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.

Very nice Sir but plz give the code
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​
<p>what is the code of this project</p>
<p>give me code please??????</p>
<p>XD LOL The code is the sheet of paper thingy.</p>
<p>Must be kind of old the schematic is 404</p>
<p>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.</p>
<p>Made this and it works very nicely, the accuracy is very high too!</p>
I made it and fixed it behind my car
<p>Would u like to share with me,,<br>Thanks in advance..:)</p>
<p>Would u like to share with me,,<br>Thanks in advance..:)</p>
<p>Would u like to share with me,,<br>Thanks in advance..:)</p>
<p>Really, good job Ravi :) </p>
Where is the code????
<p>can we measure the mm units is that sensitive for that ?</p>
<p>What code we need for this?</p>
<p>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.</p>
<p>How Much Distance it can measure????</p>
<p>could i use laser for measure the distance?</p>
So that I will know how much to back up
<p>Nicely done. Thanks for sharing this!</p>
<p>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 <a href="https://github.com/AhmedDjebali/Getting-Started-With/tree/master/Sensors" rel="nofollow">get started</a> easily sometimes you should struggle. </p>

About This Instructable




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: