Перейти к содержимому

Arduino Basics #09: HC-SR04 Ultrasonic Sensor with Arduino UNO | Distance Measurement

Tech Inventor Hub

0:00 / 0:00

Arduino Basics #09: HC-SR04 Ultrasonic Sensor with Arduino UNO | Distance Measurement

119 просмотров · 1 день назад
Tech Inventor Hub
702 подписчика
119 просмотров · 1 день назад
Learn how the HC-SR04 Ultrasonic Sensor works with Arduino UNO in this beginner-friendly Arduino tutorial from TECH INVENTOR HUB! In Arduino Basics #09, learn ultrasonic distance measurement, the HC-SR04 pin configuration, 40 kHz ultrasonic waves, the distance calculation formula, Arduino connections, and how to build a distance-alert LED project. PROJECT: Arduino UNO + HC-SR04 + LED COMPONENTS REQUIRED Arduino UNO HC-SR04 ultrasonic sensor LED 220-ohm resistor Breadboard Jumper wires USB cable HC-SR04 CONNECTIONS VCC to Arduino 5V GND to Arduino GND TRIG to Arduino D9 ECHO to Arduino D10 LED CONNECTIONS Arduino D7 to 220-ohm resistor to LED anode (+) LED cathode (-) to Arduino GND DISTANCE FORMULA Distance in cm = Echo duration in microseconds x 0.0343 / 2 PROJECT WORKING The sensor sends ultrasonic waves and measures the time taken for the reflected echo to return. Arduino calculates the distance and turns the LED ON when an object is detected at 20 cm or closer. The common HC-SR04 operates at 5V and has a typical specified measurement range of approximately 2 to 400 cm. Actual readings depend on the target surface, alignment, and environmental conditions. WHAT YOU WILL LEARN HC-SR04 ultrasonic sensor working principle TRIG and ECHO pin functions Arduino UNO sensor interfacing Distance calculation LED control using a distance threshold Serial Monitor testing 00:00 – HC-SR04 Ultrasonic Sensor Introduction 00:10 – Previous Lesson Connection 00:20 – What Is the HC-SR04? 00:30 – Transmitter and Receiver 00:40 – Ultrasonic Frequency: 40 kHz 00:50 – How Distance Measurement Works 01:00 – HC-SR04 Pin Configuration 01:10 – Four Pin Functions 01:20 – Trigger Pulse 01:30 – Echo Signal and Timing 01:40 – Distance Calculation Principle 01:50 – Distance Formula 02:00 – Operating Voltage and Measurement Range 02:10 – Accuracy and Beam Angle 02:20 – Target Surface Limitations 02:30 – Environmental Factors 02:40 – Components Required 02:50 – Connect VCC and GND 03:00 – Connect TRIG and ECHO 03:10 – Connect the LED 03:20 – Complete Circuit 03:30 – Arduino Code Setup 03:40 – Trigger and Distance Calculation 03:50 – LED Threshold Condition 04:00 – Complete Arduino Program 04:10 – Verify and Upload 04:20 – Serial Monitor Testing 04:30 – Practical Distance Alert 04:40 – Troubleshooting and Applications 04:50 – Next Lesson: Servo Motor NEXT LESSON Arduino Basics #10 - Servo Motor Subscribe to TECH INVENTOR HUB for Arduino tutorials, robotics, electronics projects, and beginner-friendly STEM learning. #Arduino #HCSR04 #UltrasonicSensor #ArduinoUNO #ArduinoBasics #ArduinoProjects #Robotics #Electronics #TECHINVENTORHUB,Arduino, Arduino UNO, HC-SR04, HC-SR04 ultrasonic sensor, ultrasonic sensor Arduino, Arduino distance sensor, Arduino distance measurement, HC-SR04 tutorial, Arduino beginner projects, Arduino Basics, ultrasonic sensor working principle, Arduino LED project, obstacle detection Arduino, robotics projects, electronics tutorial, TECH INVENTOR HUB