Line Follower 5 Channels Infrared Sensor Module TCRT5000 BFD-1000 Blue

AED 35.00



This module is designed for Arduino mobile robots that travel through a black and white line road track using its 5-channels reflecting optical sensors installed inline (TCRT5000), or a line following a robot module. It employs a hex inverter with a 5V power supply to generate a clean digital output when a black line is spotted. 


  • 5-channels reflective optical sensors mounted inline (TCRT5000 )
  • On-board hex inverter provides a clean digital output
  • Sensitive to dark color and infrared
  • Operating Voltage : 5V (recommended)
  • Comes with an M3 flexible mounting slot

Materials needed :

  • Arduino Uno
  • a Female to Male jumper wire
  • USB Cable Type A to B

The connection between 5 channels TCRT5000 Tracking Sensor Module and Arduino Uno.

  • OUT5 > D12
  • OUT4 > D11
  • OUT3 > D10
  • OUT4 > D9
  • OUT5 > D8
  • 5V > 5V
  • GND > GND


Arduino code for the 5 channels TCRT5000 Module:

Based on the source code, the pins of OUT1, OUT2, OUT3, OUT4, and OUT5 are defined and each of them responds with IRvalue respectively. The serial monitor is set as 9600 baud and the results will be printed on the serial monitor. Upload the source code into your Arduino Uno

const int pinOUT1 = 8;
const int pinOUT2 = 9;
const int pinOUT3 = 10;
const int pinOUT4 = 11;
const int pinOUT5 = 12;
int IRvalue1 = 0;
int IRvalue2 = 0;
int IRvalue3 = 0;
int IRvalue4 = 0;
int IRvalue5 = 0;
void setup()
void loop()
 Serial.print("Digital Reading=");
 IRvalue1 = digitalRead(pinOUT1);
 IRvalue2 = digitalRead(pinOUT2);
 IRvalue3 = digitalRead(pinOUT3);
 IRvalue4 = digitalRead(pinOUT4);
 IRvalue5 = digitalRead(pinOUT5);

How to work with code:

Simply bring your finger up to the IR sensor. When the IR sensor detects your finger, it illuminates the LED on the module. When the IR sensor does not detect anything, the number displayed on the serial monitor is 0; when it does detect anything, the number displayed is 1. The serial monitor will display "DigitalReading=00000," with the locations for 0 indicating which pin was detected. If the IR sensor 2 is detected, the serial monitor will display "DigitalReading=01000."