Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hi
Working principal of ultrasonic sensor: you send a sound wave @ 40kHz and note it's transmission time. When this sound wave hits some obstacle, it (or some part of it) reflects back. Now you sense this reflected wave and measure the time between transmission and reflection. This is rtt (round trip time). Divide it by 2 to get the time taken by sound wave to reach the obstacle. Now you can change this time into distance using d = v * t (v = velocity of sound, t = rtt/2)
In practice, an interface circuit is used between US sensor and micro controller.
Inside the interface circuit:
Transmitter: when it receives a high logic level from MCU, it starts sending sound wave
Receiver: it usually has a hardware integrator.
Operation:
MCU sends some pulses (4 or 6) to the transmitter circuit which then transmits 4 or 6 bursts of sound waves
When the receiver receives the reflected wave bursts, it integrates them. When the output of integrator crosses a certain threshold, it sends a signal to MCU.
MCU calculates the time between transmission and reflection and then calculates the distance as described above.