Line‑Sensing Robot
Arduino line‑follower with four IR reflectance sensors, motor shield, and live serial tuning
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
- Hardware: Arduino Uno, Adafruit v2 Motor Shield, two DC gearmotors, four TCRT5000 sensors.
- Software: Arduino controller with serial command 'sNNN' to update baseSpeed live; CSV logging of timestamps, sensor values, and motor commands.
- Mechanical: iterative 3D‑printed sensor mounts and optional housing (removed for performance during testing).