proper 38 kHz timing, pulses each IRED,
monitors the IR detector for reflections, and
then reports the results to the robot controller.
That still leaves plenty of memory left over.
What other functions are available for the
At a Boise Robotics Group meeting several
years ago, Barry Nye, the Technology Guy,
demonstrated a BOE-Bot estimating the distance
to an obstacle by changing the pulse frequency
of an IRED. The PICAXE-08M can do likewise.
This works because the IR detector has a
bandwidth of detection frequencies. The center
of the bandwidth for the ROM is 37. 9 kHz.
However, it’s also sensitive to other frequencies
— just to a lesser extent. The farther from the
center of the bandwidth the IR pulse frequency
is, the brighter the IR pulses must be in order
for the ROM to detect them.
Since the IREDs are supplied with a constant
current, their intensity is also constant. The only
way their intensity gets dimmer is if the distance
to the reflecting obstacle is greater. By changing the pulse
frequency of the IREDs and monitoring for a reflection, the
proximity detector can estimate (crudely) the distance to an
Table 1 is based on my experiments and
shows the approximate distances that the
ROM can detect an IR reflection from the
940 nm IREDs used in the Smart Proximity
Detector. I’ve also included the PWM settings
for the PCAXE-08M pulsing the IREDs.
Note: The IRED supply voltage is five
volts and the resistor in series with each IRED
is 1K ohms. The PWM wizard in the PICAXE
Editor calculated the PWM settings.
Making the Smart Proximity Detector
You’ll need the following parts to make a
Smart Proximity Detector:
• ( 2) IREDs (T-1-3/4 940 nm)
• ( 2) Plastic or aluminum tubing (1/4”
• ( 2) 1K resistors (all resistors are 1/4W)
• 10K resistor
• 22K resistor
• 330 ohm resistor
• 4.7K ohm resistor
• 4. 7 µF electrolytic capacitor (five volts or higher and
0.1 inches between leads)
• ( 2) Three straight pin headers (0.1 inches between
• Eight pin IC socket (0.3 inches wide)
• IR receiver module (anything similar to the ROM will
• Stranded wire (I use #24 AWG)
• Thin heat shrink (to cover the above wire)
• Smart proximity detector PCB (use the pattern
provided at www.servomagazine.com)
The pinout for the ROM
37. 9 kHz IR Receiver
2, 25, 53
2, 26, 54
2, 27, 56
2, 28, 57
2, 28, 59
2, 29, 61
2, 30, 63
The IR reflecting off a wall this close to the proximity
detector is detectable at many frequencies, including
those way off the center frequency of the IR Detector.
Therefore, all PWM frequency created by the PICAXE
results in a detection of this obstacle and the proximity
detector reports the wall is relatively close to the robot.
The IR reflecting off a more distant wall is dimmer and can
only be detected if the IREDs are pulsed at close to 37. 9
kHz. Since no other frequencies will produce a detection,
the proximity detector reports the obstacle is relatively
distant from the robot.
SERVO 02.2010 33