Measuring Distance With Sound

Makers, hackers, hobbyists and tinkering electrical enthusiasts have access to a variety of microcontrollers and ready-built accessories that achieve nearly every robotic or communication function imaginable. Parallax and RadioShack have ultrasonic ranging devices that are compatible with the Arduino style of microcontroller. RADAR systems use high frequency electromagnetic waves for measuring distance. With the Parallax and RadioShack sensors, users can now use sound waves to measure distance their own applications. Pictured above, Oscium’s iMSO-104 oscilloscope and an Apple iPad 2 are used in troubleshooting one of the ultrasonic sensors integrated with a microcontroller.

Intro For The Components Involved

Ultrasonic Sensors

For just under $30 someone can purchase a brand new ultrasonic range finder module. These nicely packaged gizmos use high frequency sound to measure distances. The theory of operation is relatively simple: the transmitter sends a “ping” into the world facing the module and the receiver listens to the “echo”. Anyone that has ever played Marco Polo in the swimming pool has first hand experience with using sound for judging distance.

RadioShack Ultrasonic Range Sensor

http://www.radioshack.com/radioshack-ultrasonic-range-sensor/2760342.html

Parallax PING))) Ultrasonic Distance Sensor

http://www.parallax.com/product/28015

Microcontrollers and Development Boards

There are code examples available online for the most popular microcontrollers that claim drop-in capability for the ultrasonic range finders listed above. Users need only to download the code segment from the microcontroller website, or other online source, compile and then upload the information to the processor in the microcontroller.

The range finder units’ electrical interface is simple. The connectivity between the microcontroller and the range finders consists of power (Vcc), return (GND), and the ping signal (SIG). Users with novice programming experience can write programs for any microcontroller board.

These two microcontroller boards are used in this blog series to study the ultrasonic range finders and provide readers with application examples.

Arduino Mega 2560 Microcontroller Board

http://arduino.cc/en/Main/arduinoBoardMega2560

Intel Galileo Gen 1 Development & Prototyping Board

http://www.intel.com/content/www/us/en/embedded/products/galileo/galileo-overview.html

Next Up: Trial 1: Arduino and Parallax

The first combination of microcontroller and range finder will be the Arduino Mega 2560 and the Parallax distance sensor. Readers will see example code segments from the Arduino sketch, see how the system compiles and uploads to the processor, and lastly see the distance sensor in use. Oscium’s iMSO-104 oscilloscope will be used to investigate and probe the circuitry on the Parallax board.