Line-Follower Robot

Objective: Design an autonomous line-following robot for a simulated rescue scenario that:

  1. Follows a red-tape track at ≥ 0.20 m/s using onboard color sensors.
  2. Locates and captures a 12 × 9.6 cm Lego “survivor” at the bullseye and delivers it to the nearest safe zone within 60 seconds.
  3. Weighs < 10 kg, costs <$150, and uses ≤ 4 motors

Mechanical Design

Process:    

  • Modelled the chassis in SolidWorks, 3-D printed and assembled it.
  • Designed adjustable sensor positioning: Developed SolidWorks mounts to maintain sensors at a precise 5 mm height above the wooden track.
  • Defined actuation requirements: Derived the dropper’s required torque via hand calculations to select the appropriate DC motor.
 

Electrical Design

Process:    

  • Characterized motors: Measured motor torque and power draw on the bench (5 V, 0.2 A), leading to the selection of dual H-bridge drivers and a 6×AA battery pack.
  • Captured electrical schematics: Used Altium to wire four I²C color sensors, dual H-bridge drivers, an adjustable buck converter, and a STM32 microcontroller.
 

Firmware Design

Process:    

  • Configured I2C communication to interface two Grove I2C v2 color sensors with the Nucleo F401RE MCU and calibrated their outputs to reliably distinguish red, blue, green, and black tape
  • Implemented PWM-based motor control routines on STM32 timers to drive H-bridge drivers for bidirectional speed control and individual wheel actuation
  • Translated the original flowchart algorithm into firmware that guides the robot along the line to the bullseye, triggers dropper actuation, reverses via back-mounted sensors, and returns to the start
  • Developed a bang-bang line-following controller with four discrete states based on sensor thresholds to decide motor on/off commands and maintain path tracking under varying conditions
 

Finished Product

Results, Testing & Validation

Demonstrated at the MTE 380 course demonstration, the robot achieved:

  • Mission time: 28–45 s (avg. 35 s), comfortably under the 60 s target
  • Drop-off accuracy: 80 % correct placement in the safe zone
  • Line-following accuracy: 95 % success over 20 runs (≤ 1 cm lateral deviation)
  • Weight: 4.5 Kg, < 10 kg
  • Budget: $134.14, < $150
  • Motors used: 3 motors (2 drive + 1 dropper), ≤ 4
  • Final design completed the full course on competition day