A four‑sensor line‑following robot using an Adafruit motor shield and bang‑bang hierarchical controller. The design emphasizes robust sensor calibration, modular 3D‑printed sensor mounts, and a serial interface for live tuning.

  • Sensors: four TCRT5000 reflectance sensors, individually calibrated with per‑sensor thresholds.
  • Control: hierarchical bang‑bang logic (sharp/gentle turns, on‑center) with LastTurnDirection recovery.
  • Prototype features: modular sensor mounts, serial speed tuning, and data logging for analysis.

Calibration & control

Each sensor was profiled on tape vs floor and thresholds set (left sensors ≈ 800, right sensors ≈ 710). The controller maps boolean sensor states into prioritized actions (u‑turn, sharp, gentle corrections, or recovery), and logs time‑stamped CSV data for offline analysis and plotting.

Full project writeup and extracted text:

Implementation

Back to Portfolio