FIGURE 9. Wiring diagram for
connecting the Sharp
GP2Y0D810. Be sure to observe
the correct polarity of the 3.3V
and ground connections.
One of the simplest and
least expensive ways to look for objects in the path of
the robot is the leaf switch, shown in Figure 6. When
the switch closes, the circuit is completed and the
PropBOE registers it as a contact with an object.
Refer to Figure 7 on how to connect the switch to
the PropBOE. I like to use leaf switches as bumpers
because they already have a fairly large area of contact.
You may even wish to extend the bumper of the switch
by soldering or gluing a piece of coat hanger wire to
the leaf, similar to Figure 8.
Wiring the switch to the PropBOE requires a couple
of extra resistors which are shown in the diagrams. The
10 kΩ resistor acts as a pulldown and provides a
consistent and reliable LOW value when the switch is
inactive. When the switch is closed, the output goes
HIGH. In keeping with the how-to circuit examples
provided by Parallax, the 100 ohm resistor provides
current limiting protection to the Propeller input.
Another relatively inexpensive sensor is the digital
infrared proximity detector, specifically a Sharp
GP2Y0D810 (available at Pololu; see the Sources box).
Attach a three-wire servo extension cable between the
sensor and the Beginner Bot’s breadboard. (Be sure to
get some extra double-length male headers while you’re
I’ve connected the sensor for my Beginner Bot to a
homebrew mounting bracket. I made the bracket so
that it could be swiveled out of the way when I need to
plug the USB cable into the
PropBOE. Refer to the wiring
diagram in Figure 9 for the
basic connection, and the
breadboard view in Figure 10.
FIGURE 10. Breadboard view of
the GP2Y0D810. Use a standard
three-wire servo extension to
connect the sensor to the
Gordon McComb is the author of Robot Builder’s Bonanza, now in its fourth edition.
Greatly expanded and updated, this best selling book covers the latest trends in
amateur robotics, and comes with 10 all new robot construction projects, plus
more ideas for building robots from found parts. Look for Robot Builder’s Bonanza,
4th Ed in the SERVO Webstore at http://store.servomagazine.com.
Gordon may be reached at firstname.lastname@example.org.
SERVO 12.2011 53