Simple 12 DOF hexapod

 
AttachmentSize
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! https://www.sparkfun.com/products/11497

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).

 


 

Update:

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.

 


 

Update:

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.

It would be cool to see a home made version of this. I have now updated the code and attached an improved version of Ken Sherriff's IR library that will work on Arduino V1.0 as well as the older version.

I wonder if LMR would ever add a 'LIKE' Button!!

Fantastic!

This robot, servo clutches, micro magician controller,  you are an amazing, creative and talented guy, will Dagu kit this, I hope so. This bot just looks like alot of fun, congrats!

Yes this will become a kit for those who don't want to mess around with chopsticks and polymorph. The kit will include magnetic servo clutches to help the robot survive battles with pets and small children.

Great Job! I like the gait.

What do magnetic servo clutches do in this robot? How do they help the robot to survive in battles with pets?

Unfortunately during testing we found that the clutches were not strong enough for the legs although they are perfect for low torque applications such as sensor pan/tilt kits.

The magnetic clutch would slip when excessive torque was applied thus preventing the gears from being damaged. Effectively the leg joins could bend under excessive load without straining the servos to the point of damaging the gears.