News for hackers. Stuff that matters.
Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @12:24PM (#17725605)
I'm in the process of building a Philips Hue-compatible light therapy LED strip that goes above my bed, and I chose 500 nm cyan LEDs due to this concern. The goal is to have the lights gradually wake me up every morning and help align my sleep cycles, as I suffer from Delayed Phase Sleep Disorder.

Figure 3[0] in the paper seems to show that 500 nm is safe, and that melanopsin has high absorption at 500nm, which has important effects on circadian rhythm[1].

Anyone more knowledgable than me know if this setup is safe?

[0]: https://www.nature.com/articles/s41598-018-28254-8/figures/3 [1]: https://en.wikipedia.org/wiki/Melanopsin#Effects_on_circadia...

Re:Chemists discover how blue light speeds blindness by herf on Thursday August 09, 2018 @02:33PM (#17727069)
Yes, also if your eyes are closed when it starts, 500nm is better because more gets through the eyelid. Better if you diffuse more and spread out the light over more of the visual field.

But the main thing you'll want to make sure is that you can get enough light. There is some evidence that >200 lux with this wavelength will help, but most light therapy uses tons of light (1500 melanopic lux or more):

https://fluxometer.com/rainbow/#!id=Light%20Therapy/ReTimer

Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @02:59PM (#17727340)
Thanks for the tips! That link is super interesting.

I'm guessing melanopic lux is the lux output weighted over the spectral absorption curve of your eyes?

Some napkin math: I have ten 3W LEDs, and each might produce around 1000 lux when fully driven. If we drive each at half strength, and half of the generated lux is melanopic lux, that's 2500 melanopic lux.

Re:Chemists discover how blue light speeds blindness by herf on Thursday August 09, 2018 @08:35PM (#17729772)
Yes, lux depends on the viewing distance. Lumens is related to total light in all directions, and lux is "per area" (i.e. gets smaller with 1/distance^2).

Melanopic is weighted by the non-visual response in the eye, and this number corresponds pretty closely to the spectrum that drives circadian effects, and likely, mood. So whereas an incandescent might be 0.45 melanopic lux per visual lux, a really blue sky (or a 500nm LED) is around 2.0 "M/P".

Re:Chemists discover how blue light speeds blindness by priccis on Thursday August 09, 2018 @12:59PM (#17725999)
I'm sorry I can't help you, but after reading an article posted here about melatonin I got interested in light therapy, but commercial devices are a bit expensive. Are you documenting your project?
Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @01:28PM (#17726346)
Sure, it's not the most exciting project, but I might do a short writeup when I'm done.

I originally purchased these nice LED strip bars with enclosure in blue[0], but after reading this site by the manufacturers of a commercial green therapy light[1], I was convinced to switch to turquoise/cyan.

Turquoise isn't that popular so I wasn't able to find any strips/bars, and I got these individual 3W bead LED modules instead.[2]

For the Hue integration, I'm using a Mesh Bee + UartSBee v5[3] with firmware from PeeVeeOne[4]. It outputs PWM, and I'm hooking it up to a cheapo constant current LED driver I got from Aliexpress. Since all the LEDs need to be in series for a constant current driver, I'm probably looking at a ~20V power supply to power the whole thing.

My bedframe has a headboard, so I'm planning on 3D printing some mounts that clamp on top.

[0]: https://www.ebay.com/itm/50CM-U-Aluminium-shell-DC-12V-36-SM...

[1]: http://www.sunnexbiotech.com/blue%20vs%20green%20light.html

[2]: https://www.aliexpress.com/item/10-pcs-3W-Turquoise-Cyan-LED...

[3a]: https://www.seeedstudio.com/Mesh-Bee-Open-Source-Zigbee-Pro-...

[3b]: https://www.seeedstudio.com/UartSBee-V5-p-1752.html

[4]: https://peeveeone.com/?page_id=252

Re:Chemists discover how blue light speeds blindness by bb88 on Thursday August 09, 2018 @06:24PM (#17729080)
So those cyan LED's have a forward voltage drop of 3.2-3.6 volts. So you'd be looking at a 32V-36V 350ma power supply or thereabouts to hook them up in series.

If it were me, I'd probably run everything in parallel just to keep the voltages lower, and be able to use readily available power adapters.

Aliexpress has a PWM controlled constant current driver that takes 5-35V in and outputs 350ma max [1]. 10 of them are $20, so they're not too expensive.

At a forward voltage of 3.3V for the LED's, you'd be looking at slightly more than 1W per LED at 350ma (P = VI).

Those constant current supplies probably have an efficiency of maybe 66%, taking that into consideration, I would think a 12V 2A power supply would be enough to drive the entire thing. And that could be a wall wart that you get at the local hardware store.

[1] https://www.aliexpress.com/store/product/10PCS-A58B-1W-LED-D...

Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @07:34PM (#17729488)
Just tested with my power supply, and the minimum V_on seems to be about 2.7V. So if I want to drive all 10 in series, I'll need 30V+. If I had three banks in a 4,3,3 configuration, I could get away with a 12V power supply as well, which would be nice since I already have a bunch of 12V 5A wall warts.

I already got the board you linked, supposedly configured for 700 mA. Haven't tested yet. The datasheet for the part says it can go up to 2A[0], so I could potentially modify the feedback circuit for 1A, which would reach the full 3W rating of the LEDs.

One issue with that driver chip is that the PWM/enable is active low, so I think I may just stick an inverter on the output of the Mesh Bee. The SDK for the NXP part has changed since the ZLL repo was updated, and I haven't had much luck getting it to compile myself.

[0]: http://www.xlsemi.com/datasheet/XL4001%20datasheet.pdf

Re:Chemists discover how blue light speeds blindness by therein on Friday August 10, 2018 @01:13AM (#17730851)
Why do you want to drive the 10 LEDs in series?
Re:Chemists discover how blue light speeds blindness by bb88 on Friday August 10, 2018 @01:08AM (#17730826)
So note the I/V curve on the diode [3]. The minimum on at 2.7V is probably going to be the "knee" voltage. Sending 1A through the led will be a higher voltage.

The easiest way to test it is to get a multimeter, and put 1A through the led, then measure the voltage across the diode, and that will be the voltage you're targeting. (or you can just use one of the 700ma current regulators for a good estimate, placing the enable to ground.)

Also keep in mind that those current regulators are buck converters and they're not 100% efficient (no regulator is, really). So you're going to want to add 20-30% more power at a minimum on top of the load you're planning on driving with it.

And if you're going to drive 12V of LED's, expect to need 15-18V to drive the buck converter. That's because of the way buck converters work.

The feedback voltage on that chip is a fixed 1.2V and that's used as an internal voltage reference (I guess because they didn't add one into the chip).

They have a circuit diagram for that part, and it looks like CS and Rcs are the most important things on that sheet. CS is the "Current Sense" that measures the voltage across the current sense resistor (Rcs). They give the formula for Calculating Rcs to get to 1A (ILED = 0.155 / Rcs), and I get .15 ohm for Rcs at 1A.

Then you can either replace it with another sense resistor with something like this [2], or an appropriate length of copper wire [1] to give you the correct resistance.

As far as the PWM/enable inversion goes, just invert it in software. 100% full duty cycle would be off and 0% would be on. If you have a Raspberry PI laying around you can easily set one of the pins to PWM to test out your inverter code [4].

I'm going down a similar path to build a UV light box for exposing PCB's and the like.

Best of luck!

[1] http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/wirega.htm...

[2] https://www.mouser.com/ProductDetail/Bourns/CRM2512-FX-R150E...

[3] https://www.electronics-tutorials.ws/blog/i-v-characteristic...

[4] https://circuitdigest.com/microcontroller-projects/raspberry...

Re:Chemists discover how blue light speeds blindness by fpgaminer on Thursday August 09, 2018 @01:42PM (#17726500)
You're a hero; thank you for posting details.
Re:Chemists discover how blue light speeds blindness by justinc8687 on Thursday August 09, 2018 @03:09PM (#17727428)
I would be very interested to see a write up of what you are doing here as I have a similar problem. Any chance you could share one if you create one? Email in my profile.
Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @03:16PM (#17727493)
Yep, will do!
Re:Chemists discover how blue light speeds blindness by mark-r on Thursday August 09, 2018 @02:03PM (#17726735)
Do you have a spectral output chart for those LEDs? You might be surprised how much blue is still in the output.
Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @02:09PM (#17726791)
Yeah, especially with these cheapo Chinese LEDs. I looked into spectrometers, but they seem pretty pricey. Maybe some sort of plastic filter that blocks the shorter wavelengths?
Re:Chemists discover how blue light speeds blindness by bb88 on Thursday August 09, 2018 @05:42PM (#17728781)
How about a simple prism? That would tell you instantly if there's any blue light in the stream.

Edit: You might need a mask to create a slit of light so you can see the spectrum clearly.

Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @07:36PM (#17729494)
Oh, yeah! Totally forgot about those from high school chemistry class. :)

I'm sure there'll be _some_ blue light. I don't know if a prism would be high resolution enough to tell if it's a dangerous level.

Re:Chemists discover how blue light speeds blindness by bb88 on Friday August 10, 2018 @11:11AM (#17733978)
Yeah, you won't be able to see the intensity, but you will be able to see what components of the spectrum are there. It's also and easy way to test filters.
Re:Chemists discover how blue light speeds blindness by chrisper on Thursday August 09, 2018 @04:36PM (#17728245)
Any reason why you are not just buying a Philips wake up light? I have one and it's great. Especially during darker months
Re:Chemists discover how blue light speeds blindness by mafuyu on Thursday August 09, 2018 @05:39PM (#17728752)
I wanted something that was compatible with my existing Hue system, and specifically targeted wavelengths for light therapy.

I already have a normal Hue bulb next to my bed on a schedule, similar to the wake up light, but a light strip right above my head seems more appealing to me.

Re:Chemists discover how blue light speeds blindness by sc00ty on Thursday August 09, 2018 @05:34PM (#17728711)
How long have you been using yours? I have been using one for about 3 years. Initially it worked great, but it seems the light just doesn't do it anymore and the alarm sounds are what eventually wake me up.
Re:Chemists discover how blue light speeds blindness by chrisper on Friday August 10, 2018 @12:44AM (#17730737)
About a year. But I am having similar experiences.
Re:Chemists discover how blue light speeds blindness by thewizardofaus on Friday August 10, 2018 @08:53AM (#17732780)
Perhaps try and cycle using the light. Couple months using it, one month off etc.
Re:Chemists discover how blue light speeds blindness by lewisinc on Thursday August 09, 2018 @01:02PM (#17726024)
I remember having serious issues when I was younger with this. It's still sort of a a problem, but I've learned to cope. I'd also be interested if you documented your setup :).
Re:Chemists discover how blue light speeds blindness by otuutti on Monday August 13, 2018 @05:56AM (#17749061)
Got my kitchen lighting done with these hue controlled light strips. Not entirely certain if they fulfill your need, but maybe an alternative if someone wants to replicate. They have very good CRI, which might be good/bad for your application. https://www.sowilodesign.com
Re:Chemists discover how blue light speeds blindness by GekkePrutser on Thursday August 09, 2018 @01:47PM (#17726553)
Wow that's totally what I have too. I didn't think there was a name for it.

I mean the delayed phase sleep disorder. Will talk to the doc about it.