The IR emitters are configured to use only one
detector. The GPS module is configured for raw
output mode by tying the /RAW pin to VSS. The
PING))) modules are set up to detect a car in the path
of the robot, which is why they are positioned on top
of the robot. The HM55B compass module is moved
up and away from the PCB, which sits directly over
the two NiCd batteries and four motors.
Once the changes to the control board were
completed, it was time to download the revised
program code onto it. The revised program has a
main loop that does the following tasks until the last
waypoint has been reached:
FIGURE 1. The old Super Carrier Board build.
some facility for expansion, although with only 16 I/O pins
we’re stretching things a bit now. The new board supports
the following interfaces:
• Parallax Serial LCD
• Pushbutton ()
This loop will continue until the robot reaches its goal
or the batteries die. Once the robot has reached its
destination, the LCD will display a confirmation message
that the course is complete.
Both the ADC and the HM55B use an SPI-type interface
meaning that the ADC only required one additional I/O pin.
FIGURE 2. The new Super Carrier Board build.
The first task now is to check for
obstacles. This adds a certain factor of
complexity in that the sensor code is
trying to adjust your course away from
an obstacle while the navigation code
is trying to keep you on your current
heading. The solution is to override the
navigation routines and move out of
the way first. After moving some
distance, the code can then check to
see if it can get to the desired
coordinates from its new position.
Unfortunately, with the current sensors
coming in at the wrong angle it can
cause the robot to not see surfaces it is
approaching from a low angle. As
Figure 3 shows, some obstacles will
require some fine-tuning to the sensors.
After obstacles have been checked
for, we obtain the coordinates of the
current position. These coordinates are
62 SERVO 05.2010