![SunFounder Smart Car Kit V2.0 Manual Download Page 23](http://html.mh-extra.com/html/sunfounder/smart-car-kit-v2-0/smart-car-kit-v2-0_manual_1396360023.webp)
20
(a) When the button is NOT PRESSED (b) When the button is PRESSED
Ultrasonic Module HC-SR04 Distance Sensor
The ultrasonic ranging module HC-SR04 provides 2cm-700cm non-contact measurement
function, and the ranging accuracy can reach 3mm. Stable signal can be ensured within
5m, and signal gradually fades beyond 5m till disappearing at 7m position.
The module includes ultrasonic transmitters, receiver and control circuit. The basic principle
of work:
1)
Using IO trigger for at least 10us high level signal;
2)
The module automatically sends eight 40 kHz square waves and detect whether there is
a pulse signal sent back.
3)
If there's a signal sent back, output a high level through pin ECHO; the time duration is
the time from sending the ultrasonic to the returning.
Thus,
test distance = (high level time × velocity of sound (340M/S) / 2
.
The timing diagram is as shown below. You only need to supply a short 10uS pulse to the
trigger input to start the ranging, and then the module will send out an 8-cycle burst of
SunFounder