Stufin
Home Quick Cart Profile

TCRT5000 IR Sensor Module

Buy Now

Component Name

TCRT5000 IR Sensor Module

Overview

The TCRT5000 IR Sensor Module is a compact, infrared-based proximity sensor module designed for detecting objects or obstacles in various applications. It is a popular choice among robotics, automation, and IoT enthusiasts due to its ease of use, high accuracy, and affordability.

Functionality

The TCRT5000 IR Sensor Module is designed to detect objects or obstacles within a certain distance range by emitting infrared light and measuring the reflected light. When an object is within the detection range, the sensor outputs a digital signal indicating the presence or absence of the object.

Key Features

  • Infrared Emission and Detection: The module emits infrared light from an internal LED and detects the reflected light using a phototransistor.
  • Digital Output: The sensor module provides a digital output signal, which can be easily interfaced with microcontrollers, Arduino, or Raspberry Pi.
  • Adjustable Sensitivity: The module features an onboard potentiometer to adjust the sensitivity of the sensor, allowing users to fine-tune the detection range according to their application requirements.
  • Low Power Consumption: The TCRT5000 IR Sensor Module operates at a low voltage (VCC: 4.5-5.5V) and consumes minimal power (typically 20mA), making it suitable for battery-powered devices.
  • Compact Design: The module measures 20mm x 15mm x 10mm, making it ideal for compact and space-constrained applications.
  • Robust Construction: The module is built with a durable plastic casing and features a 3-pin header for easy connection to breadboards or PCBs.
  • Detection Range: The TCRT5000 IR Sensor Module can detect objects within a range of approximately 1-10 cm (0.4-3.9 inches), depending on the object's reflectivity and sensitivity adjustment.
  • Operating Temperature: The module operates reliably within a temperature range of -25C to 85C (-13F to 185F).

Typical Applications

  • Obstacle detection in robotics and autonomous vehicles
  • Proximity sensing in home automation and security systems
  • Object detection in vending machines and industrial automation
  • Distance measurement in IoT projects and wearables
  • Line detection and following in robotics and autonomous systems

Pinout

  • VCC: Power supply (4.5-5.5V)
  • GND: Ground
  • OUT: Digital output signal (HIGH or LOW)

Important Notes

The TCRT5000 IR Sensor Module is sensitive to ambient light conditions and may require additional shielding or filtering in bright environments.

The detection range may vary depending on the object's reflectivity, color, and surface texture.

Users should adjust the sensitivity potentiometer carefully to avoid false triggering or missed detections.

By leveraging the TCRT5000 IR Sensor Module's features and functionality, developers can create a wide range of innovative IoT projects and applications that require accurate and reliable object detection.

Pin Configuration

  • TCRT5000 IR Sensor Module Documentation
  • Pin Description
  • The TCRT5000 IR Sensor Module has 3 pins, which are explained below:
  • 1. VCC (Power Supply Pin)
  • Function: Supplies power to the module
  • Type: Input
  • Voltage: 4.5V to 5.5V (Typical operating voltage is 5V)
  • Current: Maximum 20mA
  • Connect to: VCC pin of the microcontroller or a suitable power source (e.g., a battery or a voltage regulator)
  • 2. GND (Ground Pin)
  • Function: Provides a common ground reference for the module
  • Type: Input
  • Voltage: 0V
  • Current: N/A (Ground reference)
  • Connect to: GND pin of the microcontroller or a suitable ground connection (e.g., a breadboard's ground rail)
  • 3. OUT (Output Pin)
  • Function: Provides the sensor's digital output signal
  • Type: Output
  • Voltage: 0V (Low) or VCC (High) depending on the sensor's detection state
  • Current: Maximum 20mA
  • Connect to: A digital input pin of the microcontroller (e.g., an Arduino Uno's digital pin)
  • Connection Structure:
  • Here's a step-by-step guide to connect the TCRT5000 IR Sensor Module:
  • 1. Connect VCC pin of the TCRT5000 module to the VCC pin of the microcontroller or a suitable power source (e.g., a 5V output from a voltage regulator).
  • 2. Connect GND pin of the TCRT5000 module to the GND pin of the microcontroller or a suitable ground connection (e.g., a breadboard's ground rail).
  • 3. Connect OUT pin of the TCRT5000 module to a digital input pin of the microcontroller (e.g., Arduino Uno's digital pin 2).
  • Example Connection Diagram:
  • TCRT5000 IR Sensor Module | Microcontroller (e.g., Arduino Uno)
  • ---------------------------|-------------------------------------
  • VCC (Pin 1) | VCC (Pin 1)
  • GND (Pin 2) | GND (Pin GND)
  • OUT (Pin 3) | Digital Pin 2 (or any available digital input pin)
  • By following these connections, you can use the TCRT5000 IR Sensor Module to detect objects or obstacles and read the output signal using your microcontroller.

Code Examples

TCRT5000 IR Sensor Module Documentation
Overview
The TCRT5000 IR Sensor Module is a reflective infrared sensor module designed for obstacle detection, proximity sensing, and distance measurement applications. It operates by emitting infrared light and measuring the reflected light to detect objects. This module is widely used in robotics, automation, and IoT projects.
Pinout and Connection
The TCRT5000 IR Sensor Module has a 3-pin interface:
VCC: Connect to a 5V power supply
 GND: Connect to ground
 OUT: Connect to a digital input pin on a microcontroller or development board
Examples and Code
### Example 1: Basic Obstacle Detection using Arduino
In this example, we'll use the TCRT5000 IR Sensor Module to detect obstacles using an Arduino board.
Hardware
TCRT5000 IR Sensor Module
 Arduino Uno or compatible board
 Breadboard and jumper wires
Code
```c++
const int sensorPin = 2;  // Connect OUT pin to digital pin 2
void setup() {
  pinMode(sensorPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  int sensorState = digitalRead(sensorPin);
  if (sensorState == LOW) {
    Serial.println("Obstacle detected!");
  } else {
    Serial.println("No obstacle detected.");
  }
  delay(50);
}
```
In this example, we read the output of the TCRT5000 IR Sensor Module using digital pin 2 on the Arduino board. If the output is LOW, it indicates an obstacle is detected, and we print a corresponding message to the serial monitor.
### Example 2: Distance Measurement using Raspberry Pi (Python)
In this example, we'll use the TCRT5000 IR Sensor Module to measure distance using a Raspberry Pi and Python.
Hardware
TCRT5000 IR Sensor Module
 Raspberry Pi 3 or compatible board
 Breadboard and jumper wires
Code
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
sensorPin = 17  # Connect OUT pin to GPIO 17
def read_distance():
    GPIO.setup(sensorPin, GPIO.IN)
    start_time = time.time()
    while GPIO.input(sensorPin) == GPIO.HIGH:
        pass
    end_time = time.time()
    distance = (end_time - start_time)  34000  # Calculate distance in cm
    return distance
while True:
    distance = read_distance()
    print("Distance: {:.2f} cm".format(distance))
    time.sleep(0.1)
```
In this example, we use the Raspberry Pi's GPIO library to read the output of the TCRT5000 IR Sensor Module. We measure the time it takes for the output to go from HIGH to LOW, which is proportional to the distance of the object. We then calculate the distance in centimeters using the speed of light.
Note: These examples are for illustration purposes only and may require calibration and adjustments for specific use cases.