# High side NPN for current control of adding LED

#### Wolframore

Joined Jan 21, 2019
2,577
Here’s an interesting circuit. By using NPN for high side in emitter follower I’m able to add current to circuit as led are added. Due to the parallel resistance of the led the voltage sags as more are added. So limited to 1-3 LED would give acceptable results.

What I want to do is have the current go up linearly and have the circuit at 18 mA each time an led is switched on. Currently it starts at 18mA and drops to 15mA by the 3rd led. Which isn’t bad. But can we get perfect?

What is happening is that it starts to sag a little. Can anyone see how to keep the current consistent on each led as it’s being added?

Last edited:

#### Zeeus

Joined Apr 17, 2019
616

How about add a Zener diode in parallel with the 3 stuffs. Will work?

#### Wolframore

Joined Jan 21, 2019
2,577
@Bordodynov that is beautiful. It is a fun design.

#### MisterBill2

Joined Jan 23, 2018
13,139
It is not totally clear toe just what you are hoping to achieve. Is it to hold the current constant at 18Ma as each additional LED is switched in? (and have the circuit at 18 mA each time an led is switched on.) or is it to (I’m able to add current to circuit as led are added.) increase the current by 18 Ma as each LED is switched in? What is the goal, or purpose? To have the current increase with each LED added the solution is to remove the transistor and connect the switches directly to the +5 volt source. To maintain a constant current you need a current regulator circuit, which the circuit in post #1 is not a very good constant current regulator.

So really a statement of the purpose, and a clarification, are needed.

#### Wolframore

Joined Jan 21, 2019
2,577
Ok still needs work... sorry if the function of the potentiometer was not clear... The poteniometer provides dimming on the LEDs.

Mr Bill - want to increase current by 18 mA as LED are added but also be able to control the sum current on the system with a poteniometer.

Yes just voltage is easier but no good way of controlling dimming other than PWM. Which means more pins for the adjustment.

#### ElectricSpidey

Joined Dec 2, 2017
2,161
You can get better results if you change the pot to a divider across the positive and negative rails and hook the base to the center tap.

The result is a simple emitter follower, with half decent load regulation, but no line regulation.

#### Wolframore

Joined Jan 21, 2019
2,577
Thanks @ElectricSpidey... it does improve the dimming

@Zeeus - your zener idea works but concerned about efficiency. Good thinking though!

By putting in a zener at 3V I am able to regulate the voltage drop better... it does burn off quite a bit of current and actually caps the current for the full load and if not being used by LED zener shunts it... so it's no longer regulating through the transistor because it drops the emitter voltage lower.

#### Bordodynov

Joined May 20, 2015
3,012
See

#### Wolframore

Joined Jan 21, 2019
2,577
@Bordodynov - this is very good... it's almost perfect...

#### ElectricSpidey

Joined Dec 2, 2017
2,161
Might as well just use a regulator.

#### Wolframore

Joined Jan 21, 2019
2,577
you might be right spidey... but I'm thinking multiple channels on a small board... it is kind of a voltage regulator.

#### Wendy

Joined Mar 24, 2008
23,053
Part of the problem is you are using a regulator design that is soft and does not regulate well. If you replaced the transistor design with a solid state regulator that can go to zero volts you would get better results. A Sziklai Pair is a super gain transistor (Similar to a Darlington pair that should provide better regulation. Unlike a Darlington, its B-E equivalent only drops .7 volts(silicon).

Give me a little time and I will post an updated schematic.

Last edited:

#### Wendy

Joined Mar 24, 2008
23,053
Part of the problem is the input resistance of the transistor ground is a function of RLOAD x β. So by increasing the gain of the transistor or decreasing the resistance of the variable resistor the regulation is improved accordingly.

You could have another issue, both Sziklia pair and darlington pair drop 0.6volts at saturation. So 3.5volts (LED) + .6volts (transistor) =4.1volts-5volts (power supply)=.9V, not too much power supply headroom to play with.

Took me a while but I finally wrapped my head around this circuit and the problem.

Last edited:

#### Wolframore

Joined Jan 21, 2019
2,577
I believe that’s what @Bordodynov drew. I just didn’t know the name for it. You guys are amazing wealth of knowledge and smarts.

#### MisterBill2

Joined Jan 23, 2018
13,139
OK, I think. You want to increase the current in steps of 18.0mA and also vary the current with a variable control, which will change the current as the light output from the LEDs is varied. Is the purpose to have an 18.0 mA steps current reference or is it to have variable brightness LEDs?? Or is the whole package supposed to only draw 18mA? Use a 78L05 voltage regulator with a resistor connected between the output and the common terminal, a resistor to drop 5.00 volts at 18 mA and there is your regulated current, as may of them as you want. And then have one more, with a variable resistor, for your adjustable current. If you want to dim the LEDs without changing the current that is easy and simple, just put a variable resistor across the LED and it will share current with the variable resistor but the total current will be unchanged. While others have locked in on some assumption of the goal I still find the requirements conflicting. Stepping the current or having it variable??

#### Wolframore

Joined Jan 21, 2019
2,577
Thanks for my new toy. Wow the Sziklia pair is amazing. Kind of like Darlington but I like the linearity and symmetry to it. It actually does a decent job of regulating voltage. 0.6 drop out isn’t really bad as far as regulators go. Especially compared to 1.2v drop on Darlington. For something low power this is pretty effective with low part count.

I’m trying different things with it.

Easy to saturate but nice gain.

Also reading up on it and apparently they use it for output stage of power amps in AB mode up to 100 watts.

#### Wolframore

Joined Jan 21, 2019
2,577
Thanks Mr Bill. That is definitely a valid and stable option for increasing current as you add LEDs. It’s kind of an interesting problem that may end up becoming a regulated power supply in the end. Just wondering how easy it is to achieve with limited components.

This Sziklia pair is pretty interesting.

I’ve been exploring feedback circuitry to make it perform better but @Wendy is right. There is very little overhead using 5v.

Sometimes I feel the same about CMOS. Just get a microprocessor it will be accurate do what I tell it and lower part count. I’m here instead of Arduino forum because I enjoy the challenge and trying to understand better analog circuitry.

Thanks for being patient.