Simple 12 DOF hexapod

38Khz_IR_receiver_VISHAY.pdf159.61 KB
IRremote.zip23.21 KB
Hexapod_Assembly_Manual.pdf2.93 MB
_12_DOF_Hexapod.zip2.57 KB

Now available from SparkFun!

Hexapods are a popular robot design but they tend to be either 3 servo or 18 servo. I decided to try a 12 servo hexapod with 2 DOF legs. Although this does not give the same range of motion as 3 DOF legs I found you could still travel in any direction as well as rotate on the spot.

The assembly was very simple using QuadBot legs. The robot could be easily made with chopsticks and polymorph or paint sticks and hotglue.

The hardest part for me was the math. It's been almost 20 years since I have done any trigonometry and with the legs all at 60° from each other I could not cheat like I did with Chopsticks.

After a bit of messing around I finally got some basic code running. My attached sample code controls the robots movement with 3 variables.

Speed and Angle (with Rotate=0) allows the robot to walk in any direction.
Speed, with Rotate set to plus or minus 1 (Angle is ignored) makes the robot rotate clockwise or counter clockwise.
A 4th variable, Stride changes the size of the steps.

This code was originally written for a Spider controller but since a standard Arduino controller can drive 12 servos using the servo library the code could be easily adapted for something like a Uno with a bit of prototype PCB used to mount the servo headers.

I've been lazy and plugged my IR receiver directly into digital pins 10,11 & 12.This saved me making a proper cable. Arduino I/O pins can easily handle the nominal 3mA current draw required for the receiver. See the attached datasheet. D10 is my input. D11 is set to output low (Gnd) and D12 is set to output high (Vcc).




I have added more comments to the code to make it easier to understand as well as an IR test mode that allows you to see what values your TV or DVD remote is generating. Once you know what values your remote buttons are generating you can substitute those values into the code. I was using a Sony TV remote when I wrote the sample code but the IR library will work with other remotes.

I have also attached an updated version of the IR library that will work with Arduino 1.0 as well as the older versions.




I have attached a draft of the assembly manual (Thanks Frits) and the latest sample code which uses the Stride variable to ramp the leg movements up and down when you start / stop the robot. This reduces the strain on the servos and allows to robot to return to a neutral stance when you stop. Detailed comments on most lines explain how the code works.



Now sold by SparkFun:

Good news for anyone who would like to build this robot. SparkFun are now selling this product. The third video shows it featured in the SparkFun 2012 Halloween "New Product Post" all dressed up in it's own halloween costume starting about 8:36 in the video.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

In my prototype I used a 7.4V (2200mAh) LiPo battery held in place with some cable ties. The Spider Controller needs at least 7V to drive it's switchmode power supply.

As the switchmode power supply draws high current pulses from the battery you cannot use normal alkaline batteries. 6xNiMh AA batteries or a 7.4V LiPo battery is the minimum requirement.

All the miniature servos are powered at 5V by the switchmode power supply which can handle in excess of 24V at the input.

This is the list of item I want to buy :

- Hexapod robot chassis :

- Spider controller :

- IR receiver sensor :

Is it correct ?

I have the batterie holder for 6 AA and 6xNiMh AA batteries

Yes, that will work. You should know the base has a hole so that the pan/tilt kit can be mounted as well.

Thanks you for your help !

I like the movement! and the dramatic music helps too.

Nice little critter. Unfortunately I do not have time yet to copy it with some home-available materials ;-) but thinking about to use the Aluminium i bought last time.


love it :)

Each time you post a new robot, you give us a complete package with a great idea, fully operational, worked out and explained in detail making it look very doable for those among us who are less certain about the amount of talent we possess. Again you are a great source of inspiration.

These days I am trying to simplify my robot designs to make them better suited for beginners. I am glad to know my efforts are appreciated.

That looks very nice, and thanks for sharing the code :)

I was planning to built a quadpod with 3 dof legs but now you have me thinking about trying to replicate this.