(redirected from Tutorial.UltrasoundSensor)

Learning   Examples | Foundations | Hacking | Links

Ping Ultrasonic Range Finder

The Ping))) is an ultrasonic range finder from Parallax. It detects the distance of the closest object in front of the sensor (up to 3m). It works by sending out a burst of ultrasound and listening for the echo when it bounces off of an object. The Arduino board sends a short pulse to trigger the detection, then listens for a pulse on the same pin. The duration of this second pulse is equal to the time taken by the ultrasound to travel to the object and back to the sensor. Using the speed of sound, this time can be converted to distance.

Circuit

The 5V pin of the PING))) is connected to the 5V pin on the Arduino, the GND pin is connected to the GND pin, and the SIG (signal) pin is connected to digital pin 7 on the Arduino.

click the image to enlarge

image developed using Fritzing. For more circuit examples, see the Fritzing project page

Schematic:

click the image to enlarge

Code