← Back to projects
02

Line-Following Car

ECE 3 · Spring 2026

The line-following car

Overview

In a 2 person group for my Intro to Electrical Engineering class, we built an Arduino-based robot that navigates a lightbulb-shaped track using only onboard IR line-sensing, with no external localization. It starts in a marked zone, follows the full loop, detects a horizontal crossbar partway through, executes a 180° turnaround there, returns to the start, and comes to a controlled stop. For full credit, we needed a 19 second lap. Ours finished in 13.9 seconds.

Sensing

Control

Crossbar Detection

Testing

Key Takeaway

All the parameters we controlled were connected. Speed, Kp, Kd, turn timing, and crossbar sensitivity all interact, as raising speed to save time would reintroduce oscillation or false turn triggers, so every change meant re-validating parameters we'd already "solved." Our final configuration was a perfectbalance.

Tools & Techniques

Embedded C / C++ PD Control Multi-Sensor Calibration Debounced Event Detection State-Machine Design Data-Driven Tuning