Does this project spark your interest?

Become a member to follow this project and don't miss any updates

Stubby the (Teaching) Hexapod

100% open source robot platform with accessability and affordability in mind: teaching children of all ages about robots & programming

26 133 94
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 04/09/2014 and last updated 2 days ago.

I have wanted to make a walker-style robot for a while, thanks to shows like Stargate SG-1. Stubby is the evolution of this, and is currently a 3DoF walking robot with a full inverse kinematics engine. I plan on using this as a base to teach children programming concepts by implementing an API for beginniner's programming languages.

What sets it apart from other hexapods is that it a) it can be controlled programmatically by beginning programmers, b) is run by a single AVR chip (ATMega 1284), including movement and PWM, c) is designed in such a way that it can be driven by very cheap, micro servos (I am currently using $2, 9 gram servos), d) has a wooden (MDF) frame cut on a scroll saw, e) is designed with budget in mind (you can make one for around $150 worth of supplies and minimal simple tools).

See for more information.

This video shows off version 3, including various features of the Inverse Kinematics engine:

This project is my first experience with walking robots. The concept is loosely based off of the SG-1 universe's replicators, although there are definitely differences. Stubby version 3 has six legs with three DOF per leg, whereas the replicators have four legs with four DOF per leg. Then there is the whole thing of Stubby not being able to consume raw resources to construct copies of itself... I figure I will add that feature in the next version.

My kids (especially my 6 year old daughter) have been bugging me for a while to make a robot with them, and I figured that this would be a good introduction to it, plus would make for some interesting programming challenges for myself.  (In actual practice, the hardest part has been the frame design; building the frame with a limitation of servo strength requires knowledge of levers and mechanical advantage that I have not had to use since grade school!)

We got the first version working without much problem.  It was a very simple design, with the servos directly connected to the legs.  This made for an easy frame design, but even at 400g total robot weight, the servos were only barely able to support the weight of the robot.  It worked but it didn't work well, and you could hear 'buzzing' frequently when the center of gravity put too much strain on a single servo.

The second version was much more complex mechanically.  It was designed from the ground up with the objective of fully mechanical joints, with the servos only being used to drive the joints, using mechanical advantage to decrease the torque on the servos.  Version 2 can move forward and backwards, and can rotate in place.

Version 3 (the one featured in the above video) is a complete re-design, with 3-DOF per leg (18 servos total) and a full inverse kinematics engine.  It can move in any direction, rotate in place (and turn while moving), can perform body translation along XYZ axis, and can perform body rotation along XYZ axis (pitch / roll / yaw).  It includes built in calibration for each leg, a battery monitor, etc.  It weighs 594g, including 4x AA batteries.

Future plans for The Hackaday Prize are to implement a computer controlled API to allow for teaching programming and robotics concepts to children.  See my entry video for more details:

  • 1 × See for BOM

Project logs
  • Board Modifications (With Videos)

    2 days ago • 0 comments

    I finally found the time to perform the board and frame modifications I had planned.  There were a few changes which were outstanding:

    • Add all three 2200uF capacitors to try to smooth the power supply fluctuations a bit (powering 18 servos from 4x AA batteries results in massive voltage drops when all 18 servos are moving; see the video below for a visualization of this)
    • Flip the radio connector to the top of the board, so that you can swap radio modules without taking the entire control board off the frame
    • Re-cut the servo layer to include the new brace holes (to prevent the servo layer from wiggling back and forth when the coxa joints move)

    First off, we have the filtering capacitors.  I took before and after measurements on my shiny 'new' $40 oscilloscope to see what has changed.  For the first test, I had no capacitors on the battery line, and I had a single 470uF capacitor on the 3.3v line.  This is sufficient for reliable operation (if you don't have the capacitor on 3.3v, the AVR will brown out and reset as soon as the robot starts to move).

    These videos show the unfiltered battery line and the 470uF capacitor on 3.3v.  In these and the next two videos, I have the scope set to DC coupling mode, with 1 line on the screen equating to 2 volts:

    As you can see, on the battery supply we drop from a nominal 4.8 - 5v to as low as about 2v at the lowest point.  Likewise, the 3.3v supply will drop to about 2.2v at its lowest (thanks to the 470uF cap).

    I then proceeded to add the capacitors.  I put one 2200uF cap on each side's servo power supply rail, and one on 3.3v:

    (I had already removed the female headers for the radio from the bottom layer)

    After I had everything back together again, I re-tested.  The results are not perfect, but are much better:

    The battery line now does not seem to drop below about 3v, and there is no visible ripple in the 3.3v line.  (Eventually I will take a look at things in AC coupled mode with a higher resolution, but for now this is sufficient to show what a very real difference can be made with 3 big capacitors.)

    Next, the radio has been moved to the top of the board to allow easy access and swapping.  To do this, I desoldered the female headers from the bottom of the board.  I then re-soldered one of them on the top (on the row beside the AVR).  I soldered some jumper wire between the old and the new headers.  The picture of this happens to be the same one as the picture showing off the capacitors, so here it is again (the first three pins are 3.3v, RX, and TX; pin 10 is GND):

    The top side of the board looks a lot cleaner.  You can see the headers beside the AVR:

    Finally we have some shots of the control board sporting interchangeable radio modules:

    Both of these radio modules are attached via custom breakout boards I designed.  I am not sure, but I don't think the Sparkfun board would fit here - sorry! :-(  I am planning a rev2 board which will have the breakouts included as panelized additions... if I ever finish that, it will be a bit easier to support interchangeable radios.

    Finally, the frame needed some work to bring it up to the latest plans.  I designed this change a while back, but didn't implement it as it would have entailed taking apart the entire robot, and I wanted to do that along with all other changes (unscrewing lock nuts which have been placed far down a threaded rod takes a long time...)

    The finished, re-assembled version is here:

    (In particular, node the 2" screws going up from the bottom and through the servo layer.  I probably should have used threaded rod and gone through all three layers like I tell other people to do in the plans, but that would have required taking even more stuff apart, and it was getting late already).

    Now that I can swap radio modules on the fly, the next step is to verify that the bluetooth module works.  I hope to have time for that Read more »

  • Reflow Soldering Success

    12 days ago • 0 comments

    Today I successfully completed by first reflow soldering attempt using a heat gun.  My first try was with a junk SOIC chip on an extra board I had lying around... it worked perfectly the first time (I ended up with a bit of a solder bridge between two pins, but that easily cleaned up).  I cannot test this chip to verify that it works, but I did continuity checks on all the pins and that worked fine:

    My second attempt was with a HC-05 (or possibly HC-06... my particular boards have characteristics of both of these boards), trying to solder it to a simple breakout which I designed.  This breakout has the same pinout as the Sparkfun XBee breakout, which means that I can use it interchangeably with Stubby to allow it to be controlled by the computer.  (This board has quite large pads, and I could have easily soldered it by hand using an iron, but I wanted to practice my reflow technique).  This time I was able to actually verify that the circuit worked, by hooking it up to my FTDI cable (via a level adaptor).  Sure enough, it works great:

    Tomorrow I am expecting to get a bunch of parts from Digikey, which will give me plenty of more practice with reflow soldering, including a nice fine pitched TQFP-32 package.

    (This post is not directly related to Stubby, as reflow soldering is not required to build the control board.  However, I get to show off my newest skill, and the end result is that I now have a Bluetooth breakout for Stubby, so I figure it qualifies for this project.)


  • Ongoing Development Efforts: The Hackaday Prize

    17 days ago • 0 comments

    While the main Stubby build is completed, it is far from over as a development and teaching platform.  My goal, and the objective of my entry to The Hackaday Prize, is to use Stubby to help teach children basic programming concepts such as calling functions, creating and reading variables, executing control loops, and checking conditional logic. When you are learning to program for the first time, it is much more exciting to see an actual robot bow to your wishes, rather than see 'Hello, World' printing in a text console.

    In order to do this, there are a few things which need to be done:

    • Replace XBee with a bluetooth module to allow bi-directional communication with a computer
    • Connect various sensors (Ultrasonic distance sensor, light sensors, etc)
    • Design and implement an API for use with various introductory programming languages (I am thinking things like Python and Wiring at this point) to allow simple interaction with Stubby via a custom program.

    Check back often, or follow this project for updates!

View all 39 project logs

Build instructions


GoatZero wrote 10 days ago null point

Hello Wyatt thanks for all the help, and for keeping updated your log and project page,

I already got most of the components already, i just have to find the xbee modules you used since i have never used radio communication modules before reason of why im a bit confused, i will get 2 for both the PS2 controller and stubby, wherever i look (mostly ebay) i find way to many versions of the xbee, and the breakout board, some are way to expensive others are not, im a bit confused about which one is it, could you point me out in the right one please?

Are you sure? [yes] / [no]

The Big One wrote 9 days ago null point

I had some XBee Pro version 1 modules from a previous project. There are a few things to note when choosing this:

1) Make sure you get Series 1, not Series 2. They are different, and not compatible. (Series 2 may be fine, but I have no experience with it and cannot say for certain)
2) XBee Pro have a much longer range than normal XBee. Long range is probably not required for this project, so you can go with the cheaper modules unless you think you may be re-using them for other stuff.
3) I think that these ones should work fine: . However, the ones I used are:
4) Since you don't already have any RF stuff (i.e. no legacy requirements), you could really use anything that gives you a transparent serial port and runs at 3.3v. Basically, the interface Stubby is expecting is to be able to send data over the serial port. whatever radio you pick, it only needs to transparently send data which it receives over the serial port. For instance, I am working on using Bluetooth SPP modules for this (will be controlled by the computer).

Hope this helps! Let me know...


Are you sure? [yes] / [no]

David S wrote 14 days ago null point

Hey - if you still have extra PCBs, I'd like to buy one from you. I'm going to try your build with 3D printed parts :)

Are you sure? [yes] / [no]

The Big One wrote 13 days ago null point

Yep, I still have a few. Send me an email with your address and I can verify cost and provide details. My email address is in the contact section of


Are you sure? [yes] / [no]

GoatZero wrote 18 days ago null point

Wyatt, I have several questions regarding your project which im already in the process to replicate and if possible to improve in order to learn something more, Here come a bunch of newbie questions, please brace yourself for my ignorance

1.- What exactly which servos did you use?, I found this “$2” 9g servos in hobby king,

Assuming I replace the top of the frame with some modified MDF roof in order to make it able to carry stuff around while it moves (Increasing the weight) would higher weight servos accomplish this?

3.- This one is just to make sure I understand how to use a Xbee, if the PS2 controller has been modified like yours , I will need another module of the Xbee placed into stubby, , module, Stubby will need another one right however since I don't have a model at hand ?

4.- I have programed PICs 18F… using a pickit2, however I wanted to ask you exactly which programmer and what software did you use in order to program the AVR pic

5.- At the component list for stubby “1x Control PCB” can be found however I find this confusing

6.- Any chance you post some pictures of the assembled and soldered PCB and the connection with the Xbee?

7.- What software did you use to make the MDF designs? i tried using Corel, Ilustrator and Autocad to open them and review them with no luck until now, they do open but all messed up

8.- I just noticed you just updated the Assembly Instructions in your project page, they are very detailed, great job Any chance we can get some high resolution pictures?

Are you sure? [yes] / [no]

The Big One wrote 18 days ago null point

Hi there.

No worries about questions... 3 months ago I was in exactly the same place! :-)

1) Those are the servos which I used. (The price has gone up a bit... when I bought them, they actually were $2, not $2.25. The blue version, , is a bit cheaper and I would assume that it works too, but I can't say for sure.)

2) If you wanted it to carry anything substantial (anything more than 25g or so - it is already borderline as far as weight is concerned), I would definitely want to use larger servos. The problem with that is that larger servos will not fit in the frame I designed, so you would have to modify it. Now, this is not very hard, but would involve using a CAD program (I used QCad and can highly recommend it), and that may have a bit of a learning curve if you have not used a CAD program in the past. More specifically, the coxa servos should be fine as they are, with the smaller servos (there is not a lot of load placed on these ones), The servos driving the femur and tibia should be larger, though.

3) Correct, you need two XBees to communicate with each other. The design really only calls for some sort of serial communication, though, so you could use any module that provides serial communication at 3.3v. I am planning on putting one of those cheap serial Bluetooth modules on Stubby sometime (in which case you would control it with the computer). Other options could include various eBay serial modules, or even just a cable for testing. You would probably have to tweak the software a bit, as right now it is relying on the protocol from my Universal Controller, but that is not a big deal.

4) I am using LadyAda's USBTinyISP programmer ( The software is AVR-GCC (compiler) and AVRDude (to upload programs). I have no idea how to get this installed in Windows, but on Debian it is easy (install avr-libc and avrdude) and on Mac I just use Crosspack ( I know you can do it on Windows, I just don't know how. To compile everything, clone the git repo, go to projects/stubby/source and type 'make'. To install, 'make install'. To set the fuses on the AVR, 'make fuse'. You can verify that you have everything installed properly before buying a single item, by trying 'make program'. It will fail to upload, of course, but the error should be from avrdude saying the programmer is not found, rather than from the OS saying avrdude is not found.

5) The control board is a PCB which I have designed and ordered from (the design looks like I have a few extra which I can send via letter mail for $5 if you are in the USA ($4 for Canada, a bit more for international depending on the country in question). This board uses a lot of surface mount resistors and capacitors, but is solderable using a normal soldering iron as long as you have steady hands. Look for Youtube videos on how to solder 0603 SMD components by hand. Alternatively, you can wire up everything by hand using a protoboard and through hole components according to the schematics (this is what I used at first, while still designing the circuit). The schematic is at

6) Pictures are at

7) I used QCad for the frame design. I don't have access to any of those other programs, so have no idea how compatible they are.

8) Which pictures do you want higher resolution versions of? I kept them small to conserve bandwidth on my site (and since most of those pictures don't really need great detail, as they are just showing how things attach together), but I could link to some higher resolution ones if needed. Just let me know...

Hope this helps; please feel free to ask if you have other questions.


Are you sure? [yes] / [no]

APBurner wrote 23 days ago null point

I am new at ordering boards. Which file do I send to the board service.

Are you sure? [yes] / [no]

The Big One wrote 22 days ago null point

Look at;a=history;f=projects/stubby/kicad/gerber/;h=85ca159d7bad2bafbfc147f382d2850806c3176f;hb=HEAD . The file itself is stubby/kicad/gerber/ The one which I ordered is the older one (last updated 2014-05-21). I have since updated the design to include some fat capacitors on the bottom to help filter the large voltage drain that running 18 servos at the same time will do.

(Strictly speaking, you only need one of the three capacitors: the one which filters between GND and 3v3. If you don't have this one, the AVR will brown out when all the servos are moving at the same time. However, you could use the original design and just solder a cap on the expansion port, where I have already broken out GND, 3v3, VBAT, and A0-A2: this is what I have done.) I have the caps marked as 2200uF for the two capacitors on VBAT, and 470uF for the one on 3v3, although I am probably going to use a 2200uF one for all three. Currently I have a 470uF on 3v3 and that works, but larger wouldn't really hurt for something like this.

As to which one you should choose, that is really up to you. The original one is guaranteed to be correct, since it is the one which I had ordered. The new one should be fine, and has the advantage of some more capacitor holes, but I have not tried it myself.

Regardless of which one you choose, I would recommend uploading to a gerber viewing site (I use and verify that things look right. (Look for things like holes not matching the solder mask, etc).

Finally, depending on where you are located, it may be easier / cheaper / faster for me to send you one of my boards. (You get 10 per order, and I only needed a couple). This would probably cost about $4 or $5 for one board, depending on exactly where you are located. Email me if you are interested. (Offer open to anyone pending interest and availability... first come, first served).


Are you sure? [yes] / [no]

APBurner wrote 23 days ago null point

So I have started cutting out the pieces for Stubby and find the cutting very easy. The plan is well thought out. I have found something that will make it easier on those that try this. Before you cut the leg pieces off the board cut the holes for the servos. Then you have something to hold onto and can control the cutting better, Don't ask me how I know LOL. I am cutting it out of 1/4 inch Baltic Birch plywood, Only because I am a scroller two and have a bunch already on hand.

Are you sure? [yes] / [no]

The Big One wrote 23 days ago null point

That's a great idea... I cut them out after, and my hand was very close to the blade... it was a bit scary for some parts ;-)


Are you sure? [yes] / [no]

brian kame wrote 24 days ago null point

I love it!

Are you sure? [yes] / [no]

GoatZero wrote 24 days ago null point

This is really amazing, just to see how much has this evolved from V1 to the current V3, i cant wait to see V3 with 2.0 legs

I noticed you wrote in your digital cave that you sent your PCB design to china and got it made there, I was wondering if there was a way for you to share where did you sent it, I would love to attempt to send my future PCB designs the same way and get them delivered if possible

Also, this is the 1st time I hear about using painters tape on MDF in order to cut it, I tried googling to find a technique that describes what you tried to explain with “cover your MDF with painters tape and glue the design to the tape” however I didnt really understood that step, i found lots of painters using it to make messy art tho

also, just curious, around how much time do the 4 AA batteries last in stubby??

Are you sure? [yes] / [no]

The Big One wrote 23 days ago null point


I used to print this board (it was featured on HackaDay a few months back). In the past, I have also used seeedstudio's Fusion PCB (very similar). I can highly recommend both services. About 7 years ago I also got a larger PCB printed by working directly with a fab house (this was before hobby boards were really a thing); I would not recommend doing that, as it cost *way* more (IIRC it was around $100 for tooling costs alone).

Covering the wood with painters tape (or similar) is a fairly common approach when using a scroll saw. The idea is that you cover the wood with tape, and then glue the plans to the tape. You can then easily cut along the lines exactly as they appeared on the computer. When you are done, the tape removes easily without any residue. I have seen some people recommend covering the plans with a layer of packing tape as well, but I have not tried that. (I am quite new at using a scroll saw, so am not the best to ask about this... I am sure that if you ask in a scroll sawing forum, or possibly even ask APBurner (commented above), they could give you great info.

4x fully charged AA batteries lasted abour 30 - 45 minutes of continuous use in Stubby v2. I have not run Stubby v3 straight for that long, but given the fact that a) there are more servos and b) those servos are doing more work (version 2 was supported mostly by the joints; version 3 puts more load on the servos), I would guess that the batteries will last about half as long... I would be surprised if they last more than 30 minutes.

I have a battery monitor on this version, consisting of a voltage divider feeding an ADC channel. It is very interesting to see how much the voltage drops whenever Stubby moves. It may have actually been a good idea to use 5 batteries, but I didn't have the space or the battery holder to do this.


Are you sure? [yes] / [no]

x3n0x wrote 25 days ago null point

Sweet! excellent work! I want to scale it up about 2-3x. You wouldn't happen to have an SVG or DXF of the parts would you? That would make it easy to scale up! Coupled with a different building material and some nice beefy servos, it would be a fearsome beast at the local RC gatherings...

Are you sure? [yes] / [no]

The Big One wrote 25 days ago null point

Yep, I do have a .dxf - look in my git repo (now with 42% more Web Interface!) at;a=tree, and browse to projects/stubby/frame/frame_3dof_radial.dxf. I used QCad to design it, and have not used any other design programs so I can't say how compatible it is with Autocad, etc, but I would imagine it Just Works...

If you do end up building a larger version, please drop me an email... I would love to see an all-grown-up version of Stubby! ;-)


Are you sure? [yes] / [no]

Joshua wrote 25 days ago null point

Good work, looks very well thought out. I like the name too, fits the cheerful whirring, buzzing and clacking along. I like the idea of unloading the servos as much as possible, simply design something well and use some proper mechanics rather than just going the easy way and bolting to the servo arms.
One thing I noticed was that sometimes the servo arms in the lower leg look like they get pretty close to the ground, just thought with some roll and translate positions they might catch stuff. Also have you tried rubber feet or does the slight degree of play in footing help to keep things unloaded?
I want to make a hexapod too. At the very least I will be repurposing some of my old PS1 and 2 controllers as you have. Thanks!

Are you sure? [yes] / [no]

The Big One wrote 25 days ago null point


The servo arms have not caught on anything yet, although they may if you walk in deep shag carpet or something.

Somewhat on that note, in general, I *am* pretty limited in what I can do with the Z axis. I cap the Z offsets at +/- 15mm in software; the hardware can do a little bit more, but not much (maybe 17mm if I am lucky). The limitation here is the servos: they are so small and weak that I needed to use push rods and trade mobility for torque in order to even get the thing to stand. If you have stronger servos, you could move the push rod connection point closer to the joint, which would allow for more movement distance for a given servo rotation; that would in turn allow for more height. The same torque limitation is what constrains the length of the legs: make the leg too long, and the servo is fighting against a lot more leverage.

I have considered rubber feet, and I may end up adding them, but this works pretty well already. It is much quieter in real life than it seems in the video (the problem is that the camera's microphone faces forward, and I was behind the camera when talking, so my voice is quiet and the footsteps are loud). The slight slippage does tend to help prevent overloading the servos (although that being said, Stubby works fine on carpet as well, and there is no slipping there).

I do notice that the roll math seems a bit off... for instance there is one point in the video where a leg is lifted right off the ground when demonstrating the roll. I should probably re-work that section (I am currently cheating and just doing two rotations on the XZ and YZ axis, rather than doing a single rotation on an arbitrary axis. My linear algebra is a bit too rusty to figure that out... I guess it has been too long since I was in University!)


Are you sure? [yes] / [no]

Frankstripod wrote 3 months ago null point

Thank you for the push rod soldering video and pictures :)

Are you sure? [yes] / [no]

The Big One wrote 3 months ago null point

No problem, hope they are helpful!


Are you sure? [yes] / [no]

Mike Szczys wrote 3 months ago null point

Remarkable fabrication!

Are you sure? [yes] / [no]

The Big One wrote 3 months ago null point

Thank you! Version 3 is coming along nicely, and is even more intricate than version 2 was... I am really wishing I had a CNC at this point! ;-)

Are you sure? [yes] / [no]

Mike Szczys wrote 3 months ago null point

I can understand how a CNC would help out a lot. But to tell you the truth, as your first CNC project i might take just as long as doing it by hand.

All my robot projects have been wheel-based. Seeing this I'm super tempted to try my hand at a hex build.

Are you sure? [yes] / [no]

jfw wrote 3 months ago null point

This looks great, I'd love to use this for inspiration.

The bolts-as-bearings look pretty chunky -- how come it wasn't them bearing the weight in V1, instead of the weight being transmitted to the servos?

Are you sure? [yes] / [no]

The Big One wrote 3 months ago null point

Version 1 didn't have the bolts / axels at all... the legs were directly connected to the servos. (This seems to be standard for most simple hexapod designs, just because it is stupid easy to assemble and program - see for instance the Sparkfun kit at

You can see a picture of the old version at

The new version is more than twice as heavy as the old one (almost 1kg, vs 400g previously), but essentially none of the weight is being borne by the servos, so it actually works out much better. The only downside is when walking on thick carpet: since it is heavier, it tends to sink in more, which means that the tips of the legs can sometime get caught when trying to lift up. Walking slowly can mitigate this, but even then I am more comfortable walking on smooth surfaces.

I currently have some el-cheapo ball bearing units on order from eBay; I am mulling over the possibility of changing the leg design yet again, to get rid of the bolts and use a real bearing assembly, plus add another joint for the third degree of freedom. Even if I choose to do this, these changes won't be for another month or so, though.


Are you sure? [yes] / [no]

Eric Evenchick wrote 3 months ago null point

Neat to see a homemade hexapod build with the goal of being affordable, as opposed to the many that use off the shelf kits.

Are you sure? [yes] / [no]

The Big One wrote 3 months ago null point

Thanks! It has been very fun so far... I find the designing / making of a given project to be the fun part; to me, buying an off-the-shelf robot kit would only serve to rob me of the hours of pleasure I would otherwise get.

Once I finalize all of the build details I will be writing up instructions + BOM. I anticipate a total build cost of somewhere in the neighbourhood of $150 - $200, assuming you need to buy everything. I have been lucky to have much of what I need already (most of the electronics, wood for the chassis, etc); all I really needed to buy so far was servos (less than $50 inc. shipping), the aluminum for the v2.0 legs, and some hardware for the v2.0 joints. Assuming the design does not need to change much from where it stands now, I don't foresee the need for much else.

Stay tuned for more details!


Are you sure? [yes] / [no]