A Quick Review
One way to measure illuminance, as discussed in the preceding article, is to use an optical sensor that is designed to approximate the spectral response of human vision. The datasheets for these devices usually have information that allows you to convert directly from output to lux; however, owing to the discrepancy between the ideal spectral response (i.e., the luminosity function) and the sensor’s spectral response, the accuracy of the measurement will vary depending on the spectral composition of the ambient illumination.
The RGB Approximation
A highly accurate illuminance measurement could be performed as follows: first, you need an optical sensor with a “flat” spectral response—i.e., the sensitivity is the same for every wavelength in the visible spectrum. Call this the wideband detector. In addition, you arrange in close proximity numerous narrowband detectors fine-tuned to a particular wavelength. The wideband detector produces an output proportional to the overall light intensity, with each wavelength contributing equally, and the narrowband detectors reveal the spectral composition of the light. You can then apply the luminosity function, based on this spectral information, to the output of the wideband detector.The precision achieved with this approach will be proportional to the number of narrowband detectors—more detectors means a more accurate representation of the actual spectral composition. Practical limitations quickly come into play, though, and furthermore—as discussed in the first article—highly precise illuminance measurements are unnecessary and, in a certain sense, impossible.
Thus, we can implement this approach but in a highly simplified form: we need a wideband detector with a fairly flat spectral response and three narrowband detectors. The obvious choice for the narrowband detectors are red, green, and blue—first, because RGB sensors are readily available, and second, because the RGB wavelengths divide the visible spectrum into three more or less equal portions:
This is the spectral sensitivity information for the Rohm RGBC sensor IC (p/n BH1745NUC) mentioned in the previous article. As you can see, the blue detector corresponds to about the lower one-third of the visible spectrum, the green detector corresponds to the middle one-third, and the red detector corresponds to the upper one-third. Note also that the response of the clear detector is fairly flat—actually, it is very flat compared to the curves presented in the previous article, such as this one for the Fairchild phototransistor (p/n KDT00030TR) :
Nevertheless, the response of the Rohm part drops significantly at the lower wavelengths . . . I fully understand the difficulty this causes for those inclined to perfectionism—but remember, low-cost, low-complexity illuminance measurements are not an exercise in precision!
Step by Step
1. We need to adjust the RGB measurements to compensate for the major differences in sensitivity. From the above plot we see that R is about 0.72 and B is about 0.56 when G is 1. Thus, we multiply the R and B values by the appropriate correction factor:
2. Determine the “portion” of the ambient light contained in the R, G, and B bands by adding up the three values and dividing each by the total. This approach presupposes the assumption whereby the R, G, and B values represent all the irradiance in the upper, middle, and lower third of the visible spectrum. For example, let’s say the corrected RGB outputs are as follows:
3. Find the irradiance-to-illuminance conversion factor for each color:
From this overlay plot we can estimate the following irradiance-to-illuminance factors, recalling that the maximum at 555 nm is 683:
4. Multiply the irradiance portions by the appropriate IRtoIL factor, and add up the results to determine the overall IRtoIL factor for the particular spectral composition of the currently measured illumination:
5. Use the clear detector’s sensitivity to determine the wavelength-independent irradiance. Let’s say the clear output is 300 counts:
6. Finally—multiply the irradiance by the overall irradiance-to-illuminance conversion factor:
Discussion and Conclusion
You might be wondering if the clear detector is really necessary here. That’s a difficult question. We could ignore the clear detector and simply interpret the sum of the three RGB measurements as the total irradiance, but we would end up ignoring irradiance that falls in the wavelengths not covered by the RGB sensitivity bands. However, if the wavelengths of this ignored irradiance are toward the edges of the luminosity function, it would actually be better to ignore it—if the RGB detectors don’t see it and the clear detector does, it will make an erroneously large contribution to the final lux value. I suppose the bottom line is that both approaches are feasible, with one or the other being more accurate depending on the spectral characteristics of the lighting conditions and of the clear detector—ignoring the clear detector is an easy way to eliminate error caused by its nonideal (i.e., non-wavelength-independent) sensitivity.
The procedure described here is perhaps more of a starting point. It should provide reasonably accurate illuminance measurements with minimal investment of time and money, but you should definitely consider ways to refine your algorithm based on empirical observations or, even better, by comparing your results to those of a high-quality lux meter.
No comments:
Post a Comment