This is one of those small-but-valuable projects. Simple, but useful. The guts of it is basically a Propeller module cut out of the middle of a Protoboard, (I’ve used this before, Jeff Ledger has an article on it on warrentyvoid.com) a PING ultrasonic sensor, a 3 digit 7 segment LED display, and a PowerTwig from WBA consulting. The whole thing is powered by a 9 volt battery.
The program is straightforward, it reads the data from the PING with the default PING object, than converts the value to decimal and displays it (using multiplexing) to the 3 digit 7 segment LED display. The code does have limitations, though, that should be overcome with some experimenting. For starters, it only reads up to 125 inches, when the PING could probably read up to 25 feet. This [I believe] is due to a code size limitation; the amount of microseconds 1 long of data can hold. I’ll be working on it, setting up a terminal to log the amount of ticks from the PING and measuring (in feet) the distance to make sure the data is consistent.
If I modify the hardware it would be to, oh, ADD AN OFF SWITCH! Currently you have to pull the battery to cut the power because I didn’t have any small switches on hand to use for this project. I may also add a pushbutton and an accelerometer, then it would allow you to turn it to “level mode” for the full carpenter’s tool!
If you want to build one in a similar case, be sure to note that to fit the powertwig in, you kind of have to bend it around the curve of the plastic. Also be careful with the Dremel when you make your cut for the display so that you don’t have to cover up your “slip marks” with a nicely placed label and logo like I did!
I call this the “Poor mans mini-rangefinder” because it only costs about $50 to prototype: $30 for the PING, $10 for the Propeller setup (free if you use a scraped board like I did) , and $10 for the Powertwig. Of course this is assuming you already have a case and display, but even these don’t amount to much.
If you want the extremely versatile code for this project, you can download it here or on the Downloads page:
Thanks for reading! If you enjoyed it, please subscribe to my RSS!