Sunday, November 21, 2010

Arduino Sonar

This is a fun project I made with an Arduino UNO. It's a simple Sonar using an ultrasonic sensor.

 

Arduino
Arduino is an open-source hardware/software platform based on Atmel ATmega, being an open-source fanatic I couldn't resist buying it :) it's remarkably easy to learn, given that this is my first Arduino project and it took just a couple of hours ! Arduino is  programmed in a language based on Wiring.  At the time of this writing UNO is the latest Arduino board based on ATmega328.
Arduino Sonar
The idea behind the project quite simple, the servo rotates the ultrasonic sensor 180 degrees back and forth while sending/receiving ultrasonic pulses, objects are displayed on LCD by drawing lines proportionally to the time it takes the pulse to travel back to the sensor. This type of Sonar is called an Active Sonar because it initiates the ultrasonic  waves and listens for the echo as opposed to a passive one that listens to  incoming waves from other sources.



I used the PING Ultrasonic Sensor from parallax, however, any sensor should work equally well, even an Infrared sensor, as for the LCD I used the Nokia 6100 Knock-off color LCD from sparkfun. Here are some pictures showing the results of scanning the test subjects :)




The whole project can be found here, I ported the LCD driver it was originally written for mbed.

hg clone https://arduino-sonar.googlecode.com/hg/ arduino-sonar
Read more ...