I’ll need a few more upgrades first, however. Berry’s head kept falling off. (Okay, you can stop laughing now.)
As a temporary measure, I mounted a 9g micro servo
on top of the chassis by simply using double-sided foam
tape to hold the servo, and more double-sided tape to hold
the Sharp IR sensor on the servo horn (Figure 1).
Nonetheless, the servo kept tilting, and Berry kept
losing his head.
I had some inexpensive acrylic servo mounts, so I used
one to mount the servo on Berry. I kept the double-sided
tape on as well, so the servo is mounted “real good now.”
Adding a Better Servo
Unfortunately, the servo mount did not fit my blue 9g
servo perfectly. Fortunately, I had slightly bigger ones, with
better servo horns to boot! As I did not want Berry to
constantly lose his head, I also mounted one of my sensor
holders on the servo horn (Figure 2).
Berry will no longer lose his head.
The Sharp 10 cm-80 cm IR sensor made Berry short
sighted, so instead of trying glasses, I added a generic HC-
SR04 ultrasonic distance sensor since an HC-SR04 ultrasonic
ranger has a four meter range — greatly improving Berry’s
Re-Mounting the Sharp IR
The problem with the panning ultrasonic head is that it
would not prevent Berry from falling down stairs or running
off a table.
I mounted the Sharp IR sensor on Berry’s lower deck,
pointing down slightly (Figure 3).
This way, Berry can use it to watch for:
• Objects that are close by, while the HC-SR04 can pan
for farther objects
Serving Raspberry Pi
By William Henning
36 SERVO 02.2017
In the last article, the accuracy of the
heading produced by our Raspberry Pi bot,
Berry's compass was greatly improved by
adding magnetic declination and tilt
compensation. However, that by itself is not
enough for indoor navigation. At the very
least, I need to add odometry so that I tell
Berry to “go forward 0.5 m.”