Arduino LCD Project for Measuring Distance Using Ultrasonic Sensor

Views
Arduino LCD Project for Measuring Distance Using Ultrasonic Sensor

In this post i will show you how to use an ultrasonic sensor to measure distance and display the measured distance on the LCD.



With the help of this project we can easily measure the distance in inches or cm. We can use this sensor to measure the distance from  2cm to 400 cm Or 1” to 13 feet.The Ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. It's operation is not affected by sunlight or black material like Sharp rangefinders are. It comes complete with ultrasonic transmitter and receiver module.


Parts List:

To create this Distance measurement project you will need a list of parts, that are given below:

(Click on the name to buy it)

1. Arduino Uno R3

2. Ultrasonic Sensor

3. 16x2 LCD Display

4. Peizo Speaker

5. 10K Potentiometer

6. Breadboard with Jumper Wires

7. 5V Adapter


Circuit Diagram-1:


You can use the Schematic below to connect the circuit.

Arduino Distance Measurement Circuit Diagram

Connection Procedure:


1. LCD with Arduino:

16x2 LCD Module Pin diagram:

16x2 LCD Module Pin diagram:

LCD (Liquid Crystal Display) screen is an electronic display module. Easily programmable and preferred over seven segments. Connect LCD (GND, R/W, Led-) pins to the Arduino's GND pin and (VCC, Led+) pins to the Arduino's 5V pin. Connect (VEE) pin to a 10K potentiometer. Now Connect LCD (RS, EN, DB4, DB5, DB6, DB7)
pins to the Arduino's (10, 9, 5, 4, 3, 2).

2. Ultrasonic Sensor With Arduino:

This Ultrasonic Sensor has 4 pins which i've used in this tutorial. Connect its Vcc and GND pins to the Arduino's GND and VCC Pins and (Trig , Echo) to Arduino's (12, 13) pins.

3. Speaker With Arduino:

Connect the Black Wire (GND) and red wire (VCC) to the Arduino's GND and pin num 7 respectively.

4. Potentiometer with LCD:

Potentionmeter has 3 pins, connect its middle pin with LCD VEE pin and Other two with Arduino's GND and VCC Respectively.

Arduino Code:

Open this code with Arduino ide Software. Upload it to Arduino. You can also upgrade the code for better performance.

Get The Code

(Don't Compare this screenshot code with this Given code. I gave it to understand the process how to upload the code)

Arduino Ide Software

Video Demo:




If you got any problem to build this Distance Measurement project please let me know i will try my best to help.

Previous
Next Post »