Component guide · Intermediate · 4 min read
Line Sensor Arrays

Cytron LSA08 Auto-Calibrating, LSS05 and Maker Line Sensors, BFD-1000 5-Channel, Studica Cobra V3, Waveshare 5-Channel Tracker, 3, 4 and 8-Channel IR Arrays, ACEBOTT QB080, SparkFun RedBot, Grove Line Finder, HS-S01B and HS-S22A Grayscale Sensors
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
A line sensor array is a row of IR emitter and sensor pairs under a robot that sees a black line on a white floor (or the reverse). Single-channel boards only say on or off the line; 5 to 8 channels give the line's position, which lets a PID controller steer smoothly. Cytron LSA08 and Maker Line calibrate themselves and can output one analog position value, which makes fast line followers much easier.
Key specs at a glance
- Channels
- 1, 3, 4, 5 or 8
- Outputs
- Digital per channel; analog per channel on Waveshare and Cobra; single analog or UART position on LSA08 and Maker Line
- Height
- About 3-15mm above the floor
- Supply
- 3.3-5V; LSA08 7.5-20V
- Calibration
- Auto on Cytron boards, pots on others
- Line width
- 15-30mm typical tracks
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 13-Channel Path Tracing IR Sensor Module – 5V DC, CTRT5000 Sensors₹197
Option 24-Channel IR Line Tracking Sensor Module – TTL Output, 1mm-60cm Range₹105
Option 38-Channel IR Sensor Array Line Follower Module – 3.3V-5V Digital I/O₹77
Option 4ACEBOTT QB080 3-Channel Tracking Module Easy-Plug for ESP32/Arduino₹369
Option 5BFD-1000 Five Channel Infrared Tracking Module Tracing Sensor₹184
Option 6Cytron LSA08 Advanced Auto-Calibrating Line Sensor₹5,761
What the Multi-channel IR line sensor arrays: Cytron LSA08 and LSS05, Maker Line, BFD-1000, Studica Cobra, Waveshare Tracker and 3, 4, 5 and 8-channel boards is
IR line sensor arrays with 3 to 8 channels, such as the TCRT5000 and QTR-8 boards, read a black line under a robot so it can follow it smoothly.
Mount the array 5-10mm above the floor, level, and in front of the drive wheels. Calibrate on the actual track: sweep the sensor over line and background so it learns both levels.
With 5 or more channels, compute a weighted position from -2 to +2 (or 0 to 1000), feed the error to a PID loop, and adjust motor speeds. Start with only P, raise it until the robot wobbles, then add D to damp the wobble. Ambient sunlight can swamp IR sensors, so shield them or test indoors.
Multi-channel IR line sensor arrays: Cytron LSA08 and LSS05, Maker Line, BFD-1000, Studica Cobra, Waveshare Tracker and 3, 4, 5 and 8-channel boards pinout
The pins on the Multi-channel IR line sensor arrays: Cytron LSA08 and LSS05, Maker Line, BFD-1000, Studica Cobra, Waveshare Tracker and 3, 4, 5 and 8-channel boards and what each one does.
| Pin | Function |
|---|---|
| VCC / GND | Supply |
| D1-D8 | Digital channel outputs |
| A1-A5 | Analog outputs on analog arrays |
| AN / OUT | Single position output on LSA08 and Maker Line |
| CAL | Calibrate button or pin |
- VCC / GND
- Supply
- D1-D8
- Digital channel outputs
- A1-A5
- Analog outputs on analog arrays
- AN / OUT
- Single position output on LSA08 and Maker Line
- CAL
- Calibrate button or pin
Wiring the Multi-channel IR line sensor arrays: Cytron LSA08 and LSS05, Maker Line, BFD-1000, Studica Cobra, Waveshare Tracker and 3, 4, 5 and 8-channel boards
Keep sensor wires away from motor wires, and add a capacitor across each motor to cut noise.
| Multi-channel IR line sensor arrays: Cytron LSA08 and LSS05, Maker Line, BFD-1000, Studica Cobra, Waveshare Tracker and 3, 4, 5 and 8-channel boards pin | Arduino | Note |
|---|---|---|
| 5-channel D1-D5 | D2-D6 | Left to right |
| Maker Line AN | A0 | 0-5V line position |
| VCC | 5V | Shared ground with the motor driver |
- 5-channel D1-D5
- Arduino:
- D2-D6
- Note:
- Left to right
- Maker Line AN
- Arduino:
- A0
- Note:
- 0-5V line position
- VCC
- Arduino:
- 5V
- Note:
- Shared ground with the motor driver
Example code
Some boards output LOW on the line; flip the test if the error has the wrong sign.
const int pins[5] = {2, 3, 4, 5, 6};
const int weight[5] = {-2, -1, 0, 1, 2};
float Kp = 30;
int baseSpeed = 150;
void setup() {
Serial.begin(9600);
for (int i = 0; i < 5; i++) pinMode(pins[i], INPUT);
}
void loop() {
int sum = 0, count = 0;
for (int i = 0; i < 5; i++) {
if (digitalRead(pins[i]) == HIGH) { // HIGH = on black line on most boards
sum += weight[i];
count++;
}
}
if (count == 0) return; // line lost: keep last command
float error = (float)sum / count;
int left = baseSpeed + Kp * error;
int right = baseSpeed - Kp * error;
Serial.print(error); Serial.print(" L "); Serial.print(left);
Serial.print(" R "); Serial.println(right);
// send left/right to your motor driver here
}Setup and tuning
mount the array 3 to 10 mm above the floor, level across the robot.
connect VCC, GND and each output to digital or analog pins; analog gives better line position.
move the array over the line and the floor at start-up to record min and max values.
compute a weighted average of the readings to get line position.
use PID on the position to steer the motors.
What you need
Shop this list16 of 17 found in our store · ₹11,126
Generic 3-Channel Path Tracing IR Sensor Module – 5V DC, CTRT5000 Sensors: the part this guide covers3-Channel Path Tracing IR Sensor Module – 5V DC, CTRT5000 Sensors₹197
Generic 4-Channel IR Line Tracking Sensor Module – TTL Output, 1mm-60cm Range: another version this guide covers4-Channel IR Line Tracking Sensor Module – TTL Output, 1mm-60cm Range₹105
Generic 8-Channel IR Sensor Array Line Follower Module – 3.3V-5V Digital I/O: another version this guide covers8-Channel IR Sensor Array Line Follower Module – 3.3V-5V Digital I/O₹77
ACEBOTT QB080 3-Channel Tracking Module Easy-Plug for ESP32/Arduino: another version this guide coversACEBOTT QB080 3-Channel Tracking Module Easy-Plug for ESP32/Arduino₹369
Generic BFD-1000 Five Channel Infrared Tracking Module Tracing Sensor: another version this guide coversBFD-1000 Five Channel Infrared Tracking Module Tracing Sensor₹184
Cytron LSA08 Advanced Auto-Calibrating Line Sensor: another version this guide coversCytron LSA08 Advanced Auto-Calibrating Line Sensor₹5,761
Cytron Maker Line Sensor for Beginners: another version this guide coversCytron Maker Line Sensor for Beginners₹1,293
Cytron Technologies LSS05 Auto-Calibrating Line Sensor Module for Robotics – 5-Channel IR Array: another version this guide coversCytron Technologies LSS05 Auto-Calibrating Line Sensor Module for Robotics – 5-Channel IR Array₹1,039
Waveshare Tracker Sensor (Line Tracking) – 5-Channel IR Detector, Analog Output, 3.3-5V: another version this guide coversWaveshare Tracker Sensor (Line Tracking) – 5-Channel IR Detector, Analog Output, 3.3-5V₹409
Studica Robotics Cobra Line Follower Sensor V3 – 3.3V DC Infrared Line Detection Module: another version this guide coversStudica Robotics Cobra Line Follower Sensor V3 – 3.3V DC Infrared Line Detection Module₹689
SparkFun RedBot Sensor – Line Follower: another version this guide coversSparkFun RedBot Sensor – Line Follower₹379
Seeed Studio Studio Grove Line Finder v1.1 Line Tracking Sensor – TTL Digital Output: another version this guide coversSeeed Studio Grove Line Finder v1.1 Line Tracking Sensor – TTL Digital Output₹359
HS-S01B-W Infrared Line Tracking Sensor Module – Digital Output, 3.3V/5V: another version this guide coversHS-S01B-W Infrared Line Tracking Sensor Module – Digital Output, 3.3V/5V₹69
HS-S22A Grayscale Sensor Module – 3.3-5.5V Digital Output: another version this guide coversHS-S22A Grayscale Sensor Module – 3.3-5.5V Digital Output₹79- Uno R3 development board: the controller used in the wiring tableFind this part
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Solderless breadboard: to build without solderingSolderless Breadboard₹68
Alternatives and when to choose them
- Line follower robot: build a full robot.
- TCRT5000 line sensor: single-channel basics.
- IR reflective sensor modules: small single sensors.
Common mistakes to avoid
- Mounting the array too high.
- Skipping calibration.
- Testing under strong sunlight.
- Using only on/off steering instead of PID.
Frequently asked questions
How many sensors do I need for line following?
Three works for basic robots; five to eight gives smoother, faster tracking.
Should I use analog or digital outputs?
Analog gives finer line position for PID; digital is simpler.
Why does the robot lose the line?
The array is too high, ambient light is strong, or calibration was skipped.
How high should the sensor be?
About 3 to 10 mm above the surface, depending on the board.
Can I follow a white line on black?
Yes, invert the logic in your code.
Parts for this guide
Projects that use it
Put this into practice: 1 step-by-step build in our project library uses parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

