Instructables

How to build a wireless hexapod robot

FeaturedContest Winner
Picture of How to build a wireless hexapod robot
Here's a video of it in action.

Facebook page so you can keep up to date on v2

Have you completed this instructable?  Send me pictures and I'll add it on this page!

When completed, you will have a walking robot that is about 2 feet wide and stands as much as a foot tall.  It has lots of room for added features and improvements so feel free to use it for your own robotics experiments or share your improvements with others.

Build time is about 3-5 hours and it is not the easiest project.  You could burn yourself.  You could electrocute yourself.  You could fry the circuits and let the magic smoke out.  There is no warranty.  SO:  Take breaks.  Wash your hands.  Drink lots of water.

Tools and supplies you will need (not listed in the bill of materials):
  • a soldering iron
  • large phillips screwdriver
  • small slotted screwdriver
  • pliers
  • wire strippers
  • helping hands (optional, and very helpful)
  • windows PC (with optional bluetooth)
  • USB cable (think the square style that usually goes in a printer)
  • electrical tape
Skills you will need (or learn as you go):
  • wire stripping
  • soldering

TIP: Get a friend or SO to help! "I hold the part while you screw this bit here, then we switch."
 

 
Remove these adsRemove these ads by Signing Up

Step 1: Acquiring materials

Option 1: get all the parts yourself
Most of the parts listed here can be obtained at your local electronics store.
DisplayDuino and ServoBoard are sold through Sparkfun.com.
Source code and DXF files for unique parts are available online from http://visual-hexapod.sourceforge.net/
You will have to the parts yourself.  I used 2mm Acrylic though you may want to try aluminum or some other material.  I recommend a CNC machine.
Some of the parts come from lynxmotion.  Shipping costs vary.

If you download the source code you will find the DXF part files in /trunk/other/part layout.dxf

Option 2: get all the parts in a kit
It costs more but it's a lot more convenient.  The extra money will fund further developments of your robot and other future robots.

get the kit

Editor's note: I did a search among the online hexapod retailers I know.  For the equivalent closed-source kit you'd either pay about £630 or $1200, depending on who your order from.  I'm offering the full kit + shipping for $999.  Don't take my word for it - if you find a better price, send me a private message please!

Step 2: Soldering - The most dangerous step

IMG_0100.JPG
IMG_0102.JPG
The logic controller on the ServoBoard is powered separately from the servos so that different kinds of servos can be attached to the same board.  Great for most people, extra work for us - we need to wire them all up to a single, simple plug.  Personally, I love to solder. I'm not very good at it, but I love it.

Solder together the power supply for the servos. (fig 1)

Solder together the power supply from the battery packs (fig 2). Repeat for the other battery pack.

Solder the male pins of the molex to middle four holes of the BlueSmirf. (fig 3)  PCB soldering is different from wire-wire soldering.  There are lots of youtube videos to help you learn how.

Solder four wires to the female end of the molex. (fig 4)

Solder together the power supply for the DisplayDuino and ServoBoard. 

TIP: Check that your connections are good. You don't want to have to repeat this later!
 

Step 3: Mounting - The easiest step

Picture of Mounting - The easiest step
IMG_0104.JPG
Attach the gears, the ServoBoard, and the 60mm spacers to the top. (fig 1)

Attach the DisplayDuino to the bottom plate. (fig 2)

The two boards will face each other when the hexapod is assembled.

Step 4: Wiring (1) - The most "Hey man, I just work here" step

Picture of Wiring (1) - The most
Wire the power supply into the ServoBoard (fig 1, A).

Wire the RS485 connection between the ServoBoard and DisplayDuino. (fig 1, B)
A to A, B to B, C to C. The resistors go from A to B on each board (the outer pins).

Wire the VCC line to the DD's +5V. Wire the GND line to the DD's GND. (fig 1, C)

Wire the TX line to the DD's RX0. Wire the RX line to the DD's TX0. (fig 1, D)

Remove the pin from the DisplayDuino (fig 1, E). This tells the DisplayDuino to draw power from the power supply instead of the USB connection.

Wire a the first hole on the BlueSmirf to the last hole. Try to not cover up the LED lights on the front. (fig 2, A)

Connect the molex halves together.

Disconnect the molex. Store the BlueSmirf somewhere safe.

Step 7: Assemble the shoulders - The most "I did that backwards" step

TIP: Remember that half are reversed because they're on the other side.  Put three together, then the other three that mirror the first set.
 

Step 8: Wiring (2) - The most "Danger, Will Robinson!" step

Picture of Wiring (2) - The most
Servos have a limited range of 180 degrees.  The control software assumes that the robot starts in a certain position with all the servos at the middle of their range.  We have to make all the servos turn to middle position, then attach the parts together.

Attach the servos to the SB as shown. (fig 1).  If you wire these incorrectly the joints will move in funny ways or may not move at all.  It's not fatal - just correct it and try again.

Connect the USB to the DD, then the 9v power supply to the DD/SB (the labelled plug), then the 5v power supply to the servos (the unlabelled plug).


IMPORTANT! When powering on, always connect the DD first. When powering off, always unplug the DD last.  If you don't the servos will spasm in strange ways and things could get damaged.

TIP: It helps to label the DD and SB plugs to avoid confusion.  (see step 2, fig 5)
 

Step 9: Arduino - The most nerdy step

Now what we've got it all wired up, we can tell the robot to move to middle position.  To do that we need to load the software onto the DisplayDuino by using Arduino, which can be downloaded from MondroMatrix. The Mondomatrix version includes DisplayDuino firmware.

Download the application or the source code.

Start Arduino.

Load the v7.pde file.

Set the board type: Tools -> Board -> DisplayDuino 644

Upload the program. If it doesn't work, you've probably got the wrong COM port.
Set the COM Port: Tools -> Serial Port

When the program has finished uploading, there will be a short delay and then all the gears will turn to center positions.

Quit Arduino and disconnect the power.

TIP: Never work on electronics with the power in.  No one wants to let the magic smoke out.
 

Step 10: Assemble the legs - The most "wave them at your friends and make hissing noises" step

Now that the servos are in middle position, attach the legs. Take special care to align them as closely as possible to the diagram.  Do not turn the servos to get a perfect fit - get as close as you can and we'll adjust it later.

TIP: It may be easier for you to unplug the servos until the legs are assembled.


Attach the servo clamps to the shoulders and tibias. Make sure to attach them the right way up!

Step 11: Attach the legs - The most "you spin me right round, baby, right round" step

Calibrating your hexapod is important.  Your hexapod is "blind" because it has no sensors.  It assumes that everything matches the computer model.  It's your job to make sure that assumption is correct.

Print out the calibration pattern twice. Tape the two halves together to make a circle.


TIP: I taped my calibration pattern to some cardboard for easy storage and reuse.


Place the top half in the center of the circle. Insert the shoulders into each gear so that the toes point along the lines.  Do not turn the servos to get a perfect fit - get as close as you can and we'll adjust it later.

TIP: Don't forget which side of the hexapod is which, now that it's upside down and backwards. 
 

Step 12: Attach the body - The most "We are go for go" step

Picture of Attach the body - The most
Double check that all the wires are connected.

Double check that there are no exposed wires that might cause a short circuit.

Double check that the wires are not caught on the legs.

TIP: I use zip ties to keep the wire from the tibia servo attached to the femur.  Neat and tidy.


Place the bottom over the top, align the M4 shoulder pegs into the holes, and then attach the bottom to the 60mm spacers.

Step 13: Test the control program - The most "It's ALIIIIIVE!" step

Picture of Test the control program - The most
Plug in the USB. Plug in the power. (Do you remember what order to plug them in? See Step 7)

Run visual-hexapod.

Quit visual-hexapod by hitting ESC, then N.

Open config.txt

Look for Alpha->port. Set this number to the same as your com port.

Run visual-hexapod.

Hit F2. If you do NOT see two green stars on either side of the 1.00 at the bottom, you got the port number wrong. Quit, add one to it, and try again.

When you get the green stars, hit the reset switch on the DD.

After a moment, the legs will twitch and some green text should appear on the left side of the screen.

Press > twice and your hexapod should try to stand up.

Pres < once to make it sit down.

Step 14: Calibrate - the most "This should be improved by writing better software" step

Quit visual-hexapod by hitting ESC, then N.

TIP: Don't do this while your robot is walking or he may leave the room without you.  Also the next time you connect to your robot it might reset and drop to the floor.  Make your robot sit down first!


Open config.txt

Notice the six groupings - LF, LM, LB, RF, RM, RB. in each there are three values: pan_zero, tilt_zero, and knee_zero.  These numbers can be adjusted to compensate for tiny errors in manufacture and assembly.  At this time, you have to adjust the number by 2 or 3, run visual-hexapod, connect to the robot, see the change compared to the text pattern, then repeat until it is correct.

Use Calibration pattern #1 to adjust the pan.
Use Calibration pattern #2 to correct the tilt and knee.

Connect in visual-hexapod and > to "move body"

You should also be able to make the body move without moving the feet with WASDQETG. Try moving the mouse, too.  Left click when you're ready to move on.

hit > until it says ripple, wave, or tripod gait.

You should now be able to walk your hexapod around the room using WSADQE.

At any time you can hold the right mouse button and drag to turn the camera. You can also press +/- on the keypad to zoom in and out.


Step 15: Wireless - The most "Can I send him to the corner store for some snacks yet?" step

Disconnect the power supplies.

Reattach the Bluesmirf.

Attach the batteries.

The BlueSmirf will appear on a different COM port than the USB.

NOTE: BlueSmirf and USB connections do not play nice together.

You cannot connect via BlueTooth when the USB is connected.

You cannot update the Arduino code when the BlueSmirf is connected.

I hope you didn't skip the molex!

You can use Bluetooth while drawing power from the wall warts.  (You don't have to use Bluetooth with the battery packs)

Step 16: There most intrepid step

Thank you for taking the time to read through this explanation - and for building a hexapod!

If you are like me then you will find the greatest pleasure comes not just from building the robot but from taking it somewhere new.  Some ideas:
- Put sensors so it can climb over things
- Add a pen to make it a CNC plotter.  Add a CakeBot extruder to make a rapid prototyping machine.  There's already some code to make the hexapod into a CNC router.  I plan to do this to try and win the Gada prize.
- Build several and have them work together!  The code already supports controlling multiple hexapods.
- Add a roll joint to the front two legs so that they can be used like hands.
- Decorate your hexapod
- Weatherproof/Waterproof your hexapod
- Find a way to put a single battery instead of two.  Find lighter batteries!

These are just some of the things I would like to try.  You may have other ideas.
The possibilities are vast and the future bright.  If you make something, send me a picture or a video!  I'd love to hear about it.

1-40 of 103Next »
kolee4 years ago
which chip or ic shuld i use
aggrav8d (author)  kolee2 months ago

The arduino shield I used is no longer manufactured. I'm working on a replacement.

Atyrah2 months ago

hai, may i know how much servo motor u are using in this project? its possible if I'm using 2 motor servo for each leg?

aggrav8d (author)  Atyrah2 months ago

I designed this project with 18 servos. cost about $300 for all of them. No plans for 12 servo version. Try and see!

Jungersol1 year ago
Greating,
Such a great work, I can only be amazed by the good quality you've giving to this robot.
Can you please direct me to a site where I can buy Displayduino baord ans ServoBaod, I've checked in Sparkfun.com and other sites in vain, I can't find them there :/ I can only find MondoMatrix - XBee Shield I'm not sure that it's gonna work. Maybe you could sell them to me separately for the kit.
I'll be so greatfull, thank's in advance. Please excuse my poor english.
aggrav8d (author)  Jungersol1 year ago
Thank you! I check with supplier and they no longer make DisplayDuino boards.
I will try to find a replacement. When I do I will post it to my official blog.
and-re2 years ago
You didn't use a ball bearing for the base of the 'shoulders'? I noticed you used M4 screws instead but how did you get it so that there's no friction?
aggrav8d (author)  and-re2 years ago
Actually... I didn't worry about the friction. It didn't seem to matter. Yes, a bearing should have been done to do it "right", but I didn't find there was a need.
hey..i jus started to make my hexapod for my final year project...Can u pls guide me in the making of this machine ........
My mail i.d is abdullahsultan1991@gmail.com........Pls if u fins some time...pls gude...i surely need sm help.....
aggrav8d (author)  asultan11 year ago
I'm in the middle of trying to start my own company. If you want to send me email you can, dan@marginallyclever.com. If I can help I will. Good luck cutting the parts and finding the same electronics!
and-re and-re2 years ago
And you just attached it with a hex nut as well?
Mateo_2 years ago
I can't find them, some help would be most appreciated.
Mateo_2 years ago
Could you please send me the DXF files to mateo.galceran@gmail.com, I can't find them on http://visual-hexapod.sourceforge.net/. I would really appreciate it.
aggrav8d (author)  Mateo_2 years ago
Please look harder. They're in one of the subdirectories. Sorry, I don't have it open in front of me.
stpdxpdc2 years ago
can you shared the source code? I can't find it

best regard.
edy
aggrav8d (author)  stpdxpdc2 years ago
The source code is at http://visual-hexapod.sourceforge.net/ You need to be familiar with SVN.

svn co https://visual-hexapod.svn.sourceforge.net/svnroot/visual-hexapod visual-hexapod

or online at

http://visual-hexapod.svn.sourceforge.net/viewvc/visual-hexapod/
cryptex2 years ago
can you use the control system with a joystick
aggrav8d (author)  cryptex2 years ago
Yes, I've done it with a PS2 but it could also be done with a flight joystick.
Mrmaxymoo223 years ago
What CAD program did you use? And, are those files also open source?
virtualmix3 years ago
Hi Aggrav8d, I'm having a look but I can't find the source code to run the hexapod. All I can find on sourceforge is a Windows program that I can't run (I'm using Linux)
Did I missed something?
aggrav8d (author)  virtualmix3 years ago
Yes. there's a v8.pde, that's the arduino code.

Most of the application should compile in linux or OSX if you create a build script. The only part you'll have to rewrite is the serial library that sends messages to the arduino.

Good x-platform question!
Thank you Aggrav8d, I've finally use SVN to download the source code.
I can tell you must have spend some time on it. Thanks for sharing. This is a really nice project!
I will be working on a similar hexapod during the next 6 month, I have a few idea to reduce the price a bit (student budget...)
Also I will release my code in about 6 month, if it is good enough for sharing it.
Stay tuned ;)
aggrav8d (author)  virtualmix3 years ago
It took me about 6 weeks to get the first version working. However, I didn't fix the last ripple walk bug until almost 2 months after that! So.

I strongly recommend you build a virtual model of your robot like I did and test things there before you spend money on hardware that might not work - or worse, break itself the first time you turn it on! I lost three $15 servos that way.

Good luck!
I am currently building the 3D model on my computer.
I have chosen the electronic components but I'm waiting to finish the mechanical design before I purchase anything.
I have some issue with the weight. On my computer, my current design weight over 1.7kg... I'm trying to reduce it to 1kg without batteries...
How did you manage the weight? Did your servo had enough torque to handle it?
aggrav8d (author)  virtualmix3 years ago
"building the 3d model on [your] computer"?
If you just need the part models, I released DXF files as part of the sourceforge project.

In all honesty I didn't worry about the weight. I figured if it couldn't lift itself I would shave extra metal off of the frame later. The final weight with the battery is 2.3kg in my model so you're doing pretty good.
I finally made it :-)
I posted a video on youtube: http://youtu.be/3SEzLQic7Sg
I'm still planning to release all my work (CAD + Code) but I've a few things to do before. I'll be in touch if anyone is interested.
Btw, the total weight of my robot is about 2.3kg so the servos I'm using are a bit weak for the job, but it still work, fewwww :-)
aggrav8d (author)  virtualmix3 years ago
Congratulations! I am blogging your success
antonzedd3 years ago
Went to Sourceforge link and there are definitely no .dxf files to be found. Please update link:).
aggrav8d (author)  antonzedd3 years ago
you definitely didn't download the SVN package, which contains the DXF :)
Mecharius3 years ago
I have never seen resistors rated in hurt (10 kilo hurzt being 10khz), is this an error or am i really missing something?
aggrav8d (author)  Mecharius3 years ago
What have you seen them rated in?
In ohms.
me too
bowmaster3 years ago
How much weight could one of these carry? It would be cool to mount a camera and an airsoft gun on top.
MECH WARFARE AWSOME DUDE
Nope. Mechs are bipedal.
aggrav8d (author)  bowmaster3 years ago
Smashing things is boring, wasteful, and pointless. Making things is much more fun. Making things that make things is exponentially better.
What about making things to smash things? Or better yet, make them explode!
...Or! Making something that smashes things, that becomes self aware and sees the moral dilemma of its destructive behavior, then proceeds to promote world automaton peace. Then, realizing it (he) does not belong in the human or robotics realm, turns to a hermit existence, where he (George) proceeds to write his memoires, detailing out the duality of his 'mortal' occupation.
...I'm tellin ya. Call Hollywood. :)
aggrav8d (author)  jkubalek3 years ago
I tried. The PR robot wasn't interested. Said I needed a hook.
1-40 of 103Next »