Objective
The goal of this discipline is to understand how line-tracking sensors work, learn to calibrate them for a specific surface, and verify or program a basic line-following algorithm.
Principle of line-tracking sensors
Line-tracking sensors work on the principle of infrared (IR) light reflection: a dark surface (black tape) absorbs most of the emitted IR light, while a light surface (the floor) reflects more of it back to the receiver. A sensor’s output can be an analog value (read through the Pico W’s ADC input) or a digital signal (high/low) after an internal comparison against a threshold value.
Note: The base version of the platform described in both the RoboSTEAM and picobot-mqtt documentation includes an ultrasonic sensor (CS100A) for distance measurement, not a dedicated set of IR line-tracking sensors. For this discipline, the chassis therefore needs a separate row of IR reflectance sensors (e.g. TCRT5000 or QRE1113 modules) wired to free GPIO/ADC pins on the Pico W. Confirm before the competition whether this sensor set is physically fitted on the specific robot in use.

Sensor calibration
- Position the robot so the sensors sit over the black tape, and record the raw values from all sensors.
- Position the robot over plain floor (no tape) and record the values again.
- Calculate a threshold value (typically the midpoint between the two recorded levels) that reliably distinguishes the line from the floor.
- Repeat the calibration directly on the competition surface just before the attempt, since ambient lighting affects reflectivity.
Basic line-following algorithm
A simple reactive (bang-bang) or proportional control approach is recommended:
- If only the left sensor (or the sensors left of center) detects the line, the robot turns left (slowing the left-side wheels or speeding up the right side).
- If only the right sensor detects the line, the robot turns right in the same way.
- If the center sensor detects the line, the robot continues straight.
- If no sensor detects the line (line lost), the robot performs a search maneuver or stops, depending on the team’s chosen strategy.
Track rules and scoring
- The track is marked with a continuous black tape line 15-20 mm wide on a light-colored surface, including turns and at least one intersection for a more advanced level.
- Time limit: 2 minutes.
- The time needed to complete the track is scored.
- Each loss and re-acquisition of the line incurs a time penalty as set out in the competition schedule.
- Disqualification for leaving the track without being able to recover on its own within the time limit.
Comments are closed