

The TCRT 5000 is an infrared (IR) sensor module that integrates an IR emitter and a phototransistor in a single package. It is designed for detecting objects and measuring proximity by sensing the intensity of reflected IR light. The sensor is widely used in applications such as line-following robots, object detection, and proximity sensing in automation systems.








The TCRT 5000 sensor has four pins. Below is the pinout and description:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Emitter (A) | Anode of the IR LED (connect to positive voltage) |
| 2 | Emitter (K) | Cathode of the IR LED (connect to ground) |
| 3 | Collector | Collector of the phototransistor (output signal) |
| 4 | Emitter | Emitter of the phototransistor (connect to ground) |
Below is an example of how to connect and use the TCRT 5000 with an Arduino UNO to detect objects:
// TCRT 5000 IR Sensor Example Code
// Reads the analog signal from the sensor and prints it to the Serial Monitor.
const int sensorPin = A0; // Analog pin connected to the sensor's output
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
delay(100); // Delay for 100ms before the next reading
}
No Output Signal:
Inconsistent Readings:
Low Sensitivity:
Output Always High or Low:
Q: Can the TCRT 5000 detect black surfaces?
A: Black surfaces absorb most IR light, making detection difficult. Use reflective or light-colored surfaces for better results.
Q: What is the maximum detection range of the TCRT 5000?
A: The sensor can detect objects up to 15mm away, depending on the object's reflectivity.
Q: Can I use the TCRT 5000 with a 3.3V system?
A: Yes, the sensor operates at 3.3V, but ensure the current-limiting resistor for the IR LED is appropriately calculated.
Q: How do I reduce interference from ambient light?
A: Use the sensor in a controlled environment or add an IR filter to block unwanted wavelengths.
By following this documentation, you can effectively integrate the TCRT 5000 IR sensor into your projects for reliable object detection and proximity sensing.