Simple Distance Measuring Device

by Samytronix in Circuits > Arduino

24105 Views, 282 Favorites, 0 Comments

Simple Distance Measuring Device

IMG_4737.jpg

In this project we are going to learn how to use the HC-SR04 PING))) ultrasonic sensor to measure distance. This sensor is also often used on robots to detect obstacles.

Difficulty level: Easy

Time needed: ±10 minutes

Things You'll Need

IMG_4719.jpg

HC-SR04 PING sensor (x1)

Arduino UNO (x1)

LCD 16x2 (x1)

9V battery + dc adaptor (x1)

Potentiometer 10kΩ (x1)

Set of jumper wires

Plug the PING Sensor and LCD

IMG_4720.jpg
IMG_4721.jpg
LCD_bb.png
sonic03.jpg

HC-SR04

GND (pin 1) to potentiometer (left pin)

VCC (pin 2) to potentiometer (right pin)

VO (pin 3) to potentiometer (center pin)

RS (pin 4) to arduino digital pin 12

RW (pin 5) to potentiometer (left pin)

E (pin 6) to arduino digital pin 11

D4 (pin 11) to arduino digital pin 5

D5 (pin 12) to arduino digital pin 4

D6 (pin 13) to arduino digital pin 3

D7 (pin 14) to arduino digital pin 2


Potentiometer

left pin to arduino GND

right pin ro arduino 5V


PING Sensor

VCC to arduino 5V

Trig to arduino digital pin 7

Echo to arduino digital pin 6


9V battery

To arduino DC power socket

Upload the Code

Screen Shot 2015-06-10 at 8.14.24 PM.png

Have Fun! Show It to Your Friends :)

IMG_4737.jpg
simple measuring device demo

Yay! you have finished making your own measuring device. Now you can measure things without using a ruler! You can adjust the LCD brightness using the potentiometer. Feel free to give comments or ask questions and stay tune for my next project ; )