Arduino Distance Meter

Discuss topics related to woodworking projects
Post Reply
Posts: 2244
Joined: Thu Oct 22, 2015 4:51 pm

Arduino Distance Meter

Post by Suso » Fri Jan 22, 2016 9:07 am


This a project I've been working for some time now. It is a device that shows in a little lcd display the distance to the nearest object it can find, usually the floor, the ceilling and two walls or columns. So it can be so helpful to hang a picture, a shell, a light point, calculate the area of the entire wall, etc.

I have chosen to use cheap materials cause I don't really need a high precision and like almost always I am doing it for fun... so I think you can buy all the electronics for less than 15$ on ebay:

1 Arduino Mega
4 Ultra-sonic sensor sr04
1 LCD 16x02 Display
1 Perfored Prototype board
2 10k Resistors
1 10k Potentiometer
Male and female arduino pin header connectors
A few cables And as always, plywood, of course

It has 4 programs:
1. Hole
Measures the distance from up, down, left and right to the hole, the center of the device.
2. Rel
When you chose the second program, all the measurements reset to 0 and it will start measuring from that point. In this case I am making a mark 10 centimeters away from the first one.
3. Total
The number 3 does not measure from the hole but from the opposite side of the device. Useful if you want to know, for example, the distance from 2 walls or the height of the ceilling.
4. Area
The last one calculates the area. If you place it in a corner it will show you the total area of the wall, in this case the number you can see on the right.

More info on Blog

Posts: 1
Joined: Wed Mar 09, 2016 7:38 pm

Arduino Distance Meter

Post by OssieListon » Wed Mar 09, 2016 6:47 pm

Thanks for sharing this wonderful project here. I was looking for this type of project for some applications like for blind people. It can become handheld device to observe the obstacle.
Can you please share the schematics and your firmware?
Also please share the specifications of the Ultrasonic sensor.

circuit board fabrication

Posts: 2244
Joined: Thu Oct 22, 2015 4:51 pm

Arduino Distance Meter

Post by Suso » Thu Mar 10, 2016 9:09 am


you can download the code and schematic for free, here at the end of the page:
Arduino Distnace Meter

And here the specs of the SR04 sensor:

Post Reply