Reviving an
Androbot BOB
PART 4 — Extra sensors, original
sensors, wireless operation,
autonomy, and programming
by Robert Doerr
I hope that those of you following this series have
learned a few new things! The previous articles have
primarily focused on the hardware aspect of reviving
BOB. They have covered taking an empty robot shell,
adding a new brain with larger H-bridge drivers, working
with the sonar sensors, and adding a co-processor to help
offload tasks from the main processor. This article on BOB will
cover adding some extra sensors and the programming of the main controller itself.
Some of the types of sensors we’ll use to enhance BOB
will be a couple of light sensors, a temperature sensor,
a sound sensor, and a compass. The Handy Board firmware
has low-level code to control the drive motors, the LCD,
and read the analog/digital ports. There are also several
custom add-on libraries that are useful, but they are still
generic. To supplement these, the lower level BOB specific
routines are built which will use these new sensors and
talk to the co-processor. Finally, some higher level functions
will be built upon those which can start to add some
autonomy to BOB so he can move around and interact with
his world.
A Step Back Before Going Forward
Last month covered the co-processor that controls the
head and the lights on BOB. Their control all work great.
However, I got an un-expected surprise when I went to wire
up the footlights. This is one of those things that can cause
plans to change along the way. To test everything on the
bench and help debug the code for the co-processor,
I used an extra pair of footlight boards from a TOPO II.
These footlight boards have a pair of NPN transistors which
handle switching each set of three LEDs on and off.
These are meant to run at 12V for the LED power and are
controlled with a normal 5V logic signal. When I pulled out
58 SERVO 05.2008
the footlight boards that were on BOB, I discovered these
were based on the earlier TOPO I footlight boards, but
were customized for BOB. Instead of having an onboard
transistor for driving the LEDs, these boards just had two
sets of three LEDs wired in series. What is unique about
these compared to the TOPO I board is that the center LED
for each set of three was just shorted across with a solder
bridge and short length of wire. I suspect the reason for
this was so it could be directly driven from a 5V supply. If
all three LED were left in series, then 5V wouldn’t be
enough to turn them on.
Well, this wasn’t really a problem. I had run out
of room anyhow for any new circuitry on the SX48
co-processor board and my test harness can still be used
on the bench. The solution was to make a small driver
board to drive the BOB footlight boards. It plugs into the
existing connector on the co-processor where I had
plugged in the cable I used on the bench. The driver board
has the current limiting resistors and driver transistors for
the LEDs.
A lot of this BOB project has been about re-using odd
parts, so I used some unmarked NPN transistors for the
LEDs. Without knowing the exact specs, there aren’t too
many places I would have used them but they are perfect
for switching LEDs like this. Since we’re only turning on/off
some LEDs, just about any NPN transistors will do. The