{getToc} $title={Table of Contents}
How to Make Line Follower Robot using Arduino Nano, L298N and IR Sensor
INTRODUCTION
In this project, we will learn how to make a Line Follower Robot using Arduino Nano, L298N motor driver, and IR sensors.
This robot automatically follows a black line path and is one of the best beginner projects in robotics and Arduino programming.
WATCH YOUTUBE VIDEO
Watch full working of Line Follower 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} |
![]() |
IR Sensor Module | 2 | {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 (18650) | 1 | {getButton} $text={Buy Now} $icon={cart} $color={#007bff} |
![]() |
Jumper Wires | As Required | {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
Refer below image for wiring:
WIRING CONNECTIONS
Arduino Nano ↔ IR Sensors
| Sensor | Connection |
|---|---|
| Left Sensor | A0 |
| Right Sensor | A1 |
| VCC | 5V |
| GND | GND |
Arduino Nano ↔ L298N
| L298N | Arduino Nano |
|---|---|
| IN1 | Pin 4 |
| IN2 | Pin 5 |
| IN3 | Pin 6 |
| IN4 | Pin 7 |
| ENA | Pin 3 |
| ENB | Pin 9 |
ARDUINO CODE
WORKING PRINCIPLE
IR sensors detect the line and send signals to Arduino Nano. Based on the sensor values, Arduino controls the motors using L298N driver to follow the path.
TIPS
- Adjust IR sensor sensitivity
- Use black tape for path
- Tune speed values for better performance
CONCLUSION
This project helps beginners understand sensors, motor drivers, and automation using Arduino Nano.
Tags
Arduino Nano









