What it is
The ShillehTek GY-31 TCS3200 RGB Color Recognition Sensor is a color sensor module for Arduino, ESP32, and Raspberry Pi-style projects that measures an object’s color using a filtered photodiode array (Red/Green/Blue/Clear) and outputs the result as a frequency-based square wave you can time with digital I/O (no ADC required). Four onboard white LEDs help illuminate the target for more consistent readings in sorting, label detection, and basic color classification builds.
Pins
Pin names can vary by module revision. Refer to the silkscreen labels on the board/module and the listing photos for the exact pinout, then connect power (compatible with 2.7V–5.5V logic) and the frequency output to a digital input on your microcontroller.
Technical Specifications
| Item | Details |
|---|---|
| Sensor / module type | GY-31 TCS3200 RGB color recognition sensor module |
| Color filters | Photodiode array with Red, Green, Blue, and Clear filters |
| Output signal | Frequency-based square-wave output (read via digital timing) |
| Selectable output scaling | 2%, 20%, or 100% scaling (selectable) |
| Logic / operating voltage | 2.7V to 5.5V logic compatible (works with 3.3V and 5V boards) |
| Onboard illumination | Four white LEDs for target lighting |
Frequently Asked Questions
How do I read the GY-31 TCS3200 output with Arduino?
The module provides a frequency-based square-wave output. On Arduino you typically measure pulse timing or count pulses over a fixed interval on a digital input pin to derive relative RGB readings.
Does the ShillehTek GY-31 TCS3200 need an ADC input?
No. Unlike analog light sensors, the TCS3200-style module outputs a digital square wave whose frequency changes with detected light, so you can read it with digital timing.
What voltage can I power the GY-31 TCS3200 with (ESP32 or Arduino Uno)?
It supports 2.7V to 5.5V logic, so it’s suitable for 3.3V boards like ESP32 and 5V microcontrollers without level shifting.
What is output scaling on the TCS3200 (2%, 20%, 100%) and why use it?
Output scaling lets you reduce or increase the output frequency to match your processor speed or measurement method. Lower scaling can make timing easier on slower code; higher scaling can help maximize resolution in some setups.
Why does this color sensor include onboard LEDs?
The four white LEDs illuminate the target so readings are more consistent across different room lighting conditions, improving repeatability for tasks like sorting candy or checking labels.