Robot Pi Shop

Black / White Line Follower Sensor

$1.25

Shipping calculated at checkout.

Quantity

Black & White IR Line Follower Sensor – 3-Pin

The Black & White IR Line Follower Sensor is a compact infrared reflective sensor designed for line-following robots, surface detection, and object detection projects.

The sensor works by emitting infrared light toward a surface and measuring the reflected light. Light-colored surfaces generally reflect more infrared energy, while dark or black surfaces absorb more of it. This difference allows a microcontroller to detect transitions between black and white surfaces and use them to guide a mobile robot along a track.

Its simple 3-pin interface makes it easy to integrate with Arduino and other microcontroller-based robotics projects.

Technical Specifications

  • Sensor Type: Infrared Reflective Line Tracking Sensor
  • Detection Method: Reflected Infrared Light
  • Operating Voltage: 2.5–12V DC
  • Working Current: Approx. 18–20mA at 5V
  • Output Type: Digital
  • Interface: 3-Pin
  • Pins: VCC, OUT, GND
  • Sensor Element: Infrared Emitter & Photosensitive Receiver
  • Detection: Black / White Surface Contrast
  • Mounting: Onboard Mounting Hole
  • Suitable For: Line-Following Robots & Reflective Detection Projects

Infrared Line Detection

The sensor emits infrared light toward the surface underneath it.

A white or light-colored surface reflects more infrared light back toward the receiver, while a black or dark surface generally absorbs more of the infrared light.

The resulting change in the sensor output can be read by a microcontroller and used to determine whether the robot is positioned over the line or the surrounding surface.

Simple 3-Pin Connection

The module provides a simple three-wire interface:

  • VCC – Power Supply
  • OUT – Digital Sensor Output
  • GND – Ground

The OUT pin can be connected to a compatible digital input on the robot's microcontroller.

Building a Line-Following Robot

One sensor can detect whether a line is present underneath a particular position on the robot.

For improved steering, two or more sensors can be installed side by side. The microcontroller can compare their outputs and adjust the left and right motors accordingly.

A typical robot setup can include:

  • 2 × Line Follower Sensors
  • Arduino / Other Microcontroller
  • Dual Motor Driver
  • 2 × DC Geared Motors
  • Robot Chassis
  • Battery Pack

This arrangement allows the robot to automatically follow a black line on a contrasting surface.

Other Detection Uses

Because the sensor detects differences in reflected infrared light, it can also be useful for:

  • Surface Detection
  • Edge Detection
  • Object Presence Detection
  • Robot Position Sensing
  • Encoder / Rotation Detection Experiments
  • Automatic Counting Projects

Actual performance depends on the reflectivity and distance of the target.

Applications

Ideal for line-following robots, Arduino robot cars, black-and-white line detection, educational robotics, STEM projects, autonomous vehicles, surface detection, edge detection, object sensing, robot competitions, breadboard experiments, and DIY robotics.

Important Note

Detection performance depends strongly on sensor height, surface reflectivity, ambient infrared light, surface color, and mounting angle.

For line-following applications, the sensor should normally be mounted close to the floor or track and tested at the actual operating height before final installation.

Although the module accepts a relatively wide supply range, always verify the OUT voltage level before connecting it directly to a 3.3V-only microcontroller such as an ESP32.

The exact HIGH/LOW output state for black and white surfaces can vary with module implementation, so it is best to confirm the logic state during initial setup rather than relying on a fixed assumption.

Package Includes

1 × Black & White IR Line Follower Sensor