Question:

I need information on how to use ultrasonic sensor to measure distance. i also have to use PIC. help me?

by  |  earlier

0 LIKES UnLike

where can i find those info

 Tags:

   Report

1 ANSWERS


  1. The simple explanation:

    You excite the ultrasoncic transducer with a short pulse.  At the same time, that pulse starts a timer.  The transducer is switched from 'transmit' to 'receive' mode.  When the echo of the transmitted pulse is detected the timer is shut off.  The timer will contain an indication of distance because the farther away the object (to be measured) is, the longer it will take for the echo to return.  Thus more time on the timer means longer distance.

    To calibrate time, you need to know the density of the medium.

    If you have 2 transducers, one can be used solely as a transmitter, while the other one can be used as a receiver.

    To use a PIC, you can have one I/O pin produce a short pulse (on the order of 1 microsecond) and have another I/O pin be the input from the receiver.  You will need signal conditioning equipment both to power the transmit transducer from the logic-level pulse, and to amplify the received echo from the receive transducer.  Or, external circuitry will be needed to switch modes of a single transducer from transmit to receive.

    Inside the PIC you will need to create a counter that counts micro-seconds.  You will also need a state machine that resets the counter, sends a transmit pulse, starts the counter, stops the counter when the echo is present, and possibly display distance on a display, including doing the math to translate microseconds to feet, or meters (or both).

    .

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.