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, increased weight, and poor aesthetics. There's a need for a precision-engineered solution that combines custom hardware with intelligent control algorithms.
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 (Proportional-Integral-Derivative) algorithm for smooth, accurate line tracking by calculating error values from IR sensors and dynamically adjusting motor speeds. Developed a web application for real-time PID parameter tuning over WiFi, allowing optimization without code recompilation. 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. Currently, this project is at the PCB design stage—I've completed the custom chassis PCB layout and schematic, but haven't yet fabricated the board or assembled the robot. Once I receive the manufactured PCB, solder all components (ESP32-S3, motor drivers, sensors, buck converters), and test the PID algorithm with real-world line tracking, it will dramatically improve my embedded systems programming, motor control tuning, and hardware-software integration skills. Creating the web interface for PID tuning showed me how IoT capabilities can dramatically improve user experience and debugging efficiency.