The past week I’ve been playing around with a colour sensor in an attempt to make something that hopefully resembles a spectrometer. The intention is to make something that can give relatively reliable info on CCT, Duv and possibly light quality (CRI/TM-30 data). The idea is to document any progress here. You guys might have questions, so ask away. And I’m sure I’ll need some answers as well. Hardware/software I know fairly well, but I’m new to the whole calculating light quality/properties and there are people on this forum who have such an insane amount of knowledge… hoping some of that rubs of and we all learn something along the way.
So first some background. After seeing all those Opple Light Master measurements popping up, I thought of getting one as well. But alas all sold out and expected return date was May. Wait till May and still nothing. A quick inquiry resulted in an updated date of August. Not the answer I as hoping for, but by now it is known what sensor they use (a Reddit user did a quick tear down). Turns out it uses the AMS AS7262 - Consumer Grade Smart 6-Channel VIS Sensor (AS7262 Spectral Sensing Engine | ams). Checking the AMS website reveals that one is out of stock and deprecated. But fortunately they have a new an improved sensor; an 11-channel sensor. 11 channels must be better than 6 right?! And thus this topic was born
On to the hardware; the whole thing is based on the AMS AS7341. This is an 11-channel spectral color sensor (AS7341 optical sensor / spectral sensor | ams). First I needed to actually get the sensor. Not wanting to start from scratch, I started looking at dev boards. There’s an official dev kit, but that costs an arm and a leg. There are some boards on AE, but the big electronic components distributors also sell some. Ended up going for the Adafruit AS7143 (Adafruit AS7341 10-Channel Light / Color Sensor Breakout [STEMMA QT / Qwiic] : ID 4698 : $15.95 : Adafruit Industries, Unique & fun DIY electronics and kits). It seemed decent, has modern USB-C, is documented and uses a decent LED apparently (not needed for flashlight testing though). Being in the EU, Mouser was the best way to buy, provided some extra stuff was ordered as well to get free shipping from the US. Much faster than AE too!
Now on to the sensor; it communicates via I2C. There are many ways of doing that, but as it turns out, Adafruit also makes a USB to I2C board based on the MCP2221 (Adafruit MCP2221A Breakout - General Purpose USB to GPIO ADC I2C [Stemma QT / Qwiic] : ID 4471 : $6.50 : Adafruit Industries, Unique & fun DIY electronics and kits). Added to cart, will see if and how it works. Also added some ready made wires, no soldering required. Plug and play so to say (if you consider writing software play).
On a sidenote, the devkit seems to be using an FTDI FT2232 IC (dual USB UART/FIFO IC). Having worked with FTDI chips before, I recognized the name and it so happens to be that I have a breakout board with that ic. 10 years old, but should still work. The software of the official dev kit is downloadable, so I’m going to give this a go as well at some point (e.g. for verification purposes).
All hardware used/mentioned: