The TCRT reflective optical sensor is a versatile component that combines an infrared emitter and a phototransistor in a single package. This sensor is commonly used for proximity sensing and object detection. It is widely utilized in applications such as line-following robots, optical encoders, and non-contact switching.
Parameter | Value |
---|---|
Operating Voltage | 4.5V to 5.5V |
Forward Current (IF) | 60 mA |
Collector Current | 100 mA |
Collector-Emitter Voltage (VCEO) | 32V |
Emitter-Collector Voltage (VECO) | 5V |
Operating Temperature | -25°C to +85°C |
Peak Wavelength | 950 nm |
Detection Range | 0.2 mm to 15 mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | Emitter | Connect to the positive terminal of the power supply (typically 5V) |
2 | Collector | Connect to the input pin of the microcontroller or the load |
3 | Ground | Connect to the ground of the power supply |
4 | Anode | Connect to the positive terminal of the power supply (typically 5V) |
5 | Cathode | Connect to the ground through a current-limiting resistor |
Power Supply:
Emitter and Collector:
Ground:
/*
TCRT Reflective Optical Sensor Example
This code demonstrates how to use the TCRT sensor with an Arduino UNO.
The sensor detects the presence of an object and turns on an LED.
*/
const int sensorPin = 2; // Pin connected to the collector of the phototransistor
const int ledPin = 13; // Pin connected to the LED
void setup() {
pinMode(sensorPin, INPUT); // Set sensor pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int sensorValue = digitalRead(sensorPin); // Read the sensor value
if (sensorValue == LOW) {
// Object detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Object detected");
} else {
// No object detected
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No object detected");
}
delay(100); // Small delay for stability
}
No Detection:
False Readings:
Intermittent Detection:
Q1: Can the TCRT sensor detect transparent objects?
Q2: What is the maximum detection range of the TCRT sensor?
Q3: Can I use the TCRT sensor with a 3.3V power supply?
By following this documentation, users can effectively integrate the TCRT reflective optical sensor into their projects, ensuring reliable proximity sensing and object detection.