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
[…] Ranging Detector – Measuring Distance with Arduino. Teckel12 / Arduino New Ping. Index Introduction When I first received an ultrasonic sensor I was not happy with how poorly it performed. I soon realized the problem wasn't the sensor, it was the available ping and ultrasonic libraries causing the problem. The NewPing library totally fixes these problems, adds many new features, and breathes new life into these very affordable distance sensors. […]