Introducction
As you all know, professional spectrometers with high resolution are really, really expensive. There has been a rather active scene of people building DIY spectrometers for cheap, but they all suffer from the same issues: good quality diffraction gratings are expensive, monochrome CMOS/CCD sensors are unaffordable, and RGB CMOS sensors have bad spectral response as the pixels are limited to R, G and B.
Recently a Chinese hobbyist going by the name Lao Kang introduced his “Little Garden” spectrometer for ~60 bucks and started selling it on AliExpress. What makes this special is that he appears to have found a way for reliable and damage-free removal of the Bayer filter (the red, green and blue filter in front of pixels), making the spectral sensitivity of the CMOS chip much higher, while still being cheap enough for a hobby grade device. The diffraction grating is a delaminated DVD in transmission. All in all, this allows to reach approx. 0.6nm resolution.
If you want to see the device in action, Lao Kang has a youtube channel - the videos are in Chinese, but mostly have English subtitles, so they are easy to follow: https://www.youtube.com/@LaoKang2024
I ordered one of those from Aliexpress, and will present you my experience in this post. This is not an affiliate review, I paid for the spectrometer myself, and the AliExpress link above is a clean link without referral codes or similar.
Box contents and first impressions
The device arrives in a plastic box. Inside there is the spectrometer itself, a few sheets of diffusion paper (necessary to measure strong light sources like flashlights), a USB-A to USB-B cable (I wish it were USB-C…), a fluorescent lamp for wavelength calibration (more on that later) and a E27 lamp holder with a power plug (not EU, only this one is available).
The fluorescent lamp is padded, which is important, because those things are fragile and contain mercury - which is the whole reason why it is included, as calibration is performed on the 2 largest mercury emission peaks. The spectrometer is just a black box, nothing special about it. It has a hole for USB, and a second hole for the light input.
Internals
I am curious and couldn’t help myself, so I opened it up. Inside the box there is a large 3D printed frame spanning the entire box which is screwed onto the bottom. I like that the box uses threaded inserts instead of just using wood screws into plastic, like most cheaper devices do.
Interestingly, the input slit is 3D printed as well (impressive resolution, my printer could never do that, and I expected it to be made of 2 razor blades or similar). The sensor is screwed into the 3D print as well, fixing the angle of incident of the beam. The delaminated DVD is glued onto the front of the lens with a large amount of glue - this should hold up well. Still, a dedicated holder with screws would have been a bit nicer. But hey, the thing is so cheap that probably most of the purchase price went into the sensor alone. Can’t complain.
The Software
This is where you start noticing the DIY/Budget aspect. There is no dedicated software, instead Kang recommends the open source Theremino Spectrometer project. He offers a slightly modified version bundled with his spectrometer, but I honestly do not know in what sense it was modified. All source code changes are available. I have only used his version so far.
All software provided by Kang is available here: Little Garden Spectrometer software, source code and usage - Google Drive
He also offers a further modified version to calculate CCT/DUV (little garden spectrometer VO.3.exe) but that comes with its own share of problems - more on that later.
There is also this open source project that looks very promising, spectro-cam-rs by DerFetzer. I have not tested it yet, as there are no compiled binaries and I did not find the motivation to compile one myself. Also, my daily driver is a Windows notebook, and I want to use the spectrometer there. The UI looks a lot more modern and intuitive compared to the rather dated Theremino.
Unless noted otherwise, all measurements from here on will be performed with little garden spectrometer VO.2.exe
.
For CCT/CRI/DUV calculations, I used the free Osram ColorCalculator, that was sadly by now removed from their page, but is still available through web.archive.org (the link points to the archive page already).
Calibration
Wavelength calibration
This one is very easy, thanks to the included mercury fluorescent lamp. Mercury has very distinctive emission peaks at (among others) 436 nm and 546 nm. Theremino allows calibrating the spectrum with those two. You can see my calib setup below - PLEASE do not do this. Using banana plugs + crocodile clamps for mains is dumb. I was impatient and did something stupid instead of just buying a E27 holder with the correct plug for EU.
It takes about 5 minutes with waiting for the lamp to warm up to calibrate the x axis of the spectrum - easy, fast and accurate.
Response curve calibration, or a quick dive into CMOS sensors and their problems
Here comes the big catch - CMOS sensors are not really fun to use. Like most detector types, quantum efficiency of the detector is highly non-linear, and does not follow any simple mathematical behavior. A sample spectral response curve of a grayscale CMOS image sensor can be seen here (source: https://www.researchgate.net/figure/Spectral-response-of-the-CMOS-sensor_fig12_2977754):
This is… Not great. Particularly when you need an accurate spectral image to determine CCT/CRI/DUV. Furthermore every sensor type/model has its own response curve, and we do not have a datasheet for this particular sensor. Mr. Kang might have, but the sensor was made as a RGB sensor, so the datasheet is worthless with the removed Bayer filter as well.
This issue obviously does not affect us alone, every spectrometer in the world, whether CMOS, CCD or some oddball detector, suffers from this to some varying degree. However, professional spectrometers are calibrated with calibration light sources with known spectral distributions, and I lack such a thing. So this is where I had to start getting creative, and so far could not find a proper solution.
First things first, I measured a small 5W halogen bulb, which should (apart from the cutoff of the glass filtering UV light) mostly follow a black body radiation pattern. As you can see, the spectrum is mostly as excpected from a CMOS sensor, with a lot of peaks and dips. This needs some calibration.
Official calibrated software
Mr. Kang offers a “V0.3” software, which is supposedly calibrated, but I do not know how he did it (source code is provided, I was too lazy to check), but it makes things even worse for my sensor. Maybe he applied the offset based on pixel position on the sensor, and not wavelength after wavelength calibration? I am not sure, but either way, this is not useful.
Uncalibrated LED measurement
I tried to measure some LEDs (XHP70.3 HI R70 4000K) with the uncalibrated spectrometer, and results are… Well. Not totally off, but the curve is weird, and depending on the LED CCT/DUV/R9 are completely off or somewhat okay. Overall, not usable in this state. Check @koef3’s test of the same LED to see how the spectrum should look like. The weird peaks and dips in the halogen spectrum also translated into the LED spectrum and completely mess up the results.
Calibration with halogen bulb
Among my old car spare parts I still found a Osram H7U 55W bulb - the interesting aspect of these is that the “U” stands for UV. These have no UV filter (or rather, are made out of quartz glass which does not filter UV). This should allow for a easier calibration, right?
Turns out, no. Not at all.
From here on I worked in R
, a programming language made mainly for data evaluation. All CCT/CRI values in the upcoming graphs are computed by the colorspec
library for R
First, I tried using the colorspec
library to estimate the CCT of the measured H7U curve, and used that to fit a black body radiation curve. Then I calculated the multiplicative error of each datapoint, and created a calibration curve. Applying this to the XHP70.3 HI led to a very reasonable result, and I thought “nice!”. Until I tried the same with a B35AM 3500K. Obviously this method does not work. Which kinda makes sense, 4100K is way too hot (the halogen bulb would immediately die at such filament temperatures). The incomplete spectrum obviously threw the CCT calculation off by a large margin. Damn it.
Note the image descriptions for information what is depicted in each of the following images.
Next up I remembered I have an Opple LM4 and tried to get the halogen bulb CCT with the Opple. Opple claimed 4300K. Apparently the sensor struggles with the high IR and UV contents, and the reconstruction algorithm was made for LED light and is completely clueless when it comes to halogen light. There goes my next idea.
Next up, I got some advise from out favorite LED tester, koef3. He said halogen bulbs should have CCTs between 3000K and 3100K. So this is what I set my algorithm to. Does not look much better either, does it?
Note the image descriptions for information what is depicted in each of the following images.
Using a candle and assuming a CCT of 2000K, I get a complete runaway of reds in the spectrum. The LEDs are again B35AM 3500K and XHP70.3 4000K R70.
Temporary calibration verdict
This is where I am currently stuck in my calibration attempts. I will update this topic once I find time and ideas to continue my efforts