Introduction: Arduino LCD Project for Measuring Distance

Hello :)

May be you don't know how to use an ultrasonic sensor to measure the distance with an LCD display, so in this instructable I decided to make you happy and help you getting started. This sensor is very popular among the Arduino Geeks. In this project the ultrasonic sensor read and write the distance between the sensor and the object in front of it in the LCD display, It’s really simple.

My goal is to help you understand how this sensor works and then you can use this example in your own projects.

Step 1: Parts Required

- Arduino UNO R3

- 1x HC-SR04 Ultrasonic Sensor

- 1x LCD Display (I made this project with JHD162A)

- Some wires

Step 2: Connect the Components

Connect the components and wires as shown in this schematic.

Step 3: Upload the Code

Upload the sketch to your Arduino and watch the measurement.

For more projects about the HC-SR04 ultrasonic ranging sensor visit my GitHub repository
Good luck.

Comments

author
nareshk82 (author)2017-08-26

bro!! i uploaded the program on my arduino uno but still the distance is 0cm its not changing at all !! please help me i think my sensor is not working its different from yours..thanks in advance bro

author
kathait (author)2017-01-16

Very nice Sir but plz give the code

author
yachtSamba. (author)2017-01-12

add in a potentiometer to control the contrast: plug the wiper (the middle pin) to the 3rd pin on the lcd and plugging the other two pins to 5v and GND​

author
thalasujen (author)2016-12-09

what is the code of this project

author
reandybler (author)2016-06-29

give me code please??????

author
KhueD1 (author)reandybler2016-11-12

XD LOL The code is the sheet of paper thingy.

author
jerry.ericsson2 (author)2016-06-01

Must be kind of old the schematic is 404

author
JessieS19 made it! (author)2016-05-11

This is my first Arduino project. It was very simple, and the instructions were great. I did add a pot to control the contrast. Without it, it was still readable, but adding it made the screen a lot clearer. I took that idea from MC_GamingPro's photo. One of my images shows it without the pot while the other two show it.

20160511_234944.jpg20160511_234949.jpg20160511_234647.jpg
author
MC_GamingPro made it! (author)2016-05-08

Made this and it works very nicely, the accuracy is very high too!

IMG_2709.JPGIMG_2710.JPGIMG_2711.JPGIMG_2712.JPG
author
Ravi 1999 (author)2015-06-06

I made it and fixed it behind my car

author
HaroonJ1 (author)Ravi 19992016-05-06

Would u like to share with me,,
Thanks in advance..:)

author
HaroonJ1 (author)Ravi 19992016-05-06

Would u like to share with me,,
Thanks in advance..:)

author
HaroonJ1 (author)Ravi 19992016-05-06

Would u like to share with me,,
Thanks in advance..:)

author
AhmedDjebali (author)Ravi 19992015-06-06

Really, good job Ravi :)

author
kekelegend (author)2016-04-19

Where is the code????

author
MehmetcanK (author)2016-03-08

can we measure the mm units is that sensitive for that ?

author
MehmetcanK (author)2016-02-28

What code we need for this?

author
amjadpksbp (author)2016-02-19

It is possible to make a digital vernier caliper with it and send displaying figure on lcd to PC? if so it will be a very cheap digital measurement tool. Kindly reply.

author
asim.nasco (author)2015-07-12

How Much Distance it can measure????

author
isnatiyas (author)2015-07-03

could i use laser for measure the distance?

author
Ravi 1999 (author)2015-06-06

So that I will know how much to back up

author
seamster (author)2015-06-01

Nicely done. Thanks for sharing this!

author
AhmedDjebali (author)seamster2015-06-01

You're welcome. Don't worry Mr. seamster I will share with you more and more projects with easy instructions and just with the important details, because the details can be found anywhere but to get started easily sometimes you should struggle.

About This Instructable

37,140views

63favorites

License:

Bio: I like to learn different languages I speak Arabic, French and English very well. I spend more time reading about new computer science technologies specially ... More »
More by AhmedDjebali:Arduino LCD Project for Measuring Distance
Add instructable to: