Line Follower Robot

ESP32 Powered Bot with 8-Channel IR and PID Logic

Line Follower Bot

Overview

This line follower robot is built using an ESP32, TB6612FNG motor driver, 8-channel IR sensor array, and N20 motors. The bot uses PID control for smooth and accurate tracking of black lines on white surfaces. A button toggles start/stop mode, and all logic runs onboard with PWM motor control.

How It Works

Line Follower on track

Code & Tuning

The PID controller uses Kp = 30 and Kd = 20. Ki is kept at 0 to avoid integral windup. The bot performs best at medium speed on sharp and smooth curves. The IR sensor values are inverted using !digitalRead() for compatibility with black-line-on-white tracks.

Watch the Bot in Action

Tech Stack

ESP32 TB6612FNG IR Sensor Array N20 Motors PID Control PWM Arduino IDE
⬅ Back to Portfolio