Summary of Arduino ultrasonic range finder
This article details a portable ultrasonic range finder project using an Arduino, HC-SR04 sensor, and a 20x4 LCD display. The system measures distance up to 500 cm at 20 Hz, features a custom startup message, and runs on a 5V Arduino Nano with battery power. The code is fully commented for educational use, requiring no special tools beyond basic wiring and components costing under $15 excluding the microcontroller.
Parts used in the Ultrasonic Range Finder:
- Arduino (5-55$)
- Ultrasonic sensor HC-SR04
- 20x4 Display
- IIC/I2C/TWI/SPI Serial Interface Board Module
- Wires
- Breadboard
- USB cable
Hello,
in this project i want to show and explain you a range sensor with ultrasonic and a 20×04 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 20×4 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.
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$):
Parts:
Arduino (5-55$) , http://tinyurl.com/pk2wdt3
Ultrasonic sensor (2$), HC-SR04 , http://tinyurl.com/d3ss7tl
A 20×4 Display (6$) , http://tinyurl.com/pbk35ry
A IIC/I2C/TWI/SPI Serial Interface Board Module (2$) , http://tinyurl.com/nl2tr2k
Some wires
a Breadboard
A USB cable

Software:
Arduino , www.Arduino.cc
wire.h library (should be with the Arduino software)
LiquidCrystal_I2C.h library for the Display
NewPing.h library for the sensor
Tools:
what are tools? D:
(no tools needed, yay)
Additional:
a Case…
For more detail: Arduino ultrasonic range finder
- What is the maximum rated range of this device?
The maximum rated range is 500 cm. - How often does the range get measured?
The range is measured 20 times per second. - Can this project run on a battery?
Yes, it can run on battery for a portable rangefinder. - Does this require any special tools to build?
No tools are needed to build this project. - What type of Arduino is required for this project?
It requires a 5V version of an Arduino that supports I²C communication. - Can this be run on an Arduino Nano?
Yes, it can run on an Arduino Nano which is very small. - What libraries are needed for the display?
The LiquidCrystal_I2C.h library is required for the display. - What library is used for the sensor?
The NewPing.h library is used for the sensor.
