Skip to content

White Line Sensors

Overview

White Line Sensors in AlphaBot V2 detect contrasting surfaces (typically a white line on a dark surface or vice versa) to enable line-following capabilities.

Key Feature

  • Sensor Arrangement
    • Typically 5 sensors in a line across the front
  • Line Following Logic
    • Stay centered on a line
    • Detect turns or intersections
    • Correct its position if drifting off course
  • Typical Values
    • lesser than 800 for white surfaces (Low reflection)
    • Greater than 800 for white surfaces (high reflection)

Working

  • Each sensor contains an IR LED and phototransistor
  • The IR LED emits infrared light
  • The phototransistor detects reflected light
  • On dark surfaces: More light is absorbed → less reflection → Lesser sensor value
  • On light surfaces: More light is reflected → Higher sensor value
  • Hardware Setup
    • Clock (pin 13) - Synchronizes data transfer
    • Addr (pin 12) - Address selection
    • DO (pin 11) - Data output (with internal pull-up)
    • CS (pin 10) - Chip select (active low)