Ultrasonic Distance Sensor HC-SRF05
The HY-SRF05 is an ultrasonic emitter/receiver used to measure distance with a precision of ~0.3cm
The HY-SRF05 is an ultrasonic emitter/receiver used to measure distance with a precision of ~0.3cm. It sends out a 40 KHz square wave signal that reflects on objects in front of the sensor. This signal is then read back by the sensor and the duration of the received signal is reflected on the ECHO pin.
Technical Specifications
Supply Voltage | 4.5V to 5.5V (VCC) |
Supply Current | 10 to 40 mA |
Trigger Pin Format | 10 uS digital pulse |
Sound Frequency | 40 KHz |
Echo Pin Output | 0V - VCC |
Echo Pin Format |
Output is digital and directly proportional with range |
Measurement Range | 2cm to ~4.5m |
Measurement Resolution | 0.3cm |
Measurement Angle | up to 15 deg |
Connector | 5-pin male |
Measurement Procedure and Formula
Distance measurements can be made with microcontrollers in a straightforward manner:
You can find an Arduino Library with code here: http://forum.arduino.cc/index.php?topic=106043.0
- Send a 10 uS wide pulse to the sensor on the Trigger Pin. The sensor will automatically send out a 40 kHz wave.
- Begin monitoring the output from the Echo Pin and
- When the Echo Pin goes high, begin a timer.
-
When the Echo Pin goes low, record the elapsed time from the timer and use the following conversion formula:
Distance (in cm) = (elapsed time * sound velocity (340 m/s)) / 100 / 2
Note: we divide distance by 2 because the sensor returns the round trip time, which doubles the distance measurement.
Resources