The speed of the sound in the dry air (20° C) is around 343 m/s. Send a short ultrasonic pulse at Frequency of 40Khz in the air, and try to listen to the echo. Of course you won’t hear anything (only a little click noise), 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.
[Read more…]