Back to Portfolio
Autonomous Robot

Line Follower V2

autonomous line follower with PID control, designed to track white lines on black pavement.

Arduino Nano PID Control IR Sensors

// drop your robot photo here

Overview

This was my second ever project in robotics (excluding revisions). Inspired by a video I saw online, I wanted to build an autonomous system that felt more advanced than a basic hobby bot. While most line followers track a black line, I designed this one specifically to follow a white-painted line on black pavement.

The biggest breakthrough in this project was the transition from my first version—which used basic, copied code—to this second revision. I rewrote the logic to implement a PID (Proportional, Integral, Derivative) controller, which moved the robot away from "jittery" movements and allowed for smooth, precise navigation.

How It Works

01

Sensing — Uses an IR sensor array to detect the high-contrast difference between the black pavement and the white track line.

02

Processing — An Arduino Nano processes the sensor data through a PID loop. This calculates the exact correction needed to keep the robot centered, rather than just turning left or right abruptly.

03

Output — An L298N motor driver manages two TT motors mounted on a metal chassis, adjusting their speeds in real-time based on the PID calculations for fluid motion.