[ MAKING ] ULTRASOUND RANGE FINDER

  ULTRASOUND RANGE FINDER

Everybody knows the speed of the sound in the dry air is around 340 m/s. Send a short ultrasonic pulse at 40 Khz in the air, and try to listen to the echo. Of course you won't hear anything, but with an ultrasonic sensor the back pulse can be detected. If you know the time of the forth & back travel of the ultrasonic wave, you know the distance, divide the distance by two and you know the range from the ultrasonic sensor to the first obstacle in front of it.
Here we use an ultrasonic piezzo transmitter with its receiver, they are very efficient, easy to find and quite cheap.



First, we have to send the pulse : it is easy to get a 40 Khz pulse from a PIC PWM output. You can drive an ultrasonic transmitter directly from the PIC output, but the sense range will not exceed 50 cm. Using a transistor and a resonator circuit, the ultrasonic transmitter will get around 20 volts and the sense range will be extended up to 200 cm.
Second we have to sense the echo : the piezzo receiver can provide a few dozens of millivolt, this will be enough for a PIC ADC with 4 mV resolution without extra hardware.
C1 is a decoupling capacitor
The PWM pulse from the RC2 pin of the PIC drives the T1 transistor base through R1 resistor
A 330 µH inductor is added in parallel to the piezzo ultrasonic transceiver, to form a LC resonnator, the D1 diode protects T1 from reverse voltage.
The ultrasonic receiver is directly connected to the RA1 pin of the PIC (ADC channel number 1), with R3 in parallel as impedance adaptator.

[ SOURCE CODE ] MAKE ULTRASONIC DISTANCE SENSOR



if u like the post just say thank u in comment box.

No comments:

Post a Comment

its cool