You would then need to calibrate your new spectra-cam on something with a known radiation (usually just find a good blackbody radiator.) You can't just convert to black and white without calibration because the RGB sensors on the camera are going to have their own sensitivity to different wavelengths. This would be an awesome project!
--
I write firmware for high end professional LED lights, and have a $3K spectrometer on my desk. Here are things I've learned:
1. CRI is simply a bad formula to judge light quality overall and gives almost meaningless results at lower color temperature levels.
2. There are lots of fantastic python modules for working with spectrograph and light data.
3. One awful thing cheap LED lights do is blink slowly to control their voltage. This is at least as bad a poor CRI for aggravating your eyes. (Sometimes you can see this just by using slow motion video on your phone)
This has been great and I get bright neutral lighting during the day, warmer light in the evening and variations of colour gradients and themes when friends are over to chill.
However, I have no way of knowing if something is missing from the light quality or how I'd even go about optimising things both for my health/comfort and for indoor plants. Does anyone have recommendations?
>One awful thing cheap LED lights do is blink slowly to control their voltage
I assume you're talking about PWM. That's not just to be cheap. It's the only real way to control brightness.
Blinking the LED on/off to control its brightness with a PWM is definitely not the only way to control output. And if you are controlling by blinking, PWM is still the bottom of the pile in ways to blink, from a quality of light point of view.
I guess that because LEDs are actually so efficient, that isn't such a bad idea as it sounds at first.
The former approach might negatively affect the efficiency, though, depending on where the efficiency peak is.
How wrong am I to think that a capacitor after the PWM-regulator would give a reasonably good approximation of a constant voltage?
A capacitor on PWM output will give a decent approximation, _if_ it is big enough. For large LEDs this can be very costly (relative to other parts in system). Though the inductor in a switching converter is also a big cost driver.
Both for the capacitor, inductor and wrt to human perception increasing switching frequency helps. So that is what modern designs focus on normally.
A challenging aspect of LEDs is their nonlinear voltage versus current characteristic. A small change in voltage gives a very large change in current, and thus in output power. The characteristic is temperature dependent and has per device variation. Hence LED drivers are usually constant-current sources, ie they measure and attempt to regulate the current.
http://sci-toys.com/scitoys/scitoys/light/cd_spectroscope/sp...
https://lavinia.as.arizona.edu/~mhammer/outreach/cdSpectrome...
(diffraction spectrometer from used CDs!), very easy to make, and it costs ~$0.
It has enough resolution to distinguish individual lines of fluorescent lamps (by using a narrow aperture). Highly recommended (very nice as an educational tool also, to impress folk with the hidden spectra of light around us ;) ).
On the other hand, you could achieve pretty decent "monochrome" behavior by just summing the three color channels of a RGB camera, at least in the visible range of wavelengths. With that issue settled, you could figure out a way to produce a rainbow spectrum by hook or crook, such as a cheap prism from Surplus Shed (if they have one in stock -- they are a great source of bargain optics) and some lenses. For intensity calibration, a plain tungsten lamp would suffice for home experimentation. They operate very close to their rated color temperature. For wavelength calibration, one idea is to see if there are useful visible lines in the mercury emission spectrum (don't remember) which are emitted by a regular fluorescent lamp. Also, colored LED's at room temperature run pretty close to their rated peak wavelengths.
There's still some of variation in colored LEDs. (and unless you are paying big bucks, a ton of variation on white LEDs. What most home LED bulb companies do is buy a bunch of off color white LEDs and sort them per light so that the badness sort of evens out to something close to okay.)
But even monochrome sensors have lumpy response.
I'm only suggesting to use colored LED's as crude wavelength references and a blackbody as an intensity versus wavelength reference, for something that's good enough for home experimentation within reason.
I am puzzled as to why it has to be so expensive. I would think one can put a prism, project the light over the surface of a black-and-white CCD sensor and measure the light intensity along the length, giving a reasonably good idea of how much energy is deposited into each wavelength range. I feel like one of these can be made for $20 in parts?