Skip to content
HOW TO: Drive multi...
Clear all

HOW TO: Drive multiple LEDs (the right way)

1 Posts
1 Users
0 Reactions
Posts: 476
Topic starter

One of our members asked how to drive several LEDs from a low voltage supply (perhaps as low as 3V).

The obvious way to do it (and method they found on YouTube) is to wire the LEDs in parallel with small current limiting resistors.

Recall that the Vf of a typical red LED is about 2.2 volts but let's say I want to drive four of them at 10 mA a piece.

Let's do it the wrong way:

3v - 2.2v = 0.8 volts

So that means we have to limit the current to 10 mA with a voltage drop (across the resistor) of 0.8 volts. From Ohm's law:

0.8 / 0.01 = 80

Pretty easy and we might just stick 100R (a nice easy value) in there and be done with it.

Now add one more in parallel and see what happens (I've forced the simulator here to show the effect).

The actual result is unpredictable - and is dependent on the internal resistance of the supply (this matters more with batteries) but mostly on the individual LEDs because one will invariably nick most of the current! You can get away with this of course but it's not a professional solution and in a battery powered device it's going to create all manner of problems. Simulators (LTSpice, Falstad, etc.) don't simulate this by default so just because it looks right in a sim, doesn't mean it will work in real life.

El-cheapo LED torches work like this with the result that the LEDs often start to burn out because they are all trying to run at max brightness. Smart LEDs (like the multi-coloured ones) have their own circuit to dodge these issues but let's assume we're using infra-red diodes that we don't want to destroy and since we can't see how bright they are (except using a digital camera) it's better to keep the current the same.

The traditional solution (certainly the easiest one) is to wire LEDs in series. In this case the voltage drop across the whole "string of beads" is the sum of the voltage drops across each LED (*around* 2.2V). 

So with a 3V supply how are we going to drive FOUR LEDs?

Even just two of these is a voltage drop of 4.4V and while the LEDs might glow a little due to leakage, they won't operate predictably. 

In fact, why don't we make this interesting by making the supply voltage variable! This applies in battery circuits all the time. A typical 9V battery has six 1.5v cells in series and as they discharge with use the voltage drops and drops. But we can't have a circuit that dies just because the battery drops off a bit. We want this to run from 9v all the way down to the point where the battery is exhausted.

In this simulation I've made the supply range from 6 - 16 volts. The reason for this is to keep things a little simpler but the same things apply:  

When the simulation starts you'll note the green trace which is the power supply wavering all over the place - but there are probes at specific points in the circuit proving that all three diodes are different with voltage drops of (around 1.8, 2.5 and 0.6) respectively but then look at the current... flowing in each one - around 10 mA and it hardly varies even though there's no resistor there to control each!

The Programming Current

This is based on some circuit blocks called a current sink (formed with the 5v6 Zenner and NPN transistor).

The Zenner sets the base voltage at 5.6 volts. 0.6 volts is dropped (lost) over the base-emitter junction which means we can program the voltage at the emitter.

And if we can program the voltage we can use Ohm's law to set the current flowing through that transistor! Hence a 500 R resistor from emitter to ground gives us 10 mA

5v / 500R = 0.01

Which is all fine and nice... but how to use it? That's what the PNP transistors above it do.

The first one is wired as an active diode (collector and base shorted) but this junction has an interesting property if we connect other transistors to it... the current flowing in the active diode is "mirrored" in the transistors that follow it. Note they are wired conventionally, something that's difficult to see in this sim.

Very low voltage Zenners are less common but you can dodge that using anything from a forward biased LED (another cheap trick) or even several silicon diodes wired in series - three is typical here.

A resistor divider doesn't work unless the supply is rock solid; something you don't get in a battery powered device. Simulators tend to fool us into thinking things will work when they won't but simple circuits like this usually reflect real life.

Horowitz and Hill (Art of Electronics) sum this up as "it's all done with mirrors". These blocks are used in operational amplifiers so the device can operate over a huge supply range and still operate predictably. One current source/sink programs every current in the device to predictable value. Better still (for an IC) the transistors are "intrinsically matched" because they share the same piece of silicon. In real life with real discrete parts there is more variance but it's usually minimal with good design. 

How Does the Mirror Work?


Here's a close up of one side of the "mirror" (wired as a diode with current flowing from the supply through the emitter-base junction. 

Ready for the clever bit?

The current flowing from collector to emitter (NPN) or emitted to collector (PNP) is determined by the current at the base multiplied by the "beta" or gain of the transistor which is 100 in this example, so 100 uA flowing in the base-emitter circuits gives us 10 mA. 

So how does the transistor "know" how much current it needs? It doesn't - that current is nailed down by the current sink discussed above. Within the limits of the compliance (the voltage range where it works) the current at the collector is always 10 mA.

And here's the reason you don't ever rely on beta as good indicator because it varies with each device, the voltage and current in the circuit. But wait - doesn't that mean if the transistor's beta is variable doesn't the current change?

Say the transistor had a beta of 300 - what then - doesn't that mean a current of 30 mA?

It would normally but because the current is already set somewhere else, the transistor's BASE current is set by the current in the Collector-Emitter circuit. It literally doesn't matter - we've used the semiconductor effect to force the transistor to set its own base current.


Take a closer look at the mirror in isolation with it's programming current and things get a bit clearer.


The PNP transistor circuit highlighted in blue, is forced to supply 10 mA (approximately) because the collector of the NPN transistor is going to keep on yanking at it until it does (this happens effectively instantly in reality).

At first glance you might think, "that can't work" but it does because there are already charge carriers in the circuit - they're just "sat there" until we switch it on,

The voltage on the collector of the NPN transistor will pull as hard as it can until the transistor saturates at about 0.2v but the PNP transistor's base is wired directly to the collector. For 10 mA to flow in that circuit it supplies exactly enough current divided by the transistor's beta to the base.

Since everything is tied to together, the current flowing through the base is determined by the collector current and the collector current is determined by the collector. It's a negative feedback loop.

Now we have our BASE programming current we can copy that into lots more transistors which

Now that we have enough base current to supply 10 mA we can connect that base to any number of identical transistors and they will "mirror" that value. Remember we don't need (nor care) what the base currents are - we just let the circuit figure that out. 

If this went over your head the first time, don't worry, it's a difficult concept to grasp because lots of things happen (apparently) at the same time. At some level of inspection (likely in the picosecond range) we might see this going on but there's no need to go that far.

This topic was modified 1 month ago by marcdraco

Take everything I say with a pinch of salt, I might be wrong!

Posted : 05/05/2024 2:23 pm