You can sense a lot of things with the right sensor, and [Nikhil Nailwal] is here to show us how to sense colors using a TCS230. The project is a simple demo. It displays the color and lights up an LED to correspond to the detected color.
If you haven’t seen the TCS230 before, it is a chip with an array of photosensors, for different light wavelengths. The controlling chip — an Arduino, in this case — can read the intensity of the selected color.
The TCS230 uses a 4 x 4 array of photodiodes, along with a Bayer filter. That is, there are four detectors for red, four for green, and four for blue. There are also four unfiltered detectors that aid in low lighting detection.
The host computer controls two lines to select which group of four detectors to read. The output is a frequency from around 2 to 500 kHz that indicates the intensity. You can scale the output frequency if you don’t want to deal with higher frequencies.
From what we understand, the sensor’s resolution isn’t that great. But for simple color detection, it is easy to use and effective. There are very similar chips like the TCS3200 that have more sensors, but work in the same way.
We’ve seen similar projects, but we are always struck how simple this sensor is to use. Combine these with an RGB LED and you can make a chameleon.
Source: THIS ARDUINO ISN’T COLOR BLIND