Datasheet HY-SRF05 - 3

DescriptionPrecision Ultrasonic Sensor
Pages / Page3 / 3 — Measurement Procedure & Formula
File Format / SizePDF / 221 Kb
Document LanguageEnglish

Measurement Procedure & Formula

Measurement Procedure & Formula

Model Line for this Datasheet

Text Version of Document

Measurement Procedure & 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.