Ultrasound is a high frequency sound (typically 40 KHz is used). A short burst of sound waves (often only 8 cycles) is sent out the “Transmit” transducer (left, above). Then the “Receive” transducer listens for an echo. Thus, the principle of ultrasonic distance measurement is the same as with Radio-based radar.
To wire your SR-04 Ranging Detector to your Arduino, connect the following pins:
- Sensor Pin 1 (Gnd) –> Arduino Ground
- Sensor Pin 2 (Echo) –> Arduino Pin 11
- Sensor Pin 3 (Trig) –> Arduino Pin 12
- Sensor Pin 4 (Vcc) –> Arduino +5V