The TCRT5000 is a popular reflective optical sensor module combining an infrared emitter and a phototransistor in one compact package . It detects objects and surfaces by measuring reflected IR light, producing both digital and analog outputs for line following, obstacle detection, and object counting projects .
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Output Modes | Analog (AO) and Digital (DO) |
| Comparator IC | LM393 |
| Detection Range | 2mm to 15mm (adjustable) |
| Effective Range | 1mm to 8mm |
| Power Consumption | <100mA |
= Key Features =
+Adjustable Sensitivity - Onboard potentiometer sets the digital output trigger threshold
+Power and Signal LEDs - Visual indicators for module status and object detection
+Mounting Holes - M3 holes for secure attachment to robot chassis
+Wide Compatibility - Works with 3.3V to 5V logic systems
√ Compatible with Arduino, ESP32, Raspberry Pi, and other MCUs
√ Available as bare module or with cable
√ Easy integration with popular robotics libraries
| Sensor Pin | Arduino Pin | Function |
|---|---|---|
| VCC | 5V | Power supply |
| GND | GND | Ground |
| AO | A0 | Analog signal (object distance) |
| DO | D2 | Digital signal (threshold trigger) |
> Use analog output for variable reflectance reading (e.g., line position)
The sensor works by emitting infrared light from the IR LED . When an object is close, the light reflects back to the phototransistor, which changes its resistance . The LM393 comparator converts this analog signal to a digital output with adjustable sensitivity . High reflectance surfaces (e.g., white paper) produce a higher output voltage, while low reflectance surfaces (e.g., black paper) produce a lower output voltage .
Inconsistent readings:
No signal: