Distance measurement by using ultrasonic sensor / Muhammad Faris Md. Zulkiflie & Muhammad Fakhrullah Mohamad Salleh - Md. Zulkiflie, Muhammad Faris; Mohamad Salleh, Muhammad Fakhrullah (2015)
Distance measurement by using ultrasonic sensor is an device to measure a distance just by using a sensor. Ultrasonic sensor is use and this sensor measures the time it takes an ultrasonic ping to go out, bounce off a target, and come back. The time it takes for the ping to leave and come back to the sensor depends on the speed of sound and the distance to the target. This sensor works in the same way a bat uses high pitched tones to navigate in the dark. It is also the same principle used in submarine sonar. This sensor is fairly easy to use. To hook it up, sensor VCC pin and hook it to the Arduino 5V pin. The sensor GND is connect to Arduino GND. The Trig pin on the sensor we take to pin 13 on the Arduino and the Echo pin on the sensor we connect to the Arduino pin 11. Since we know the speed of sound, we can use it to measure distance, since d = r*t (distance = rate *time). You know the rate, that is the speed of sound. You can measure the 'time' using the ultrasonic sensor, just as you did in Lesson 17. This is the time for a ping to go from the sensor to the target and back. Knowing this, you can then calculate the distance to the target. LCD is also use, These LCD are tricky to hook up because there are so many wires. Once the LCD is wired up, it is fairly straightforward to use. The connection is hook up to LCD after we program it. Last but not least, potentiometer is use to set the contrast of the LCD backlight by rotate the button