Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use TCRT-5000 IR sensor: Examples, Pinouts, and Specs

Image of TCRT-5000 IR sensor
Cirkit Designer LogoDesign with TCRT-5000 IR sensor in Cirkit Designer

Introduction

The TCRT-5000 is an infrared sensor module that integrates an IR LED and a phototransistor in a single package. It is designed for detecting objects and measuring proximity by emitting infrared light and sensing the reflected light from nearby objects. The sensor is highly sensitive to reflective surfaces and is commonly used in applications such as line-following robots, object detection, and optical encoders.

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!
Raspberry Pi Zero-Based IR Sensor Array
Image of CSC 615 A4: A project utilizing TCRT-5000 IR sensor in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP-8266 Based Obstacle Detection System with IR and Ultrasonic Sensors
Image of iot rev: A project utilizing TCRT-5000 IR sensor in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Leonardo-Based Line Following Robot with TCRT-5000 IR Sensors and L298N Motor Driver
Image of compt_neapolis_nebeul: A project utilizing TCRT-5000 IR sensor in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled Dual Gearmotor System with IR Sensing
Image of esp32 BLETHOOTH with motor driver: A project utilizing TCRT-5000 IR sensor in a practical application
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

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!
Image of CSC 615 A4: A project utilizing TCRT-5000 IR sensor in a practical application
Raspberry Pi Zero-Based IR Sensor Array
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of iot rev: A project utilizing TCRT-5000 IR sensor in a practical application
ESP-8266 Based Obstacle Detection System with IR and Ultrasonic Sensors
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of compt_neapolis_nebeul: A project utilizing TCRT-5000 IR sensor in a practical application
Arduino Leonardo-Based Line Following Robot with TCRT-5000 IR Sensors and L298N Motor Driver
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.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of esp32 BLETHOOTH with motor driver: A project utilizing TCRT-5000 IR sensor in a practical application
ESP32-Controlled Dual Gearmotor System with IR Sensing
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.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Line-following robots
  • Proximity sensing
  • Object detection
  • Optical encoders for motor speed measurement
  • Position detection in automation systems

Technical Specifications

The TCRT-5000 IR sensor has the following key technical details:

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

Pin Configuration and Descriptions

The TCRT-5000 typically has 4 pins. Below is the pinout and description:

Pin Name Description
1 VCC Power supply pin (3.3V to 5V)
2 GND Ground pin
3 OUT Output pin (Analog or Digital, depending on circuit)
4 LED Cathode Cathode of the IR LED (connected internally to GND)

Note: Some TCRT-5000 modules may have additional components like resistors or comparators, which can affect the output type (analog or digital).

Usage Instructions

How to Use the TCRT-5000 in a Circuit

  1. Power the Sensor:

    • Connect the VCC pin to a 3.3V or 5V power supply.
    • Connect the GND pin to the ground of your circuit.
  2. Connect the Output:

    • For analog output, connect the OUT pin to an analog input pin of your microcontroller.
    • For digital output (if the module includes a comparator), connect the OUT pin to a digital input pin.
  3. Position the Sensor:

    • Place the sensor facing the object or surface to be detected.
    • Ensure the detection range (2 mm to 15 mm) is maintained for optimal performance.
  4. Adjust Sensitivity (if applicable):

    • Some TCRT-5000 modules include a potentiometer to adjust the sensitivity. Turn the potentiometer to fine-tune the detection threshold.

Important Considerations and Best Practices

  • Reflective Surfaces: The sensor works best with reflective surfaces like white or light-colored objects. Dark or matte surfaces may reduce detection accuracy.
  • Ambient Light: Avoid exposing the sensor to direct sunlight or strong ambient light, as it may interfere with the IR signal.
  • Mounting: Ensure the sensor is securely mounted to prevent misalignment during operation.
  • Pull-up Resistor: If using the sensor in analog mode, consider adding a pull-up resistor to stabilize the output signal.

Example: Using the TCRT-5000 with 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 with Arduino UNO
// Connect the sensor's VCC to 5V, GND to GND, and OUT to A0 (analog pin)

const int sensorPin = A0;  // Analog pin connected to the sensor's OUT pin
int sensorValue = 0;       // Variable to store the sensor reading

void setup() {
  Serial.begin(9600);  // Initialize serial communication for debugging
}

void loop() {
  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

  // Add a small delay to avoid flooding the Serial Monitor
  delay(100);
}

Tip: The sensor value will be higher when an object is detected (depending on reflectivity). You can use this value to trigger specific actions in your project.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Cause: Incorrect wiring or loose connections.
    • Solution: Double-check the wiring and ensure all connections are secure.
  2. 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.
  3. Fluctuating Output Values:

    • Cause: Electrical noise or unstable power supply.
    • Solution: Add a decoupling capacitor (e.g., 0.1 µF) across the power supply pins.
  4. Interference from Ambient Light:

    • Cause: Strong ambient light affecting the IR signal.
    • Solution: Shield the sensor from direct sunlight or use it in a controlled lighting environment.

FAQs

Q: Can the TCRT-5000 detect black or dark-colored objects?
A: The sensor's performance is reduced with dark or matte surfaces due to low reflectivity. For better results, use reflective or light-colored objects.

Q: How do I convert the analog output to a digital signal?
A: You can use a comparator circuit or a microcontroller's ADC (Analog-to-Digital Converter) to process the analog signal and set a threshold for digital output.

Q: What is the maximum detection range of the TCRT-5000?
A: The sensor can detect objects within a range of 2 mm to 15 mm, depending on the object's reflectivity.

Q: Can I use the TCRT-5000 with a 3.3V system?
A: Yes, the sensor operates within a voltage range of 3.3V to 5V, making it compatible with both 3.3V and 5V systems.

By following this documentation, you can effectively integrate the TCRT-5000 IR sensor into your projects for reliable object detection and proximity sensing.