How To Use Ultrasonic HC-SR04 Sensor With Arduino Uno For Distance Measurement

XrDRyli4h_k/default.jpg

Using Ultrasonic Sensor HC-SR04 with Arduino Uno (Distance Measurement)
Hello everyone,In this Arduino Tutorial we will learn how the HC-SR04 Ultrasonic Sensor works and how to use it with the Arduino UNO Board
to measurment the distance of obstacle.The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo.

Buy Begineers Arduino Kit :https://ban.ggood.vip/dzqv

Banggood website: https://ban.ggood.vip/gc2j

------------------------------------------
SUBSCRIBE FOR MORE ( It's FREE!!! )
SSTecTutorials : https://goo.gl/CL51EH
Vlog Channel : https://goo.gl/zSsj1U
------------------------------------------

More Videos on Arduino Projects : https://www.youtube.com/watch?v=lhYks...

Hardware:
1.Arduino Board : https://ban.ggood.vip/dzqv
2.Ultrasonic Sensor HC-SR04 : https://ban.ggood.vip/dzqv
3.Breadboard : https://ban.ggood.vip/dzqv
4.Jumper Wires : https://ban.ggood.vip/dzqv

Those are Some Affiliate Links, Buy From there To Support Make more videos like this.

DIY meArm Robot Arm Car for Ardunio Remote Control :https://ban.ggood.vip/dznb

Raspberry Pi Zero Micro Sd Card with NOOBS:https://ban.ggood.vip/dzpk

Clear Acrylic Case For Raspberry Pi Zero & Zero W:https://ban.ggood.vip/dzpx

Orange Pi Prime Development Board Mini PC:https://ban.ggood.vip/dzqi

Arduino UNO R3 LCD Sensor Beginner Starter Kit For Arduino:https://ban.ggood.vip/dzqv

Connections:
The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo.
The Ground and the VCC pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board and the trig and echo pins to any Digital I/O pin on the Arduino Board.

Steps :
1.The HC-SR04 sensor attach to the Breadboard
2.The Sensor VCC connect to the Arduino Board +5V
3.The Sensor GND connect to the Arduino Board GND
4.The Sensor Trig connect to the Arduino Board Digital PIN 9
5.The Sensor Echo connect to the Arduino Board Digital PIN 10


Source Download : http://bit.ly/2IT9YRp
First you have to define the Trig and Echo pins. In this case they are the pins number 9 and 10 on the Arduino Board and they are named trigPin and echoPin. Then you need a Long variable, named "duration" for the travel time that you will get from the sensor and an integer variable for the distance.
In the setup you have to define the trigPin as an output and the echoPin as an Input and also start the serial communication for showing the results on the serial monitor.
If the object is 10 cm away from the sensor, and the speed of the sound is 340 m/s or 0.034 cm/µs the sound wave will need to travel about 294 u seconds. But what you will get from the Echo pin will be double that number because the sound wave needs to travel forward and bounce backward. So in order to get the distance in cm we need to multiply the received travel time value from the echo pin by 0.034 and divide it by 2.

#UltrasonicSensor #UsingHCsr04UltrasonicSensor #Arduino

If you have any questions & inquiries Contact :
-------------------------------------------------
Connect With Me Socially !
-------------------------------------------------
Like Us On Facebook: https://goo.gl/EdyWB9

Follow Me on Facebook: https://goo.gl/pcNNji

Join Our Facebook Group: https://goo.gl/5vzxT6

Follow Me on Twitter: https://goo.gl/K9LJeo

Follow Our Instagram Page: https://goo.gl/g66fQQ

Join Us on Google +: https://goo.gl/xJzxXy

Thank You!!!

XrDRyli4h_k/default.jpg
How To Use Ultrasonic HC-SR04 Sensor With Arduino Uno For Distance Measurement How To Use Ultrasonic  HC-SR04 Sensor With Arduino Uno For Distance Measurement Reviewed by Anonymous on June 27, 2019 Rating: 5