3x3 LED Circuit with POT for Dimming Help

Thread Starter

tycoad

Joined Jan 22, 2025
10
Hi! I had made a simple 3x3 LED array circuit with a pot for dimming and a simple calculation for the resistor. Would someone be able to verify this would work and would all the LEDs be giving the same brightness when powered. I plan to transfer this to a breadboard later today. The Vf for the LEDs is 2.13V and the Amps is 20mA. I also put some volt and amp nodes for values incase that helps. Thank you for any feedback.
 

Attachments

Last edited by a moderator:

Sensacell

Joined Jun 19, 2012
3,769
(1) LEDs are NOT all identical- even from the same batch- they will not share current equally, resulting is significant brightness variations.
(2) A simple POT will provide a very unsatisfactory level of control.
(3) The power dissipation of the pot will be large- a standard pot will burn out- you would need a high power rheostat - these are expensive and hard to find.

Start over- use PWM.
 

WBahn

Joined Mar 31, 2012
32,706
Hi! I had made a simple 3x3 LED array circuit with a POT for dimming and a simple calculation for the resistor. Would someone be able to verify this would work and would all the LEDs be giving the same brightness when powered. I plan to transfer this to a breadboard later today. The Vf for the LEDs is 2.13V and the Amps is 20mA. I also put some volt and amp nodes for values incase that helps. Thank you for any feedback.
You don't want to put LEDs in parallel and don't want to put strings of LED in parallel even more, unless each branch has it's own current-limiting resistor. Each LED will be slightly different, and so one string will take more current than all the others at a given voltage across it. This can lead to current-hogging and thermal runaway.

In addition, each LED will give off a somewhat different amount of light even at the same current. Whether the difference is enough to be relevant depends on what you are using it for and what matters for your application.

On paper, your pot will let you limit the current down from your nominal 60 mA. You'll want to consider the power dissipation in your pot, as well. Your max power dissipation will occur with the pot is the same as your fixed resistor, which will give you 30 mA through 95.3 Ω, or about 86 mW. That should be too much of a problem as small multi-turn trimmer pots are frequently rated for 300 mW or so.

You may find that a 1 kΩ pot does one or two undesirable things. When you turn the light all the way down, it might still give off too much light for you. Or, you might find that it dims too quickly as you turn the pot, making it hard to adjust the light to the amount you want. It's possible for both things to happen, as well. If that turns out to be the case, you might be able to deal with it by using something like an audio-taper pot as opposed to a linear-taper one.

A more common way to control brightness is using pulse-width modulation (PWM). A 555 timer IC (which is pretty easy to use) would likely meet your needs just fine.

Another way to do it is to use a NPN transistor in each string with a ballast resistor between the emitter and ground. Then use your pot to control the voltage on the base of the transistors. This would also allow you to trim each string so that they appear to be equally bright (though the LEDs within a given string might still differ, but you could put the brightest ones in one string, the dimmest ones in another, and the middle ones in the third. That might be good enough for the per-string adjustment to work. Note that you can combine the two methods and use the transistors to control and trim the current and use the PWM signal to drive the bases.
 
This should be much better because the potentiometer isn’t stressed with high current:
Since you have ~6V room (12V-3*2V) from your power supply you can afford to use a transistor voltage source for regulation.
Every column of the Leds have own 220 resistor so the Led currents will be about equal.
IMG_1570.jpeg
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,769
Here is a concept- the current through the LED's will be almost identical, the adjustment will be linear, and the current will go all the way to zero (off).

Linear current change however does not mean linear brightness change.

3883.jpg
 

WBahn

Joined Mar 31, 2012
32,706
Here is a concept- the current through the LED's will be almost identical, the adjustment will be linear, and the current will go all the way to zero (off).

Linear current change however does not mean linear brightness change.

View attachment 342315
This is exactly the topology I described above.

A tweak would be to put a fixed resistor below the pot so that the lowest voltage out of the wiper is around 400 mV. This removed most of the deadband.
 

Thread Starter

tycoad

Joined Jan 22, 2025
10
Here is a concept- the current through the LED's will be almost identical, the adjustment will be linear, and the current will go all the way to zero (off).

Linear current change however does not mean linear brightness change.

View attachment 342315
Thank you for the help. One question tho, would there be any other transistors I can replace for the 2n4123. Those are not easibly obtainable for me if I were to test your concept on a breadboard, which I'd like to do
 

Thread Starter

tycoad

Joined Jan 22, 2025
10
alright thank you. Also, say I wanted 7 more columns of 3 leds (so a 3x10), would I do the same layout, add a transistor to each column, and adjust the values of the pot and resistors?
 

WBahn

Joined Mar 31, 2012
32,706
alright thank you. Also, say I wanted 7 more columns of 3 leds (so a 3x10), would I do the same layout, add a transistor to each column, and adjust the values of the pot and resistors?
Yes, though there is definitely a limit at some point. And a correction -- you only need a transistor that can handle the current in its column, plus reasonable overhead. You also should consider power dissipation, but that shouldn't be an issue in this case. Still, let's see how that would be done in case you need to change things in the future.

Let's use an 2N3904.

Let's otherwise keep things generic. Assume we have Vcc (12 V in this case) and our nominal LED forward voltage, when on, is Vf (2.1 V in this case) with an intended max current of If (20 mA in this case).

Let's say that we put N LEDs in each string and we have M such strings (and NxM array, with N=2 and M=10 in this case).

Let's say that we want our max current to be reached when the Vce of the transistor in a string is 1 V, which puts it conveniently at the place where most of the hFE values in the datasheet are spec'ed, plus gives it some additional room for adjustment, while keeping the total current limit not too much above the desired max current.

1739323187314.png

We see that the minimum gain at Ic = 10 mA and Vcc = 1 V is 100, while at Ic = 50 mA it is 60.

If we look at the typical gains at Vce = 5 V

1739323306577.png

We see that at 20 mA, the current gain is typically over 200. We could probably use 100 as a good design choice, but going with worse case, let's use 60. I like to hedge, where possible, so let's actually use 50 for our calculations.

If we want our strings to have If when Vce = 1 V, then the emitter resistor needs to be:

Re = Vr / If = [Vcc - (N*Vf + Vce)] / If = [12 V - (3*2.1 V + 1 V)] / 20 mA = 4.7 V / 20 mA = 235 Ω

To give some adjustability, we might use a 220 Ω fixed resistor and a 50 Ω pot in series.

Note that this calculation assumes that the average Vf of the N LEDs in a string is 2.1 V. It would be best to take into account the min/max Vf values from the LED datasheet.

At this current, the voltage on the base of the transistors will be about 5.4 V (Vr + Vbe, and assuming Vbe is about 0.7 V, which is going to be pretty close).

Our base current is going to be less than If / hFE per string, so our total current needed for all of the transistors is going to be

Ibtot = M*(If/hFE) = 10 * (20 mA / 50) = 4 mA

It will almost certainly actually be between 1 mA and 2 mA.

Ideally, we would like the current in our bias resistors (the resistors and pot that set the base voltage) to be at least 10x the max current that the load might need, or about 40 mA in this case. But that's going to be about half a watt being dissipated just in these resistors, so let's add another transistor, Radj, to bring that current down another factor of 50 (and, in reality, probably quite a bit more), meaning that we only need our bias chain to deliver 40 µA, so the bias chain can easily live with 0.4 mA of current, which we will shoot for an even 1 mA.

To get 1 mA from 12 V, we need a total resistance of 1.2 kΩ, which is made up of three parts -- the upper bias resistor, Rub, the lower bias resistor, Rlb, and the pot, Rpot. In the attached schematic, I've represented the pot as two resistors, the portion above the wiper and the portion below the wiper. I just don't have a pot part right now.

Next, we need to determine our desired limits for the output of the pot. To turn the LEDs off, the base to Qadj needs to be below 2 Vbe. To be on the safe side, we'll take this to be Vbe = 500 mV to ensure that the transistors are adequately "off". So the lower voltage limit is 1 V. That merely needs a 1 kΩ resistance for Rlb.

For the upper limit, we need to allow for a higher-than-typical Vbe, which we'll take to be Vbe = 800 mV. That means that our upper limit is (4.7 V + 2*0.8 V) = 6.3 V. That's a drop of 5 V across Rub, which would need a 6.3 kΩ resistor. We'll use a 6.2 kΩ resistor, since that's a standard size.

That means that we need a pot that is 4.8 kΩ, which we are unlikely to find. We can talk about how to tweak things to get close to what we want later. For now, we'll assume that we find one of these.

R adj is there to limit the base current in the string transistors and also to shift heat away from Qadj, though at the currents it will be supplying, that's not much of a concern.

We know that our maximum needed base current is about 4 mA and that the base voltage of the string transistors at that point will be about 5.4 V. If we want to keep Vce at 1 V here, too, then that means we need to drop the remaining 5.6 V across Radj when it has 4 mA flowing in it, so it needs to be 1400 Ω. Both 1300 Ω and 1500 Ω are standard E24 values, but 1500 Ω is also in the E12 sequence, which I prefer to use whenever possible. In this case we would normally want to go with a lower resistor, but we've been conservative enough with our numbers that we can almost certainly use 1.5 kΩ with no problem.

Here's a schematic with the various values that have been discussed (though it only has three strings). Also, the LED model was chosen at random. I don't have decent color-specific models that give me the Vf values I want. I don't use pots and LED in the kind of simulations I do, so I've never gone out and found the proper model libraries.

1739327394504.png
 

Sensacell

Joined Jun 19, 2012
3,769
Why make the emitter voltage so large? it's a current sink, give it some headroom to regulate the LED current.

If you keep the emitter voltage low, the circuit will work with any color LED- infrared to Blue without adjustment.
 

WBahn

Joined Mar 31, 2012
32,706
Why make the emitter voltage so large? it's a current sink, give it some headroom to regulate the LED current.

If you keep the emitter voltage low, the circuit will work with any color LED- infrared to Blue without adjustment.
The goal (which I tried to describe) was to chose emitter resistors that intrinsically limit the LED current to a maximum current regardless of the control input. It also makes the resolution of the adjustability finer.

If you want to change it to work with any color LED, that's certainly possible. As with most engineering situations, these all involve tradeoffs, so it comes down to what is and what is not important for the particular application.
 
Top