The AS7261 is a color sensor. That seems simple enough, but if you look at the datasheet, you might find yourself confused by the terminology. So before we discuss the device itself, let’s look at some of the relevant concepts.
First, we see in the description that we’re dealing with a “chromatic white color sensor.” That alone is enough to provoke discouragement. “Chromatic” is defined as “relating to color.” But the next word, “white,” generally evokes images of, well, whiteness, not color. Then we have the word “color,” which I think we all know and which is both redundant (with regard to “chromatic”) and mildly paradoxical (with regard to “white”).
The primary thing to keep in mind is that there really is no such thing as white light, in the sense that there is no wavelength of electromagnetic radiation that corresponds to whiteness in the way that 650 nm corresponds to redness. Rather, our eyes interpret illumination as whitish when it contains mixtures of different wavelengths (more details here).
So the AS7261 is a device that can detect the chromatic characteristics of ambient illumination. (Honestly, I’m still not sure why the description includes both “chromatic” and “color”). In other words, whitish light goes in, color data comes out. (Of course, it works with non-white light as well.) But what sort of color data are we talking about? Perhaps the most familiar is “RGB,” i.e., separate values for the intensity of red, green, and blue wavelengths in the received illumination. But the AS7261 doesn’t give you RGB—you get XYZ instead.
The XYZ Space
All images used courtesy of ams.
As you can see, the XYZ color space seems rather similar to RGB. However, XYZ is designed to be consistent with how human beings actually experience optical wavelengths. In other words, RGB focuses on the wavelengths themselves, whereas XYZ is based on human experiments that explored the relationship between the wavelengths and the physiological perception of color. A web search for XYZ color or CIE 1931 will turn up more information for those who are interested. The bottom line is that XYZ is considered “better”—i.e., more consistent with color as perceived by humans.
The following diagram conveys the general idea of how the AS7261 is incorporated into a system:
Optical sensors work in conjunction with a “cognitive light engine” to provide digital XYZ color data via I2C or UART. The AS7261 also performs NIR (near infrared) and C & D (clear and dark) sensing; hence the array of six photodiodes:
Here is a more detailed diagram of the internal functionality:
As usual, we’re looking at high levels of integration. The device includes 16-bit analog-to-digital conversion, a temperature sensor, and LED drivers for electronic-shutter functionality.
The sink current for the LED_DRV signal is programmable from 12.5 mA to as much as 100 mA. The other LED signal (LED_IND) seems to be intended primarily for basic indicator LEDs, and thus it is limited to 8 mA. However, the datasheet implies that you could use LED_IND for (presumably low-intensity) illumination and thereby have a two-wavelength lighting system.
I find the AS7261’s packaging arrangement rather interesting. It’s a land grid array (LGA) but with a large housing that provides a built-in aperture:
Don’t Forget the Flash
The number of external components required by the AS7261 is quite low. However, keep in mind that you will need a flash memory chip. I doubt this presents any serious inconvenience, but in these days of single-chip solutions, it might be considered mildly annoying.
The datasheet says that the external flash memory chip must be “ams [Austria Micro Systems] verified,” and I’m not sure what that means. The datasheet also says that “flash memory software is available from ams”; I suppose that refers to some sort of program that helps you to get the right data into the flash.
Overall, the AS7261 seems to be a powerful and convenient device for high-performance color-sensing applications. Looking at its capabilities, I suppose it’s more of an all-purpose optical sensor because it has NIR and C & D photodiodes in addition to XYZ diodes.
Do you have any experience with XYZ color? Do you think it offers significant improvement over RGB? Leave us a comment and let us know your thoughts.