The HC-SR04 module is often used in robot obstacle avoidance, object ranging, liquid level detection, public security, parking lot detection and other places.
The HC-SR04 module is mainly composed of two general-purpose piezoelectric ceramic ultrasonic sensors and a peripheral signal processing circuit.
Two piezoceramic ultrasonic sensors, one for sending out ultrasonic signals and one for receiving reflected ultrasonic signals.
Since both the sending signal and the receiving signal are relatively weak, it is necessary to increase the power of the sending signal through the peripheral signal amplifier, and amplify the reflected signal, so as to transmit the signal to the microcontroller more stably.
Use voltage: DC-5V
Quiescent current: less than 2mA
Level output: high 5V
Level output: bottom 0V
Induction angle: no more than 15 degrees
Detection distance: 2cm-450cm
High precision up to 0.2cm
Pin:
The ultrasonic module has 4 pins, which are Vcc, Trig (control terminal), Echo (receiving terminal), and GND; where VCC and GND are connected to a 5V power supply, Tg (control terminal) controls the ultrasonic signal sent, and Ech0 (receiving terminal) ) to receive the reflected ultrasonic signal.
The MCU pin triggers Tig ranging, giving a high level signal of at least 10us
The module automatically sends 8 square waves of 40khz, and automatically detects whether there is a signal return;
There is a signal return, a high level is output through the IO, and the microcontroller timer calculates the duration of the high level
The time it takes for an ultrasonic wave to return from its launch.
Calculation formula: test distance = (high level time * speed of sound (340M/S)/2
Package include:
5 x HC-SR04 distance sensor module
3 x Mounting bracket