The best color sensor on the market, the TCS34725, which has RGB and Clear light sensing elements.
An IR blocking filter, integrated on-chip and localized to the color sensing photodiodes, minimizes the IR spectral component of the incoming light and allows color measurements to be made accurately.
The filter means you'll get much truer color than most sensors, since humans don't see IR.
The sensor also has an incredible 3,800,000:1 dynamic range with adjustable integration time and gain so it is suited for use behind darkened glass.
The TCS3472 color sensor is able to measure any of the following quantities (refer to photos below):
- RED, GREEN and BLUE (filtered) values.
- Color Temperature - measured in Kelvin.
- Lux - or Lumens per Square Meter.
The sensor works by shining a white light on an object and measuring the amount of red, green, blue and white light that is reflected from the surface of that object.
The measurements are taken using a a 3 x 4 matrix of sensors that have red/green/blue color filters in front of them. It also measures the overall intensity of the reflected light using a clear filter over three of the sensors. The entire sensor array has an IR filter over it that minimizes the effect of IR light on the readings.
The analog sensor outputs are converted to 16-bit digital values using 4 integrating ADCs. These sensor digital values are then available to the MCU via the I2C bus.
There are 2 main settings that can be configured to affect the readings and optimize them for a particular application.
Gain Setting: The gain setting can be set to 1X, 4X, 16X or 60X. Higher gain settings may help read the color correctly under lower light conditions but it may also increase the noise level of the reading.
Integration Time: The integration time is the length of time used for taking the sample. Longer integration times may provide better accuracy in some applications. The integration time can be set to 2.4mS, 24mS, 50mS, 101mS, 154mS or 700mS.
If the interrupt has been enabled, when the measured values exceed an upper or lower threshold values set for the interrupt, the open-collector output will be driven LOW. Since it is an open-collector output, a pull-up resistor is needed on the INT line to pull it HIGH when it is not being driven LOW. This can usually be implemented by enabling an internal pull-up on the uC data pin.
The on-board white LED is used to illuminate the object being measured and it can be controlled via the LED pin on the module. When the pin is left floating, the LED will be illuminated. If it is desired to have it permanently off, the pin can be grounded. The pin can also be attached to a digital output on the MCU and turned on/off when samples are being taken.
- Separate Red/Green/Blue light intensity sensors
- Ambient (clear) light intensity sensor
- IR light blocking filter
- Integrated logic controlled white LED light source
- 3,800,000:1 dynamic range
- Adjustable gain and integration time
- Interrupt output available based on predefined lighting thresholds
- I2C interface
- 3.3 or 5V operation
- Health and fitness
- Industrial process controls
- Medical diagnostic equipment