How to Build a Wireless Hexapod Robot

214,844

423

114

Introduction: How to Build a Wireless Hexapod Robot

About: I want to build my moon base with remote controlled robots and solar sintering.
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."

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

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

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

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 5: Assemble the Tibias - the Most "This Is Starting to Come Together!" Step

TIP: Remember that half (3) of the tibias are reversed because they're on the other side.

TIP: Make sure you put the servos in the right way up.

Step 6: Assemble the Femurs - the Most Repetitive Step

Attach the gears to both ends of half the femurs. (fig 1)

Attach the clamps to both ends of half the femurs. (fig 2)

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

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

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

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.

USB Contest

First Prize in the
USB Contest

Be the First to Share

    Recommendations

    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • For the Home Contest

      For the Home Contest
    • Big and Small Contest

      Big and Small Contest

    114 Comments

    0
    bowmaster
    bowmaster

    12 years ago on Introduction

    How much weight could one of these carry? It would be cool to mount a camera and an airsoft gun on top.

    0
    aggrav8d
    aggrav8d

    Reply 12 years ago on Introduction

    Smashing things is boring, wasteful, and pointless. Making things is much more fun. Making things that make things is exponentially better.

    0
    Saturn V
    Saturn V

    Reply 12 years ago on Introduction

    What about making things to smash things? Or better yet, make them explode!

    0
    jkubalek
    jkubalek

    Reply 12 years ago on Introduction

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

    0
    0111nadam06
    0111nadam06

    Reply 4 months ago

    so age of ultron

    0
    aggrav8d
    aggrav8d

    Reply 12 years ago on Introduction

    I tried. The PR robot wasn't interested. Said I needed a hook.

    0
    the tech head
    the tech head

    Reply 12 years ago on Introduction

    so i can still make my own version with my equipment as soon as i get a video camera

    0
    the tech head
    the tech head

    Reply 12 years ago on Introduction

    i can try to make a movie of that ll it wwill be alot shorter thanks i will give you a copy of it if i ever get around to it cause i might not make ant thing at all

    0
    the tech head
    the tech head

    Reply 12 years ago on Introduction

    actually mech warfare lets u have a biped or a quadruped and in the novice classe any legged machine including tracks and wheels so u could enter in novice class Ive been thinking about doing an event were i live bu i figured no on would show up cause im thirteen (yes im gonna build a quadruped programming an all by myself)

    0
    aggrav8d
    aggrav8d

    Reply 12 years ago on Introduction

    Well then the biggest challenge you'll face at the start is that no one will take you seriously. On the internet proper spelling and punctuation will make people think you are more mature and ready to do the work. The thing that will seal the deal is building a robot. I wish you good luck! I couldn't invest that much time, energy, money, and love into something just to watch it get destroyed.

    0
    the tech head
    the tech head

    Reply 12 years ago on Introduction

    they dont get smashed they have airsoft guns and sensor pads and u have 20 hp look it up on youutube

    0
    aggrav8d
    aggrav8d

    Reply 12 years ago on Introduction

    I have a version with an aluminum frame. it weighs ~2.3kg. the servos are rated at 11kg/cm. if three legs are on the ground then that's 6 servos 5 cm apart. Let's say a safe margin of error leaves us with 8kg. so it *should* be able to lift ~5kg. That's before getting stronger servos, metal gears, or leaving 5 feet on the ground at once (which walks slower but is less work per servo).

    0
    Otniel96
    Otniel96

    Question 5 years ago

    how about the source? can u help me about it? for the voltase and ampere to the robot, and from arduino supply, my hexapod didnt move correctly

    0
    Ahlonnae
    Ahlonnae

    6 years ago

    i would like to find the servo connections to the servo controller

    0
    kolee
    kolee

    12 years ago on Step 1

    which chip or ic shuld i use

    0
    aggrav8d
    aggrav8d

    Reply 8 years ago on Step 1

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

    0
    mstfozt
    mstfozt

    Reply 6 years ago

    Hello. I want to control hexapod with android phone and aurdino so I need to aurdino code. please send my email (ozturkmustafa0006@gmail.com). thanks for your understanding

    0
    mstfozt
    mstfozt

    Reply 6 years ago

    Hello. I want to control hexapod with android phone and aurdino so I need to aurdino code. please send my email (ozturkmustafa0006@gmail.com). thanks for your understanding