Back to selected work10 / 12

Robotics & Hardware · 2023 · completed

Precision Line-Following Robot

High-speed autonomous trajectory-following robot with PID-tuned optical sensor array.

PID ControlInfrared ArraysMotor ControlEmbedded C++Kinematics

01 / Overview

An autonomous wheeled robot engineered for high-speed track navigation using an infrared reflectance sensor array and closed-loop Proportional-Integral-Derivative (PID) motor control.

02 / Problem

Navigating sharp track curves at high linear velocities causes standard threshold-based robots to oscillate violently and throw themselves off course.

03 / Contribution

Designed the analog sensor conditioning circuit, implemented discrete PID control in firmware, and tuned KP/KI/KD coefficients.

04 / System architecture

Physical + hardware

  • 8-channel infrared reflectance array (QTR-8A)
  • High-RPM micro metal gearmotors with soft silicone grip tires
  • Dual H-bridge driver with high PWM switching frequency

Firmware + software

  • Weighted average position estimation algorithm calculating path offset error with sub-millimeter resolution
  • Discrete PID controller adjusting left/right motor PWM differential at 500 Hz loop frequency

Signal flowMultiplexed IR phototransistor array feeding analog pins; MCU running 2ms timer interrupt executing PID calculation to update PWM registers.

05 / Engineering decisions

  1. 01Tuned the derivative coefficient (KD) to aggressively counteract rate-of-error change, damping out high-speed fish-tail oscillations.

06 / Results + constraints

Observed results

  • Navigated complex high-curvature test tracks at continuous speeds without losing tracking.
  • Smooth trajectory tracking with zero observable overshoot on straightaways.

Current limitations

  • Requires calibration under varying ambient lighting conditions.