Interfacing Ultrasonic Rangefinder with AVR

HC-SR04 sensor

In this tutorial, we are going to interface ultrasonic rangefinder with the all popular ATMEGA8. Ultrasonic rangefinder is used to find range of an obstacle or a wall from the sensor. However, when there are cheap methods available to find range like the IR sensor or even a combination of LED’s and LDR would do but the question is why we use a more costly sensor. The reason is:- IR sensors are not accurate Result varies from object to object Calibration is required Works good only for shot range Normally the IR sensors have a range from 30-80 cm or even less depending upon the manufacturer and also the LED’s used. However for an ultrasonic rangefinder, the distance can be measured accurately up to 400cm with an accuracy of 1cm. … Continue reading