TCS3200-DB Measuring Ambient Light
KitKat25
Posts: 8
Does anyone know how I can use the TCS3200-db to measure ambient light? I know to (1) turn the LEDs off, and (from reading other posts) (2) to put a piece of white paper over the lens, but in the datasheet there is a chart called TCS3200 Relative Emissive Spectral Response with IR Filter that I'm confused about.
I want each color (red, green, blue) to have the same sensitivity/response in ambient light. To do this, can I use the same count time for each one, or does blue (for example) need a longer count time than green and red (because it has a lower relative response in the chart)?
I'm really confused, please help!!
I want each color (red, green, blue) to have the same sensitivity/response in ambient light. To do this, can I use the same count time for each one, or does blue (for example) need a longer count time than green and red (because it has a lower relative response in the chart)?
I'm really confused, please help!!
Comments
Welcome to the forum!
Let's assume that what you mean by this is that you want the responses to be the same in ambient white light. White light, by definition, is that which contains an equal measure of output at every wavelength. However, it's something that we almost never experience, since most incandescent light sources (e.g. the sun, a lightbulb, etc.) follow what's known as the "blackbody radiation curve" whose whiteness is governed by a factor known as "color temperature."
Given any source spectrum, the response of each sensor in the TCS3200 will be the integral over all wavelengths of that spectrum multiplied the color response curve of the sensor. For an ideal white light source, this just translates to the area under the response curve. So, in order to equalize or "normalize" the responses of the individual sensors under these conditions, you would need to divide the actual response by a number proportional to the area under the sensor's response curve. You can also, as you suggested, adjust the integration time in the same way. The only catch, if you're using the TCS3200 with a BASIC Stamp, is that typical integration times tend to be small integers. So you will not get the precision you might be after by adjusting them.
More typically, however, one will have a reference "white" standard available that can be used simply to measure the white response of each sensor, in lieu of the integration, and use this value to divide the response by for the normalization. This is what's referred to in the TCS3200 doc as doing a "white balance."
-Phil
I guess my question is then, what should I multiply each color reading by to "normalize" them? I could be way off on this, so sorry if I am, but looking at the chart it looks like blue is .53 of the whole, green is about .65 of the whole, and red is .95 of the whole. Would it be right then to multiply blue by 1.89, green by 1.54, and red by 1.05 (rounding to the nearest hundredth)? Thank you for your help on this, I'd be lost otherwise!
-Phil
-Phil
-Phil
I'm not entirely sure what it is that you're trying to accomplish. Perhaps, if you supplied some more details, I could suggest other ways of handling the data.
-Phil
We got it to work just fine, but then we started to get a little concerned when red was always the highest color, followed by green and then blue, no matter where we took readings (in the house, outside, etc.). Then I looked back at the datasheet chart and saw how the colors had different "responsiveness," and that responsiveness seemed to match up with our readings, i.e., red was the highest, then green, then blue. I got worried that the red sensor was just more sensitive than the green (and so forth), and that if we didn't compensate for this somehow, our readings of ambient light would not be accurate.
I suppose I just want to make sure the sensors are all just as responsive or sensitive as the others, so that the readings are accurate. I hope that makes sense.
There are other, more complicated approaches one can take. For example, you could partition the spectrum into distinct red, green, and blue sections. Then use the sensor's output to estimate how much light fell into each section. With perfect filters having non-intersecting spectral responses, this would be simply a matter of taking readings. But, since the color responses overlap and bleed into other portions of the spectrum, there would be some additional math involved. For example, because the green sensor has a small peak of sensitivity in the blue, a better estimate of how much green light it's receiving could be had by subtracting a little bit of the response from the blue sensor to compensate. But, really, I think this goes well beyond the requirements of the project at hand.
-Phil
Thank you for all your help, this was very informative.