Optical Proximity Sensing
Optical proximity sensing provides an inexpensive means of detecting
when your mobile robot is in hazardously close proximity to an
object such as a wall. A typical technique is to simply use an
LED and optical detector configured in such a way that light
emanated from the LED refelcts from the obstacle back to the
sensor. Often the LED's used are IR (InfraRed) for the following
reasons:
(1) IR LED's are generally much more efficient that visible
light LEDs and capable of emitting more light power.
(2) Silicon photodetectors are more efficient in the near IR
region of the light spectrum.
(3) In a mobile robot competition, chances are that the "ambient
light" will either be from flourescent or sodium room lights.
Both of these light sources emit much more visible light than
InfraRed light. Thus by working in the IR regime, your system will
be less susceptable to interference from ambient room lights.
Question: Whats so bad about ambient light?
Answer: You have no control over it. Ambient light levels will vary
from room to room, and even within a single room, thus if you do
nothing to exclude ambient light, you will have to carefully
calibrate your system for the ambient light conditions each time
you set up. Furthermore, the ambient light level caused by
flourescent lights fluctuates strongly at 120Hz. This could
mess up your detection process if you aren't careful.
Combatting ambient light effects:
Some techniques for reducing derogatory effects include:
(1) Use heterodyning. In this scheme the LED is pulsed at a fixed
frequency and the output of the photodetector is sampled at an
integer multiple of that frequency. The resulting signal is then
either bandpass filtered, or multiplied by the original (LED Drive)
signal and then low-passed. A simplified technique which is
easy to implement goes as follows:
(1) The microcontroller turns the LED on, waits a reasonable
time for the LED to respond (say 1ms) then reads the
photosensor and saves the result as "V_LED_On".
(2) The microcontroller turns the LED off, waits a reasonable
time for the LED to respond (say 1ms)then reads the
photosensor and saves the result as "V_LED_Off.
(3) The result is calculated as V_Result= (V_LED_On) - (V_LED_Off).
(4) With artificial lights, the noise immunity will be
further improved if the time between samples (i.e. the V_LED_On
sampling and the V_LED_Off sampling) is a multiple of (1/120th of
a second), as the lights will flicker at a fundamental frequency
of 120 Hz (Incadescent), and flourescent lights often have an
unsymmetrical waveform such that they have a fundamental of 60 Hz.
The best strategy would be to insert exactly a (1/60th sec) delay
between steps (1) & (2).
(5) Use simple "shading" techniques if possible. In some applications it is possible
to place small "visors" above the optical sensors, to partially block out overhead lights, e.q. in a proximity
sensor designed to sense distance from a wall (much like the visor on a cap shades your
eyes from the sun's glare). In some applications, your "visor" could conceivable be a
"tube" or cylinder. Note that most cameras have a lens recessed in a cylindrical enclosure, to
help block glare from the sun/overhead lights etc.. The visor or cylinder must be adjusted
so that your sensor has a sufficient "field of view" in order to detect what it needs to
detect. To do this, imagine that the detector is your eye, looking thru the tube or whatnot,
and imagine what field of view your eye would see.
Measured Time Varying Intensity for 60Hz Line-Voltage Powered Lights
Plot of the measured light intensity for flourescent & incadescant lights:
(Note: These are standard lights powered by 120VAC 60Hz line voltage):
The flourescent lights, on a relative basis, seem to be noisier than
incadescent lights. The following figures are derived from the above data:
For flourescent lights (AC Noise Power/Total Power) = 1.46%
For incadescent lights (AC Noise Power/Total Power) = 0.072%
Thus for the particular lights tested, the flourescent light was about 13dB
noisier, relatively speaking, that the incadescent light.
Back to Home Page