Arduino ultrasonic range finder, with lcd display!


in this project i want to show and explain you a range sensor with ultrasonic and a 20x04 lcd screen. I wrote the code for this project myself and added lots of comments, so that everybody can understand it and use it for other projects (maybe a light range sensor?!). It is easy to build and much more easier to program, it just requires a few cheap parts and can run on battery, for a portable rangefinder.

The maximum rated range is 500 cm, the range is measured 20 times per seccond. It is Displayed on a lcd screen which is 20x4 chars big, it has a custom start message, and it can have a custom design while measuring. It will have a backlight LED and can run on every arduino, which has I²C communication. That mean you can run it on an Arduino nano, which is very small. It also requires 5V so it has to be a 5V version of an Arduino.
Remove these adsRemove these ads by Signing Up

Step 1: What do you need & Tools

We dont need much things, the parts should be less then 15$ (without arduino, with arduino may 25-35$):


Arduino (5-55$) ,
Ultrasonic sensor (2$),  HC-SR04  ,
A 20x4 Display (6$) ,
A IIC/I2C/TWI/SP​​I Serial Interface Board Module (2$) ,
Some wires
a Breadboard
A USB cable


Arduino ,

wire.h library (should be with the Arduino software)
LiquidCrystal_I2C.h library  for the Display
NewPing.h library for the sensor


what are tools? D:

(no tools needed, yay)


a Case...

Step 2: The Display

Now we need to connect the IIC I2C TWI SPI Serial Interface Board Module to the display, that allows us to easily use the Display with the I²C bus of the Arduino ( nearly every Arduino/Atmel processor can communicate with I²C, it just need a SDA and a SCL pin). Solder the module to the display ( picture 2 ).

Take care of the heat, it can easily destroy the display and the module!!!
Fenex1 month ago

Hey :)

Really cool instructable. I already ordered the parts to build it. Just one question: what's the accuracy of the measurement?

Jan_Henrik (author)  Fenex1 month ago

Hi, the accuracy at 20°C is 3,4% :)