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.

You can find the code here

If you are in your phone or tablet and you can't see the video, click here

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
A little bit of hard plywood, of course

The sr04 has a 3mm resolution, so I am only using it in entire centimeters. You can also change it to inches pressing a button but then the resolution is even worse. I am trying to figure out how to get a better resolution, I know it is possible. Needless to say any help will be apreciated.

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.

Step 1: Making the Case

You can start cutting the plywood. If you have a different idea for the design of the box, you can avoid this part and go directly to the electronics. Tilt the disk 45 degrees and cut the four pieces for the frame.

Drill the holes for the sensors and for the usb cable and use a chisel adapt the place for the connector. You can use a little bit of fabric to make sure they fit exactly in the middle and mark with the drill.

Ready to apply the glue. Remove the remains of glue and check if it is squared.

I have tried in the Arduino Uno, successfully ... !! But there is less to see often changed, but when the "unit, prog" pressed on the display will not change.
<p>I don't know what can be happening, check the buttons wires and resistors. If you are using a different board, you will have to modify the code changing the digital pins for the buttons.</p>
<p>very nice build!</p>
<p>thank you!</p>
<p>why di i need the code and i do i get it work,my computer dont recognize the file</p>
<p>Thumbs up !!!</p>
<p>Hi, this is nice work. But you say &quot;I am trying to figure out how to get a better resolution, I know it is possible.&quot; One way is to measure temperature and compensate for the variation in the speed of sound with temperature. I did an experiment with that and documented it here &lt;a href=&quot;http://la3za.blogspot.no/2014/05/temperature-compensation-for-arduino.html&quot;&gt;</p><h3>Temperature compensation for an Arduino ultrasonic distance sensor&lt;/a&gt;</h3>
<p>Thanks LA3ZA. It seems to be an amazing solution. I'll give it a try! </p>

About This Instructable




Bio: Hi, I'm a instrument maker and sometimes do other woodworking projects. You can also check out my website www.paoson.com
More by Paoson Woodwork:Drill Press Stand Cork World Map  Make a Push Stick for Your Saw Table 
Add instructable to: