Datasheet

Chapter 8 Robot Control with Distance Detection
250Robotics with the BOE Shield-Bot
Activity 1: Testing the Frequency Sweep
Here's a graph from one specific brand of IR detector’s datasheet (Panasonic PNA4602M; a
different brand may have been used in your kit).
The graph shows that the IR detector is most sensitive at 38 kHzits peak sensitivity at
the top of the curve. Notice how quickly the curve drops on both sides of the peak. This IR
detector is much less sensitive to IR signals that flash on/off at frequencies other than 38
kHz. It’s only half as sensitive to an IR LED flashing at 40 kHz as it would be to 38 kHz
signals. For an IR LED flashing at 42 kHz, the detector is only 20% as sensitive. The further
from 38 kHz an IR LED’s signal rate is, the closer the IR receiver has to be to an object to see
that IR signal’s reflection.
The most sensitive frequency (38 kHz) will detect the objects that are the farthest away,
while less-sensitive frequencies can only detect closer objects. This makes rough distance
detection rather simple: pick some frequencies, then test them from most sensitive to least
sensitive. Try the most sensitive frequency first. If an object is detected, check and see if the
next-most sensitive frequency detects it. Depending on which frequency makes the reflected
infrared no longer visible to the IR detector, your sketch can infer a rough distance.
Programming Frequency Sweep for Distance Detection
The next diagram shows an example of how the BOE Shield-Bot can test for distance using
frequency. Note this diagram is not to scale: the detection range only covers a short
distance, and begins a few centimeters away from the robot.