News for hackers. Stuff that matters.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by dmitrygr on Saturday January 06, 2018 @06:01PM (#16087984)
> My research into LED

> technology turned up

> the fact that it is a

> bit of a technological

> challenge to dim an LED.

This is complete nonsense. While pwm can indeed be used, many of the nicer LED drivers are actually variable current. While adjusting the voltage directly indeed does not work as expected for LEDs, a constant current driver does indeed produce a constant brightness. Varying the current varies the brightness. Only the cheapest displays and lighting installations use pwm for brightness control.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by jdietrich on Saturday January 06, 2018 @06:44PM (#16088152)
The 2008 MBP did use PWM backlighting. PWM is slightly more efficient than a constant current regulator and gives a more consistent backlight color temperature. IIRC Apple have stuck with PWM backlighting for these reasons, but have moved to an extremely high frequency (~120kHz) which should be imperceptible even to the most sensitive users. Many other top-tier laptop manufacturers also use PWM backlighting, but with a switching frequency of around 1kHz.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by modeless on Saturday January 06, 2018 @06:13PM (#16088030)
... and many car/truck taillights. I think PWM taillights should be illegal. The artifacts are distracting.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by ChadMoran on Saturday January 06, 2018 @06:28PM (#16088085)
This, so much this.

I have nystagmus which means my eyes move uncontrollably. Primarily on the horizontal plane. While my brian compensates for this and I don't see a moving image anything that uses PWD flickers very, very badly.

PWM tail lights are THE ABSOLUTE WORST for this condition. Not only do I see it on the source but I see it on anything the light projects onto, it's horrible.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by exikyut on Saturday January 06, 2018 @07:05PM (#16088238)
Wait. Contemporary nystagmus == saccades?

I haven't tracked the cause down yet - I know it's a nerve issue of some kind - but sometimes my jaw, arms or eyes (yup) can occasionally jump. My jaw and arms jump when I'm nervous (or have a buildup of too much nervous energy/excitement), while my eyes jump when I'm trying to focus on something too hard, they drift, and I try to course-correct too hard. (I think half my brain is aware of the drifting, but the other half, the part that would make the fine motor movements to keep my eyes locked, is happily whistling away blithely in a corner somewhere.)

When my eyes jump and I overcorrect when I fail to re-point them where they need to be, I usually have a second or two where I'm not technically blind but I need to let my eyes refocus and remember their purpose in life (if you will) :P

I always thought this was nystagmus (read the term online one day and went "!!! that's what it's called!")... but now I wonder, is what I'm dealing with something else?

(An aside: I'm really, really bad at tracking moving objects in space. If someone else is holding onto something and I'm expected to look at it, I have to hold it instead. No other alternative.)

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by ScottBurson on Saturday January 06, 2018 @06:31PM (#16088096)
If not banned outright, they should at least be required to use a 1MHz minimum frequency.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Saturday January 06, 2018 @06:38PM (#16088127)
10 or 20 kHz would probably be sufficient, based on talking with the author of some of the most used open-source flashlight driver firmwares, who is quite sensitive to PWM.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by walterbell on Saturday January 06, 2018 @07:33PM (#16088338)
Which flashlights use this firmware?
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Saturday January 06, 2018 @09:31PM (#16088765)
These are all enthusiast-oriented, not something you'd find in a retail store. At least one can only be ordered through a group buy on budgetlightforum.com right now, though a retail offering will come in the future.

* BLF A6 (AKA Astrolux S1)

* Astrolux S41/Manker E14

* BLF X5/X6 (AKA Astrolux S2/S3/SS)

* Emisar D4, D1, D1S

* BLF Q8

* BLF GT

* Convoy S2+/C8 (new firmware version)

These don't all use the same firmware, but they all use an open-source firmware with high-frequency PWM, except that I think the BLF GT does not use PWM. A number of expensive custom lights use these too; those often focus on metalworking and exotic materials.

Firmware sources available here: http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/t...

I own an Astrolux S41 (Nichia 219B), Astrolux SS (3A) and a semi-custom light I assembled using the A6 and Biscotti firmwares by ToyKeeper. I plan to pick up the Emisar D4 (Nichia 219C) and D1S (5D).

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by walterbell on Saturday January 06, 2018 @10:26PM (#16088951)
Thanks! I’ve been looking at [1] low-flicker, daylight simulation LED lights that can output 10K LUX. Great to hear that OSS firmware exists for some PWM lighting.

[1] https://www.aputure.com/products/al528-1

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Sunday January 07, 2018 @12:12AM (#16089331)
> that can output 10K LUX

What does this mean? I would assume the surface brightness of the emitters is a good bit higher than that. Aside from surface brightness, lux does not provide any information about a light source without a distance. The SI unit of luminous flux is the lumen, and luminous intensity, the candela.

I have a Viltrox panel with similar characteristics, but smaller (adjustable color temperature, CRI 95+) and I think it uses 5mm Yujis. Brightness adjustment is non-PWM. It's also meant to take a camera battery, but I converted it to use two loose 18650s. Model VL162T, $30ish on Amazon.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by walterbell on Sunday January 07, 2018 @01:03AM (#16089519)
The Aputure 528S is rated at 12700 lux at 50 cm. Will check out the Viltrox, thanks.
Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Sunday January 07, 2018 @12:58PM (#16091786)
I see on the specs page it's 4380 lux at 1 meter, or 4380 candela. No information is offered on total output, but it's possible to estimate from the information given.

Lux is lumens per square meter. Candela is lumens per steradian, the SI unit of solid angle. At one meter, these are equal, unless the beam hasn't converged at 1 meter. Aputure provides the beam angle in degrees, for which it was surprisingly hard to find the conversion. Sure, the units aren't technically comparable, but we know they meant the apex plane angle, at least we do now that I looked up the correct term.

So a right circular cone (which the light produced by a rectangular panel isn't, but we'll pretend) with an apex plane angle of 25 degrees has a solid angle of 0.1489365798 sr, approximately. 4380 lm/sr / 0.1489365798 sr = 29408 lm.

And that can't be right because the power consumption is 30 W, and the theoretical limit of luminous efficacy is 683 lm/W. I'd expect an LED panel like this to be on the order of 100 lm/W for about 3000 lm from 30 W.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Saturday January 06, 2018 @06:26PM (#16088073)
Worse than typical PWM is running LEDs from AC mains power directly. I've seen this used in large, high-output panels. 20,000 lumens with 50/60 Hz flicker is rather unpleasant to be around.

And yes, two other ways to dim an LED are a switch-mode power supply with output current regulation, or a variable linear regulator. I'm familiar with both approaches being used in flashlight drivers, though PWM is also quite common. Good PWM designs tend to be over 10 kHz, which is nearly always invisible to the naked eye.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by exikyut on Saturday January 06, 2018 @06:22PM (#16088062)
I've long wondered how this is actually done electronically. The only approach I've ever been able to come up with is a digipot connected to a linear power supply, but that would generate a bit of heat at low brightness settings, and I suspect even a 256-step digipot would exhibit visible fade "jumps".

As someone who knows zero about electronics fundamentals... how is this done?

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Saturday January 06, 2018 @06:36PM (#16088112)
Linear regulators are fairly common in flashlight drivers. They do generate waste heat at low output levels since the difference between battery voltage and LED forward voltage is just burned off, but the heat itself isn't a significant problem. Efficiency is more of an issue, but low-output runtime in LED flashlights is so long that most people will be able to charge their battery long before it runs out.

Switch-mode power supplies are the high-end version. These can step the input voltage up or down to produce the required output voltage and can regulate current to one or many desired levels.

More information on how both of these work is easy to find with a google search, but I should note that some things written about linear regulators assume a target voltage. When used to drive LEDs, regulators with a target current are required.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by exikyut on Saturday January 06, 2018 @07:12PM (#16088259)
Interesting, thanks very much for the insight.

> Switch-mode power supplies are the high-end version. These can step the input voltage up or down to produce the required output voltage and can regulate current to one or many desired levels.

The way you wrote this makes it sound like SMPS don't have the smooth progression linear regulators do, which is in line with what I understand about SMPS designs. I presume the controller is connected to (or incorporates?) a digipot or similar, or is it actually possible to define an arbitrary reference voltage (derived from a digipot for example)?

> More information on how both of these work is easy to find with a google search, but I should note that some things written about linear regulators assume a target voltage. When used to drive LEDs, regulators with a target current are required.

Sure thing. And yeah, I find the constant-{voltage,current} thing a very fascinating/interesting quirk of LED regulation. At some point I'll find out why LEDs need constant current.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by Zak on Saturday January 06, 2018 @09:45PM (#16088805)
There are commercially-produced flashlights that use SMPS and continuous dimming. As they're all managed by microcontrollers, I'm sure it's actually hundreds or thousands of discrete steps.

> At some point I'll find out why LEDs need constant current.

There are flashlights that work by connecting a Li-ion battery to an LED through a FET that can use PWM to dim it. This will deliver all the power the battery is capable of providing at a given point on the LED's forward voltage curve. If that sounds like a good way to burn out components, it... can be. Everything needs to be fairly robust.

These flashlights do not have constant brightness. Even in lower modes, output tracks battery voltage. Strictly speaking, however, it demonstrates that it's possible to operate LEDs without constant current. Forward voltage drops a bit as temperature increases though, so LEDs are "greedy" and will essentially take all the current available as long as there's sufficient voltage. At some point, this will let the magic smoke out.

FET drivers in flashlights only work because the voltage range of the battery and LED overlap, battery voltage sags when it gets a heavy load on it, and some LEDs can handle a lot more current than the datasheet says for a few minutes at a time. None of these things are valid for mains-powered lighting, except that with sufficient heatsinking, many LEDs can be overdriven at a modest cost to longevity.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by SAI_Peregrinus on Saturday January 06, 2018 @07:21PM (#16088287)
The brightness of an LED depends on the current through it. The current through an LED increases exponentially with increasing voltage. It's very difficult to directly control the voltage precisely enough to keep the LED lit at a given brightness, but it's a lot easier if you can just control the current.

Switchmode supplies can output any voltage, they're not limited to discrete steps. Their only disadvantages are increased complexity and potentially increased output noise, depending on the design. Most good switchmode control chips use a bandgap voltage reference internally, that provides a temperature-independent fixed voltage. Then an internal error amplifier and some feedback from the output is used to control the output voltage. Think of it like a thermostat: if the output voltage is too low/high, the supply senses that and starts boosting/dropping the output. Once the output goes over/under the threshold the boosting/dropping stops, and the output starts to fall/rise. The supply keeps switching it around the output threshold. (Linear regulators do exactly the same thing, they just only drop the voltage instead of being able to boost, drop, or both. They also drop the voltage in a less efficient but less noisy manner.)

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by exikyut on Saturday January 06, 2018 @07:33PM (#16088336)
> The brightness of an LED depends on the current through it. The current through an LED increases exponentially with increasing voltage. It's very difficult to directly control the voltage precisely enough to keep the LED lit at a given brightness, but it's a lot easier if you can just control the current.

I see. So set the current, let it draw the voltage it wants. Heh.

> Switchmode supplies can output any voltage, they're not limited to discrete steps.

Right - the issue I was getting at was the problem of getting an arbitrary representation of a desired voltage out of a microprocessor and into the real world. Digipots are the only way I'm aware of to do that (apart from PWM).

Thanks for the very interesting and highly informative wall of text :)

Open question, in case this piques your curiosity: I'm very interested what your comments might be on https://news.ycombinator.com/item?id=15005811, and any suggestions/ideas you might happen to have. I've long thought that what I describe in this post is noise-related, SMPS noise in particular, but I'm absolutely stumped on how to pinpoint/narrow things down any further.

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by SAI_Peregrinus on Saturday January 06, 2018 @09:20PM (#16088715)
FYI, switchmode supplies don't need microprocessors. Many are entirely analog, most of the rest use a small amount of digital logic to control the switching. EG check out the LT3574 datasheet[1] pg 6: the only digital logic is the master latch, and it's just doing the "thermostat-style" switching I mentioned above. Or for an even more basic system: the ringing choke converter[2]. Lots of cheap power supplies use these because they are very simple and require no digital circuitry.

Edit: also to get a given voltage out of a microprocessor, you just use an analog-to-digital converter (ADC). Some have them built in, others are external. I like the AD9850 for hobby work, as it has a high resolution and is quite fast. If you need a large voltage range there are ADCs available for that, or you can amplify the signal from a lower voltage one.

WRT your issues with sensitivity to SMPS, it probably is audible noise. See if Screen Tunes[3] causes symptoms, it causes audible (but quiet) coil whine of varying frequency on most monitors I've tried. Your issues are unlikely to be directly caused by RF EM, but the side effects of the systems that generate such signals are often detectable by people.

[1] http://cds.linear.com/docs/en/datasheet/3574f.pdf [2] http://mmcircuit.com/understand-rcc-smps/ [3] https://thume.ca/screentunes/

Re:Eye Strain from LED Backlighting in MacBook Pro (2008) by SAI_Peregrinus on Saturday January 06, 2018 @07:14PM (#16088263)
Any voltage-mode linear regulator can be connected to form a constant-current driver. It's best to use adjustable regulators if doing this, to improve stability. And of course a dedicated current-source is better still, as they will tend to have a wider possible operating range.