# Sharing Current Between Parallel COB LEDs. Transistors? Circuit Design Help!



## gully.moy (Jan 22, 2015)

Hi CPF! This is my first post so I hope I'm in the right place. I wasn't sure if this would do better in one of the custom forums so feel free to move this thread or whatever.

So I've got some high powered COB LEDs. They're rated at 100W which is made up by about 3A at something like 35V. They came with drivers to match which I suppose are some kind of constant current source and are tuned to run one LED each at full power.

My plan however is to run the LEDs at approximately half power by running two in parallel from one driver. My hope is that this will make cooling easier by reducing heat per an LED, increase the lighting efficiency and prolong the life of the LEDs. Further more this will allow me to run two different spectrums from the same driver - one warm white, one cool.

I also want to be able to control how the current is shared between the two LEDs. If I could conjure up a circuit with a fully analogue control to adjust the balance of current between them that would be fantastic. I suspect however that that it would be easier and cheaper to design a circuit with say three balance settings. For example these may split the 3A by approximately:

1A to the cool white LED and 2A to the warm
1.5A each
2A cool, 1A warm

Of course the easiest way to achieve this would be to use resistors in series, however efficiency is a primary concern of mine so I'd rather not go down this route. I am not too worried about precise amperages but it needs to be fairly cheap. So I've been reading about current controlling circuits using transistors. This is all quite new to me however and I'm struggling to comprehend it all well enough to come up with a solution to my problem. Perhaps to someone more experienced it is quite straight forward?

If anyone has any ideas for either an analogue current balance control or a number of discreet settings I'd really appreciate they're input.

Many thanks,
Gully.


----------



## more_vampires (Jan 22, 2015)

gully.moy said:


> Hi CPF!



Hello! 



gully.moy said:


> My plan however is to run the LEDs at approximately half power by running two in parallel from one driver.



I need some more coffee, but wouldn't two LED *in series* from one driver would do what you're saying?



gully.moy said:


> My hope is that this will make cooling easier by reducing heat per an LED, increase the lighting efficiency and prolong the life of the LEDs.



Reduced power would do this, yes.



gully.moy said:


> Further more this will allow me to run two different spectrums from the same driver - one warm white, one cool.



Maybe so, maybe no. Different LED types have a different Vf, aka "forward voltage." Not saying it won't work, just one will be brighter than the other. Led response to current varies among the various led types out there.



gully.moy said:


> I also want to be able to control how the current is shared between the two LEDs. If I could conjure up a circuit with a fully analogue control to adjust the balance of current between them that would be fantastic.



You do that with two drivers. Been done before. Not so bad. This will also allow you to run each one properly if you're going to try color/tint mix.



gully.moy said:


> I am not too worried about precise amperages but it needs to be fairly cheap.


Drivers for regular flashlight applications of LED are only a couple of bucks. $2-$4 or so.



gully.moy said:


> So I've been reading about current controlling circuits using transistors. This is all quite new to me however and I'm struggling to comprehend it all well enough to come up with a solution to my problem. Perhaps to someone more experienced it is quite straight forward?


No problem. We had a warm happy thread all about it here: http://www.candlepowerforums.com/vb/showthread.php?394834-battery-efficiency-increased-runtime-mod

You could come back and ask questions in this thread, if you like.



gully.moy said:


> If anyone has any ideas for either an analogue current balance control or a number of discreet settings I'd really appreciate they're input.


That'd be based of the two driver boards you selected and the modes that they offer. No big deal.


----------



## gully.moy (Jan 22, 2015)

more_vampires said:


> I need some more coffee, but wouldn't two LED *in series* from one driver would do what you're saying?


It's my understanding that if I connected them in series they would have to share the voltage. Since my drivers are only rated at something like 30-36V they wouldn't supply enough voltage to meet the voltage drop of two of these LED modules in series. Does that make sense?



more_vampires said:


> Maybe so, maybe no. Different LED types have a different Vf, aka "forward voltage." Not saying it won't work, just one will be brighter than the other. Led response to current varies among the various led types out there.


 I believe that the Vf listed on the sellers page is the same for the warm and cool versions. I'd have to check it, but as long as it's similar I'm not too concerned with the exact brightness.



more_vampires said:


> You do that with two drivers. Been done before. Not so bad. This will also allow you to run each one properly if you're going to try color/tint mix.


My very limited understanding of transistors would suggest that it should be possible with one driver given the right circuit.



more_vampires said:


> Drivers for regular flashlight applications of LED are only a couple of bucks. $2-$4 or so.


Remember I'm not talking about flashlight LEDs here. These are high powered COB LEDs running 100w per a module at around 35V. The drivers are not so cheap and it's hard to find ones with the correct voltage/current combinations at the right price.



more_vampires said:


> No problem. We had a warm happy thread all about it here: http://www.candlepowerforums.com/vb/showthread.php?394834-battery-efficiency-increased-runtime-mod


Thanks for this, I'll check it out in a minute.

And thanks for getting back to me :thumbsup:


----------



## Anders Hoveland (Jan 22, 2015)

more_vampires said:


> I need some more coffee, but wouldn't two LED *in series* from one driver would do what you're saying?


I suspect the required voltage for running the two in series would exceed the maximum voltage range of the constant current driver, given that these drivers were sold along with the LEDs. But yes, normally a driver will increase its voltage until the desired current flows through the circuit.





more_vampires said:


> Not saying it won't work, just one will be brighter than the other.


Really hard to say. One might be a little brighter than the other. The only way to know is to try it.
There's no risk to the LEDs here.

Since the LED chip is 35v, it is comprised of ~9 diodes, so I would think that any voltage bin differences would mostly average out. 

It can be problematic to run LEDs in parallel for _several_ reasons, but it_ can _work in some situations.


----------



## DIWdiver (Jan 22, 2015)

You're right that running them in parallel is the correct way to achieve what you want.

You're also correct that switching in and out resistors is one way to do it, and that it can also be done with transistors. But using current control techniques with transistors is no more efficient than using resistors.

If the Vf of the two leds is the same (or at least pretty close) then it would be reasonable to run them in parallel. Even if the specs are the same, there's no guarantee that any two individuals will be at close to the same point in the range.

Assuming you have two good candidates, the most efficient way to run them would be to use PWM. Basically you put a transistor in line with each LED, and turn the transistors on and off at high frequency. Say you want slightly warm white. So leave the warm one on all the time, and turn the cool one on and off. Say it's on half the time and off half the time. When it's on, the two LEDs share current. When it's off, the warm one gets all the current. 

So the warm one would be on 100% for half the time and 50% half the time, while the cool one would be on 50% half the time. Want it a little cooler? Leave the cool one on 60% of the time, or 70%. Want it really cool? Reverse the positions and turn the warm one off.

You could do this with a single PWM module, and a switch to select which LED gets controlled. Then you'd have warm to neutral on one switch setting, and neutral to cool on the other.


----------



## more_vampires (Jan 23, 2015)

Anders, DIW, thanks for setting us straight guys.

This is my absolute favorite kind of thread. The experts showed up!


----------



## gully.moy (Jan 23, 2015)

Thanks DIW, that seems like just the kind of thing I'm looking for. Although I'm surprised to hear that transistor circuits are as inefficient as resistors since I've read otherwise providing the components are chosen carefully. But I'm not too worried about that because I like the sound of Pulse Width Modulation anyway for it's efficiency and [virtual] analogue control.

Reading about it though I'm still a bit lost in new concepts, and therefore struggling to understand exactly what components I need. Most of the PWM modules I can see for sale list output values as a fixed current, and a varying voltage. I want the opposite.

If I understand the theory correctly, the actual current and voltage would actually both be unaltered by the module when on, it is just the ratio of on time to off time that varies. So I guess this produces an average voltage decrease. But what happens to the current. Would there also be an average current drop? Or do I need a different kind of PWM module for that?

Thanks again.


----------



## Anders Hoveland (Jan 23, 2015)

gully.moy said:


> it is just the ratio of on time to off time that varies. So I guess this produces an average voltage decrease. But what happens to the current.


Actually an average *current *decrease. Current is the amount. Voltage is like the "pressure". Basic electronics.
To go through two LEDs in series, it takes twice the voltage. The current is the same because it is the same current going through both of them. To go through two LEDs in parallel, it takes twice the current. The voltage is the same because it is not any harder for the current to go through either of the LEDs. The voltage potential does not fall just because the current splits apart and flows through two separate wires*.

It gets more complicated when discussing AC voltage, but I will not go into that here.

*Assuming there is plenty of reserve current available, so this general rule may not apply to static electricity .
Actually, since we are discussing a constant current supply here, the voltage probably actually _will_ be a little lower. Having two resistive loads in parallel (the two LED chips) creates a lower resistance, meaning it will take a slightly lower voltage to drive the rated current through. Nothing you need to worry about though.


----------



## gully.moy (Jan 23, 2015)

Yeah sorry, I was confused by motor speed controllers like this one and LED drivers like this one which I found on eBay when searching 'PWM'. I saw the analogue dial and thought they were what I was after but didn't get why they were offering a range of voltage outputs when I want variable current.

Then I confused myself more thinking that when the PWM module was turned off that the voltage would be 0, so the average voltage whilst the PWM was 50% on 50% off would be half of the voltage when on. But of course even when turned off the voltage across the terminals would still be full. If I was thinking of potential difference rather than voltage I might have clicked sooner.

Of course the voltage and current couldn't both half when the PWM was turned down half way because then the power would have to quarter for only 50% less 'on' time.

I'm largely just talking through my thoughts in case anyone else gets stuck in the same rut as I did.

So what I want is something more like this PWM chip and learn how to connect it to my LEDs and a potentiometer for control! Have I got it?

Sorry I'm a bit dense with electrics and need things spelling out sometimes.


----------



## SemiMan (Jan 23, 2015)

Anders Hoveland said:


> I suspect the required voltage for running the two in series would exceed the maximum voltage range of the constant current driver, given that these drivers were sold along with the LEDs. But yes, normally a driver will increase its voltage until the desired current flows through the circuit.
> 
> 
> 
> ...



With typical VF off even on a China FAB, unlikely. 10-12. 12 is the most common for COB.


----------



## DIWdiver (Jan 23, 2015)

Yeah, when using PWM, concepts like 'average' can be very useful or very misleading. Average current is pretty reasonable when calculating battery life, decent when estimating brighness, not so good when looking at tint, and pretty rotten when calculating power.

For power you should use RMS values. The RMS value of a PWM signal at 50% duty cycle is 0.7071 times the full value. Since it applies to both voltage and current in this case, P = 0.7071V * 0.7071I. It's no coincidence that 0.7071*0.7071 is 0.5, so the equation simplifies to P = 0.5 * V * I, which is exactly what you intuitively knew it should be.

I find it's generally best to consider what's happening when the device is on (and at full power, at least for the moment) for calculating voltage drops, max current, tint etc. Then multiply by the duty cycle to get 'average' power, brightness, battery load.

The TLC5940 is designed to run a number of small LEDs, not a single large one, and it has current regulators for each channel. While you could adapt it to your use, it's kind of overkill. What you need is a small portion of that chip with bigger output transistors. Also, you need to create a stream of data to control that chip. That means you need a microprocessor or special output from a PC or similar (it used to be that you could use the parallel port on a PC for this, but those are pretty non-existent today).

There are some PWM modules around that are purely PWM, with no driver circuitry, which is what you want. Taskled used to make the D2Flex, but has discontinued it. I was sure that led-tech.de had one, but I can't find it now. I'm sure you could roll your own with any of the DIY microprocessor units like Arduino, Raspberry Pi, BeagleBone, etc.


----------



## Anders Hoveland (Jan 24, 2015)

DIWdiver said:


> For power you should use RMS values. The RMS value of a PWM signal at 50% duty cycle is 0.7071 times the full value. Since it applies to both voltage and current in this case, P = 0.7071V * 0.7071I. It's no coincidence that 0.7071*0.7071 is 0.5,


for a sinusoidal waveform. but what happens when the output is being alternately shunted between two different outputs? for the average current to be a factor of 0.7071, that would (most likely) require current to be flowing through the two outputs simultaneously, seems a little counterintuitive


----------



## DIWdiver (Jan 24, 2015)

Anders Hoveland said:


> for a sinusoidal waveform. but what happens when the output is being alternately shunted between two different outputs? for the average current to be a factor of 0.7071, that would (most likely) require current to be flowing through the two outputs simultaneously, seems a little counterintuitive



I think you missed the point entirely. The RMS value can be very different from the average value. Average values are useful for some things, not for others. RMS values are useful for some things, not others. And they are pretty much mutually exclusive.

I didn't say that the average was 0.7071 times the max. I said that the RMS value was 0.7071 times the max. Quite different statements.

In order to make useful calculations in circuits that are not DC, with 'DC' meaning that the current and voltage are fixed over a short term, one must understand not only what average and RMS are, but also where they are to be used. To use either where the other is called for is to make a significant error (usually). The average value of a sinusoidal waveform is zero. It's pretty obvious that won't produce useful results in most calculations.

RMS means literally "square *R*oot of the *M*ean of the *S*quare". That means that you take the square of the signal, average over one cycle (or some other useful period), then take the square root of the average. It turns out that for a sine wave, the RMS value is 0.7071 times the peak value. For a square wave (by definition, 50% duty cycle), it's also 0.7071 times the peak value. But for any other duty cycle, the PWM signal has different RMS value. 

In general, the RMS value of a PWM signal is the square root of the duty cycle. If you have a duty cycle of 0.1, or 10% (on 10%, off 90%) the RMS value is 0.32, because the square root of 0.1 is 0.32. Likewise, if you have a duty cycle of 80%, the RMS value is 0.89, since the square root of 0.8 is 0.89.


----------



## SemiMan (Jan 25, 2015)

Anders Hoveland said:


> for a sinusoidal waveform. but what happens when the output is being alternately shunted between two different outputs? for the average current to be a factor of 0.7071, that would (most likely) require current to be flowing through the two outputs simultaneously, seems a little counterintuitive




No, the RMS voltage is sqrt(DutyCycle)*peak value. If the duty cycle is 0.5, peak is 1, then RMS = sqrt(0.5) = 0.7071

For your example of going between two values: say 0.25 peak for 25% of the duty, and 0.5 peak for remaining 75% of the duty, you could do RMS =

sqrt((0.25 * sqrt(0.25))^2 + (0.5 * sqrt(0.75))^2) = 0.452. I.e. the RMS voltage is 0.451V. The power into a 1 ohm resistor is the square of this or 0.203W


You could also get that from (0.25^2*.25+0.5^2*0.75) = 0.203


Semiman


----------



## more_vampires (Jan 25, 2015)

DIWdiver said:


> I think you missed the point entirely. The RMS value can be very different from the average value. Average values are useful for some things, not for others. RMS values are useful for some things, not others. And they are pretty much mutually exclusive.
> 
> RMS means literally "square *R*oot of the *M*ean of the *S*quare". That means that you take the square of the signal, average over one cycle (or some other useful period), then take the square root of the average. It turns out that for a sine wave, the RMS value is 0.7071 times the peak value. For a square wave (by definition, 50% duty cycle), it's also 0.7071 times the peak value. But for any other duty cycle, the PWM signal has different RMS value.
> 
> In general, the RMS value of a PWM signal is the square root of the duty cycle. If you have a duty cycle of 0.1, or 10% (on 10%, off 90%) the RMS value is 0.32, because the square root of 0.1 is 0.32. Likewise, if you have a duty cycle of 80%, the RMS value is 0.89, since the square root of 0.8 is 0.89.



When talking about PWM, occasionally I mention mechanical voltage regulators such as used by Bosch in cars and motorcycles in the 1900s.

There's the battery, there's the regulator. It's just a switch that slams off and on quickly. Under an oscilloscope, it looks like big nasty square waves. The only reason that it works is that over time, it equals out. It tones down the voltage from the charging system. It's really crappy regulation. It doesn't care about current.

Modern current control is smooth (usually.) In PWM, there may be a visible flicker that can induce headaches, nausea and vertigo in some people (like me.) Not a fan of PWM, smooth current control is best.


----------



## DIWdiver (Jan 25, 2015)

Those type of regulators work by adjusting the field current in the alternator. Since the field winding is a big inductor, the PWM duty cycle of the voltage ends up adjusting the average field current. The field current ends up being a sum of DC and AC components. If it's designed properly, the AC component is much smaller than the DC component. The field current and engine speed control the output current of the alternator. The battery soaks up most of the AC component of the alternator output. So the 'big nasty square waves' at the output of the voltage regulator aren't simply averaged. They are filtered by a number of other components in the system. The field coil should do a decent job of averaging the PWM signal from the regulator, but there's a lot more to it than that.

I'm sure someone will correct me if I'm wrong, but I'd bet big that modern electronic regulators do exactly the same thing, just using transistors instead of contacts, and higher PWM frequency.

If there is visible flicker in a PWM system, it's because the frequency is low, or being modulated by the scanning frequency of a camera. If we're talking direct to the human eye, 200 Hz. is plenty to make it imperceptible to even the most sensitive eyes. And it's usually quite easy to go much faster than that.

The problem with PWM in illumination is with cameras. If your PWM frequency is 3000 Hz, and your camera scans an image in 1/1000th of a second, you get three cycles of on and off during the scan, which look like light and dark bars in the image. Talk about a headache!


----------



## more_vampires (Jan 25, 2015)

For more insight into the PWM problem inducing epilepsy and other factors, please consider this wiki page:
http://en.wikipedia.org/wiki/Flicker_vertigo
I mention this because I, myself, am vulnerable. I've been knocked out with a blackjack on two occasions breaking teeth. This is what will happen, similar to flicker vertigo/the Bucha effect. It's basically the same effect. Avoid it.

If you want to talk safety, please don't subject a percentage of the population to a medical condition by viewing your display.

You don't want people hitting their heads upon pavement or tile. These are not good materials for this.


----------



## SemiMan (Jan 25, 2015)

PWM over 1 KHz, problem solved, at least where people are concerned.


----------



## more_vampires (Jan 26, 2015)

Agree, SM. Bad pwm on most lights is just a headache. It's slow strobe like at night club/dance halls that really gets me. Haven't been to one in probably 14 years. Most didn't run them long enough to get me.

Also forgot to say that PWM could be a step towards smooth current regulation, then full wave rectifier plus filtering.


----------



## SemiMan (Jan 27, 2015)

If you PWM at 1KHz plus, there is no need to post filter. As well, assuming you are PWMing DC, no need for the rectifier either.


----------



## more_vampires (Jan 27, 2015)

I never used to "hear comm" so I like my filters.

Sorry, obligatory smiley face:


----------



## DIWdiver (Jan 27, 2015)

SemiMan said:


> If you PWM at 1KHz plus, there is no need to post filter. As well, assuming you are PWMing DC, no need for the rectifier either.



Absolutely. Unless you are providing light for video or digital photography, in which case you should be very careful.


----------



## gully.moy (Jan 28, 2015)

Hi guys. This threads gone out of my depth now! I like the sound of PWM, but microprocessors and certainly computer control are a bit more in depth than I wanted to get.

I had a simpler idea. I may be talking nonsense as I don't really understand semiconductors, but from what I've read BJT transistors can act as a high frequency switch. By switching on and off really fast they can control a large current over the collector-emitter, from a small current over the base-emitter. That sounds kind of like PWM to me?...

So what I'm proposing is driving the base from a small 5v power supply (wall wart) via a potentiometer. Hopefully a high resistance will mean minimal power wastage. The LEDs will be powered by the constant current source. Adjusting the potentiometer will control the current going to one of the LEDs, by the ratio of on to off time. The other LED will get what's left.

I made a little circuit diagram on paint:






So by selecting the right components, could this or an idea similar work? Is there a problem combining power supplies in this way? Can you have two different voltages over one transistor? Any adjustments or tips?

Cheers.


----------



## more_vampires (Jan 28, 2015)

gully.moy said:


> Hi guys. This threads gone out of my depth now!



Nah, not at all. You sound like you're onto it.



gully.moy said:


> transistors can act as a high frequency switch. By switching on and off really fast they can control a large current over the collector-emitter, from a small current over the base-emitter. That sounds kind of like PWM to me?...



You got it.



gully.moy said:


> So what I'm proposing is driving the base from a small 5v power supply (wall wart) via a potentiometer.



If you go with an existing power supply and tweak by an adjustable resistor (pot,) you skip the fiddling with transistors. You could possibly just use the potentiometer, depending on the quality of your DC wall wart, your voltage, your wattage needs.

I guess it depends on how far you want to go in building your power system. Sometimes, simpler is better.

Watch out for wall warts, though. The cheap ones don't seem to obey the specs stamped on them.


----------



## gully.moy (Jan 28, 2015)

I'm not driving the LEDs with the wallwart though, the LEDs are closer to 30V so that wouldn't cover them. I realise that I could just put a pot in series to control current, but I didn't really was want to waste power running 30V through a resistor and my drivers aren't rated to make up for the voltage drop over it.

Any feedback on the circuit diagram?


----------



## more_vampires (Jan 28, 2015)

Sorry, this thread's gone on so long, I forgot about 30-35v and was thinking flashlights again. I do that.

I skimmed the diagram and missed some things. There's some problems. On that diagram, what's switching your switch? The voltage is going to bias the transistor one way and then there's no PWM.

How about this, check this diagram, top right of the page.
http://en.wikipedia.org/wiki/Boost_converter
The regular old switch in the diagram is supposed to be a transistor.



> A boost converter is sometimes called a step-up converter since it “steps up” the source voltage. Since power (
> 
> 
> 
> ) must be conserved, the output current is lower than the source current.


----------



## gully.moy (Jan 28, 2015)

more_vampires said:


> I skimmed the diagram and missed some things. There's some problems. On that diagram, what's switching your switch? The voltage is going to bias the transistor one way and then there's no PWM.



Hmm... I was trying to take advantage of 'current gain'. If I understand correctly, the current at the collector of a bipolar junction transistor is roughly proportional to the current at the base. So in the diagram altering the resistance of the potentiometer will alter the current at the base of the BJT. This should result in a proportional increase in current at the collector. Could that work, even if it's not PWM?



more_vampires said:


> How about this, check this diagram, top right of the page.
> http://en.wikipedia.org/wiki/Boost_converter
> The regular old switch in the diagram is supposed to be a transistor.


Maybe I'm missing something, but I'm not sure how boosting my voltage is going to help me, since the power for the LEDs is coming from a separate constant current source, which is designed to provide enough voltage for them...


----------



## more_vampires (Jan 28, 2015)

Transistor as a switch:
Think of the main current path of a transistor like your garden hose faucet. The water pressure is pretty decent and flow can be on or off (current.) The low-voltage control of a transistor is sort of like the faucet valve, except not really. Turning the valve involves less effort than generating the water pressure, but nothing's free. Without pressure and flow in your water system, turning the valve does nothing. 

http://en.wikipedia.org/wiki/Transistor#Transistor_as_a_switch



> If the voltage difference between the collector and emitter were zero (or near zero), the collector current would be limited only by the load resistance (light bulb) and the supply voltage. This is called _saturation_ because current is flowing from collector to emitter freely. When saturated, the switch is said to be _on._



So statically biasing a transistor as a switch is sort of like treating it as a glorified potentiometer. In the above quote text, note that "fully on" is direct drive of the LED with nothing else in the way of the main current path. Statically adjusting that bias potentiometer is basically changing the resistance value of one leg of a parallel circuit and the LED on the right will be at max brightness while the one on the left hand will be off. Or both on and sharing. Depends on what you do with that potentiometer to bias that transistor in your example schematic in post 23.

If I mis-spoke, someone please steup up to the microphone and correct me. Also, this sort of adult discussion is a fantastic tool for learning. I love electronics, didn't say I couldn't make a mistake.

Anyway, isn't "Transistor as an amplifier" more appropriate? It's right after "Transistor as a switch" in the wiki.

Thanks for posting, Gully.


----------



## DIWdiver (Jan 28, 2015)

gully.moy, I think you understand things pretty well.

With a few caveats, your diagram should work exactly as you plan, with no PWM. This is what I was referring to in post #5 when I mentioned 'current control techniques with transistors'. Your diagram is one of several ways I can think of to do 'current control with transistors'.

The caveats: 
1. A bipolar junction transistor can never be essentially zero resistance. When it's 'fully on' it will still drop 0.1-0.5V depending on the transistor you choose and how much current you put in the base and collector. This voltage is referred to as Vbe(sat) in the data sheets.

2. The high impedance isn't something you can choose arbitrarily. The resistance setting will be dictated by the transistor gain (Hfe) and the desired collector current. Okay, that probably sounds like gibberish. Put another way: once you choose your transistor, the resistance of the potentiometer will determine the collector current. For a specific collecor current, you will need a specific base current, which means you will need a specific resistance. If you want to keep the base current low (and thus the efficiency high), you want to choose a transistor with high gain. But beware of darlington transistors. They have very high gain, but they also have Vbe(sat) values of 0.7V and higher.

3. more_vampires is correct that you could think of this as using the potentiometer to adjust the resistance of the transistor. At any given setting, the transistor will have voltage across it and current through it. This results in power loss in the transistor, reducing the efficiency. Using Ohm's law (V = I*R) you could calculate an effective resistance. The power loss and impact on efficiency will be the same whether that comes from a transistor or an actual resistor.

The reason that PWM has higher efficiency is that the transistor has only two states: on and off. Obviously when it's off there's no power dissipation and thus no efficiency loss. When it's on, the voltage is very low, so power is very low, so efficiency loss is very low. For this you would probably want to use an FET instead of a BJT, because the gate current (similar to the BJT's base current) is essentially zero. And the voltage drop can be very low, well under 0.1V.


----------



## more_vampires (Jan 28, 2015)

DIWdiver said:


> Okay, that probably sounds like gibberish



Im going to read it again, and think about it some more, don't care if it is hours or days. I review this thread daily.

Lurkers reading the thread? Did you even get close? Keep trying! I don't know it all, but I'm working on it.

DIW is one of the best I've seen. Lurkers, please take note. Post 29 is this way ^ ^ ^ ^



DIWdiver said:


> reducing the efficiency



Wait, there's reasons to do that.

Isn't PWM the "cut corners" method of voltage regulation, hoping that the particular emitter can "take it" for "long enough?" I can see how it involves fewer components than going whole hog with rectification and smoothing.

I'm allergic to PWM. It's why I try to learn so much about it! 

PWM is very much like AC current. Rectification and smoothing is how you turn that into level voltage. It adds more components, more components to dissipate waste heat, reducing efficiency.
http://en.wikipedia.org/wiki/Rectifier



> Rectifiers have many uses, but are often found serving as components of DC power supplies and high-voltage direct current power transmission systems.


I am 100% certain this thread isn't over yet!



> Many applications of rectifiers, such as power supplies for radio, television and computer equipment, require a _steady_ constant DC current (as would be produced by a battery). In these applications the output of the rectifier is smoothed by an electronic filter (usually a capacitor) to produce a steady current.



We're looking at multiple ways to skin a cat.


----------



## gully.moy (Jan 29, 2015)

DIWdiver said:


> With a few caveats, your diagram should work exactly as you plan, with no PWM. This is what I was referring to in post #5 when I mentioned 'current control techniques with transistors'. Your diagram is one of several ways I can think of to do 'current control with transistors



Yeah I suspected that was the case. I suppose it depends on the specific values of each component, but would you say there is likely to be much of an efficiency benefit over resistors in series? Probably not seeing as I'm driving an extra power supply right?



DIWdiver said:


> The reason that PWM has higher efficiency is that the transistor has only two states: on and off. Obviously when it's off there's no power dissipation and thus no efficiency loss. When it's on, the voltage is very low, so power is very low, so efficiency loss is very low. For this you would probably want to use an FET instead of a BJT, because the gate current (similar to the BJT's base current) is essentially zero. And the voltage drop can be very low, well under 0.1V.


So would a FET produce PWM? The reason I chose a BJT is that I read that they were current controlled and I know how to control current. I'm not sure how to control voltage without transformers to give a varying output current. Any hints on how I could substitute for one?


----------



## gully.moy (Jan 29, 2015)

Hold on, it's called a potentiometer - should be obvious.

Would this be the FET equivalent?






But perhaps it would be more efficient to run it straight from the LED driver in parallel with the LEDs?


----------



## gully.moy (Jan 29, 2015)

So this being the option with just the LED driver as a power supply






Given the right value components would either of these circuits work as I describe?


----------



## DIWdiver (Jan 29, 2015)

more_vampires said:


> Isn't PWM the "cut corners" method of voltage regulation, hoping that the particular emitter can "take it" for "long enough?" I can see how it involves fewer components than going whole hog with rectification and smoothing.



Maybe...

If we were talking about DC motors, PWM is fairly analogous to changing the voltage. However, as the voltage (whether DC or PWM average) gets lower, we find the motor actually performs better on PWM than on DC.

In LED applications it's not really useful to think of it as regulating the voltage. Changing the DC voltage has a _dramatically_ different effect than changing the PWM duty cycle.

For LEDs, it's much better to think of the PWM as changing the average current. When the transistor is on, the current is limited by other things in the circuit. Say you have a direct drive flashlight that's putting 10A through your XM-L. It won't last long at that condition, so you add PWM, and set it for 30% duty cycle. Now you have an average of 3A, which is good for the XM-L. Is this "cutting corners"? Yeah, maybe. It's still stressing the LED more than 3A DC would do. But if you keep the frequency high enough, it is probably okay.

But if you buy the next generation of battery for your light, and now the direct drive current is 15A, 30% gets you to 4.5A. That's probably way more than you bargained for. At this point many people would agree you were cutting corners.

On the other hand, say you have a regulated 3A in that same XM-L, and you want to be able to make it put out less light without changing the tint. So you put a PWM on it, with 1% duty cycle. Now you get around 10 lm, without changing the tint. If instead you change the DC current to 0.03A, you'd get probably 11-12 lm, but the tint would change substantially. The PWM is still putting more stress on the LED, but at this point it's so low as to be laughable! Which is better? Clearly that's up to the user to say.



more_vampires said:


> I'm allergic to PWM. It's why I try to learn so much about it!



That's like saying you're allergic to nuts when in fact you're allergic to walnuts. What bothers you is _low frequency_ PWM. Once the frequency gets to 200 Hz or so, it will stop bothering you completely. Fluorescent lights, computer screens, TVs and all kinds of things powered off the line voltage have (or at least used to have) frequencies lower than 200 Hz. If PWM is deliberately introduced into an illumination device, the frequency is normally chosen by the designer and should always be at least 200 Hz to eliminate the irritating (or even dangerous) effects on some people. I usually work in the 500-5000 Hz range, even though anything over 80-90 Hz doesn't bother me.


----------



## SemiMan (Jan 29, 2015)

Even 200 hz creates non visual issues. I would say more 500-800Hz to completely guarantee no issues.


----------



## DIWdiver (Jan 29, 2015)

gully.moy said:


> Yeah I suspected that was the case. I suppose it depends on the specific values of each component, but would you say there is likely to be much of an efficiency benefit over resistors in series? Probably not seeing as I'm driving an extra power supply right?



Actually, because of the extra power supply, this will be less efficient that using resistors.



gully.moy said:


> So would a FET produce PWM? The reason I chose a BJT is that I read that they were current controlled and I know how to control current. I'm not sure how to control voltage without transformers to give a varying output current. Any hints on how I could substitute for one?



PWM simply means you turn something on and off rapidly, and you control some value by changing the ratio of on time to off time. I once watched a video of Gordon Ramsay (very famous chef) showing how to cook scrambled eggs. He was taking the pan off the burner, putting it back. Off, on. Off, on. He was essentially using PWM to control the cooking of his eggs. When I cook my eggs, I don't use PWM, I use DC. I turn the knob on the burner control to where I know it will produce the temperature I want, and I leave the pan on the burner. Obviously, I don't produce the same result as the world famous chef.

In electronics, for PWM, you need a 'switch' element, something that can be turned on and off. And you need a 'control' element, which turns the switch on and off. The switch is almost always a transistor, either BJT or FET. There's also a hybrid called an IGBT that's more common in higher voltages. The control is often a microprocessor, but can also be a simple timer circuit. Either of these can use a potentiometer or other device as an input to tell it how to control the PWM.

For DC control, you still need a control element, but the other part is more commonly called a 'pass' element. Guess what we use for the pass element? Transistors! BJTs and FETs! But now instead of turning them on and off we use them in that in-between area where they aren't really on, and aren't really off. This is called the 'active' region. The current gain of a BJT is only applicable in the active region. In the ON state, we talk about Vbe(sat). In the OFF state it's, well, just off. In the active region, it has a gain. An FET doesn't really have a gain (technically, it has transconductance), because the voltage on the gate controls the resistance between the source and drain. But it has ON and OFF states, and an active region in between.

Because of the similar but not identical behavior of BJT's and FET's, the control elements used for them can be pretty similar or pretty different. Some of the things that work for BJTs don't for FETs, and vice-versa. In your BJT diagram you used the variable resistor with only two terminals. This is often called the 'rheostat' configuration, and it's appropriate as you used it, to control current. In your FET diagrams you show three terminals connected, one to power, one to ground, and one as an output. This is the 'potentiometer' configuration, and is also appropriate as you used it, to control voltage.

While the active region of a BJT can cover several orders of magnitude of base current with good linearity, predictability, and repeatability, the active region of a FET can cover as little as a volt or two on the gate. And unlike the BJT, the characteristics in the active region are usually highly non-linear, not well characterized, and not very repeatable. So unlike BJTs, FETs don't lend themselves well to very simple control circuits like the variable resistor. But add an amplifier and some feedback, and the FET can really shine (pun is accidental).


----------



## gully.moy (Jan 30, 2015)

Thanks a lot, that's cleared quite a lot up for me. For some reason I thought that transistors controlled current by stopping and starting it, but I see now that I must have got confused about when that is applicable.

I'm not too worried about how linear the control is and I think I could come up with a set of resistors + pot which varied the gate voltage by around 1v, so I think I'll just give that a go and if I'm not happy with the results I'll go from there.

Just to clarify, if I ended up going for PWM the current control element of the circuit would be more efficient and the CRI would be maintained more accurately. But would I be correct in assuming that because the LED is always driven at full current when on I'd be missing out on the extra lumens / watt that you get from running an LED on a lower DC current and the prolonged life of the unit per lumen emitted?


----------



## DIWdiver (Jan 30, 2015)

gully.moy said:


> Thanks a lot, that's cleared quite a lot up for me.



You're welcome.



gully.moy said:


> Just to clarify, if I ended up going for PWM the current control element of the circuit would be more efficient and the CRI would be maintained more accurately. But would I be correct in assuming that because the LED is always driven at full current when on I'd be missing out on the extra lumens / watt that you get from running an LED on a lower DC current and the prolonged life of the unit per lumen emitted?



If you are talking about running all your LEDs on the same PWM, yes that's all correct. Except you still get some (but not all) of the extra life based on running at a lower average current. I don't have hard numbers, but I'd guess you get most of the extra life.

However in the situation where you have one LED that's always on and one that's PWM controlled, it's a little different. The one that's PWM controlled acts like any other PWM controlled LED. But the other one is different, because the current through it is bouncing back and forth between two current values. So you have some of the effects of both PWM and DC control.


----------



## gully.moy (Jan 31, 2015)

DIWdiver said:


> At any given setting, the transistor will have voltage across it and current through it. This results in power loss in the transistor, reducing the efficiency. Using Ohm's law (V = I*R) you could calculate an effective resistance. The power loss and impact on efficiency will be the same whether that comes from a transistor or an actual resistor.


Right, I've just managed to get this into my dense skull. For some reason I thought that transistors controlled current without as much resistance. So now I see why there is no efficiency gain to be had using transistors over resistors. I think again it's from reading about transistors in PWM circuits and not realising it was PWM.

So presumably without having control on both LED branches of the circuit, changes in the their internal resistance due to heat would effect the current balance? And that's where feedback would be handy?

So actually I think I'll have to work out a good PWM circuit after all, or just use resistors.


----------



## gully.moy (Jan 31, 2015)

gully.moy said:


> So presumably without having control on both LED branches of the circuit, changes in the their internal resistance due to heat would effect the current balance? And that's where feedback would be handy?
> 
> So actually I think I'll have to work out a good PWM circuit after all, or just use resistors.


Hold on, let me get this right...

Say I was using just resistors and wanted to control the current and account for any changes in the internal resistance of the LEDs due to inevitable heat changes. To do this I need resistors in both LED branches to make their internal resistance change negligible. I could then have a rheostat in one branch on top of the fixed resistors to give me control. So I'd need a lot of resistance and therefore a lot of wasted power.

If I used simple current control with transistors, like my above circuits, I'd have the same problem with the LEDs' internal resistance and therefore the same power wastage.

If however I used active current control with transistors using a feedback loop, I could control the current accurately from one branch. Instead of having to override resistance changes in the LEDs with more resistance, the transistor could act as an automatic rheostat, tweaking itself to maintain an equal current in its branch as the LEDs' internal resistance changes! Still less efficient than PWM, but significantly better than resistors all the way as outlined above...

Does that make sense DIW? Is there an efficiency advantage in active transistors over resistors when taken into account the extra resistors needed to maintain a constant current under varying conditions?

I think I first got the idea that transistors could be more efficient from a web page which was trying to describe this.

Thank you for your continued patience, I appreciate that I am a bit of a slow student.


----------



## more_vampires (Jan 31, 2015)

gully.moy said:


> Say I was using just resistors and wanted to control the current and account for any changes in the internal resistance of the LEDs due to inevitable heat changes.



It doesn't work that way, resistors have a set and unchanging ohm value unless they burn open or short with melted solder (or similar.) They are not a "reactive component."

Accounting for changes in the LED resistance requires reactive components. A reactive component changes properties based on what's going on in the circuit. They respond to waveforms and can do some pretty strange and interesting things. An LED is, itself, a reactive component. It does not have a set resistance. The electronics word for this is "reactance."

Using only resistors will provide no regulation. That is to say that the light will fade as the battery drains, as the LED gets hot or cold, etc. Limit resistor only does not and cannot account for any change in LED *reactance.* LED is a diode and a reactive component. Resistors are linear, LED is not.



gully.moy said:


> So I'd need a lot of resistance and therefore a lot of wasted power.



Not quite. Think of your garden hose and faucet. Simple resistance is like closing the valve and reducing flow. LED is like the water pressure changing and limit resistors are like leaving the faucet valve at one setting and never changing it.

Limit resistors can be quite efficient, but with limit resistors alone they will not provide real regulation as far as constant brightness or any kind of reactive control.

To my knowledge, PWM cannot be implemented with resistors alone. I'm half expecting DIW to correct me.


----------



## SemiMan (Jan 31, 2015)

Sorry no. LEDs and transistors are not reactive and don't have reactance. That would be inductors and caps which except at high frequencies for all intents and purposes diodes and transistors do not.


----------



## more_vampires (Jan 31, 2015)

Thanks sir. Slip of the keyboard. If we don't talk about these things and reason them out, we'll forget!

Saturation and cutoff.


----------



## SemiMan (Jan 31, 2015)

more_vampires said:


> Thanks sir. Slip of the keyboard. If we don't talk about these things and reason them out, we'll forget!
> 
> Saturation and cutoff.



Slip of the keyboard? Saturation and cutoff? ... huh? .... quit while ahead.


----------



## gully.moy (Feb 1, 2015)

more_vampires said:


> It doesn't work that way, resistors have a set and unchanging ohm value unless they burn open or short with melted solder (or similar.) They are not a "reactive component."



Yeah I get that. Perhaps "account for" wasn't the perfect choice of words. If you read the paragraph I'm just talking about choosing high value resistors which just render any change in the LEDs internal resistance negligible. I understand that it is passive control, not active.

The power wastage would come from pumping a lot of current through a lot of resistors. The current through them x the voltage drop across them will be wasted Watts.

And I'm not trying to achieve PWM with resistors either.


----------

