Wish: Eval. board for Color Light Sensor Avago ADJD-S371-Q99

I’ve got the sparkfun eval board working with a PIC. The whole system can run at 3.3v so there is no need to worry about level conversions.

The sensor seems to be only slightly directional, which makes sense since it’s just a bunch of photosensitive elements without any optics. One way to make it more directional would be to stick a narrow, opaque black plastic tube over it (I guess I could paint a drinking straw?). Like the sensor is sitting at the bottom of a well.

I have not yet done calibration as the sensor is just waving around on the end of some wires sticking up out of a breadboard right now. But it does seem to give nicely varying readings when I wave my cell phone screen, bag of skittles, and coaster in front of it (very close to it, like yeah 2mm from the surface).

I expect calibrating the sensor to be kind of a pain in the ass, so I haven’t done it yet. If somebody has, please let met know if the following sounds like a bunch of bull or not:

Since I’m just going for hue and saturation reproduction, I just need to characterize the input system (the sensor) and the output system (RGB color space on my LCD monitor), and transform between them.

I’ll do it like this! I’ll take a reddish, greenish, and blueish object, illuminate them with the sensor’s tinyass LED, and visually match the colors in a color picker on my computer. So now I have three RGB values on my monitor that match the objects.

But that’s not enough! I’ll also take readings from the reddish, greenish, and blueish objects on the color sensor, so now I have corresponding sensor RGB values for the objects.

Each set of 3 colors is like a coordinate frame in 3d space, so I can transform sensor readings into the sensor RGB space, and then out of the LCD RGB space: lcdColor = MonitorRGBMatrix * SensorRGBMatrix ^ -1 * sensorColor.

Does that make sense?

I should stop writing and just try this, huh. I’ll let y’all know how it goes.