To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 2998
2997  |  2999
Subject: 
Range Finder Hack
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 18 Nov 1997 10:26:22 GMT
Original-From: 
John Hatton <JohnHa@icsplc.co.uk*avoidspam*>
Viewed: 
1286 times
  
I apologise to everybody for my last message, the ascii formatting went
completely haywire. Hopefully this one will be correct as I has edited
the text file again. To see the diagrams correctly in the majority of
email packages that allow font formatting I suggest changing the font
for the entire message to a non-truetype font such as courier.

Sharp Sensor Hack for Analog Distance Measurement

Report: Sharp Sensor Hack for Analog Distance Measurement

From:   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 Jantz
in February of 1995. I subsequently engaged in several experiments to
improve the transient response of the device. All mentions of the Sharp
device are in reference to the SHARP GPIU5 8X. Information presented is
taken 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. This
signal 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
points
will be found to the left of the output pin. One of these points is the
analog signal as it is integrated over a surface mount capacitor. The
lead
to the capacitor and into the integrated section (black mound) is
readily
visible. 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
that
the other capacitor terminal is grounded and that the capacitor has a
value
of 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
taken
from the same sensor. In other words, the sensor that previously was
only
used 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 input
into which the signal is applies should be of <20pf capacitance.
Practically, this means that an HC11 analog input is OK, but a 4000
series analog MUX is not. Also, because of the rise/fall time, a
sampling
rate of only 10Hz is supported. It is critical that the case of the
Sharp be grounded for proper operation. This can be done by simply
applying a large blob of solder to the outer pin (ground) and heating
the Sharp case with the same soldering iron until a join is formed.

        The rise/fall time can be reduced to 1-2ms by replacing the
surface-mount integrating capacitor. A value of 5000-10000pf will give
rise/fall times of 1-2ms respectively. Using the 5000pf option, the
author
achieved rise, saturation, and fall within 1ms allowing for a 1KHz
sampling rate. Signal stability and range is preserved at these values.
Lower values result on significant ripple. Using the improved
time-constant
hack will destroy the digital response of the sensor. It is no longer
possible to use the same Sharp for analog and digital measurements.

                                Range

        Range of the hacked Sharp depends on the level of IR used by the
emission system and the degree of collimation. A favorite method of
collimation used at MIL is to cut the tube of a black Paper-Mate pen
and 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 of
the LED is used. This tube can then be glued to the side of the Sharp
device to form a formidable ranging device.
        Range is greatly enhanced by allowing digital control of the IR
level. The method currently used at MIL, developed by Scott Jantz and
Tae 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
can
be used, but the provision of sinking substantial current must be taken
into 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
over
20mA 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 as
close to 2.0V as possible is desirable. Alternatively, plot the response
of each level vs. distance and define the most linear sections. Then
create a composite of eight linear sections with enough offset to
prevent
overlapping. This gives near 8-bit resolution across the .5 to 44 inch
range 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
difference
of 2.5V between reference voltages.

I apologise again for wasting bandwidth.



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR