{getToc} $title={Table of Contents}
INTRODUCTION
In this project, we will build an Obstacle Avoiding Robot using Arduino Nano, L298N motor driver, ultrasonic sensor, and a servo motor.
This robot can automatically detect obstacles and change its direction, making it a smart autonomous robot project for beginners.
WATCH YOUTUBE VIDEO
Watch full making video of Obstacle Avoiding Robot:
COMPONENTS REQUIRED
| Item Image | Item Name | Quantity | Buy |
|---|---|---|---|
![]() |
Arduino Nano | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
L298N Motor Driver | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Ultrasonic Sensor (HC-SR04) | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Servo Motor (SG90) | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
DC Motors | 2 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Wheels | 2 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Battery Pack | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
TOOLS REQUIRED
| Image | Tool Name | Quantity | Buy |
|---|---|---|---|
![]() |
Screwdriver | 1 | {getButton} $text={Buy Tool} $icon={cart} $color={#007bff} |
![]() |
Wire Cutter | 1 | {getButton} $text={Buy Tool} $icon={cart} $color={#007bff} |
APPS AND ONLINE SERVICES
| Image | App Name | Access |
|---|---|---|
| Arduino IDE | {getButton} $text={Download} $icon={download} $color={#007bff} |
CIRCUIT DIAGRAM
Add your circuit image here
WIRING CONNECTIONS
Arduino Nano ↔ L298N
| L298N | Arduino Nano |
|---|---|
| IN1 | Pin 5 |
| IN2 | Pin 4 |
| IN3 | Pin 7 |
| IN4 | Pin 6 |
| ENA | Pin 3 |
| ENB | Pin 9 |
Ultrasonic Sensor
| Sensor | Arduino |
|---|---|
| Trig | A4 |
| Echo | A6 |
Servo Motor
| Servo | Arduino |
|---|---|
| Signal | Pin 10 |
| VCC | 5V |
| GND | GND |
ARDUINO CODE
WORKING PRINCIPLE
The ultrasonic sensor detects obstacles. The servo motor rotates to scan left and right. Based on distance, Arduino decides direction and controls motors using L298N.
TIPS
- Keep sensor height correct
- Use stable power supply
- Adjust delay timing
CONCLUSION
This project is a great step into autonomous robotics and smart navigation systems.
Tags
Arduino Nano








