The Halbot 3000

Looking for someone to keep you company at zine fairs? Look no further than the companionship of a good robot. Follow the Broken Pencil staff as they embark on a project to see if they can replace their boss, Hal Niedzviecki, with a mechanical replica.

By Derek Winkler and Lindsay Gibb

The staff of Broken Pencil came to an agreement at a secret meeting some months ago. We agreed on the following points:
1) Hal Niedzviecki is kind of a pain in the ass.
2) Hal Niedzviecki doesn’t really do much.
3) We should build a robot to replace Hal Niedzviecki.

And so a highly classified project was undertaken. We got the technology. We gained the capability to build the world’s first robotic cultural critic. The Halbot Mark I is that robot. Better than Hal was before. Well, flatter and quieter, at least. Here’s how we built a new Hal:

Step One: We take a fine rendering of Hal’s face, courtesy of Evan Munday, and blow it up to roughly life-size and laser-print it on glossy photopaper. (To learn how to draw such a face for yourself, please consult Munday’s step-by-step instructions in issue 40 of BP.)

Next we glue our printout to a slab of black foam board with rubber cement and carefully free it from confinement via the skillful manipulation of an X-Acto knife. Note to readers: the flatness of our robot’s head is not intended to imply that Hal is a two-dimensional kind of person. It merely indicates that we have no sculptors on-staff. Notice that the lower lip and jaw have been separated from the rest of the face.

Step Two: Welcome to the back of the Halbot’s head. The jaw is reattached using an elastic band held down with massive blobs of hot glue. But how is the Halbot to flap its jaw in the true Niedzvieckian style? This is where we get to leave the artsy-crafty stuff behind and bust out some electronic shit.

That small box above the mouth, securely fastened with copious amounts of electrical tape (again, nothing but the best for our bot), is a servo. A servo is an electric motor packed into a box with a bunch of gears and sensors. The upshot is that you can control a servo with precision. Send it the right signals (see next step) and the shaft will rotate to a certain position and stop. Attach an arm to the shaft and you can use the servo to push stuff. The arm on our servo will push the mouth open to let those cutting social observations flow forth. When the servo rotates the arm back, the rubber band shuts the Halbot up.

We got our servo, along with a matching arm and a few more electronic bits we’ll get to later, from a place in Toronto called Creatron (as mentioned earlier in skot deeming’s ‘Error State’ column on page 10). If you don’t happen to be in Toronto, you can get all the same stuff by mail order from them or RobotShop.ca. The servo we’re using is the cheapest one they’ve got. It cost $11. It’s not very responsive, but then neither is Hal. It’s also loud as hell, but then so is Hal. Now we need a way to send our control signals to the servo.

Step Three: We’re getting to the good stuff here. This is an Arduino. It’s a programmable microprocessor and a collection of supporting bits and pieces. It’s got a USB port for talking to computers, a bunch of places to plug in motors and sensors and other things that interface with the real world, and a small chunk of memory to hold your commands. It’s an open source project, meaning all the specs and source code are freely available from arduino.cc. You can even get the schematics and build your own from scratch, if you’re feeling hardcore. We just bought one. This model is called the Duemilanove and cost us about $20.

The Arduino is the shit. It’s cheap, it’s versatile and it’s easy to program. Because of this, it has become the darling of the electronics prototyping scene. The thing has become so popular so fast, it’s like an indie band just about to make the big time. We advise you to get in on it now, so later you can tell your friends that you liked the Arduino better before it went all mainstream.

The Arduino isn’t the brain of the Halbot. We’re using a computer for that. This board is more like the bot’s autonomic nervous system. It receives impulses from the computer brain and passes the messages along to the twitchy parts. We plug the servo into it and, lo, the mouth shall move. But not yet.

Step Four: All this hardware is useless without software. The Halbot requires two programs to function: one on-board the Arduino, seen here on the right, and one on a regular PC, seen on the left (*all the software we’re using is available for Windows, Mac and Linux). The two programs talk to each other via a USB cable. Once the Arduino code has been uploaded to the board, it stays there until you overwrite it with something else, so you can close the right window now if you’re following along at home.

The PC program is written in a language called Processing (processing.org). It’s also open source and freely downloadable. The Processing language was designed for artsy types who lack a formal programming background, so it’s not too hard to get stuff working. The Arduino language is a slightly modified version of Processing, so all the parts mesh together and the children play nicely.

As we mentioned above, the Arduino program is just there to pass along instructions to the Halbot’s blinky, twitchy bits. The heavy thinking is done by the Processing program. It waits a random length of time, then chooses a random nugget of Hal wisdom and bequeaths it unto the world. It does this by sending commands that cause the servo to open and close the bot’s mouth, while simultaneously playing an audio file through a pair of speakers hidden beneath the bot’s stylish T-shirt. We didn’t even spring for good speakers. These suckers cost us $12 at some Broken Computer Discount Warehouse. They sound like crap, but they have the saving grace of running on USB power, so we don’t have to rig up a separate supply. When all that’s done, the loop starts over. The program continues to loop until you either achieve enlightenment or smash the robot’s face in.

It’s beyond the scope of this article to explain how to write Processing programs, but there are many tutorials and code samples available at the website, not to mention big thick books on the subject. If you have any programming experience, picking up the basics of Processing will be easy. If you don’t, well, there’s a first time for everyone, and Processing is quite gentle with the inexperienced. Don’t be shy.

Step Five: The Halbot needs something to say. We used the most excellent open source audio editing program Audacity (audacity.sourceforge.net) to extract 15 particularly Niedzvieckiesque clips from an old recording of some radio show he once did called Subcultures. Fifteen Hal clips should be enough for anyone.

Step Six: Now, a Halbot that sits in the corner talking to itself is all well and good, but to truly recreate The Hal Experience we need a robot that will yell something at you whenever you walk past. We need to give the Halbot eyes.

We put two little red LEDs in the bot’s eyeholes, because really, what kind of robot doesn’t have glowing red eyes? But these eyes don’t pass our walkthrough test. We need a sensor; a passive infrared motion detector. This is the same kind of thing that flicks on your security floodlights when a raccoon knocks over your recycling bin. Creatron sold us a bare-bones version of the same circuit for $11 and we planted it bang in the middle of the Halbot’s forehead. Call it Hal’s third eye. Like the servo, it plugs into the Arduino. When it detects motion, it sends a signal to the Processing program on the PC, and Processing tells the robot it’s showtime. Now the Halbot is fully autonomous and interactive. The original Hal’s days are really numbered.


Step Seven: Now that the Halbot’s head is all hooked up to the computer and ready to go, Hal needs a body or he’ll just be creepy. Here you’ll need a lot of cardboard, a utility knife, the speakers, a glue gun and a ruler.

We grab a really large scrap of cardboard and start cutting it into a relatively proportionate upper-body to go with the head. Since we’ve accepted that

Halbot is two dimensional all we do is cut a rectangle for the chest, two rectangles with slanted edges at the shoulder blades to be the upper arms and a few angled pieces to create picture-frame-style rests to prop up the body.

We cut a square in the middle of the chest the same size as the two speakers side-byside so we can mount them for prime Hal audio. This required us to create a shelf for the speakers by cutting two more pieces of cardboard, one just a bit longer than the width of the hole and an angled one that measures from where you will mount your speaker shelf to the bottom of Halbot’s body to hold up the shelf and the speakers.

Step Eight: After all the pieces are cut we use the glue gun to attach the speaker shelf and the bits to prop up the body. It takes a lot of glue to hold Halbot together, so make sure you have a lot of refills for the gun on hand.

Once the glue is dry we attach the upper arms with nuts and bolts so they can swivel. Pop the speakers into place on their shelf, hook up the audio wire and the USB cable to the computer, and we’re almost ready to set Halbot loose at zine fairs.

Step Nine: The Halbot needs some clothes, so we throw a Broken Pencil T-shirt over the whole shebang (if you’re dressing your robot, make sure not to make the body too big to fit into the wardrobe). So that Halbot can one day replace the real Hal at readings too, we give him functioning hands by attaching a pair of grabber arms to the elbows with plastic zip ties and yet more tape.

To mount the head on the body we use even more electrical tape to stick the head to an empty CD spindle. It’s a skinny neck, but it keeps his head up so we’re satisfied.

Step Ten: To make the bot a bit more mobile, we put together some undercarriage. We were scraping the bottom of the ingenuity barrel by this time, so we went with a cut-down mop handle glued, tied and taped to a wheeled base that used to hold up a potted plant. The torso is attached to this spine with a bracket made from an untwisted coat hanger that fits into a couple of holes in the cardboard. Tying up the bottom of the t-shirt hides the mess.

Now that the Halbot is presentable we power up his electronic parts and wave our arms in front of his face, beckoning him to speak. “You could buy a baby,” he begins. Adding to the creep factor of the red-eyed Hal replica is the fact that the audio clips from the radio show feature what sounds like new age music in the background. “Do you ever stop and say, why am I

doing this?” he asks. Yeah, I guess so, we collectively think, looking at the life-sized cardboard Hal in front of us. But damn it was fun.

<object width=”640″ height=”390″><param name=”movie” value=”http://www.youtube.com/v/MRNUTk1e_jw&rel=0&hl=en_US&feature=player_embedded&version=3″></param><param name=”allowFullScreen” value=”true”></param><param name=”allowScriptAccess” value=”always”></param><embed src=”http://www.youtube.com/v/MRNUTk1e_jw&rel=0&hl=en_US&feature=player_embedded&version=3″ type=”application/x-shockwave-flash” allowfullscreen=”true” allowScriptAccess=”always” width=”640″ height=”390″></embed></object>

 

1 thought on “The Halbot 3000

  1. I think many Boards of Education down here in the U.S. would love to replace their teachers with lots of Halbots.
    This is good stuff.

Comments are closed.