News for hackers. Stuff that matters.
Re:Inexpensive chip-based device may transform spectrometry by danielvf on Thursday October 25, 2018 @08:48PM (#18305915)
You can get a plastic DSLR camera body cap for less than 50 cents each (ebay from China). This cap goes where the lens would attach the camera when you don't have a lens on. Sometimes I cut a hole in the center of a cap and make really hacky camera "lenses" for fun. You could put a prism on the outside of a cap.

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)

Re:Inexpensive chip-based device may transform spectrometry by psandersen on Friday October 26, 2018 @01:52AM (#18307067)
Light quality has been something I've been interested in for a while so I've invested in making my whole environment use LIFX and Yeelight bulbs.

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?

Re:Inexpensive chip-based device may transform spectrometry by tomcam on Thursday October 25, 2018 @09:08PM (#18305992)
Sorry for the off-topic reply, but it’s people like you that make HN awesome
Re:Inexpensive chip-based device may transform spectrometry by tyingq on Thursday October 25, 2018 @10:00PM (#18306184)
Interesting detail. On this, though:

>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.

Re:Inexpensive chip-based device may transform spectrometry by danielvf on Thursday October 25, 2018 @11:08PM (#18306447)
(Sorry, I meant to say that I hate cheap LED lights that blink slowly to control their 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.

Re:Inexpensive chip-based device may transform spectrometry by CamperBob2 on Friday October 26, 2018 @12:54AM (#18306866)
What other ways are there? Nobody is going to want to dissipate heat in a linear element somewhere, are they?

I guess that because LEDs are actually so efficient, that isn't such a bad idea as it sounds at first.

Re:Inexpensive chip-based device may transform spectrometry by smaddox on Friday October 26, 2018 @01:19AM (#18306949)
PWM could be combined with a capacitor in order to smooth the voltage out. Or sufficiently high PWM frequency can be used (10s of khz), in order to avoid eye strain.

The former approach might negatively affect the efficiency, though, depending on where the efficiency peak is.

Re:Inexpensive chip-based device may transform spectrometry by jononor on Friday October 26, 2018 @08:06AM (#18308461)
A constant current source does not have to be linear, one can use a switchmode powersupply with current regulation. Then the current though the LED flows in a continuous manner.
Re:Inexpensive chip-based device may transform spectrometry by solarkraft on Friday October 26, 2018 @05:15PM (#18312755)
Switch-mode regulators don't pulse?

How wrong am I to think that a capacitor after the PWM-regulator would give a reasonably good approximation of a constant voltage?

Re:Inexpensive chip-based device may transform spectrometry by jononor on Friday October 26, 2018 @07:06PM (#18313344)
Sure they pulse/switch, but that is into/from the inductor/capacitor used as intermediate energy storage, not through the load (LED). At the output a constant voltage is seen (plus some ripple).

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.