Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Search WWW Search seattlerobotics.org

Walking Stick: A First Robot

StickSide.jpg (28539 bytes)

by John Bono 9/3/2001



I found out about the Seattle Robotics Society quite by accident at my daughter’s school science fair early this year. Since at that time I was unemployed, I attended a SRS meeting and got inspired to build my first robot. With an extensive background in electronics and software but knowing nothing about robotics and related subjects, it seemed prudent to start small. This article is about my experience of building a simple "first robot". Along the way, lessons learned will be highlighted for any others just getting started.

StickFront.jpg (27480 bytes)


For fun, I wanted to build a walking robot instead of one with wheels. However, simplicity of design was a paramount concern. The concept for this robot came from the book "Robots, Androids, and Animatrons" by John Iovine. His inspiration for it came from a Mark Tilden BEAM robot. It is not necessary to purchase the book in order to build this robot since there are only a couple of pages describing it and most of the important information is covered here. The main difference between the book’s robot and my design is the change from a Stamp to an OOPic and the addition of a couple of switches and LEDs. The design comes out looking like a bug, kind of like a Praying Mantis, and my daughter Jenna was quick to name it after a bug she studied in school, the "Walking Stick". The Walking Stick was shown at the May SRS meeting.

StickBottom.jpg (25966 bytes)

Room for improvement: Controllability. For a more controllable robot, wheels are a better choice than legs. There is little ability to control direction in this robot and the surface it walks over can cause it to turn randomly. On the other hand, I didn’t have to deal with complexities of torque, speed, wheel mounting, etc..


This robot has just two servos and can be driven directly from a low end CPU, in this case an OOPic. There are no sensors. Here is the complete parts list as designed with approximate cost of the items:

Description Qty Cost Comments
OOPic CPU 1 $40 See www.oopic.com.
Servo Motors 2 $20 HiTec HS-300 or any other standard size
LEDs 2 $1  
220 ohm resistors 2 0 From scrap box. Any value from 110 to 330 ohms.
0.1 uF bypass capacitors 3 $1  
wire wrap pins ~10 $1 To allow plugging in servos & LEDs
Switches 2 $2 Single Pole Single Throw (SPDT)
Aluminum channel 1 $5 from Hardware Store (Loew’s has it)
3/32 inch steel legs 2 $6 from Hardware Store (Loew’s has it)
9V Battery holder 1 $2 from Radio Shack
2 AA battery holders 2 $4 from Radio Shack
9V battery 1 $2  
AA batteries 4 $3  
Bottle caps 4 0 from orange juice cartons or 2 liter bottles
Misc mounting hardware   $2  
Hot melt glue   $1  

Room for improvement: Cost. Even the very simplest of robots can be more complex and cost more than expected.

Room for improvement: Weight. I changed many things from the original design but did not pay attention to weight. This was perhaps the biggest of my novice mistakes.

  1. I used an OOPic controller instead of a Stamp. The OOPic is bigger and about twice as heavy.
  2. I used AA batteries when AAA size would have worked for the short durations that it is on.
  3. It needed a separate 9V battery because it is recommended to not run the OOPic and servos from the same supply. I do not know if the Basic Stamp has the same requirement but if not, its use would eliminate the 9V battery.
  4. More substantial battery holders were used than originally planned because of the shaking expected.
  5. Metal spacers were used, eight screws, and a perfboard to mount the OOPic where originally I expected two tiny bolts to be used.
  6. Two power switches were used for the separate batteries instead of a single DPDT.
  7. The body is channel aluminum instead of two bars glued to the servos in the copied design. It was extra long to accommodate sensors to be added later to the front and back. Extra long wires were used to accommodate later design enhancements.

One thing that did reduce weight was the use of smaller diameter legs from the original design. Overall the Walking Stick comes in at about a couple of pounds. Pretty heavy for a stick. Now that I’ve run it for awhile one of the servos is going out. This is probably due to the excessive loading.

Mechanical Design

The physical design starts with an aluminum channel bar as a chassis. The channel is U shaped as seen from the end. The bar I found is exactly the right size to just press fit the servos into the channel. They could also be glued. The spacing of the servos is such that the electronics fits between them. The back servo is mounted parallel to the body. The front servo is angled about 30 degrees. This angling is what causes the robot to walk, along with the bend at the "knee" level of the front leg bars.

At the time, I wanted to make a bug body out of a couple of plastic sports drink bottles that had bug-body-like ridges. So I carefully arranged the parts to fit in that envelope. This necessitated the OOPic board being mounted between the servos because the board is so wide that that location corresponded to the widest point of the body, the middle of the bottle. Since the board is under the channel bar, the batteries had to be mounted on top of the channel bar.

The legs were made from 3/32 round steel bars. To mount them, I flattened the center of them with a hammer, then drilled holes and bolted them to the servo tangs. The bending of the legs is important to make it walk. The back legs simple come out perpendicular to the body and then bend down to the feet. The front legs look the same when viewed from the front, but there is a backward bend at the knee level of about 30 degrees. This results in the "calf" of the leg being bent backward as seen from the side.

The feet are easy. Using some plastic bottle caps, one just sets a robot leg in each, and then fills them up with hot melt glue.

The 9V battery powers the OOPic and the four AA batteries power the servos. I used separate switches so that I could download code and run the CPU without the motors activating. Also, the two toggle switch handles looked like bug antennas.

Two LEDs were added for the look of eyes. This turned out to be very important for two reasons. First, they provide a simple way to start to learn to program the OOPic and make sure it is loading the program correctly. Second, one is blinked after the program ends to remind me to turn off the power.

Room for improvement: Form factor. The overall size and shape of the robot has a tremendous impact on the complexity of the mechanical layout. If building a robot to fit inside a given envelope (e.g. for sumo) it takes considerable thought to make it work.  If not building to fit an envelope, then it will be much easier to complete the mechanical aspects.

Room for improvement: Weight distribution. It was a mistake to put the batteries above the servos but I couldn’t figure out a good way to mount them lower within the confines of a planned shell for the body. Lowering the center of gravity (CG) would have made the Walking Stick more stable but as it turned out, the wide leg spacing compensated for this. If I had this to do over, I’d mount a Stamp to the top, and put AAA batteries between the servos.

Lesson learned: Feedback. The LEDs were critical to getting the CPU functioning since I don’t have much in the way of diagnostic tools like an oscilloscope. I recommend putting a couple on any robot.

Lesson learned:  Re-assembly. The design completely comes apart since wiring was done with plugs that slip over wire wrap pins. This allowed several mechanical changes after the beginning of the assembly stage.

Room for improvement:  Suitability.  After the Walking Stick was built, I realized that the uncontrollable nature of the walking meant that it was not a good platform for adding sensor based controls. This was a disappointment since I wanted to play with various sensors to learn about their operation.


The OOPic is a wonderful CPU to work with for low end applications. It’s as cheap as any other, has free software support, can be programmed in (VB-like) Basic or (C++ like) C, the documentation is really well done, the installation (on Windows 98) is simple, it’ll drive servos and LEDs directly and it all worked as claimed. The only downside for this design was the form factor. It’s about 2 inches by 3 inches.

The documentation will take you through everything you need to know to learn to program the OOPic. I started writing the program in Basic and then for just for fun, started over with C. The Basic syntax is much easier and its use is recommended for first timers.

Software Design

The final version of the complete code listing is in C. Note that most of the code is involved with blinking the LEDs in rather complex ways which are not necessary to the walking. Also note that all variables are global and that some C++ syntax is used in the OOPic’s C language, specifically the New operator and dot notation for referring to object members. Also, there is some Basic in the use of the SUB keyword.

Walking Stick Code Listing

Room for improvement:  Program size. To this day, I still don’t know how much code fits in an OOPic and how much my code fills up the memory. I do know that what started out as a very simple drive of an LED, got complex very quickly and added a lot to the program size.

Electrical Design

The design was so simple that I never produced a schematic. The only thing of importance is to make sure to match the I/O pins referred to in the software to the pins used in the hardware. These are shown in the software listing as "xxxx.IOLine" in the Initialize function.

Room for improvement:  Do schematics.  I originally forgot that two switches or a double pole switch was needed for the two power sources. I had planned on using one switch for a selection of which procedure to run but was forced to use it for power control.  The original wiring of the LEDs went to the wrong pins, also.  Now, four months later, I can’t quite remember how things are hooked up.


I had a great time building the Walking Stick. It is super simple and quite a conversation piece. I recommend it to those of you that have been coming to SRS meetings but have never dived in and actually built a robot.

Room for improvement: Time. It takes a long time to build any robot. I spent over 30 hours on this one. The modifications to the original design more than doubled the effort of what would have worked. The majority of the time, about 80%, was doing mechanical work.  However, building a robot like this is just for a hobby and it was good fun spending the time to get it just the way I wanted it.

About the Author

My background includes a decade of electronics hardware design and another decade of software design. I am currently employed as the Engineering VP at NetAcquire Corporation, makers of high speed remote data acquisition and test systems.

Copyright 2001, John Bono. Permission granted for publication in the Seattle Robotics Society Encoder online magazine.