The SunFounder HC-SR04 Ultrasonic Ranging module includes an ultrasonic transmitter, receiver and circuits. It has 4 pins: VCC, TRIG, ECHO and GND. The anti-reverse pin header onside makes it easy to connect and apply.
As for the ranging principle, it is quite simple to understand: pull up the pin Trig to High thus providing high level signals of at least 10us, so the module starts to detect and measure the distance; if an object is detected, the ECHO pin will be High, and the duration of it being High depends on the distance detected, thus giving the distance calculation formula: Distance = Duration of High ECHO * Speed of sound (340m/s)/2.
- Adopts IO port trigger for at least 10us high level signal.
- It can send eight 40khz square wave automatically, and detect if there is any signal returned.
- If the signal returning, output one high level signal via IO port. The duration of the high level signal is the time from sending ultrasonic to returning.
- Measuring distance=duration of high level x sound velocity(340m/s)/2
- Power supply :5V DC; Quiescent current :<2mA; Ranging distance : 2cm~450cm; High precision: Up to 0.3cm