The 5 Way IR Line Tracking TCRT5000 is a sensor module designed for line-following and object detection applications. Manufactured by Arduino (Part ID: IR5W-C47F11B), this module uses five TCRT5000 infrared sensors arranged in a row to detect the presence of a line or track. Each sensor emits infrared light and measures the reflected signal to determine the surface's reflectivity.
This module is widely used in robotics, automation, and educational projects, particularly for building line-following robots, edge detection systems, and obstacle avoidance mechanisms.
The module has a 7-pin interface for power, ground, and sensor outputs. Below is the pinout:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5V DC). |
2 | GND | Ground connection. |
3 | OUT1 | Digital output of the first sensor (High = no line, Low = line detected). |
4 | OUT2 | Digital output of the second sensor (High = no line, Low = line detected). |
5 | OUT3 | Digital output of the third sensor (High = no line, Low = line detected). |
6 | OUT4 | Digital output of the fourth sensor (High = no line, Low = line detected). |
7 | OUT5 | Digital output of the fifth sensor (High = no line, Low = line detected). |
Power the Module:
Connect the Outputs:
Position the Module:
Calibrate the Sensors:
Read Sensor Outputs:
Below is an example code snippet to read the outputs of the 5 sensors and display the results in the Serial Monitor:
// Define the pins connected to the sensor outputs
const int sensorPins[5] = {2, 3, 4, 5, 6}; // Digital pins 2 to 6
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Set sensor pins as inputs
for (int i = 0; i < 5; i++) {
pinMode(sensorPins[i], INPUT);
}
}
void loop() {
// Read and print the state of each sensor
Serial.print("Sensor States: ");
for (int i = 0; i < 5; i++) {
int sensorState = digitalRead(sensorPins[i]);
Serial.print(sensorState); // Print 1 (High) or 0 (Low)
Serial.print(" ");
}
Serial.println(); // Move to the next line in the Serial Monitor
delay(100); // Small delay for readability
}
Sensors Not Detecting the Line:
Inconsistent Readings:
All Sensors Output High (1):
All Sensors Output Low (0):
Q1: Can this module detect colors?
A1: No, the TCRT5000 sensors detect surface reflectivity, not color. It works best with high-contrast surfaces.
Q2: Can I use this module with a 3.3V microcontroller?
A2: Yes, the module supports both 3.3V and 5V power supplies.
Q3: How do I connect this module to a motor driver for a line-following robot?
A3: Use the sensor outputs to control the motor driver inputs. For example, if the left sensors detect a line, slow down the left motor to steer the robot back onto the track.
Q4: What is the maximum detection range?
A4: The module can detect lines up to 25mm away, but optimal performance is achieved at 2mm to 12mm.
This concludes the documentation for the 5 Way IR Line Tracking TCRT5000. For further assistance, refer to Arduino's official resources or community forums.