Introduction:

This project is about ultrasonic distance measurement using Arduino board and Ultrasonic Sensor. Using ultrasonic sensor, we can measure distance without making any physical contact between the measuring device and measurement surface. We are using the cheap HCSR04 ultrasonic sensor. The distance output is printed on LCD screen

Components Required

1 x Arduino Board

1 x USB Cable

1 x LCD

1 x HC-SR04 ultrasonic sensor

1 x Breadboard

Few resistors

connecting wires

Arduino Schematic:

Make the connections of ultrasonic distance sensor with Arduino as shown in the figure below. Ultrasonic Sensor has 4 pins. VCC and GND are power pins which should be connected to the +5v and GND of Arduino. The 2 other pins are trigger input and pulse output.

When we give a signal to the trigger input, the ultrasonic transducer present on the sensor emits a sound wave of ultrasonic frequency. This sound is not audible to human ears. When this audio frequency wave is fallen on any flat surface, it reflects back and the ultrasonic transducer generates a pulse output. The width of this pulse output is directly proportional to the distance of the object from sensor giving an exact output of the distance value.

Mount below circuit on breadboard and copy below sketch on Arduino IDE, upload the code and view the output on LCD

Code:

 Working Video of this Project