Line Following Robot with PID Control
Custom PCB-based line following robot with PID control and web-based tuning interface
Technology Stack
The Problem
Traditional line following robots suffer from poor accuracy and jerky movements due to lack of proper error correction algorithms. Additionally, most hobbyist robots use breadboards or off-the-shelf chassis, resulting in messy wiring and increased weight.
Technical Implementation
Designed and fabricated a custom-shaped PCB that serves as both the robot chassis and circuit board, eliminating external wiring and reducing weight. This was my first PCB design, refined through multiple iterations to achieve a clean, functional layout. The hardware features ESP32-S3 DevKit as the brain, QTR-8 channel IR sensor array for line detection, DRV8833 motor driver controlling N20 gear motors with encoders, and dual buck converters (5V for ESP32, 6V 5A for motors) powered by a lithium battery. Implemented PID algorithm for smooth, accurate line tracking by calculating error values from IR sensors and dynamically adjusting motor speeds. Built as part of Hack Club's Blueprint Program.
Reflective Analysis & Growth
This project was transformative in bridging my software skills with hardware engineering. Learning PCB design from scratch taught me the importance of iterative refinement and attention to detail in electrical layout. The PID algorithm implementation deepened my understanding of control systems and how mathematical concepts translate to real-world robot behavior.