TCS34725 Photodiode Color Sensor Efficiency compensation

Hi all,

I am performing some color measurments involving analizing reflected light from a sample. The light is analyzed by Adafruit TCS34275 sensor and the light is provided by a single through hole NeoPixel also from Adafruit.
I have two major questions I could not solve by googling around:

  1. How do I compensate for the TCS photodiodes efficiencies to different wavelengths? The datasheet is being pretty obscure about how the measurements can be translated. I understand that where the Clear channel has 100% efficiency (@755nm according to datasheet, but it seem sto me it is at 600nm-ish), the Red channel has say, 65% efficiency, to get the true Red light reading I should multiply the Red reading by 100 and divide by 65. Same goes with G and B
    But what if the NeoPixel Illuminates with light ar 625nm (eg Red)? Then the clear channel has an efficiency of about 90% and the red one 80%, how do I manage to get the true reading?

  2. I know (sort of) know the wavelegths corresponding to R, G, B components of the NeoPixel, but what if I write (127, 0, 127), that is magenta? (half red and half blue) How do I find out the wavelength for that?

Can anybody point me in the right direction to solve these? Any suggestion will be helpful!
Thanks a lot!

  1. How do I compensate for the TCS photodiodes efficiencies to different wavelengths?

Calibrate it.

I know (sort of) know the wavelegths corresponding to R, G, B components of the NeoPixel, but what if I write (127, 0, 127), that is magenta? (half red and half blue) How do I find out the wavelength for that?

You don't need to. Because the wavelength isn't that of magenta but it's simply 50% intensity of the red wavelength and 50% intensity of the blue wavelength.
If you need the output values as absolute measurements, you have to calibrate your setup with know values.

The human eye has three color receptors, and the perception of the color depends on how the brain interprets the relative outputs of the three receptors. See this discussion.

You can get the exact same impression of color from light of one particular wavelength, or light with two or more wavelengths chosen appropriately. See this discussion on color addition and subtraction.

However, the color magenta is not associated with one wavelength, but rather a mixture of blue and red.

Interpreting the output of the TCS34725 color sensor can lead to the same problem: one input wavelength or many?

What is it that you are really trying to do?

Hi, sorry for the late response, I could not seem to get new replies notified.
I'm trying to use the TCS to characterize some liquid biological samples. I doesn't really matter if the sensor perception is similar to human eye, I just want to take a measure that can be repeatable.
Since I know that color is related to reflected light, I wanted to quantify how much of light is reflected back from my sample (referred to a certain wavelength).
I was wondering if a part from reflection related to R,G,B components I could find reflection to, say, yellow light, by having the NeoPixel go yellow (127,127, 0) and measuring the readings on the clear channel of the TCS. Does this makes sense? Because otherwise I could just have the NeoPixel go white and read R, G, B from the corresponding channels on TCS and call it an end.
The point is that this is a thesis project and my advisor has not been very clear about why it would amuse him to have "reflection of multiple colors", so I'm quite confounded as well

I could find reflection to, say, yellow light, by having the NeoPixel go yellow (127,127, 0)

No, because the NeoPixel is not emitting yellow light.

The NeoPixel is emitting red and green, which the human eye perceives as yellow. If the object does not reflect red and green light, it will appear black.

But in practice, the LED emission bands are broad and some yellow light is indeed emitted, perhaps by both the red and green LEDs.

In order to succeed in this project, you really need to understand color theory.