The TCS3200 color sensor can detect a wide variety of colors based on their wavelength. This sensor is specially useful for color recognition projects such as color matching, color sorting, test strip reading and much more.
The TCS3200 color sensor – shown in the figure below – uses a TAOS TCS3200 RGB sensor chip to detect color. It also contains four white LEDs that light up the object in front of it.
Specifications:
- Power: 2.7V to 5.5V
- Size: 28.4 x 28.4mm (1.12 x 1.12″)
- Interface: digital TTL
- High-resolution conversion of light intensity to frequency
- Programmable color and full-scale output frequency
- Communicates directly to microcontroller.
The TCS3200 has an array of photodiodes with 4 different filters. A photodiode is simply a semiconductor device that converts light into current. The sensor has:
- 16 photodiodes with red filter – sensitive to red wavelength
- 16 photodiodes with green filter – sensitive to green wavelength
- 16 photodiodes with blue filter – sensitive to blue wavelength
- 16 photodiodes without filter
By selectively choosing the photodiode filter’s readings, you’re able to detect the intensity of the different colors. The sensor has a current-to-frequency converter that converts the photodiodes’ readings into a square wave with a frequency that is proportional to the light intensity of the chosen color. This frequency is then, read by the Arduino.
Pin Name | I/O | Description |
GND (4) | Power supply ground | |
OE (3) | I | Enable for output frequency (active low) |
OUT (6) | O | Output frequency |
S0, S1(1,2) | I | Output frequency scaling selection inputs |
S2, S3(7,8) | I | Photodiode type selection inputs |
VDD(5) | Voltage supply |
Filter selection
To select the color read by the photodiode, you use the control pins S2 and S3. As the photodiodes are connected in parallel, setting the S2 and S3 LOW and HIGH in different combinations allows you to select different photodidodes. Take a look at the table below:
Photodiode type | S2 | S3 |
Red | LOW | LOW |
Blue | LOW | HIGH |
No filter (clear) | HIGH | LOW |
Green | HIGH | HIGH |