| Oricom Technologies
www.oricomtech.com |
Index
|> Overview
|> Circuit Values
|> Signal Measurements
|> Analog Output
|> Beamwidth
|> Object Reflectance
|
NOTE - the circuit described here
has proved to be very reliable for object detection, and can be seen in operation on our Quadruped Walker Nico-II - see the [ n-roam1.avi ] movie - |
This proximity detector is an extension of IRPD circuits described by Dennis Clark (555 Based IR Proximity Detector and 12C508 IR Obstruction Detector), and by Dave Hylands. Similar devices that have been around for several years, such as Seattle Robotics, and can be traced back to at least the early 1990's in Circuit Cellar magazine.
Dennis's units count background pulses and decide if an object is present based upon a certain degree of increase of pulse activity above this background level. Dave's unit appears to signal an obstacle whenever the detector module output goes low. The present detector differs from the others in that it rejects background activity and noisy reflections by integrating the pulse output of the IR detector module to produce an analog signal, which can easily be converted and thresholded using an A/D converter on a microcontroller.
Circuit Operation.
As shown in the diagram at the right, the basic circuit consists of an IR Led pulsed at a
frequency near 38 khz, plus an IR detector module, eg Panasonic PNA4602M. The light from
the Led bounces off a nearby object, and is picked up by the detector module.
A baffle can be placed between the Led and detector module to prevent direct pickup
of pulses, or the Led can be partially encased in black heat-shrink tubing to eliminate
backwards and sideways radiation.
The PWM signal to the Led has approx 50% duty cycle, and comes from a microcontroller. The output of the PNA4602 module is normally high, but goes low and stays low, when it picks up a steady 38 khz infrared signal. However, the module output will pulse irregularly in the presence of intermittent IR input - such as a reflected signal. To deal with this, the detector signal is integrated using a low-pass filter in a manner similar to converting a regular PWM signal to a DC voltage. The PNA4602 has an output inverter stage with an internal pull-up resistor of about 20 Kohms. The circuit adds another external pull-up (R1), and also low-pass filter R2-C1. The time constant of the overall filter consisting of R1, R2, and C1 is about 2 msec. This filter rejects individual noise pulses, smoothes pulsetrains into a representative voltage, and allows threshold-setting for reliable operation.
Downside - note that the downside to this type of detector is that the PNA4602 module is very sensitive, and will respond to other IR sources modulated at close to 38 khz, such as a TV remote or other robots generating IR signals. In practice, it's preferable to start and stop the Led output, and scan for extraneous IR sources inbetween searching for local obstacles.
<| Circuit Values
|
The IR Leds used in the circuit were Fairchild QED234 T-1 3/4 devices, with 27 mw/sr output at 940 nm peak wavelength, and the detector module was a Panasonic PNA4602M, which is a 3-pin device slightly smaller than a TO-220 package.
Effective Range. The range of the detector can be controlled in two ways: (a) by using an Led pulse frequency which is off-center from the most sensitive pickup frequency for the detector module, and (b) by adjusting the power output of the Led by adjusting the current flowing through it.
After some experimentation, we ended up using a 34.8 Khz PWM signal, and as shown in the diagram at the right, at this frequency the sensitivity of the 38 khz PNA4602 module is down to about 25% of its peak value. In addition, POT1 was set to about 3.4 Kohms, which limits the current through the Led to about 1 mA. These values give an effective detection range of 4 - 6" for objects with high infrared reflectivity, such as white paper and objects with shiny surfaces - and as shown below, this also allows objects with less IR reflectivity to still be detected at smaller distances.
Variations. Clearly, the detection distance can be adjusted over a wide range of values, from just a couple of inches to well over the 6" set here. Using a PWM frequency closer to 38 Khz and/or more Led current will select a longer range - and vice versa. Also, we haven't specifically examined it, but suspect that setting a longer range [by using more Led power, etc] will also increase the number of noise pulses picked up by the detector due to spurious reflections. In general, this could be a problem with a simple 'yes-no' digital output, but the integrated-analog output used here should reduce the problem somewhat.
<| Signal Measurements
|
Click for Block Diagram of PNA4602 |
The PNA4602 module itself has an internal integrator, which turns a continuous 38 khz IR pulse input into a constant output = low, or '0'. Therefore, with a strong reflection, the detector module will output a continuous '0' level. However, for objects either far away or with weak reflection, the detector module will only receive a few reflected pulses, and its output will be a series of pulses of varying width and number, depending upon how strong the reflection is. This last situation is shown in the diagram below. Note that this display is a single long trace, which wraps around 8 times on the screen. In this case, the external integrator, consisting of R1-R2-C2, has been disconnected from the module.
Raw Detector Module Output. In the presence of no pickup, the PNA4602 module output is steady high = '1'. A highly-reflective object [ie, the experimenter's hand] is then brought in from far away. As the object comes closer [shown in epochs 0 - 3], pulses start occurring as the reflection gets stronger. The number, length, and shape [negative-going or positive-going] of pulses in the transition zone between steady '1' and steady '0' is roughly related to the distance of the object. When the object is very close, a steady '0' level is output. In epochs 5 - 7, the reverse situation takes place as the object moves away from the detector - steady '0' gives way to pulses, then to a steady '1'.
|
Click for display of Pulse Chatter |
Maximum Usable Range and Reliable Operation. By adjusting the current to the IR Led, the range of the IRPD can be varied. Less Led current decreases the range, and more current increases it. We found that the circuit is usable out to about 12" or so - however, what happens with the larger Led currents [ie, power output] is that "noisy" background pickup increases dramatically, and this gets especially serious when attempting to adjust the range to more than 12" or so. When listening on the piezo, there is a continuous pulse chatter with larger Led current levels, and if current is increased too much, then background pickup turns on the IR detector module fully, even with no targets in the beam. In contrast, when the current is set so the effective range is 8" or less, there is very little background chatter.
For reliable operation, the system needs a good way to reject or compensate for background pickup at the range selected.
<| Analog Output
Integrator Output. The diagram below shows the detector module output integrated by external low-pass filter, R1-R2-C1, as the A/D converter sees it. Of note, individual noise pulses are eliminated, and a monotonic decrease in voltage is seen as the object moves in from afar. The transition zone corresponds to the situation above where the pulses occur. Once the object gets in close, the voltage stabilizes at a low level. The transition from low voltage back to high is the object moving away from the detector.
This voltage can be measured by the A/D converter, and a threshold value between max and min can be used as a stable measure of object detection. This helps to eliminate the problem seen in the previous diagram, where the microcontroller has to use software routines to reject noise and deal with transition-zone pulses, and decide when a hard response is present. In fact, the signal below is smooth enough, it would probably work just as well if sent into a digital input of a microcontroller instead of to an A/D converter channel.
<| Beamwidth
The effective beamwidth of the detector was measured using a white card, brought into the field-of-view from the side, at various distances. For these measurements, the Led and detector module beams were essentially parallel, with the two devices 1/2" apart.
|
<| Object Reflectance Characteristics
| object | size | ** detection range |
| flat objects | ||
| white paper pad | 3" x 5" | 5 - 8" |
| lite-brown cardboard box | 6" x 6" | 4.5 - 7.5" |
| brown fiberboard | 3" x 9" | 4 - 6.5" |
| shiny black + multi-color CDRom cardboard box |
5" x 5.5" | 3.5 - 6.5" |
| mottled blue plastic | 3" x 5" | 3.5 - 6" |
| shiny metal ruler | 0.5" x 6" | 1 - 6" |
| clear shiny plastic | 2" x 4" | 3 - 4.5" |
| shiny green plastic | 3" x 5" | 2.5 - 4.5" |
| transparent plastic chip tube | 1" x 6" | 2.5 - 4.5" |
| shiny blue plastic ruler | 1" x 6" | 2.5 - 4" |
| shiny black plastic | 2.5" x 6" | 1 - 3" |
| black conductive foam | 3" x 5" | 1 - 1.5" (weak response) |
| cylindrical objects | ||
| shiny white screwdriver handle | 3/8" x 3" | 2 - 3.5" |
| shiny white ballpoint pen | 1/4" x 6" | 2 - 3.5" |
| lite-grey marker pen | 1/2" x 5" | 2 - 3" |
| translucent white plastic cup | 2.0" x 1.5" | 2 - 3" |
| semi-flat black battery holder | 1" x 4.5" | 0.5 - 2" |
| mottled black microball pen | 3/8" x 6" | 0.5" (weak response) |
| ** detection range = min (detector full-on) - max (just-detect) | ||
Note that the reflected signal from an object is dependent upon a number of factors, and this will affect the nature of the detector module output [eg, pulses in the transition region], and also the distance of reliable detection. Objects with different reflective properties were found to have different detection distances. Relevant factors include:
The table at right shows detection ranges for several common objects. Flat objects were oriented orthogonal to the detector beam. "Just-detect" refers to the distance at which the first few individual detector module output pulses were observed.
Oblique Objects. When flat objects are oriented at an angle to the detector beam, instead of oriented orthogonally, the responses are generally lower - and the objects must be located slightly closer for full-on detection. The table below shows responses for several of the same objects as before, but angled at 45 deg with respect to the detector beam.
| object | 45 degree detection range |
| white paper pad | 3.5 - 7" |
| cardboard box | 3.5 - 7" |
| mottled blue plastic | 3 - 5" |
| shiny green plastic | 2.5 - 4.5" |
| shiny blue plastic ruler | 2 - 4" |
Summary. Comparing the beamwidth and object reflectivity results indicates that: