The IO port TRIG is used to trigger the distance measurement, giving a high level signal of at least 10us. The module automatically sends eight 40khz square waves, automatically detects whether there is a signal return; there is a signal return, through the IO port ECHO output a high level, while opening the timer timing, when this port becomes low, you can read the value of the timer, the duration of the high level is the ultrasonic time from the launch to the return of the time. Test distance = (high level time * speed of sound (340M/S))/2; us/58 = centimetres or us/148 = inches; (us for the echo high level signal duration) It is recommended that the measurement period of 60ms or more to prevent the impact of the emission signal on the echo signal.
Product Parameters:
Electrical parameters: HC-SR04 ultrasonic module
Working voltage: DC 5 V
Working current: 15mA
Working frequency: 40kHz
The farthest range: 4m
Nearest range: 2cm
Measuring angle: 15 degrees
Input trigger signal: 10uS TTL pulse
Output echo signal: output TTL level signal, proportional to the range
Size: 45*20*15mm
Precautions:
1, this module should not be connected with electricity, if you want to connect with electricity, let the GND end of the module connected first, otherwise it will affect the normal work of the module.
2、When measuring the distance, the area of the object to be measured should be not less than 0.5 square metres and the plane should be as flat as possible, otherwise it will affect the results of the measurement.
3, TRIP pin is an internal pull-up 10K resistor, use the IO port of the microcontroller to pull down the TRIP pin, and then give a pulse signal of more than 10us.
4, if the test surface is not very regular or when testing long-distance objects, you can use multiple measurements to correct the method.