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:
Measures the distance from up, down, left and right to the hole, the center of the device.
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.
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.
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.
This is a DIY Project for those who want to spend a nice time making their own Arduino Distance Meter. This is not a professional tool, it have different resolutions depending on the sensor you chose and other factors as air temperature. You may have to calibrate it and you'll need some basic Arduino knowledge.
Ok, let's see how you can make your own.
Once you have the plans you can start cutting the plywood on the Saw Table. 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. Cut the base and cover and use the hand plane if needed. Mark and drill the holes for the buttons, the screws and the bubble wich is recycled from a cheap spirit level.
With the 3D Router make the hole for the display. Glue and screw a little block of plywood to hold the steel pipe. We can apply now the varnish. 3 coats of nitrocellulose lacquer in my case. And between them you can use transfer paper to write the names of the buttons. Now we can go with the electronics. I have used a bread board to make sure all the stuff worked and now we can keep going. With a perforated board I made a shield for the arduino with a little circuit.
Connect it to the computer and upload the code (you can download it for free in the foot page), check all is working ok and you can start the assembly. I have used a bread board to make sure all the stuff worked and now we can keep going. With a perforated board I made a shield for the arduino with a little circuit. You can actually do it without it but this way it will save us a lot of wires and the result will be cleaner.
To make it lower I moved the plastic part of the pins to the end and soldered them from below. To connect the display I had used a female pin header connector like this one. You'll probably have to solder the pins of the display depending on where you bought it. This female connectors can be so useful if you don't want to solder the sensors. Solder the potentiometer, the resistors and the rest of the cables and you can assembly it. I didn't have screws as small as the holes of the ultrasonic sensor so I had to use a drill to make the holes bigger. Take care if you have to do the same, I think a 2mm drill could be the bigger one you can use if you don't want to brake something. With a little plastic pipe you can make these little spacers. Now asembly the buttons and the level.
With a little plastic pipe you can make these little spacers.
The arduino with the board and the display and all the wires following the schematic. Bend a little plate and screw it to the base to hold the battery. You can use a little piece of EVA to avoid scratching the base or the wall
Finally cut the pipe and the drive pin and assembly them.