Arduino HC-SRo4 Ultrasonic Range Finder
by robmawe91 in Circuits > Arduino
1840 Views, 3 Favorites, 0 Comments
Arduino HC-SRo4 Ultrasonic Range Finder
I'll show you how to use a HC-SR04 Ultrasonic Sensor to find distance measured in inches and feet. With
a wonderful Arduino Uno R3 Clone created by Elegoo
From the Elegoo UNO R3 Project Complete Starter Kit with Tutorial for Arduino MEGA2560 NANO (63 Items)
I will be using my own code that I will up load later in this Instructable.
I hope you enjoy :)
Gather Parts
Elegoo UNO R3 Project Complete Starter Kit with Tutorial for Arduino MEGA2560 NANO (63 Items)
Has everything you need!
- 1 - Arduino uno R3
- 1 - Ultrasonic Sensor
- 1 - LCD Liquid Crystal Screen
- 2 - 10K Potentiometer
- 1 - Breadboard
- About 20 - Male to Male Jumper Wires
- 1 - 9 Volt Battery if you want to make it portable.
Wire Everything Up.
First start with the LCD screen.
LCD - Arduino
- VSS - Ground
- VDD - +5VDC
- VO - Middle of Potentiometer Left side to +5VDC and Right side to Ground (Controllers Contrasts)
- RS - Arduino Pin 12
- RE - Ground
- E - Arduino Pin 11
- D4 - Arduino Pin 5
- D5 - Arduino Pin 4
- D6 - Arduino Pin 3
- D7 - Arduino Pin 2
- A - +5VDC
- K - Middle of Potentiometer Left side to +5VDC and Right side to Ground (Controllers Brightness)
Then wire up the Ultrasonic Sensor
Ultrasonic Sensor - Arduino
- VCC - +5VDC
- Trig - Arduino Pin 6
- Echo - Arduino Pin 7
- Gnd - Ground
Upload Code
I included the Code I used in this instructable.
Just click on the .ino file and open with the Arduino IDE and upload to you Arduino.
Downloads
Take You Project Farther
You can replace the 10K Potentiometer with a resistor by using a multimeter you can find the resistance between the middle pin one of the outer pins. In my case a 9.5K Ohm resistor is needed for my brightness (Yours may vary).
Now you wont have to worry about turning the Potentiometer. You can solder all parts to a prototyping board and make you own shield for you Arduino if you would like.
Or you could even build you own Arduino and this project or its own board and enclose it into a case.