Subject:
|
IR Range finder
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 17 Nov 1997 16:27:37 GMT
|
Original-From:
|
John Hatton <JOHNHA@ICSPLC.antispamCO.UK>
|
Viewed:
|
1395 times
|
| |
| |
I am posting this for in case any body is interested as I know that I
will be trying to make use of it. I apologise in advance to anybody who
already knows how to do this, or does not intend to use such a range
finder, but I imagine there are a lot of people out there who will want
it.
John Hatton
johnha@icsplc.co.uk
Sharp Sensor Hack for Analog Distance Measurement
Report: Sharp Sensor Hack for Analog Distance MeasurementFrom: Machine
Intelligence Laboratory Electrical Engineering Department
University of Florida Prof. K. Doty Director
(doty@joker.mil.ufl.edu)Author: Erik de la Iglesia
(erik@joker.mil.ufl.edu) Undergraduate Researcher The
Sharp hack was demonstrated to me by lab member Scott Jantzin February
of 1995. I subsequently engaged in several experiments toimprove the
transient response of the device. All mentions of the Sharpdevice are in
reference to the SHARP GPIU5 8X. Information presented istaken from
lectures from EEL 5934 "Intelligent Machine Design Laboratory" or my
research. The Analog Hack The
unmodified Sharp has only a single digital output pin. Thissignal is
taken from a Schmitt trigger in series with a 40KHz bandpass
filter and signal amplifier. An integration element (capacitor) is
applied before the Schmitt trigger. If the printer side of the
Sharp board is examined, two test pointswill be found to the left of the
output pin. One of these points is theanalog signal as it is integrated
over a surface mount capacitor. The leadto the capacitor and into the
integrated section (black mound) is readilyvisible. A wire soldered
directly to this trace will give the analog response. For practicality,
it is much easier to solder to the capacitor terminal than the trace
itself. With a multimeter, it can be verified thatthe other capacitor
terminal is grounded and that the capacitor has a valueof 0.1uf.
View of opened Sharp case from
underside/-------------------------\| | 1)
Trace to test point (very thin)| ||
| 2) 0.1uf Surface-mount capacitor | /----\
|| | 4 | | 3) Trace to integrated section|
| | || 3/ \----/ | 4) Integrated section
(black dome) | / D V G || _CAP/__ i c N | *
Solder analog tap on the "P" side| 2 \ g c D | of the
capacitor.| 1\ * * * |\-------------------------/
| | | Using this method, both analog and digital
responses can be takenfrom the same sensor. In other words, the sensor
that previously was onlyused for digital IO can now also measure
distance. Signal Characteristics: Zero reading : 1.5V
Full saturation : 2.5V
Rise/Fall time : 100ms The analog tap is very sensitive to
loading. Any analog inputinto which the signal is applies should be of
<20pf capacitance. Practically, this means that an HC11 analog
input is OK, but a 4000series analog MUX is not. Also, because of the
rise/fall time, a samplingrate of only 10Hz is supported. It is critical
that the case of the Sharp be grounded for proper operation. This can be
done by simplyapplying a large blob of solder to the outer pin (ground)
and heatingthe Sharp case with the same soldering iron until a join is
formed. The rise/fall time can be reduced to 1-2ms by replacing
thesurface-mount integrating capacitor. A value of 5000-10000pf will
giverise/fall times of 1-2ms respectively. Using the 5000pf option, the
authorachieved rise, saturation, and fall within 1ms allowing for a
1KHzsampling rate. Signal stability and range is preserved at these
values. Lower values result on significant ripple. Using the improved
time-constanthack will destroy the digital response of the sensor. It is
no longerpossible to use the same Sharp for analog and digital
measurements. Range Range of the
hacked Sharp depends on the level of IR used by theemission system and
the degree of collimation. A favorite method of collimation used at MIL
is to cut the tube of a black Paper-Mate penand hot-glue the Infrared
LED into the tube. Using the standard size LED,the fit is perfect. A
length of 1 to 1.5 inches of tube from the back ofthe LED is used. This
tube can then be glued to the side of the Sharpdevice to form a
formidable ranging device. Range is greatly enhanced by allowing
digital control of the IRlevel. The method currently used at MIL,
developed by Scott Jantz andTae Choi, uses a 74HC374 output latch as
follows: Vcc
| |
LED -> -*- |
___|___ | Current | | |
| Flow RESISTORS -> R 2R 4R |
DIODES -> D D D \|/
| | | P2 P1 P0 The P2-P0
pins are outputs of the 374 latch. Any digital port canbe used, but the
provision of sinking substantial current must be takeninto
consideration. By selecting the appropriate bitmap, P2-P1-P0, the
desired resistance level is available to the LED. Using a 5V Vcc, the
appropriate value for R is between 300 and 400 ohms. The 374 can sink
over20mA per pin. By using software control of the LED level, a range of
.5 to 44 inches can be realized. This required that the software start
at the highest level P2=P1=P0=low and decrease the level if the response
is saturated at 2.5V. The level which causes the analog signal to come
asclose to 2.0V as possible is desirable. Alternatively, plot the
responseof each level vs. distance and define the most linear sections.
Thencreate a composite of eight linear sections with enough offset to
preventoverlapping. This gives near 8-bit resolution across the .5 to 44
inchrange using an 8-bit A/D with reference voltages greater than
(2.5-1.5V) 1V. This is particularly useful for the HC11 which requires a
minimal differenceof 2.5V between reference voltages.
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|