News Item: PIC Sonar - Ultrasonic distance measurement
(Category: PIC projects)
Posted by ajay_bhargav
Mon Nov 09 2009, 06:15 pm

A simple projects demonstrating use of Ultrasonic sensor to measure distance. This project make use of PIC microcontroller and 40Khz ultrasonic transducers pair for measuring distance from obstacle and displaying it on 7-Segment LED display.

The working of project is based on the simple phenomenon of sound traveling. The time from transmission of the pulse to reception of the echo is the time taken for the sound energy to travel through the air to the object and back again.

Since the speed of sound is constant through air measuring the echo reflection time lets you calculate the distance to the object using the DST equation :

Distance = (s * t)/2 (in metres)

You need to divide by 2 as the distance is the round trip distance i.e. from transmitter to object and back again.

The 40Khz signal is generated form controller itself and given to ultrasonic transmitter via amplifier circuit. Receiver part includes preamplifier, peak detector and threshold circuit.

Block Diagram of PIC Sonar

Circuit Diagram:

for complete theory and code visit PIC Sonar project page

This news item is from Rickey's World of Microcontrollers & Microprocessors
( )