This ultrasonic sensor breakout can measure distance beween 2cm to 450cm, and can be as accurate as 3mm. The components onboard include transceiver and control circuit.
The basic principle:
- It uses IO to trigger the distance measurement. The host asserts the IO pin high in a duration of 10us.
- The module will send a square waveform of 40Khz with a duration of 8 cycles, and will automatically sense the echo.
- If there is echo, it will output a high level signal from the IO pin ECHO. The duration of the high level signal is the time it takes for the transmiting to the receving. The distance measured is (duration of high level signal*speed of sound (350m/s))/2.