Microcontroller › 8051 › Interfacing AT89S51 with ultrasonic sensor and LCD › Interfacing Ultrasonic sensor
Ultrasonic sensor uses a technique called ECHO in which you somthing reflecting back after striking from the surface. sensor provides an output signal proportional to distance based on the echo. The sensor here generates a sound vibration in ultrasonic range upon giving a trigger, after that it waits for the sound vibration to return.
steps to calculate distance: