Pictured above, iMSO-104 measures the pulsed Tx and Rx signals from a Parallax Ping))) ultrasonic range sensor that is driven by an Arduino Mega micro controller. This system is one of the basic building blocks for robot vision. Makers and hobbyists around the world are innovating new creations around systems just like this one.
Interconnect DiagramThe diagram shown below depicts the few required interconnects between the Arduino controller and the Parallax Ultrasonic Sensor. It is a simple three-wire interface requiring only Ground, Vcc, and a Signal. The diagram below also has pin assignment information.
Here’s What’s Happening – Distance Measurement
This figure above sketches the system’s components and some consideration given to placement. On the left, there’s a micro controller. The micro controller acts like the stopwatch for the system. It starts counting when the PING signal goes High, and then stops when the PING signal returns to Low. The program running in the micro controller takes the elapsed time between Start and Stop, divides by two, factors in the speed of sound, and calculated the one-way distance the sound PING traveled between the High and Low transitions of the signal. The figure below shows the Pulse and Echo events from the PING))) sensor (Green Trace), the Arduino micro controller’s Pulse signal transitioning from Low to High with the Tx pulse, and then High to Low with the Rx pulse. Seeing the signals and timing in an overlay diagram like this one is often very helpful for debugging and designing the interactions between components in a system.
The 40 kHz signal inside the pulse can be seen by a high-speed digital oscilloscope. A follow-on project from this blog post might be just that: connect an oscilloscope to the audio output of the PING))) sensor and look at the waveform before it is transmitted through the air at the target. The figure below depicts the sinusoidal 40 kHz audio wave inside the PING))) sensor’s pulse.