male-male connections. See Figure 4 for a pictorial list of
the pins and wiring.
Take note of the ground connection between the
Arduino and the breadboard. Even though the servos run
from their own power supply, all the electrical components
in your ArdBot II must share a common ground.
Otherwise, the robot may operate erratically or not at all.
If you forget the ground connection between the Arduino
and the servos or the connection comes loose, your bot
may stop working. So, this is always a good first place to
check if your robot is suddenly refusing your commands.
Installing the Optional
The ArdBot II is equipped with two touch sensors on
the front for detecting if it runs into objects. While the
switches are optional, I highly recommend you add them
so that your ArdBot II has a basic sense of feel. Some of
the demonstration programs in upcoming installments of
this series will depend on the switches. As they're fairly
inexpensive — about $2-$3 each from numerous sources —
they're worth taking the time to wire and install.
For the ArdBot II, you want a pair of miniature (not
micro) SPDT leaf switches. The bulk of these have a
consistent size and shape, and already have two mounting
holes on opposite corners of the switch body. See the
switches in Figure 1 for an example. Refer to Part 1 for a
more complete list, but online sources for this type of
switch include Jameco and All Electronics. SPDT leaf
switches will have three connection lugs: Common,
Normally Open, and Normally Closed.
You want a switch with an attached metal leaf — the
length isn't critical, but it should be at least 3/4". In a bit,
I'll show how to add ordinary aquarium or metal tubing
over this leaf to extend the "touch zone" of the switch. If
you happen to find a pair of leaf switches with longer
leafs, that's fine, but avoid anything over about 3".
Solder as shown in Figure 5. Start with a 9" length of
three-wire servo extension (left over from the battery
wiring from Part 1, but shown again for your convenience
52 SERVO 09.2013
FIGURE 4. For ease of wiring, use pre-made jumpers and breakaway double-long
male header pins. These jumpers (available from Pololu) make for neat and tidy
wiring on your ArdBot II.
Precut ArdBot II body chassis,
with all assembly hardware
Selected sources for miniature
leaf switches, piezo elements: