Product description: Ultrasonic distance sensor HC-SR04 2-200cm - justPi
Ultrasonic sensor working in the range of 2-200 cm. Powered with voltage of 5 V. The output is a signal whose duration is proportional to the measured distance.
Video
Directions of ultrasonic sensor HC-SR04
To begin the measurement, you must specify the output pulse voltage on the pin TRIG (high state 5V) for 10 s. The module measures distances using sound wave with a frequency of 40 kHz. To the microcontroller, a signal is sent, in which distance depends on the duration of high state and it can be calculated by the formula:
test distance = (high level time × velocity of sound (340m/s) / 2
where:
- test distance - the measured distance
- high level time - duration of high state
- velocity of sound - velocity of sound waves' emission in air - 340 m/sec
In short, to get the result in centimeters, use the formula:
distance[cm]= ( high level time[us]* 34 ) / 1000 / 2
HC-SR04 sensor specification
- Supply voltage: 5 V
- Average current consumption: 15 mA
- Measuring range: from 2 cm to 200 cm
- Output: frequency signal
- Working frequency: 40 kHz
- Dimensions: 45 x 20 x 15 mm
Details inthe documentation.
Accessories for HC-SR04 - justPi sensor
Ultrasonic distance sensor HC-SR04 2-200cm - justPi.
Useful links |