Arduino
This super little Hexapod was designed by 4tronix especially for use with Arduinos. Please follow the steps below carefully.
 
 

1. Check that you have all parts

  • 1 off Black Universal Baseplate
  • 6 off Lower legs in blue acrylic (peel off backing paper)
  • 6 off Upper legs in blue acrylic
  • 24 off self-tapping screws: 2x6mm
  • 22 off self-tapping screws: 2x10mm
  • 12 off M2 10mm screws
  • 12 off M2 nuts
  • 24 off M2 washers
  • 18 off Tower Pro 9g Micro Servos (or metal-gear Go-Tek servos)
  • (Note: the Hip/Thigh servos are already fixed together in pairs)
  • Battery holder for 6xAA cells
 
 
 2. Make the Lower legs
  • Make 3 left-hand legs and 3 right-hand legs
  • Requires 12 off M2x10mm screws, 12 off M2 nuts and 24 off M2 washers
  • Use the M2x10mm screws with 2 washers and a nut on each
  • Place a washer on the screw, then pass through the lower leg, then through the servo flange
  • Then add another washer and tighten the nut onto the screw
 
 
3. Prepare the Upper Legs
 
For this step we just add the servo horns to all 6 legs
 
  • Make 2 legs with horns on the same side, and 4 legs with horns on opposite sides
  • Use the straight servo horns
  • Use the 2x6mm self-tapping screws
  • Cut the ends of the horns so they don't extend beyond the leg pieces
 
4. Connect the Servo controller to the Arduino
 
Before connecting all the servos, we need to ensure that they are in the correct position. To do that, it is easiest to use the sample sketch  SetServos01.ino. Wire up the servo controller as shown and run the sketch which will set all servo positions to the centre value.
 
When that is done, you can connect each servo one at a time, then fix it in position on the relevant servo horn
 
5. Connect the Hip/Thigh Joint Servo Horns to the Main Baseplate
 
  • Use the cruciform (cross-shaped) servo horns
  • Use 2 of the 2x10mm self-tapping screws for each horn
  • Insert the servo mounting screw into each servo horn, before fixing the horn to the baseplate
  • Ensure that the central hole is above the hole in the base-plate - this allows you to tighten the servo mounting screws after the horn is fixed
 
6. Connect Hip/Thigh Servos
 
** NOTE: Ensure the orientation of each servo is correct before tightening the screws
  • Connect one Hip servo to the servo controller as in step 4, to ensure it is set to central position
  • Push the servo into the horn - making sure it is parallel with the edge of the baseplate (as close as possible, but small errors are corrected in the program)
  • Double-check that the orientation is correct
  • Use a small screwdriver through the base-plate to tighten the servo-mounting screw
  • Repeat for all 6 servo assemblies
  • The Hip servos are screwed into the baseplate
  • The Thigh servos are all on the OUTSIDE of the base plate
  • The 4 corner servos all have the servo shaft pointing away from the base plate
  • The middle 2 servos have the servo shaft pointing to the Front of the base plate (the end without any projections on the top surface)
  • Double check against the photo
 
7. Mount the Upper and Lower Legs to the Thigh servos
 
  • Lie the base plate on the back with the Hip/Thigh servos upwards
  • As before, connect each Thigh servo to the servo controller to centralise it
  • Then connect the Upper Leg piece to the servo - ensuring you use the correct piece from Step 3
  • Connect the leg so that it is as close to horizontal as possible (small errors are corrected in the software)
  • Screw the servo mounting screw into the thigh servo
  • Repeat for all 6 upper legs
  • The 4 legs with horns mounted on opposite sides are for the 4 corners
  • The 2 legs using same sides are for the middle legs

  • Then we add the lower legs in a similar manner
  • Connect each servo in turn to the controller to ensure it is centralised
  • Then push onto the shaft, ensuring the leg points as near vertical as possible
  • Finally screw the servo retaining screw into the servo
  • Repeat for all 6 legs
  • There are 3 left-hand and 3 right-hand legs as assembled in Step 2 - use them as shown
 
8. Complete the Wiring
 
  • Screw the Arduino into the base plate using 2 of the 2 x 10mm self tapping screws
  • Screw each of the servo controllers into the base plate using 2 of the 2x10mmself-tapping screws for each controller
  • Use the tie-wrap to hold the battery pack in place between the 2 controllers
  • Connect the first controller to the Arduino with 4 of the Male-Female dupont wires included:
    • Vcc on servo controller goes to +5V on Arduino
    • Gnd on servo controller goes to Gnd on Arduino
    • SCL on servo controller goes to A5 on Arduino
    • SDA on servo controller goes to A4 on Arduino
    • OE and V+ on the servo controller are not connected
  • Connect all 6 connections from servo controller 1 to servo controller 2, connecting all like-for-like
  • Then connect each servo onto the servo controller - ensure you do this in the order shown:
    • For each side, start on the Left of the servo controller looking from the outside, and start with the left leg
    • Connect Hip, then Thigh, then Knee
    • Ensure that the servo is connected the correct way around: Orange wire closest to the inside of the servo controller
    • When complete, the first 9 connectors on each servo controller will be used, leaving 7 unused connectors (eg. for pan/tilt mechanism)
  • Connect the 2 wires from the battery pack into the power screw terminals on one of the servo controllers, ensuring Black goes to Gnd and Red goes to V+
 
The Completed Hexapod Robot
 
  • Add in 6 good quality AA batteries. We prefer Energizer Rechargeable Extremes
  • First you will need to align all servos correctly using SetServos01.ino from >HERE<
  • Modify the offset[] array in SetServos: int offset[18] = {20,0,0, 10,0,0, 15,0,0, 15,0,0, 0,0,0, 15,0,0};until you are happy that all servos are correctly parallel, horizontal and vertical
  • The numbers are in 6 groups of 3. This represents the legs going clockwise from the start
  • Each group of 3 is Hip, Thigh, Knee
  • When you are happy all servos are sitting in the correct positions, download the simple walking code from >HERE<
  • This is a very basic walking gait, so please design your own and let us know how you get on