Bugbot

I recently built up a hexapod walker robot that uses three servos. I suspect that it is quite similar to the Parallax hexapod "Victor". I saw this on their web page and thought to myself, I wonder how they did that? So I went home and designed one. Mine also uses a Parallax Basic Stamp I for its brains, and let me tell you, its all this controller can do just to make the bug walk! Walking is MUCH more complex than just rolling! I will have more details and pics soon.

Click here for bigger shot

Construction and Discussion

The Body and Legs

The body of my hexapod is made from plain Radio Shack protoboard, no copper or traces. Its super light (critical) and fairly rigid - unfortunately, its also kind of fragile. The dimensions are roughly 6 1/2 inches long by 3 1/2 inches wide. There are two cutouts for the outer leg servos, they are 3/4 inch from the rear of the board. The dimensions of the cutouts will be determined by the size of the servos that you will be using. It works, but I have to be careful about drilling bending and tightening things. This could just as easily been a piece of hobby grade bass wood, aluminum or plexiglass.

view from above the side

The legs are made from old PC boards that I was throwing out (PC I/O cards). I used a torch to unsolder mass quantities of parts and then a scroll saw to chop out the different pieces. I ran out for the center legs so just used what I could find there. This center leg should be as long as the outer legs stick out from the side of the robot. This center servo is mounted such that the center point of the servo horn is dead-center on the chassis plate and equidistant between the front and rear legs. The center leg spar is mounted at the "low" point on the servo wheel, and not through the center of the wheel. This introduces a bit of sway in the motion of the robot. The two end servos are mounted using screws, the center servo is mounted with servo tape (sticky on both sides) and is tie-wrapped to the main chassis plate.

Bottom look

Each leg is made up of two pieces, the horizontal spar that connects to either a servo or a pivot joint, and a vertical one that connects to the horizontal spar. The legs are about 1/2 inch wide, this was arbitrary on my part, its how wide they needed to be for me to get the number of leg pieces that I wanted from the PCB that I hacked apart! The upper (horizontal) pieces of the outer legs are 2 1/2 inches long, as are the lower (vertical) pieces of the legs. The pieces are held together with hot glue, great stuff. There is a notch cut into the upper leg section into which the lower leg piece is fitted. This allows some forward/backward flexibility of the legs. The legs are mounted equidistant from each other to maximize the "bug" look. I then glued 1/2 inch rubber grommets to the "foot" of each leg so that it could get better traction and not snag on carpeting.

Look at the legs

This little bugger uses three un-modified servos to move the legs. The front and rear legs are tied together with a drag link coupling. The rear legs are attached to servo horn wheels and their center points pass through the center of the servo for maximum power transfer. The front legs are attached at a simple pivot joint carefully done to provide low friction with low slop. The front/rear servos are mounted about 90% to the back of the chassis and are mounted in holes cut into the main deck to hold them. The center "legs" is really a single beam with feet on either side.

The Controller

The brain of the bugbot is a Parallax BASIC Stamp I. Its at its limits to run this robot though it does work just fine. The bugbot can walk forward, go in reverse (clumsily) and turn left and right. The only additional circuitry required is a 10K pullup resistor for the front bumper switch detectors, and the IR object detection module.

Circuit diagram
Bugbot circuit and electronics. Uses a Parallax Stamp I and the DPRG 12C508 PIC IR detection solution. Has a small piezo speaker, bump switch, three servos used, IR left and right detection with an IR disable line. All of this is mounted on a Radio Shack proto board, the one that has a 24 pin DIP in the center with traces going to pads around the edges, I also drilled a few more holes and cut some traces to make stuff line up better. The IR module is on another such RS board and is connected via a 5-pin connector and cable. A program jack is included so that the robot can be programmed while still all connected, its quicker that way.

Sensors

IR Sensor

This robot uses my latest design in IR detection. A PIC 12C508 based solution that handles all of the noise filtering and signal debouncing and verification. This is the code that powers the PIC, I recently have perfected (read, good enough) the design of it. My design uses the DPRG PCB layout, and 12C508 pinout. Why re-design the wheel? However, it uses my own code for the actual object detection. It has a five pin connector on it for [+5, G, /Disable, Left, Right] signals and power. The /Disable is an input to the circuit, the Left and Right signals are outputs for the robot controller to read.

Conceivably, you could put the IR sensor electronics on the same board as the Stamp controller and simplify your life. It just wouldn't be as modular that way, but it would be an easy way to move controllers from robot to robot and only have to change the programming.

Bumper Switches

My front bumper switch doesn't work very well. A better design is to use two micro switches with levers on them. The "whiskers" would thus cross in the middle and extend as far as the outside of the front legs. Each switch would then be controlled by one whisker side and the switches would be wired in parallel so that a contact on either one would signal a collision. Use 1mm or 3/32 inch piano wire for the whiskers. These will then be flexible but strong enough to move the switch.

The Software

This is all written in Parallax PBASIC for a Stamp I controller. It is an experiment to see just how far I can push a Stamp I! A walking robot is far more complex to control than a rolling one because you have to coordinate all those legs to get any kind of coherent motion. This bot has a full suite of environment sensors as well, so it should prove quite capable. Here is the source code for my Bugbot. Its pretty terse, but seems to work quite well! <Bugbot Program>

How Does it Walk?

Aha, glad you asked. This was the most challenging, and hence, the most fun part of the project. The Bugbot walks with a tripod gate so common with insects. In general, this is the procedure to walk forward:

To move backward do this in reverse, to turn, move one set of legs forward and one set backward at the same time while centering the middle legs off of the surface. Whenever the Bugbot is turning or backing up it seems to "rear up", its very creepy, it really looks bug-like. The robot tends to sway side-to-side, and would really be cool if I had faster servos that would make it truly "scuttle" about!

Quicktime Movies

Bugbot backing up and turning away
Bugbot doing a backup and turn away

Approximate Costs and Component Breakdowns

I may not have listed everything, I have a pretty extensive electronic/mechanical/RC/etc. junkbox in my playroom, but this is what I can remember and scrape up while in front of a keyboard.

Stamp I SIPP     $34.00
PC/proto boards  $ 4.00 (Radio Shack)
Servos           $30.00
wire/conn/switch $ 4.00
Legs (hacked up) Free
piano wire       $ 0.40
glue/misc. stuff $ ??   just junk lying around, robotics needs good junk box.
Sharp 38KHz IRM  $ 3.60 (Radio Shack)
IR LEDs          $ 3.40 (Radio Shack)
PIC 12C508       $ 1.70
LEDs/caps/res.   $ 1.00

Obviously the PIC programmer, laptop programmer for the Stamp, soldering iron, etc other tools are extra. Using the Morgan State Stamp II kits ($25) could have given me a cheaper, more capable brain as well, but it would require building the circuit board for that (which I am currently designing, anyone else interested in them?). In my case also, I have LOTS of old RC servos lying around, so that cost was really zero for me, I just included the common cost via mailorder of low-end hobby servos that are basically either Futaba or Cirrus.

There are many correct answers when building this kind of robot. Imagination is the most important tool in your toolbox. Don't be afraid to try something, you learn from your failures.