The TCRT-5000 is an infrared (IR) sensor module manufactured by ARDUINO with the part ID UNO. It consists of an IR LED and a phototransistor housed in a compact package. This sensor is widely used for object detection and proximity sensing due to its ability to detect the reflection of infrared light from nearby objects. The TCRT-5000 is particularly popular in robotics, line-following robots, and industrial automation systems.
Explore Projects Built with TCRT-5000 IR sensor
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit integrates a Raspberry Pi Zero with two types of IR sensors: a TCRT 5000 IR sensor and a generic IR sensor. The Raspberry Pi Zero is configured to receive digital output signals from both sensors on GPIO14 and GPIO15 respectively, allowing it to process and respond to infrared light detection. The 5V and GND pins of the Raspberry Pi Zero provide power to both IR sensors, establishing a common voltage reference.
This circuit integrates two types of sensors, the TCRT 5000 IR sensors and HC-SR04 Ultrasonic sensors, with an ESP-8266 microcontroller. The IR sensors are connected to both analog and digital input pins on the ESP-8266, allowing for both threshold-based and precise distance measurements. The ultrasonic sensors are interfaced with digital pins for triggering and echo reception, enabling distance measurement through time-of-flight calculations. The ESP-8266 likely processes these sensor inputs for applications such as obstacle detection or proximity sensing, and could potentially communicate the data wirelessly given its capabilities.
This circuit is a line-following robot that uses four TCRT-5000 IR sensors to detect the path and an Arduino Leonardo to process the sensor data. The Arduino controls two DC motors via an L298N motor driver module, powered by a 7.4V battery and a rocker switch for power control.
This circuit features an ESP32 microcontroller interfaced with three TCRT 5000 IR sensors and two DC gearmotors controlled by an L298N motor driver. The ESP32 reads digital outputs from the IR sensors to likely make decisions based on line or obstacle detection, and it controls the gearmotors' directions and speeds, possibly for a robot or automated system. Power is supplied by a 6V battery connected to the motor driver, which also provides 5V to the ESP32 and the IR sensors.
The TCRT-5000 IR sensor has the following key technical specifications:
Parameter
Value
Operating Voltage
3.3V to 5V
Operating Current
10 mA (typical)
Detection Range
2 mm to 15 mm (depending on object reflectivity)
IR Wavelength
950 nm
Output Type
Analog or Digital (depending on circuit)
Dimensions
10.2 mm x 5.8 mm x 7 mm
Operating Temperature
-25°C to +85°C
Pin Configuration and Descriptions
The TCRT-5000 module typically has 3 or 4 pins, depending on the specific breakout board. Below is the pin configuration for a common 4-pin module:
Pin
Name
Description
1
VCC
Power supply pin (3.3V to 5V)
2
GND
Ground pin
3
OUT
Output pin (provides analog or digital signal based on the detected reflection)
4
EN (optional)
Enable pin (used to enable or disable the sensor module)
Usage Instructions
How to Use the TCRT-5000 in a Circuit
Power the Sensor: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
Connect the Output: Connect the OUT pin to an analog or digital input pin of your microcontroller (e.g., Arduino UNO).
Adjust Sensitivity: If your module has a potentiometer, adjust it to set the desired sensitivity for object detection.
Place the Sensor: Position the sensor so that the IR LED faces the object or surface to be detected. Ensure the distance is within the detection range (2 mm to 15 mm).
Important Considerations and Best Practices
Reflective Surfaces: The sensor works best with reflective surfaces. Matte or dark surfaces may reduce detection accuracy.
Ambient Light: Avoid placing the sensor in direct sunlight or near strong IR sources, as this can interfere with its operation.
Distance Calibration: Test and calibrate the sensor for the specific distance and object type in your application.
Pull-up Resistor: If using the digital output, ensure a pull-up resistor is connected if not already included on the module.
Example Code for Arduino UNO
Below is an example of how to use the TCRT-5000 with an Arduino UNO to detect objects:
// TCRT-5000 IR Sensor Example Code
// Connect the OUT pin of the sensor to Arduino pin A0 (analog input)
#define SENSOR_PIN A0 // Define the analog pin connected to the sensor
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(SENSOR_PIN, INPUT); // Set the sensor pin as input
}
void loop() {
int sensorValue = analogRead(SENSOR_PIN); // Read the analog value from the sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
// Check if an object is detected (threshold value may vary based on calibration)
if (sensorValue > 500) {
Serial.println("Object Detected!");
} else {
Serial.println("No Object Detected.");
}
delay(100); // Small delay for stability
}
Troubleshooting and FAQs
Common Issues and Solutions
No Output or Incorrect Readings
Cause: Incorrect wiring or loose connections.
Solution: Double-check all connections, ensuring VCC, GND, and OUT are properly connected.
Sensor Not Detecting Objects
Cause: Object is outside the detection range or has low reflectivity.
Solution: Ensure the object is within 2 mm to 15 mm of the sensor and has a reflective surface.
Fluctuating Readings
Cause: Ambient light interference or unstable power supply.
Solution: Shield the sensor from ambient light and use a stable power source.
Output Always High or Low
Cause: Sensitivity not calibrated or faulty sensor.
Solution: Adjust the potentiometer (if available) or replace the sensor if it is damaged.
FAQs
Q1: Can the TCRT-5000 detect transparent objects?
A1: The sensor may struggle to detect transparent objects due to low IR reflection. Use a different sensor for such applications.
Q2: How do I increase the detection range?
A2: The detection range is limited by the sensor's design. However, you can improve performance by using highly reflective surfaces or adjusting the sensitivity potentiometer.
Q3: Can I use the TCRT-5000 with a 3.3V microcontroller?
A3: Yes, the sensor operates at both 3.3V and 5V, making it compatible with 3.3V microcontrollers.
Q4: What is the difference between analog and digital output?
A4: Analog output provides a continuous voltage proportional to the detected reflection, while digital output gives a binary HIGH or LOW signal based on a threshold.