FundamentalPrinciples
A short ultrasonic pulse is transmitted at the time 0, reflected by an object. The sensor receives this
signal and converts it to an electric signal. The next pulse can be transmitted when the echo fades.
This time period is called cycle period. The recommend cycle period should be no less than 50ms. If
a 10μs width trigger pulse is sent to the signal pin, the ultrasonic module will output eight 40kHz
ultrasonic signals and detect the echo back. The measured distance is proportional to the echo
pulse width and can be calculated by the formula above. If no obstacle is detected, the output pin will
give a 38ms high level signal.
Requirements
Hardware
Arduino UNO x1
Battery Capacity Indicator x1
Software
Arduino IDE V1.6.9 Click to Download Arduino IDE from Arduino®
ConnectionDiagram