Ultrasonic Measuring Device
by brickbuilder2 in Circuits > Arduino
1434 Views, 10 Favorites, 0 Comments
Ultrasonic Measuring Device
![Ultrasonic Measuring Device Main.jpg](/proxy/?url=https://content.instructables.com/F8Z/1RXL/IR9E9DU5/F8Z1RXLIR9E9DU5.jpg&filename=Ultrasonic Measuring Device Main.jpg)
Supplies
![Parts.jpg](/proxy/?url=https://content.instructables.com/FS2/EQFK/IR9E9I5W/FS2EQFKIR9E9I5W.jpg&filename=Parts.jpg)
In order to build this, you will need:
·An Arduino (I used Uno)
·The Arduino IDE
· Android Serial Monitor app
·One HC-SR04
·One HC-06 Bluetooth module
·A breadboard
·A Battery Case
·Batteries for case
·Male to Male jumper wires
·Male to Female jumper wires
All of these can be found at Amazon for as little as $40. Now that we have our parts, let's get building!
Wiring
![Ultrsonic Measuring Tape_bb.jpg](/proxy/?url=https://content.instructables.com/FNZ/4OBC/IR9E94UF/FNZ4OBCIR9E94UF.jpg&filename=Ultrsonic Measuring Tape_bb.jpg)
Using the diagram, connect the echo pin of the HC-SR04 to pin 8 on the Arduino using the male to female wires. Connect the trig pin to pin 7 in the same way. Once this is done, place the vcc and gnd pins in separate breadboard rows. Now for the Bluetooth! Although the Bluetooth is optional, it allows us to view the data without connecting it to the computer. Place the rxd pin in pin 1 of the Arduino,and place the txd pin into pin 0. The place the vcc and gnd pins in the same breadboard rows as the vcc and gnd of the HC-SR04.
Finish Wiring and Coding Arduino
![Ardu Logo.jpg](/proxy/?url=https://content.instructables.com/FTS/ZAVD/IR9E93EE/FTSZAVDIR9E93EE.jpg&filename=Ardu Logo.jpg)
Now for the Arduino! Connect the 5V pin to the vcc breadboard row. Do the same for the gnd Arduino pin and the gnd row. Now for the code! Using the Arduino IDE, upload the code below to your Arduino. You may have trouble uploading the code to the board. This is because of the Bluetooth module. To fix this, simply unplug the Bluetooth module until the code is done uploading.
Downloads
Turn It On
![Uno.jpg](/proxy/?url=https://content.instructables.com/FGM/K4PL/IR9E9I7H/FGMK4PLIR9E9I7H.jpg&filename=Uno.jpg)
Time to test our device! Put the batteries in the case. Then connect the positive (red) wire to the vcc row, and the negative (black) wire to the gnd row. You should see the Arduino and the Bluetooth light up. Now connect to the Bluetooth (normally HC-06) through the Android Serial Monitor app. Once connected, you should see the readings from the device.
Done!
![temp_718926693.jpg](/proxy/?url=https://content.instructables.com/FFG/H3K5/IR9E9DTZ/FFGH3K5IR9E9DTZ.jpg&filename=temp_718926693.jpg)
Now that you've built it, there are easy ways to modify it for different projects. With some small code changes, this design can be used for a radar in an RC vehicle, an electronic thief detector (in my next Instructable I will build one) and other things. It's all up to you. Have fun!