The Human Following Robot uses ultrasonic sensors to detect a person and automatically follows them while maintaining a safe distance. The robot moves forward, left, right, or stops based on human position.
🔧 Components Required
-
Arduino UNO
-
Ultrasonic Sensor HC-SR04 (1 or 2 sensors)
-
Motor Driver L298N
-
DC Motors × 2
-
Robot Chassis + Wheels
-
12V Battery / Power Bank
-
Jumper Wires
-
Breadboard
(Optional: IR sensors for better accuracy)
⚙️ Working Principle
-
Ultrasonic sensor emits ultrasonic waves.
-
Waves reflect from the human body.
-
Arduino calculates distance.
-
Based on distance:
-
Too far → Move Forward
-
Too close → Stop
-
Left detected → Turn Left
-
Right detected → Turn Right
-
📐 Distance Formula
🔌 Circuit Connections
HC-SR04 → Arduino
| HC-SR04 | Arduino |
|---|---|
| VCC | 5V |
| Trig | D9 |
| Echo | D10 |
| GND | GND |
L298N Motor Driver → Arduino
| L298N Pin | Arduino |
|---|---|
| IN1 | D2 |
| IN2 | D3 |
| IN3 | D4 |
| IN4 | D5 |
| ENA | 5V |
| ENB | 5V |
| GND | GND |
💻 Arduino Code
📊 Output Behavior
| Distance | Robot Action |
|---|---|
| > 60 cm | Stop |
| 20–60 cm | Follow Human |
| < 20 cm | Stop |
🚀 Applications
-
Assistant robots
-
Service robots
-
Surveillance robots
-
Smart shopping carts
-
Robotics learning projects






0 comments:
Post a Comment