Have you ever wanted an ultrasonic tape measure, like this Stanley? (See picture). Well, I have but then I am a Lazy Old Geek. I don’t really need one but I thought I’d try to make one. And naturally, I thought of an Arduino.
August 2012 update: I just found out the software used in this Instructable does not work in the latest Arduino environment, 1.0. I think it is the LCDKeypad library but haven't found an updated version or software fix. However, this does work with version 023. LOG
Remove these ads by
Signing UpStep 1: Parts List
Arduino $17.60 (Duemilanove 2009) ebay.com
HC-SR04 Ultrasonic $ 4.61 ebay.com
LCD Keypad (Arduino) $ 8.88 ebay.com
Now I realize this is about $30 where the Stanley is available for around $24 but these parts are not committed to one function like the Stanley is.
Parts selection:
I wanted an Arduino that was shield compatible. I already have two, a Freeduino and Seeduino so I decided to buy a third. Right now, one of the best deals I liked is for a standard Arduino Duemilanove 2009 on ebay.
By the way, mine came with an Atmega 328-PU instead of the ‘standard’ Atmega328P-PU. I discussed this in another Instructable:
http://www.instructables.com/id/My-Arduino-Bootloader/
The LCD keypad also has Arduino support plus five user pushbuttons and a 16x2 (16 characters x two rows) display.








































Visit Our Store »
Go Pro Today »




I replicated the tape measure exactly, but hooking up Trig & Echo to 2,3 results in it just showing 0.0 and not measuring. I transferred it to my mega 2560 and it works when assigned pins not connected to the LCD shield. I would like to know what i'm doing wrong with my UNO R3.
Thank You,
Albert L. Chupick
0. Do a visual inspection of your work to look for shorts, solder bridges or cold solder joints.
1. Connect HCSR04 and LCD to UNO R3
2. Without power, with a DMM, measure for continuity between HCSR04 Trigger and D2 on the UNO R3 which is Atmega328 pin 4.
3. Measure continuity between Echo and Atmega pin 5
4. If ok, then turn on power and make sure you have 5V and ground on the HCSR04
5. Load sketch and carefully wiggle all added connections to see if you get any reading.
6. If still not working, turn off power and make sure pin 4 or 5 aren't bent over instead of going into the socket.
7. If still not working and you have one, try a different Atmega328.
Hope this helps.
LOG
In file included from sketch_dec06a.cpp:2:
C:\Users\Chris\Desktop\ARDUINO\arduino-1.0.1\libraries\HC_SR04Ultrasonic/Ultrasonic.h:11:22: error: WProgram.h: No such file or directory
The HC_SR04 library has been installed. Anyone any ideas please - still relatively a noob . Tx
Thanks
LOG
LOG
The UltraRanger file is the program sketch. I don't think it matters where you store it but I store all of my sketches in a directory under Arduino-0023 called MTS. So it would look like this c:\arduino-0023\MTS\UltraRanger.
TIP: Apparently a .pde file has to be in a subdirectory of the same name. So I have UltraRanger.pde under UltraRanger directory.
Now I'm not sure but it seems like sometimes I had to reboot my computer to get the Arduino environment to see everything.
Now when you start up your Arduino software, you go to file open and find the UltraRanger directory and open up UtraRanger.pde.
Hope this helps.
LOG
When using Arduino-1.0 you have to change all of the WProgram.h to Arduino.h for it to work with the new software. I thought i was downloading it wrong. Very cool project. Thanks for the Instructable.
LOG
LOG
I suspect you need to update your Arduino IDE but you might also try to reload the header files. One source is:
http://iteadstudio.com/application-note/arduino-library-for-ultrasonic-ranging-module-hc-sr04/
though the download is an *.rar file
Iteadstudio has some good information on the HC-SR04.
Hope this helps.
LOG
not having trouble with the ultrasonic just the lcd keypad thing but i will check out the site you mentioned.
thanks for the reply bro
LOG
Yes, the measurement is from the front of the device,
That's a good idea about measuring from the back of the Arduino. It's a little tricky in that the power connector is on that side so that would have to be added in also or you could mount the sensors on one of the sides or maybe even perpendicular to the LCD.
Right now I have mine torn apart for some other projects but the idea behind my design is so that it can be easily recreated just by plugging in the cable connectors and the sensor. Assuming that I can find them again.
LOG
LOG
LOG