Datasheet

Chapter 6 Light-Sensitive Navigation with Phototransistors
178Robotics with the BOE Shield-Bot
Light Waves
In the ocean, you can measure the distance between the peaks of two adjacent waves in feet
or meters. With light, which also travels in waves, the distance between adjacent peaks is
measured in nanometers (nm) which are billionths of meters. The figure below shows the
wavelengths for colors of light we are familiar with, along with some the human eye cannot
detect, such as ultraviolet and infrared.
You can see this image in color in the free PDF version of this book, availabe for download from
the #122-32335 product page at www.parallax.com.
The phototransistor in the Robotics Shield Kit is most sensitive to 850 nm wavelengths,
which is in the infrared range. Infrared light is not visible to the human eye, but many
different light sources emit considerable amounts of it, including halogen and incandescent
lamps, and especially the sun. This phototransistor also responds to visible light, though it’s
less sensitive, especially to wavelengths below 450 nm.
The phototransistor circuits in this chapter are designed to work well indoors, with
fluorescent or incandescent lighting. Make sure to avoid direct sunlight and direct halogen
lights; they would flood the phototransistors with too much infrared light.
In your robotics area, close window blinds to block direct sunlight, and point any halogen
lamps upward so that the light is reflected off the ceiling.
Activity 1: Simple Light to Voltage Sensor
Imagine that your BOE Shield-Bot is navigating a course, and there’s a bright light at the end.
Your robot’s final task in the course is to stop underneath that bright light. There’s a simple
phototransistor circuit you can use that lets the Arduino know it detected bright light with a
binary-1, or ambient light with a binary-0. Incandescent bulbs in desk lamps and flashlights
make the best bright-light sources. Compact fluorescent and LED light sources are not as
easy for the circuit in this activity to recognize.
Violet
Red
Yellow
Blue
Ultraviolet
450
495
570
590
620
750
Orange
Green
10…380
…100,000
Wavelength (nm)
Color
Infrared