0% found this document useful (0 votes)
83 views55 pages

Capers II A Hexapod Robot

This document provides instructions for building a hexapod robot called Capers II. It describes how to assemble the servo brackets and attach servos to create mirrored pairs of leg assemblies. Each leg has three segments - coxa, femur, tibia - with a servo to control movement between each segment, allowing the robot to walk in different gaits. Parts lists, diagrams, and step-by-step instructions are included to guide the assembly of the robot's leg mechanisms. Videos supplement the documentation to demonstrate the robot's motion capabilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views55 pages

Capers II A Hexapod Robot

This document provides instructions for building a hexapod robot called Capers II. It describes how to assemble the servo brackets and attach servos to create mirrored pairs of leg assemblies. Each leg has three segments - coxa, femur, tibia - with a servo to control movement between each segment, allowing the robot to walk in different gaits. Parts lists, diagrams, and step-by-step instructions are included to guide the assembly of the robot's leg mechanisms. Videos supplement the documentation to demonstrate the robot's motion capabilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

instructables

Capers II, a Hexapod Robot

by Toglefritz

This Instructable will show you how to build your very The code that powers Capers II also allows for two
own hexapod robot, I call the design Capers II. modes in which the legs stay planted on the ground,
but the body is allowed to move through its entire
range of motion.
https://www.youtube.com/embed/WK9nbCEi-T0?
rel=0&showinfo=0
https://www.youtube.com/embed/oOGXDNOMRl0?
Robot Design rel=0&showinfo=0
A hexapod robot is a robot with six legs. Each leg is
actuated by three servos: one for forward/backward Robot Control
movement, one for up/down movement, and one to Capers II features wireless control using a Playstation
bend the leg in the middle. This gives the robot three 2 controller.
degrees of freedom, allowing it to move in any
direction.

Source
https://www.youtube.com/embed/SDMJ7NhmD30?
All of the code, design files, descriptions, and other
rel=0&showinfo=0 utilities needed to build, calibrate, and run the Capers
II hexapod can be found in a GitHub repository for the
Some hexapod robots are symmetrically designed,
project.
with the six legs equally spaced around a linearly
symmetrical body. Capers II, on the other hand, has a
slightly elongated body, giving the robot a more
natural appearance and the ability to use gaits
reminiscent of insects.

Motion
A six-legged robot has a great deal of flexibility in the
ways it is able to move. Capers II is able to use
several different gait patterns while walking.

https://www.youtube.com/embed/B186EfBtzvU?
rel=0&showinfo=0

Capers II, a Hexapod Robot: Page 1


Capers II, a Hexapod Robot: Page 2
Capers II, a Hexapod Robot: Page 3
Capers II, a Hexapod Robot: Page 4
Step 1: Gather Your Parts

You will need the parts below to build your hexapod robot.

Electronic Components
1 x Botboarduino
Arduino-compatible robot controller

1 x SSC-32U Servo Controller


USB servo control board

1 x NiMH Battery Charger


Charger for NiMH battery charger

1 x NiMH Battery Pack


6V 2800mAh NiMH batter

1 x Wiring Harness
Battery wiring harness with switch

1 x PS2 Controller/Receiver
Wireless PS2 controller with receiver breakout

18 x Hitec HS-645MG*
High-torque analog servo

Hardware
36 x M2.2 x 5mm thread-forming screws
For attaching the servo horns

54 x M3 Nut
To put on the M3 screws

Capers II, a Hexapod Robot: Page 5


72 x 4-40 x 0.375" Screws
For attaching the servos

72 x 4-40 Nuts
To put on the 4-40 screws

6 x 3mm bore, 8mm OD Flanged Ball Bearings


These are used for the coxa joint

60 x M3 x 5mm Cap Screws


For connecting the servo brackets together

6 x M3 x 8mm Countersunk Screws


Used with the ball bearings

6 x M3 x 50mm Standoffs
These hold the top and bottom body plates together

Frame
Hexapod frames are actually fairly easy to obtain. A simple search should yield several different sellers on different
platforms. I purchased my frame on eBay.

* It may be tempting to go with less expensive servos than the Hitec HS-645MGs used in this Instructable.
However, I would highly recommend getting the name brand. The robot requires quite a bit of strength from its
servos in order to work correctly.

Project Cost
The total cost at current prices is detailed in the table below.

Part Quantity Unit Cost Total Cost


Hitec HS-645MG Servos 18 $28.99 $521.82
Botboarduino 1 $34.99 $34.99
SSC-32 Servo Driver 1 $44.95 $44.99
Wireless PS2 Controller 1 $23.85 $23.85
6V 2800mAh Battery 1 $26.95 $26.95
Battery Charger 1 $21.95 $21.95
Frame 1 ~$80.00 ~$80.00
Power Switch 1 $4.95 $4.95
Total $759.46

Capers II, a Hexapod Robot: Page 6


Capers II, a Hexapod Robot: Page 7
Capers II, a Hexapod Robot: Page 8
Capers II, a Hexapod Robot: Page 9
Step 2: Anatomy of a Hexapod

Before we get to actually building the hexapod, it will assembly we will start building in the next step. The
be useful to establish a naming convention for the second leg segment is the femur. The third leg
different parts of the robot. The robot has three segment, the last one on each leg, is the tibia.
segments on each of its six legs and three servos for
the joints between the leg parts. The naming scheme The servos will be named according to the leg
we will use for the different parts of the legs will be segment they move. The servo that attaches to the
analogous to the arthropod leg. body of the hexapod is the coxa servo. The servo that
lifts and lowers each leg is the femur servo. The
servo that allows the legs to bend in the middle is the
tibia servo.
The leg segment closest to the body will be called the
coxa. In our build, the coxa is a servo bracket

Capers II, a Hexapod Robot: Page 10


Step 3: Build the Servo Bracket Assemblies

It's time to start building. The first parts of the Capers attaching the ball bearings to the servo brackets is
II hexapod we will put together are the servo bracket that you do not want to tighten the screw so much
assemblies that will go on the base of each leg. We that the ball bearing can no longer move. Keep the
will build the servo bracket assemblies in pairs nut on the back side of the bracket slightly loose so
because, like many parts of the hexapod, we will that the ball bearing can spin freely. This is one
have three bracket assemblies on the left side of the reason to use thread locking compound on this nut,
robot, and three on the right. We will need to build our so that you can leave it a bit loose and still not worry
sub-assemblies in pairs that are mirror images of about the nut falling off.
each other.

https://www.youtube.com/embed/aeVGSRHiE4w?
rel=0&showinfo=0

One other important detail to keep in mind while

1
1

1. The ball bearings mount on opposite sides of the servo brackets. 1. Make sure the screw on the ball bearing is not too tight. The bearing
needs to be able to move freely.

Capers II, a Hexapod Robot: Page 11


1. The servo bracket assemblies will be mirror images of each other.

Step 4: Attach Servos to the Bracket Assemblies

With the servo brackets built into pairs of mirrored side closest to the ball bearing. Attach the servos to
joints, we can now attach the servos themselves to the brackets using four 4-40 x 0.375" screws and 4-
the brackets. The orientation of the servos is not as 40 nuts for each servo. It is advisable to use some
difficult to figure out as the orientation of the brackets, thread lock on the screws so vibrations from the robot
but it can still be a touch confusing. do not loosen the servos.

The first servo attaches to the bracket with the ball


https://www.youtube.com/embed/GhlE_gQb8PY?
bearing. This servo should be oriented so that the
rel=0&showinfo=0
motor shaft aligns with the ball bearing. The second
servo should be mounted with the motor shaft on the

1. The first servo should be mounted so that the motor shaft lines up with
the ball bearing.

Capers II, a Hexapod Robot: Page 12


1

1. The second servo should be mounted with the motor shaft closest to the
ball bearing.

1. We will center the servos later. Yours may already be centered.

Capers II, a Hexapod Robot: Page 13


1

1. You will end up with three pairs of opposing coxa joint assemblies.

Step 5: Attach Servos to the Tibias

Mounting servos to the tibia parts is a simple task. Attach the servos to the tibia parts with the motor
First, this is another step involving assembling parts shaft closer to the pointy end of each tibia. Like the
in mirrored pairs. We need three tibias for the right coxa and femur servos we assembled in the previous
side of the robot, and three more for the left. Start by step, the tibia servos connect using four 4-40 x 0.375"
arranging your tibia pieces in opposing directions so it screws and 4-40 nuts each.
is easier to keep track of which you've already
assembled.

Capers II, a Hexapod Robot: Page 14


1

1. The tibias will be assembled in mirrored pairs.

Capers II, a Hexapod Robot: Page 15


Capers II, a Hexapod Robot: Page 16
Step 6: Attach Servo Horns to the Femurs

Next we need to connect the servo horns to the femur Unlike every other part of the robot, we do not need to
so that, after the next step, we can assemble the worry about building the femurs in mirrored pairs
legs. The Hitec HS-645MG servos actually come with because they are symmetrical anyway.
a few different horns in the box. The ones we will use
on the Capers II robot are the white circular horns that Attach a servo horn onto each side of each femur
may have come pre-installed on your motors. using four M2.2 thread-forming screws on each servo
horn.
Each of the femur parts needs two servo horns.

1. The screws will tap into the plastic to create a secure connection.

Capers II, a Hexapod Robot: Page 17


Capers II, a Hexapod Robot: Page 18
Step 7: Center the Servos

In order for the code running on the Botboarduino to control Capers II, it is critically important that the controller
knows the orientation of each leg when the servos are centered. The code assumes that, when all the servos are
centered, the coxa faces directly away from the body, the femur is level with the ground, and the tibia is at an
angle of 75 degrees relative to the femur. In order to guarantee this position, we need to make sure all the servos
are centered before assembling the legs, which we will do in the next step.

We will use the Botboarduino to center the servos. The GitHub repository for this project contains a simple sketch
called servo_center.

1. Open the servo_center sketch in the Arduino IDE


2. From the Tools menu, change the board type to "Arduino Duemilanove or Diecimila"
3. Upload the code to the Botboarduino via USB

Then, once the sketch is running on the Botboarduino, simply plug each servo into the servo header on pin 2.

https://www.youtube.com/embed/NF3fgosaa7k?rel=0&showinfo=0

1. The servos must all be centered before assembling the legs.

Capers II, a Hexapod Robot: Page 19


Step 8: Assemble the Legs

With the coxa joint, the femur, and the tibia closest to the ball bearing on the coxa joint. Press the
individually assembled, they can all be put together to servo horn on the femur onto the motor shaft and
create the robot's legs. At this point, all of the servos secure it in place using one of the screws included
should be in their center position. Connecting the leg with the servo.
parts together in the correct orientation is integral to
the correct operation of the hexapod. The second step is to attach the tibia to the femur.
Start by lining up the tibia so that it is perpendicular
the femur. Then, rotate the tibia towards the coxa joint
https://www.youtube.com/embed/1YS_Pph9RZk?
slightly. As you rotate the part, you will feel the teeth
rel=0&showinfo=0
on the motor shaft engaging with the teeth on the
servo horn. Rotate the tibia in until you feel the part
"click" into place in its next position, which is 15
degrees from perpendicular.
The first step is attaching the femurs to the femur
servo/coxa joint. The femur attaches to the femur
servo so that the femur itself is perpendicular to the
servo. One side of the femur is flat, and the other side
is curved. The flat side faces down, which is the side

1. The tibia will be mounted to the femur turned inwards by 15 degrees


from perpendicular.

Capers II, a Hexapod Robot: Page 20


Capers II, a Hexapod Robot: Page 21
Step 9: Attach Servo Horns and Standoffs to the Upper Chassis

Now that the legs are all fully assembled, we will set thread-forming screws, attach six servo horns to the
them aside briefly while we turn our attention to the part.
hexapod's chassis. In this step, we will accomplish
two related tasks before we start working on the Second we will attach the six M3 x 50mm screws to
electronics. the upper chassis piece in preparation for mounting
the lower chassis towards the end of this Instructable.
First, six servo horns will mount onto the upper There will be one standoff mounted near each of the
chassis piece in the same way the servo horns were legs.
mounted onto the femurs. Using a pair of M2.2 x 5mm

Capers II, a Hexapod Robot: Page 22


Capers II, a Hexapod Robot: Page 23
Step 10: Upload Capers II Sketch to the Botboarduino

The Capers II hexapod is designed so that the USB port on the Botboarduino will be accessible even after the
robot is fully assembled. This allows the robot to be reprogrammed without any disassembly. However, since the
Botboarduino is, at this point, not yet caged inside the robot chassis, we will program the board now and take
advantage of the convenience.

There is one preparatory step needed to program the Botboarduino. There are a number of jumpers on the board,
and we will take a closer look at those in the next step, but for now, find the solder jumper labeled USB/ext. This
jumper is used to select the power source for the board. Ultimately we will power the board from an external
source, but for now, move the jumper to the USB position.

With the jumper set, head over to the GitHub repository for this project and download the code. Then, open
Capers_II_PS2_SSC32.ino in the Arduino IDE. Uploading the sketch to the Botboarduino will follow the same
process we used earlier when centering the servos:

1. Open the servo_center sketch in the Arduino IDE


2. From the Tools menu, change the board type to "Arduino Duemilanove or Diecimila"
3. Upload the code to the Botboarduino via USB

Uploading the sketch may take a little longer than your typical Arduino program. The Capers II code is quite large
for an Arduino, taking up about 75% of the Botboarduino's memory.

Capers II, a Hexapod Robot: Page 24


Capers II, a Hexapod Robot: Page 25
Step 11: Set Botboarduino and SSC-32 Jumpers

Another step we will perform prior to mounting the Moving further across the board, you will find a group
electronics inside the Capers II chassis, because the of four jumpers near the buttons and LEDs on the
electronics become much less accessible once inside Botboarduino. These jumpers will not really do
the robot's body, is configuring a series of jumpers on anything in the Capers II hexapod. They enable or
the Botboarduino and SSC-32 servo controller. Each disable the buttons, but we will not be using the
board has several jumpers used to select various buttons anyway. Just leave these jumpers installed.
settings. Many of these jumpers configure power
delivery options for the board and it is therefore vitally
important that they are set correctly.
Next, there are three jumpers next to three banks of
Botboarduino Jumpers pins on the side of the Botboarduino opposite the
The Botboarduino has a total of 13 jumpers placed screw terminal. These jumpers, control the voltage
around the board. First we have two jumpers near the delivered to those banks of pins between the VS
screw terminal. We've actually already played with voltage supplied to the screw terminal and 5V. We
the first jumper, the one used to select the power will be using those blocks of pins to connect the PS2
source for the Botboarduino, between USB and controller, and connect to the SSC-32. Therefore,
external power. For programming the Botboarduino make sure all three of these jumpers are set to 5V.
we need to power the board via USB. However, the
board will be powered by a battery in the robot, so we
will switch this jumper to the ext setting.
The jumper underneath the blocks of pins is labeled
similarly to those next to the blocks of pins above.
This jumper controls the same power deliver option
The jumper next to the power source selection is for the TX/RX pins. Set this jumper to 5V as well.
labeled VS=VL. There are two ways the
Botboarduino can be powered: first, separate power
sources can be used to power the logic components
of the board and the servo connectors, second, both SSC-32 Jumpers
systems can be powered from the same source. The SSC-32 servo controller has far fewer jumpers to
Since we will not be connecting servos directly to the configure. It only has two. On one side of the screw
Botboarduino, they connect to the SSC-32 instead, terminal there is a jumper labeled VS=VL. This
we will use a single power source for the entire jumper has the same function as the same-labeled
system. Therefore, install a jumper onto the VS=VL jumper on the Botboarduino. Since we will power the
pins. SSC-32 from a single power source (the battery), we
will install a jumper on these pins.

These second jumper is found on the opposite side of


Next, moving across the board a little bit, there is a the screw terminal. It is actually a set of four pins that
jumper near the speaker. This jumper simply enables control the same setting. It is possible to use two
or disables the speaker. This option is your choice. different power sources for servos on the left and right
Install the jumper to enable the speaker, or remove it side of the SSC-32. We will be using a single battery,
and the speaker will be disabled. so install two jumpers across the pins labeled, VS1
VS2.

Capers II, a Hexapod Robot: Page 26


Capers II, a Hexapod Robot: Page 27
Capers II, a Hexapod Robot: Page 28
Step 12: Mount the Botboarduino Onto the Upper Chassis

Getting all of the electronics and wiring to fit inside is mounting the Botboarduino onto the upper chassis
the robot's chassis is a little bit tricky. We will be plate. Start by installing four 6mm nylon standoffs
building a kind of stack of boards inside the robot's onto the holes in the upper chassis plate that line up
frame. All of the boards will hang upside-down from with the mounting holes on the Botboarduino (you
the upper chassis plate when the robot stands. may need to add some holes like I did). Then place
the Botboarduino onto the standoffs.
The first step to assembling the electronics package

1. Note that you should have the 50mm standoffs installed as well. After
assembling my first hexapod, I decided it was much easier to install the
standoffs first.

Capers II, a Hexapod Robot: Page 29


1

1. We will be installing other parts on top of these standoffs later.

Capers II, a Hexapod Robot: Page 30


Step 13: Install the Controller Receiver

The next component to be added to the electronics stack is the controller. Before actually mounting the controller
on top of the Botboarduino, we need to connect the receiver electronically - and we will also be adding a few other
electrical connections as well.

Connect the Controller Receiver


The controller receiver comes with a set of pin-terminated wires in the box. There are six connections on the
receiver. On the Botboarduino, the receiver connects to the 6-9 block of pins:

Receiver GND to Botboarduino pin 9 GND


Receiver 5V to Botboarduino pin 9 5V
Receiver CLK to Botboarduino pin 9
Receiver ATT to Botboarduino pin 8
Receiver CMD to Botboarduino pin 7
Receiver DAT to Botboarduino pin 6

With the electrical connections made, we can mount the controller receive on top of the Botboarduino. First, add a
nylon nut on top of the two nylon standoffs on the side of the Botboarduino with the screw terminal. On top of these
nuts, add two [add length]mm nylon standoffs. On the side of the Botboarduino opposite the screw terminal, add
two [add length]mm nylon standoffs. Place the controller receiver on the two standoffs on the screw terminal side
of the Botboarduino. The receiver should fit snugly into place with the end of the receive itself nestled next to the
wires we've already plugged in.

Add Other Connections


Since we will be installing the controller receiver and the SSC-32 on top of the Botboarduino in the next few steps,
the Botboarduino will soon be inaccessible. Therefore, it will be difficult later on to make the other connections
between the Botboarduino and the other parts of the system. We will install a few other wires to the Botboarduino
now, before mounting the controller receiver. Those wires will connect to other parts of the system later on.

First, we will add the wires we will use later to connect the Botboarduino to the SSC-32. Three wires are used for
this. First, a black wire connects to the GND on pin 13. Next, connect a yellow cable to the signal on pin 13.
Finally, connect a red wire to the signal on pin 12. For now, these wires will just dangle free until we install the
SSC-32.

The final connection to make is the one that will deliver power to the Botboarduino later on. The battery will
connect directly to the SSC-32 and then the power will chain to the Botboarduino. There are two power
connections on the Botboarduino screw terminal. As a preparatory step, connect a + and - wire to the screw
terminal labeled VL.

Capers II, a Hexapod Robot: Page 31


1 2
1

1. Six wires connect the controller receive to the Botboarduino. 1. The controller receiver connects to the 6-9 block of pins with power and
ground connections as well.
2. These three wires will later be used to connect the SSC-32 to the
Botboarduino.

1. Note this empty pin.

Capers II, a Hexapod Robot: Page 32


1
1

1. We will plug this connector into the SSC-32 later on. 1. First add nylon nuts to the standoffs next to the screw terminal.

1. On top of the nylon nuts, add two 12mm standoffs. 1. The controller receiver mounts on top of the nut/standoff stack.

Capers II, a Hexapod Robot: Page 33


1

1. The controller receiver should fit like a glove inside the footprint of the 1. The Botboarduino will receiver power from the SSC-32 later.
Botboarduino.

Capers II, a Hexapod Robot: Page 34


Step 14: Set the SSC-32U Baud Rate

In a moment we will add the SSC-32U servo controller to the electronics stack inside the hexapod. First, however,
we need to take the preparatory step of setting the baud rate on the SSC-32U. The default baud rate of the SSC-
32U is 9600, however, the Capers II code we will be running on the Botboarduino uses a baud rate of 38400,
allowing significantly faster communication between the Botboarduino and the SSC-32U.

https://www.youtube.com/embed/b8oXd0Sa1zE?rel=0&showinfo=0

In order to set the SSC-32U baud rate, we will need to power on the board. To do this, simply plug your SSC-32U
into an available USB port on your computer. Then, on the SSC-32U, you will find a button labeled "baud." Next to
that button, there are two LEDs, one labeled "A" and one labeled "B."

Press and hold the baud button. At first, the LEDs illuminate to indicate the current baud rate setting. The default
of 9600 is indicated by a green LED. After two seconds, the LEDs will start to alternate, indicating that you can
now set a new baud rate. Release the button. Then, press the button to cycle through the baud rate settings:

1. 9600 - green
2. 38400-red
3. 115200-red and green

So, cycle through the LEDs until a red LED illuminates. Once the correct baud rate is selected, do nothing. After
five seconds, the new baud rate will be saved to the board's memory.

Step 15: Add the SSC-32 Servo Controller

Our stack of electronics will be topped off by the the Botboarduino. We already have wires installed on
SSC-32 servo controller. The SSC-32 simply mounts the VL screw terminal on the Botboarduino. Attach
on top of the standoffs added to the stack on top of the other end of this wire to the VL screw terminals
the controller receiver. Orient the SSSC-32 so that on the SSC-32.
the screw terminal on the SSC-32 is on top of the
screw terminal on the Botboarduino, because we will Next we need to connect the Botboarduino and the
be connecting these screw terminals together. Fasten SSC-32 together so that they can communicate with
the SSC-32 in place using four nylon nuts. each other. We already have three wires installed on
the Botboarduino. These wires connect to the
With the SSC-32 in place, we will make a few RX/TX/GND pins in the middle of the SSC-32.
connections using the wires we installed on the
Botboarduino earlier. First, power from the battery will
be connected directly to the SSC-32 - we will do this
in the next step. Then, the SSC-32 delivers power to

Capers II, a Hexapod Robot: Page 35


1
1

1. The SSC-32 mounts on top of the standoffs. 1. The SSC-32 is held in place using four nylon nuts.

1. At its heart, Capers II has a stack of electronics for controlling the


system.

1. The VL connector on the SSC-32 connects to the VL connector on the


Botboarduino.

Capers II, a Hexapod Robot: Page 36


1

1. The SSC-32 connects to the Botboarduino via the TX/RX pins using
the wires we've already connected to the Botboarduino.

Capers II, a Hexapod Robot: Page 37


Step 16: Attach the Power Switch

At this point, we've completed the electronics stack at nut.


the heart of the robot. In this step we will add the
power switch and wiring harness that will deliver With the switch installed, it can be wired into the
power from the battery to the electronics system. system. The switch has a battery connector on one
There is a hole in the upper chassis plate on the side side, and a pair of wires on the opposite side. These
of the electronics stack opposite the screw terminals. wires connect to the VS1 screw terminals on the
Start by removing the washers from the button and SSC-32. Remember that we've already set our
then install the button into this hole. If you take a look jumpers to connect VS1 to VS2, allowing the
at the large flat washer included with the switch, you battery to power all the servos, and connect VS1
will notice a tab on one side of the washer. This tab to VL, allowing the battery to power the board
will insert into one of the smaller holes next to the one logic as well. The wire connecting VL on the SSC-
in which the switch is installed. This washer keeps 32 to VL on the Botboarduino delivers power to
the switch oriented correctly. With the washer in the Botboarduino logic.
place, fasten the switch in place using the included

Capers II, a Hexapod Robot: Page 38


1

1. The washer on the switch has a small tab to keep the switch oriented
correctly.

1. This jumper connects the battery power to the logic power.

1. The battery will connect here later.

Capers II, a Hexapod Robot: Page 39


Step 17: Attach Legs to the Body

Alright, we are now in the final stretch of the build must be assembled so that when the servos are
process for our hexapod robot. In this step we will centered, the robot is in a predetermined posture.
attach all of the previously-assembled legs to the
upper chassis plate (the one to which we attached all So, attach all six legs to the upper chassis plate.
the electronics). When attaching the coxa servos on Secure the servos using the screws included with the
the legs to the servo horns on the upper chassis servos. Be careful when picking up and moving the
plate, the servos must be oriented so that the leg robot at this point because we have the entire leg
faces directly away from the center point of the robot. assembly supported at a single point by the plastic
As we discussed when assembling the legs, in order servo horns.
for the robot firmware to operate correctly, the robot

1. The servo must be mounted so that the leg faces directly away from the
center of the robot.

Capers II, a Hexapod Robot: Page 40


1

1. For the front and back legs, the orientation should still be directly away
from the center of the robot. So, these legs will mount at an angle.

Capers II, a Hexapod Robot: Page 41


Capers II, a Hexapod Robot: Page 42
Step 18: Attach Servos to the SSC-32

All 18 servos on the hexapod connect to the SSC-32 #define cRMCoxaPin 4 //Middle Right leg Hip Coxa

servo controller. The Botboarduino then issues


commands to the SSC-32 to move the servos to #define cRMFemurPin 5 //Middle Right leg Hip Femur

angles calculated by the inverse kinematics


algorithms that constitute the bulk of the Capers II #define cRMTibiaPin 6 //Middle Right leg Tibia

code.
#define cRFCoxaPin 8 //Front Right leg Hip Coxa
The SSC-32 has a row of servo connectors on each
side of the board. These servo connections are
#define cRFFemurPin 9 //Front Right leg Hip Femur
grouped in blocks of four rows each. Each leg
connects to a different block. The pin numbers for the
#define cRFTibiaPin 10 //Front Right leg Tibia
servo connections are defined in the code.

#define cLRCoxaPin 16 //Rear Left leg Hip Coxa


There is one tricky aspect to connecting the legs. In
order to actually make the connections, you need to
turn the robot upside-down. This means, that when #define cLRFemurPin 17 //Rear Left leg Hip Femur

you are looking at the robot from the side with the
switch closest to you, the right servos will actually be #define cLRTibiaPin 18 //Rear Left leg Tibia

on the left side of the robot.


#define cLMCoxaPin 20 //Middle Left leg Hip Coxa

#define cLMFemurPin 21 //Middle Left leg Hip Femur

Each row of connectors has three pins: ground,


signal, and 5V. Connect the servo cables with the #define cLMTibiaPin 22 //Middle Left leg Tibia

black ground wires towards the outside of the board.


#define cLFCoxaPin 24 //Front Left leg Hip Coxa

/// SSC-32 PIN NUMBERS ///

#define cLFFemurPin 25 //Front Left leg Hip Femur

#define cRRCoxaPin 0 //Rear Right leg Hip Coxa

#define cLFTibiaPin 26 //Front Left leg Tibia

#define cRRFemurPin 1 //Rear Right leg Hip Femur

#define cRRTibiaPin 2 //Rear Right leg Tibia

Capers II, a Hexapod Robot: Page 43


Capers II, a Hexapod Robot: Page 44
Step 19: Manage Your Cables

Right now you robot probably looks like a crazy


spaghetti bowl of wires. In order for the bottom
chassis plate to fit onto the hexapod, we will need to
fasten down all of the servo wires so that they fit
nicely underneath the brass standoffs. This step is
more art than science. Just try to bundle together the
wires and fit them into any crack or empty space
around the SSC-32U.

The one consideration here is that the legs still have


enough slack to operate on their full range of motion
after fastening down the wires.

Capers II, a Hexapod Robot: Page 45


Step 20: Attach the Lower Chassis Plate

The final parts we have to install on the Capers II With the battery mounted onto the lower chassis
hexapod robot are the lower chassis plate and the plate, place the assembly on top of the robot, which
battery. First of all, we need to attach the battery to should still be upside down at this point, line up the
the lower chassis plate. When the robot stands, the ball bearings on all six legs with the holes in the lower
battery will hang under its body. chassis plate. This might be a little bit tricky to do.
The lower chassis plate should be oriented so that
Place the battery in the middle of the lower chassis the battery cable is on the opposite side of the robot
plate and, using two zip-ties, secure the battery in from the switch cable. Finally, secure the lower
place. In order to help the robot balance, try to center chassis plate in place using six M3 x 8mm screws
the battery as precisely as possible. into the standoffs.

Capers II, a Hexapod Robot: Page 46


Capers II, a Hexapod Robot: Page 47
Step 21: Adjust Servos

Earlier, when we were assembling the legs and attaching the legs to the body, we discussed that the Capers II
code expects the robot to be in a particular posture when all of the servos are centered. The femurs should be at
right angles to the coxa servos. The tibias should face 15 degrees inward relative to the femurs. The legs should
face directly away from the center of the robot. However, even if you were very careful while assembling the robot,
when the robot turns on, you might find that the initial angles of the servos are somewhat off.

There is a utility in the Capers II code that allows you to adjust the initial servo angles of all 18 servos in order to
correct any small errors in alignment introduced during assembly.

https://www.youtube.com/embed/1pG9EarsN5Q?rel=0&showinfo=0

To use servo offset mode, first plug the Botboarduino into your computer via USB. The USB cord can reach the
port on the Botboarduino through the front two legs. With the robot connected to your computer, turn on the switch
and open Serial Monitor in the Arduino IDE. When the robot starts, you will be presented with some instructions in
Serial Monitor. To enter servo offset mode, send "O" to the hexapod.

Once servo offset mode starts, you will again be presented with some options. The first step is selecting a leg. All
six legs are designed by a number in the code:

1. Rear Right
2. Middle Right
3. Front Right
4. Rear Left
5. Middle Left
6. Front Left

To select a leg, send the leg number, along with servo designator over Serial. You can specify the coxa servo with
"C," the femur servo with "B," or the tibia servo with "C." Once you have a leg selected, send "+" or "-" over Serial
to increase or decrease the servo zero position.

Once you've configured all your servos, send "$" over Serial to exit servo offset mode. A prompt will ask you if you
want to save your configuration. Respond "Y" to save your offsets.

Capers II, a Hexapod Robot: Page 48


Capers II, a Hexapod Robot: Page 49
Step 22: Bring Your Hexapod to Life

It has probably taken quite a bit of time, but your always face the same direction. The right stick turns
hexapod is now complete! All that remains to do is the robot.
turn on the robot, and the controller, and take Capers
II for a walk. It will be useful, of course, to know how
to control the hexapod. On the PS2 controller, you
have access to a set of "common controls" which are One of the other commonly used modes is single leg
almost always active, whatever mode the robot is control mode. As the name implies, this mode allows
currently in. individual control over the legs. You can also have
the robot hold its legs in a position you set.

In the final two modes, the robot does not move


around the room. Rather, it will keep its feet planted
and move only its body. The first of these stationary
modes is shift mode. In shift mode, Capers II will
keep its body level, and the sticks move the body
around: forward, backward, left, right, up, and down.

The other stationary mode is rotate mode. In rotate


The Capers II code provides several different control mode, the robot's feet are still planted, and the body
modes. The default mode, which is the one entered does perform transnational movement, rather, the
after turning the hexapod on with the Start button is body is allowed to roll, pitch, and yaw.
walking mode. In walking mode, you will use many of
the common controls to change the gait, body height,
gait length, gait speed, and other movements. https://www.youtube.com/embed/EY__nRJiEDU?
Steering the robot works much like FPS games. The rel=0&showinfo=0
left stick handles translation. If you used only the left
stick, the robot would move around but it would

Capers II, a Hexapod Robot: Page 50


Capers II, a Hexapod Robot: Page 51
Capers II, a Hexapod Robot: Page 52
Capers II, a Hexapod Robot: Page 53
Lovely Instructable, but I would suggest op would post a ballpark project cost at the beggining. I
know Robotics isn't a cheap hobby, but its good information to have.

Hey harkejuice, thanks very much for the suggestion. I added a section to the bottom of the
"Gather Your Parts" step that estimates the total cost of the project. The total cost is around $750.

Hi, I have one questions. How much power for 18 servos (current). I have a big problem with power
for them.

The Hitec HS-645MG servos used in this project have a no-load current consumption of 450mA at
6V (which is the voltage of the battery used in this Instructable). Fortunately, we should never be in
a situation where all eighteen of the servos are running at once. In fact, the code running on the
robot is specifically designed to avoid this scenario because if all the servos ran at the same time,
they would require over 7A of total current, and the battery can supply a maximum of 2.8A.
Typically, a maximum of three servos will be running at the same time, requiring around 2A. For
example, in a triangle gait, three femur motors will lift the legs, then three coxa motor will move the
legs forward, then three femur motors will lower the legs back down. These types of gait patterns
limit the number of servos running together, thus limiting the robot's total current draw.

Great Instructable, I mean it's scary as hell, it'll probably killl you whilst you sleep but still really
cool!! Great work!

Very cool!

That is the best I have seen,


keep up the good work. you should e working for nasa they need people like you for there mars
project.

Wow! This is all so perfectly put together. The set of instructions are so thorough. Thank you so
much for sharing. I am amazed! I now follow you. You are a genius!Do you have more genius
Capers II, a Hexapod Robot: Page 54
projects like these? Keep up the marvelous work! I can't wait to begin on this one! I am so excited!
Monalyssa
[email protected]

looks AWESOME!

Great tutorial!! It's so detailed that it's just beautiful! Can't wait to make one. thanks a lot.
Cheers :)

Capers II, a Hexapod Robot: Page 55

You might also like