Acrob015
Zo stránky SensorWiki
< Previous | Home | Next >
Ultrasonic sensor for distance measurement
In following application we will use the Parallax PING))) Ultrasonic sensor.
- PING)))™ Documentation v1.6 (.pdf)
Features:
- Provides precise, non-contact distance measurements within a 2 cm to 3 m range
- Simple pulse in/pulse out communication
- Burst indicator LED shows measurement in progress
- 20 mA power cosumption
- Narrow acceptance angle
Key Specifications:
- Power requirements: +5 VDC
- Communication:Positive TTL pulse
- Dimensions: 22 x 46 x 16 mm
- Operating temp range: 0 to +70 °C
Principle of operation
The Ping sensor measures distance using sonar; an ultrasonic (well above human hearing) pulse is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return. Output from the PING))) sensor is a variable-width pulse that corresponds to the distance to the target.
The PING))) sensor detects objects by emitting a short ultrasonic burst and then "listening" for the echo. Under control of a host microcontroller (trigger pulse), the sensor emits a short 40 kHz (ultrasonic) burst. This burst travels through the air, hits an object and then bounces back to the sensor. The PING))) sensor provides an output pulse to the host that will terminate when the echo is detected, hence the width of this pulse corresponds to the distance to the target.
Interfacing to the microcontrollers is a snap: a single (shared) I/O pin is use to trigger the Ping sensor and "listen" for the echo return pulse. An onboard three-pin header allows the PING))) to be plugged into a solderless breadboard (on an Acrob, for example), and to be connected to its host through a standard three-pin servo extension cable.
Example program
#include <stdio.h>
Sources of errors
Air Temperature
Changing environmental conditions are the main source of the differences. Many quantities influences measurement
including temperature, humidity, turbulences, pressure and damping. Main source of error is air circulation and
temperature. Many equations appears in literature, two of them are mentioned here:
where
- - speed of the sound at 0° C and 0% RH (c0 = 331,5 [m/s]),
- - temperature coefficient of the speed (@ 0° C), γ = 1.83 10-3 [°C-1],
- - humidity constatnt (AV = 2,2 . 10^-4, for 50 ÷ 200 kHz),
- - relative humidity of air [%],
- - air temperature [°C].
For practical purposes we can abandon humidity influences and then simplified formula applies:
The percent error over the sensor’s operating range of 0 to 70 ° C is significant, in the magnitude of 11 to 12 percent. The use of conversion constants to account for air temperature may be incorporated into your program.
< Previous | Home | Next >