34 SERVO 08.2015
• myservo3.attach( 9); Middle finger attached to PWM
pin 9
• myservo4.attach( 6); Pointer finger attached to PWM
pin 6
• myservo5.attach( 5); Thumb (swivel up/down)
attached to PWM pin 5
• myservo6.attach( 3); Thumb (close/open) attached to
PWM pin 3
Each button press would be linked to a statement in
the code: if (digital Read) (button Pin A) == HIGH). Or, if
button A was pressed, then execute a for loop containing a
group of myservo1.write(n) statements to move the servos
and thus the fingers.
Again, looking at the example ‘sweep’ sketch, the for
loop contains the variable pos (position). It is this one
variable that is used to assess the condition to stay in or
exit the loop, as well as incrementing/decrementing the
counter. More importantly, this variable represents the servo
position value for the myservo1.write(n) statement, where
n is replaced with pos. As the loop runs, the pos value
(which begins at 0) is incremented, and thus the position of
the servo is changed one degree at a time by using the
myservo1.write(pos) statement.
So, basically the code was repeated until a condition
was met, then stopped. In this case, the condition was if
the value of pos is equal to the maximum travel angle
position value — which was 180 — then stop.
All the above code represented moving the finger from
the open to the close position. To move it back to open was
easy — it was just a matter of adding a second loop, but
starting with a value of 180 and counting in reverse
(decrementing the counter). This second loop followed the
first, resulting in the full close and open movement.
I watched how fast the servo rotated based on the
code, and how by including the time delay function delay()
after each individual or group of write() position
movements, the rotation speed could be increased or
decreased, and thus the speed of the fingers closing and
opening could be changed. For example, delay( 5) would
cause the program to pause five milliseconds before
continuing to the next write() position statement.
I attached the string to the servo horn and executed
the code. The results were in: It worked great as the first
finger closed and opened smoothly, and as planned. Woo
hoo, I gave myself a high five!
After this success, it was a matter of replicating the
code and adjusting it slightly for each finger until they were
all done. Be sure to test each finger independently, and
when satisfied you can combine the code so multiple
fingers move at once. The thumb was a little more
challenging, so I chose a basic movement model:
• Swiveling the whole thumb up
• Closing the thumb
• Opening it, then
• Swiveling back down to lay flat with the palm
It took some time to get both servos working together
as I wanted, but by breaking the two movements into
separate actions, eventually the final movement was
smooth and integrated.
The coding was complete, testing had identified some
fine-tuning that was needed, and — best of all — I had a
cool working robot hand with four functions. I was quite
happy and knew that if I could accomplish this, then I could
do so much more using the Arduino, great little micro
servos, and a lot of bits and pieces!
Behold, the Little $300
Wooden Robot Hand!
Having succeeded with the project, I wanted to show
the world! I created a few basic videos of it in action,
merged the results, and uploaded it to my You Tube
channel. It’s been really popular, with lots of comments and
questions — all of which I try my hardest to answer.
In demonstrations, people are quite taken with it and
their questions and delight make the whole experience even
better. I enjoy explaining how I built it and how it functions,
even inspiring friends at work to go out and experiment
with an Arduino and the work-horses of mechatronics — the
servo. Overall, I thoroughly enjoyed my foray into
mechatronics. Although I haven’t fired the hand up in a
while and have since repurposed the servos, it still has a
prime position on my workshop shelf. What’s really great is
all of the components and parts came to under $300!
Challenges and Obstacles
Given the simple nature of the components, there
Parts List
• Piece of 10 mm x 50 mm x 400
mm pine (forearm)
• Piece of 10 mm x 60 mm x 70
mm MDF (palm)
• 1 m long piece of 10 mm
diameter wooden dowel
• Right angle plastic bracket (to
mount servos to forearm)
• Paddle pop sticks (not
required)
• Silicone tubing x 200 mm
• Black elastic
• Strong thread/string
• Metal eyelets
• Tea infusers
• Arduino Uno (or similar)
• Jumper wires
• Pushbuttons
• Resistors (10K ohm)
• DC jack
• Breakaway header pins
• Servos x 6 (I used 7. 6 gram
DS76 digital sub-micro servos)
Tool List
• Drill and drill bits
• Alligator clips
• Small rubber bands
• Epoxy
• Super Glue™
• Blu Tack
• Pliers
• Dremel or hack saw
• Soldering iron and solder
• Arduino IDE (v1.0.4)