Page 236 ·
Robotics with the Boe-Bot
Infrared Headlights
The infrared object detection system we’ll build on the Boe-Bot is like a car’s headlights
in several respects. When the light from a car’s headlights reflects off obstacles, your
eyes detect the obstacles and your brain processes them and makes your body guide the
car accordingly. The Boe-Bot uses infrared LEDs for headlights as shown in Figure 7-1.
They emit infrared, and in some cases, the infrared reflects off objects and bounces back
in the direction of the Boe-Bot. The eyes of the Boe-Bot are the infrared detectors. The
infrared detectors send signals indicating whether or not they detect infrared reflected off
an object. The brain of the Boe-Bot, the BASIC Stamp, makes decisions and operates the
servo motors based on this sensor input.
Figure 7-1
Object Detection
with IR Headlights
The IR detectors have built-in optical filters that allow very little light except the 980 nm
infrared that we want to detect with its internal photodiode sensor. The infrared detector
also has an electronic filter that only allows signals around 38.5 kHz to pass through. In
other words, the detector is only looking for infrared that’s flashing on and off 38,500
times per second. This prevents IR interference from common sources such as sunlight
and indoor lighting. Sunlight is DC interference (0 Hz), and indoor lighting tends to flash
on and off at either 100 or 120 Hz, depending on the main power source in the region.
Since 120 Hz is outside the electronic filter’s 38.5 kHz band pass frequency, it is
completely ignored by the IR detectors.