Distance Measurement using Arduino Ultrasonic Sensor…
This application report describes a distance-measuring system based on ultrasonic sound utilizing the MSP430F413 ultralow-power microcontroller. The system transmits a burst of ultrasonic sound waves towards the subject and then receives the corresponding echo. The MSP430 integrated analog comparator Comparator_A is used to detect the arrival of the echo to the system. The time taken for the ultrasonic burst to travel the distance from the system to the subject and back to the system is accurately measured by the MSP430. Assuming the speed of sound in air at room temperature to be 1100 ft/s, the MSP430 computes the distance between the system and the subject and displays it using a two-digit static LCD driven by its integrated LCD driver. The distance is displayed in inches with an accuracy of ±1 inch. The minimum distance that this system can measure is eight inches and is limited by the transmitter’s transducer settling-time. The maximum distance that can be measured is ninetynine inches. The amplitude of the echo depends on the reflecting material, shape, and size. Sound-absorbing targets such as carpets and reflecting surfaces less than two square feet in area reflect poorly. The maximum measurable range is lower for such subjects. If the amplitude of the echo received by the system is so low that it is not detectable by the Comparator_A, the system goes out of range. This is indicated by displaying the error message E.
Ultrasonic distance measurement - CORE
Ultrasonic sensors are great tools to measure distance without actual contact and used at several places like water level measurement, distance measurement etc. This is an efficient way to measure small distances precisely. In this project we have used an Ultrasonic Sensor to determine the distance of an obstacle from the sensor. Basic principal of ultrasonic distance measurement is based on ECHO. When sound waves are transmitted in environment then waves are return back to origin as ECHO after striking on the obstacle. So we only need to calculate the travelling time of both sounds means outgoing time and returning time to origin after striking on the obstacle. As speed of the sound is known to us, after some calculation we can calculate the distance.
The module works on the natural phenomenon of ECHO of sound. A pulse is sent for about 10us to trigger the module. After which the module automatically sends 8 cycles of 40 KHz ultrasound signal and checks its echo. The signal after striking with an obstacle returns back and is captured by the receiver. Thus the distance of the obstacle from the sensor is simply calculated by the formula given as
The algorithms are tuned for ultrasound distance measurement ..
First of all we need to trigger the ultrasonic sensor module to transmit signal by using arduino and then wait for receive ECHO. Arduino reads the time between triggering and Received ECHO. We know that speed of sound is around 340m/s. so we can calculate distance by using given formula: