Led driver mechanics

Jc2278

Newly Enlightened
Joined
Jan 4, 2017
Messages
1
Hi guys new to the forums. I'm building a flashlight and I have a question about how led drivers work.

The flashlight im building uses an 18v drill battery lithium ion, 24Whr (which is 1300ma by my calculation). If I run an XHP70 12v @ 1000ma using a buck driver (using low current due to heat and using xhp70 due to high efficiency), what happens to the extra 6 volts? Is it lost? Am I better off using the buck driver to drive the led at 12v @ 1500ma? Will the run time be the same? Basically the question is what happens with the extra voltage, if it's lost as heat, maybe it's better to just get more output by running at 1500ma without effecting the run time

thanks, sorry for my engineering ignorance
 

electronFarmer

Newly Enlightened
Joined
Dec 27, 2016
Messages
9
Location
Michigan
I'm a bit new here too, but I've been doing a lot of reading and research and reading and research. Depending on the driver you choose the "extra" 6 volts is not lost, it will contribute to longer run time as the voltage drops in your battery. You have not specified any other features you want in your build such as dimming or stepped modes or strobe/flash but after much reading on drivers you should check out these drivers from LED Supply.com, http://www.ledsupply.com/led-drivers/buckpuck-dc-led-drivers
Or
http://www.ledsupply.com/led-drivers/flexblock-buck-boost-dc-led-driver
Be sure to read the PDF's at the bottom of the pages, noting that your battery voltage must be higher than the Vf (read that as Vee sub f, the forward voltage of your chosen LED). This MAY give you some protection of your battery against draining below a safe discharge threshold, as the driver (buckpuck at least) shuts down (I think) when your battery voltage drops to 14.5 volts. That is your 12 volt Vf of your chosen LED plus 2.5 volts required in the driver control circuit of the buckpuck.
The other driver can boost from lower voltages and so it would not protect your battery but it has less amperage than you are looking for anyway.
I am considering this driver for my project but I don't like the fully enclosed packaging of it, can't see the guts and details...
Again I'm a newbie/noob here so don't take my word as the final solution here and these drivers are just suggested reading. Oh, and no I don't work for LED Supply.com.
 

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
In the crudest sense, there are two types of drivers - resistive and switching.

A resistive driver (linear drivers and direct drive fall under this category) drops the extra voltage across some kind of resistance. This may be an actual resistor, or it may be the resistance of a transistor (which can be controlled, so can give better performance) or it may be just the resistance of the wires, switches, and internal resistance of the battery and LED (this is direct drive, or DD). This circuit is just a loop, consisting of the battery, wires, switch, resistance(s), and LED. The same current flows at all points in the loop. Imagine the battery as a pump pushing water through a closed loop of plumbing. The same flow rate exists at all points in the loop.

At any given moment, the power coming out of the battery is divided between the LED and the resistance. It's easy to see the ratio, because P=VI, where P is power, V is voltage, and I is current. Since I is the same everywhere, the power coming out of the battery is divided among the various parts in the same ratio as the voltage across those parts. If you have a 12V battery and a 3V LED, you must have 9V across the resistor. Thus for every 12W that comes out of the battery, 3W goes to the LED and 9W to the resistor. Since all the power that goes into a resistor is immediately turned into heat, and is essentially unrecoverable, this is a pretty wasteful setup.

In a switching driver, the extra voltage is dropped across an inductor. The magic of an inductor is that if operated properly, most of the power that goes into it is stored in a magnetic field, and can be gotten back out as electrical power rather than heat. The driver switches back and forth between two circuits. In one, power is drawn from the battery, and divided between the inductor and the LED as in the resistive driver. In the other, no power is drawn from the battery, and power is recovered from the inductor and sent to the LED.

Because current is drawn from the battery only part of the time and current is delivered to the LED all the time, if we look at average currents, we can see that the average current in the LED is higher than that drawn from the battery.

In an ideal switching driver, all the power drawn from the battery is eventually delivered to the LED. But since the voltage is different, and P=VI, that means the current needs to be different too. In fact, the ratio of input and output current is the inverse of input and output voltage. So if you had that same 12V battery, and 3V LED, for every 1 mA from the battery you'd get 4 mA in the LED. That's because 12V * 1mA = 3V * 4mA.

So far we've been talking only about systems where the battery voltage is higher than the LED voltage. Resistive drivers can only operate in this mode. But through the magic of inductors, switching drivers can actually increase the battery voltage. There are three primary types of switching drivers - buck, boost, and buck/boost.

Buck drivers can only decrease the battery voltage. In fact, some need to reduce it at least 1-2 volts in order to work properly, while others are okay with reductions as little as 0.1V or less. The required difference between input and output voltage is called the 'overhead' of the driver. If the LED voltage is higher than the battery voltage minus the overhead, the output current is reduced or zero. This is a pretty benign failure mode, and is often used to tell the user that the battery is dead.

Boost drivers can only increase the battery voltage. If you have a 36V LED array and want to drive it from a 12V battery, this is the kind of driver you want. But if the LED voltage is less than the battery voltage by more than a fraction of a volt, look out. You may have a catastrophic failure in your future.

Buck-Boost drivers have the best and worst of both worlds. They can increase the battery voltage if necessary,or reduce it if necessary. But in buck mode they don't have the efficiency of buck drivers, and in boost mode they they don't have the efficiency of boost drivers. Only a good idea if necessary.

Long post. Apologies. Stop now. Ask for more if you dare.
 

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
Okay, glad you liked the first post.

I think I've answered the OP's question, so anything else is hijacking his thread. Please stop me if anyone objects.

Let's talk about dimming. There are two ways to dim a light.

One is to reduce the voltage/current. I say it that way because sometimes you control the voltage, and sometimes you control the current. Reducing one reduces the other (but not necessarily by the same amount), and increasing one increases the other. On incandescent or halogen bulbs or LEDs, this is always the case. At the input of a driver this generally does not hold true. In a linear driver, changing the input voltage should (in a well-designed driver) have no effect on the input or output current or the output voltage. In a switching driver, increasing the input voltage generally reduces the input current, and vice-versa. There should be no impact on output voltage or current.

The other way to control brightness in a lamp is to turn it on and off very rapidly. Any particular rod or cone cell on your retina (essentially a pixel of human visual acuity) can only respond in a specific time frame. If the input to that cell is too fast, the cell will average the inputs. If a light is turning on and off at around 50 Hz., most people can see this as flicker, especially in peripheral vision (which is sensitive at higher frequencies than central vision). At 200 Hz. few people are perceptive of flicker, though some suffer ill effects (including nausea) at frequencies somewhat above 200 Hz.

At 200 Hz, an incandescent bulb cannot respond by changing its output. But an LED most definitely can. An LED can turn on or off in much less than a microsecond. A filament cannot.
 

chillinn

Flashlight Enthusiast
Joined
Jul 19, 2014
Messages
2,527
Location
Mobjack Bay
The other way to control brightness in a lamp is to turn it on and off very rapidly. Any particular rod or cone cell on your retina (essentially a pixel of human visual acuity) can only respond in a specific time frame. If the input to that cell is too fast, the cell will average the inputs. If a light is turning on and off at around 50 Hz., most people can see this as flicker, especially in peripheral vision (which is sensitive at higher frequencies than central vision). At 200 Hz. few people are perceptive of flicker, though some suffer ill effects (including nausea) at frequencies somewhat above 200 Hz.

At 200 Hz, an incandescent bulb cannot respond by changing its output. But an LED most definitely can. An LED can turn on or off in much less than a microsecond. A filament cannot.

Another great post, thanks.

PWM and pulsing has more effect on people than what can "be seen" or what a human retinal cell can detect or respond to, and I suspect it has less to do with the limitations of the eye and more to do with the brain's gamma oscillations. But I honestly do not know why this aftermarket PWM moded tailcap for incan E-series rapidly gives me a headache, and can trigger a full blown migraine, when I don't believe the filament can react fast enough to go off and on, nor can I visually detect its PWM.
 

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
While an incan on mains voltage will not turn fully on and off at 100 or 120 Hz, the intensity does go up and down. https://www.youtube.com/watch?v=pye23D3ZlL4

I've never heard of anyone being sensitive to mains-powered incan flicker, but there's no telling what frequency that tailcap uses. It's also possible that the bulb in your light has a higher frequency response than ordinary mains bulbs. If the PWM frequency is 150 Hz, and the bulb frequency response is 250 Hz, you could have a migraine in the making without it being perceptible.

One way to detect PWM in a light is to sweep your eyes across it or something it illuminates. You've probably noticed automotive tail lights that seem to leave a 'dotted line' effect. To see it well you need high contrast, like something white against a dark background. In a handheld light it might be possible to sweep the light instead of sweeping your eyes. You'd want a very narrow beam for this - maybe put the light in a box with a small aperture some inches in front of the light.

While we're at it, let's talk about something else that can be impacted by PWM lights - digital cameras!

A modern camera may have a sensor array of 4000 x 3000 pixels, or even more. These pixels are not all read at once, they are scanned in a sequence. If the lighting intensity changes during the scan, part of the picture will be light and part will be dark. Depending on the relationship of PWM frequency to scan time, this may manifest as two sections on the picture, or as a number of horizontal or even diagonal bars. This can occur in both video and still photography.

I've never tried to understand the numbers well enough to know how to avoid getting this effect. As I'm not a photographer, and haven't designed photographic lights, it's never been important to me. I have seen claims of dimmable LEDs that are good for photography. I can think of several ways to accomplish this:

1. Turn off LEDs. If it takes 5 LEDs to provide full brightness, you have 5 steps, in 20% increments, of variable brightness. Be careful it doesn't make illumination uneven.
2. Reduce the LED current (analog dimming). Unfortunately, this changes the spectral output of the LEDs, which photographers hate. Okay for small changes. Not so much for big ones.
3. Shading, aiming, reflecting, and other ways of changing how much of the light's output reaches the subject. Let the photographers discuss.
 

chillinn

Flashlight Enthusiast
Joined
Jul 19, 2014
Messages
2,527
Location
Mobjack Bay
I've never heard of anyone being sensitive to mains-powered incan flicker, but there's no telling what frequency that tailcap uses. It's also possible that the bulb in your light has a higher frequency response than ordinary mains bulbs. If the PWM frequency is 150 Hz, and the bulb frequency response is 250 Hz, you could have a migraine in the making without it being perceptible.

Must be the frequency that tailcap uses, because I get no headaches using or bathing in the light of an incan A2 Avaitor, which uses PWM for voltage regulation in it's LVR regulator. I also could only speculate if it is a matter of PWM frequency being complementary or adverse to what eyes can detect, and/or gamma oscillations, or whether the LVR simply uses a higher frequency (above some threshold) than the LightSaver.

When discussing PWM, everyone seems to assume that higher frequency is always better, but I am not so sure this is necessarily true, or rather, that maybe it is coming at the issue the wrong way. If gamma oscillations are involved with whether a specific frequency of PWM is tolerable, then the specific frequency of the PWM will matter, probably as a harmonic (or overtone, or inharmonic partial) of the frequency of natural gamma oscillations. For instance, if the incan bulb in my bedside lamp, which causes me no grief, is oscillating at 120Hz, then I believe this frequency is the third harmonic of the natural brain gamma oscillation at 40Hz. Perhaps that is why the bulb's consciously imperceptable oscillation doesn't bother anyone? But if the filiment was oscillating at 130Hz, 143.72Hz or 501.23Hz, perhaps it would bother many, even without conscious perception of the oscillation?

This is really something that should, by oversight from government entities like the Consumer Product Safety Commission, be held to flashlight manufacturers, and others that use PWM (such as the auto industry which often uses PWM in brake lights and dash lights for some inscrutable reason) to discover the reasons and mitigate them. But because PWM and its effects are often subtle, and adverse effects not widely reported, even menacing products using intolerable PWM will escape such scrutiny and oversight.
 
Last edited:

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
I don't know how old you are, but at one time computer monitors had a 60 Hz refresh rate. So did TVs. Many people could see this, some even in central vision. Refresh rates in monitors climbed gradually until they reached around 200 Hz. Fewer and fewer people complained, and eventually it was considered not a significant issue (which is not to say there weren't still a few people bothered by it). I don't think anyone ever went above 200 Hz.

I think it's widely held that at or above 200 Hz, effects on humans are very rare. The rod and cone cells on the retina have a limit to how fast they can respond to changing light intensity. That may be faster than the brain's ability to perceive such changes (which is generally lower in central vision, higher in peripheral vision), which if true might explain effects that can be felt but not seen. But once you get above the retinal bandwidth by some margin, all effects should disappear, unless they have a non-optical mechanism, like acoustical or magnetic.

Oh, and the reason automotive lights use PWM is so they can control the brightness by turning them on and off, rather than by power-wasting voltage changes. That makes it cheaper. That's the ultimate incentive.
 

chillinn

Flashlight Enthusiast
Joined
Jul 19, 2014
Messages
2,527
Location
Mobjack Bay
I've been thinking about video refresh rates for some time. Ultimately, I want to question if it really is as applicable to PWM as it initially seems. A TV doesn't cast the same light frequency constantly like most light sources nor a flashlight, but it is mixed up with many colors and shades and brightnesses. This could be the difference between water-drip torture and a refreshing rain shower. Or you could step on a nail pointed the wrong way, and it may go right through your foot with resulting excruciating pain. But step on a bunch nails packed together but all pointed almost the same way, and it is a foot massage. I think, possibly, comparing video refresh rates to a single light source with PWM may be like comparing apples to pianos.
 
Last edited:

PiperBob

Newly Enlightened
Joined
Feb 13, 2017
Messages
70
A modern camera may have a sensor array of 4000 x 3000 pixels, or even more. These pixels are not all read at once, they are scanned in a sequence. If the lighting intensity changes during the scan, part of the picture will be light and part will be dark.


That wouldn't work for most cameras.

shutter closes
pixels flushed
shutter opens
pixels gather light
shutter closes
pixels read

Most small cameras use an iris shutter that exposes the entire sensor array at once, although some very inexpensive cameras have no shutter at all.

With a dslr the shutter swipes across the frame. At shutter speeds over 250 (for Nikon anyway), the shutter swipes a band of light across the sensor. So at 500 the first blade starts to open. When it is exposing half the frame the second blade starts to close.

At 1/1000 second the shutter would expose a quarter of the frame at a time in a moving swipe. There is a total of 2.5 ms difference in time between when the shutter starts to open and when it finishes closing, but any given pixel only sees 1 ms of light.

The swiping will manifest as curves in helicopter blades.

Here's a webpage with a photo of curving blades:

http://www.wrotniak.net/photo/tech/heli-puzzle.html
 

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
Okay, take your 1/1000th shutter speed example. If the light is PWM'd at 1000 Hz, and 50% duty cycle, then the light will be on for exactly half the exposure, and off for the other half. Thus part of your picture would be in 100% light, part in 0% light.

Regardless of whether the scanning is electronic or mechanical, the scan rate can still interact with PWM on a single light.
 

ssanasisredna

Enlightened
Joined
Oct 19, 2016
Messages
457
That wouldn't work for most cameras.

shutter closes
pixels flushed
shutter opens
pixels gather light
shutter closes
pixels read

Most small cameras use an iris shutter that exposes the entire sensor array at once, although some very inexpensive cameras have no shutter at all.

With a dslr the shutter swipes across the frame. At shutter speeds over 250 (for Nikon anyway), the shutter swipes a band of light across the sensor. So at 500 the first blade starts to open. When it is exposing half the frame the second blade starts to close.

At 1/1000 second the shutter would expose a quarter of the frame at a time in a moving swipe. There is a total of 2.5 ms difference in time between when the shutter starts to open and when it finishes closing, but any given pixel only sees 1 ms of light.

The swiping will manifest as curves in helicopter blades.

Here's a webpage with a photo of curving blades:

http://www.wrotniak.net/photo/tech/heli-puzzle.html

Most small cameras today have a rolling electronic shutter, not an iris at all. The array is not exposed all at once. Even with a mechanical iris, they are not fast enough to effectively expose all the array at once unless you have a really low shutter speed w.r.t. the iris speed.
 

ssanasisredna

Enlightened
Joined
Oct 19, 2016
Messages
457
Another great post, thanks.

PWM and pulsing has more effect on people than what can "be seen" or what a human retinal cell can detect or respond to, and I suspect it has less to do with the limitations of the eye and more to do with the brain's gamma oscillations. But I honestly do not know why this aftermarket PWM moded tailcap for incan E-series rapidly gives me a headache, and can trigger a full blown migraine, when I don't believe the filament can react fast enough to go off and on, nor can I visually detect its PWM.

If the retina cannot detect, then nothing in the brain is going to happen. You can't have output without input .... which is not to say you cannot have gamma oscillation/visual interaction, but it appears that the visual is driving the induced gamma, which can come from optical information you are viewing.

If you are getting headaches, it is more likely visual issues related to saccades. High modulation depth PWM, even past 200Hz can cause errors in the rapid eye movements (over/undershoot) which causes eye strain and can lead to headaches, or migraines if you are prone to them. High PWM depth at 120Hz gives me headaches. Past 500Hz, and/or not modulating 100% will reduce and completely eliminate any issues.
 
Top