Ultrasonic

Document Sample
Ultrasonic Powered By Docstoc
					 Ultrasonic
Range finder




               Yiyang Gong
               EE 90
Table of Contents         ____________________________________      2

Features/ DC characteristics ____________________________________   3

Accuracy, Beam width      ____________________________________      4

User’s Manual             ____________________________________      5

Circuit Description       ____________________________________      7

Block Diagram             ____________________________________      8

Schematic                 ____________________________________      9

Code                      ____________________________________      10

Conclusion/Thanks         ____________________________________
Features
The ultrasonic rangefinder features a one shot mode where distances up to 5.50m can be
detected. Moreover, in this range, the reading is always within one centimeter of the true
distance. The rangefinder can also detect velocities of objects within one meter per
second for objects within 1.50m. Finally the rangefinder can enter scanning mode, where
the transmitting and receiving transducers can be turned 45 degrees in either direction.
Thus, the system can sweep across 90 degrees and find the distances. Because of its high
accuracy and long range, the rangefinder can be used to find the distances for common
household objects, and measure relatively short distances between objects. In addition,
the rangefinder sweep mode can be used to get a profile of any surface. Finally a laser
pointer is included to give the user an impression of what object in the distance is being
measured.

Electrical characteristics
Parameter                        Conditions             Min       Typ             Max         Units
Input Voltage (supply1,          T = 25oC               4, -      5, 12           6, 15       V
supply2)
Current drawn                                                     220                         mA
Response time                    T = 25oC               .26                       108         ms
Detected distance                T = 25oC               .09                       5.50        m
Detected distance                T = 5oC                .09                       5.50        m
Max distance                     Dry erase wall                                   5.50        m
                                 Wood panel                                       4.80        m
                                 Stucco                                           3.50        m
                                 Painted wall                                     3.85        m
                                 Metal cabinet                                    4.73        m
Distance Accuracy                T = 25oC                         1.0                        cm
Velocities                       T = 25oC               -3.0                      3.0         m/s
Velocity accuracy                T = 25oC                         1.0                        m/s
Velocity distance                T = 25oC               0.20                      1.5         m
Temperature of operation1                               5                         40          o
                                                                                                C
Degrees of detection                                    -45o                      45o
Scan cycle speed                                                  4*Response                  ms
                                                                  time
Beam width                         T = 25oC                                      90           degrees
1
  note that at the temperature extremes, the device doesn’t function very well. To have full functionality, the
device should be operated above 10oC.

Physical dimensions
Accuracy of distance


                                                                 5
                                                                                 Y = X * 1.0002
                                                                                 R 0.99997
                                                                 4
                                         Measured distance (m)




                                                                 3



                                                                 2



                                                                 1                                           Distance
                                                                                                             Linear fit of data

                                                                 0


                                                                       0           1         2          3          4          5
                                                                                         Actual distance (m)



Beam width vs. Distance

                                                100

                                                          90
      Approximate beam width (degrees)




                                                          80
                                                                                                                        Beam width
                                                          70

                                                          60

                                                          50

                                                          40

                                                          30

                                                          20

                                                          10
                                                                 0.0       0.5         1.0        1.5       2.0        2.5        3.0
                                                                                         Distance away (m)
User Manual

Button      Menu     Action
Reset       Any      Resets system
Transmit    Transmit Gives one transmission, and finds the object’s distance and
                     velocity
            Display Returns to transmit menu
            distance
            Scan     Returns to transmit menu
            During   Stops scan and holds current scan on display
            scanning
Scan        Transmit Goes to scan menu
            Scan     Begins scan. Each measurement is updated on the display
                     according to the degrees of displacement from the center
            Display Returns to scan menu
            scan
            data

Upon reset, the menu is displayed “ready to transmit” (1). By pushing the transmit
button, a distance and velocity sample is obtained (2). Pushing the transmit button again,
the user returns to the “ready to transmit” message. During the ready message, if the scan
button is pressed, the “ready to scan message” is displayed (3). Pushing the scan button
begins the scan, while pushing the transmit button returns the user to the “ready to
transmit” message. During the scan, distances from –45o, 0, and 45o are taken, and are
displayed on the screen in the appropriate places (4). Pushing the transmit button here
stops the loop, and then a press of the scan button returns the user to the “ready to scan”
message.

Tips for the user
During use, the user can use the laser pointer to figure out where the transmitting beam is
pointing at. Moreover, it is most efficient to point the beam perpendicular to the object in
the distance. Although this is not always necessary (as seen in the second characterization
chart), it does produce the best results. Also, shiny objects returns the signal better than
rough objects.
Main Menu, buttons




1)




2)




3)




4)
Circuit description

         The transmit begins with a Phase Lock Loop (LM565) in free running mode.
When the user start a transmit cycle, the microcontroller sends a control signal to the
analog switch to stop grounding the PLL output (otherwise the clock out is just
grounded). At the same time, a timer inside the microcontroller starts count, with one
overflow of a counter representing one centimeter. During the time of flight, this time
register is accumulated. The square wave clock signal is then amplified by an inverting
amplifier circuit with the high speed OPA606. The output, with the 100 feedback
resistor compensating for the capacitive transducer load at resonance, is then coupled to
the transmitting transducer.
         When the signal bounces off of an object and returns to the system, the signal is
amplified in a non-inverting amplifier. The AD711 and the non-inverting amplifier were
both chosen for the high input impedance, so as to take as much of the return signal as
possible. The resulting signal is then passed through a low pass filter and put through a
comparator. The threshold of the comparator is set just above the noise value. The
comparator is high when the signal is below the threshold and low with the signal is
above the threshold. Thus, it was most convenient to use it as interrupt for the
microcontroller to stop the count. The count is then converted to a string and save in
memory. At the same time that the interrupt occurs, the microcontroller toggles another
analog switch to let this return signal go to the PLL input (before this, the input with just
grounded, letting the PLL run in free mode). If the return signal has a frequency shift, the
control voltage of the variable controlled oscillator in the PLL will change. This change
is put through a low pass filter, through a differential amplifier, and a gain stage to
amplify this difference. The resulting voltage is then passed through a protection diode
and fed into a analog to digital converter on the microcontroller. This voltage is linearly
correlated with the frequency shift of the return signal with respect to the transmit signal,
and thus also the velocity. The voltage is converted also to a string of the velocity. Both
the distance and velocity are then displayed on the LCD.
         In the scan mode, everything occurs in the same order, except that the motor is
moved through a cycle. This is done by sending the proper control signals through a
ULN2003 buffer to the stepper motor.

See also block diagram, schematic
Conclusion:
         A very accurate ultrasonic rangefinder was made. The maximum distance is also
fairly long. Although the velocity detection is not very stable, it still giving an
approximate value for speed, and generally gives that correct direction of motion. Finally
the scanning stepper motor worked efficiently.




Thanks to Kyle Chrystal for making the lid of the box, and designing the mechanism to
hold up the transducers on a rotating platform.