# How to use transistor as a variable Regulator?

#### umesh057

Joined Apr 25, 2022
2
I'm designing a variable power source from 5V to 30V with 600mA. Input voltage is VIN = 36V. I tried the below circuit.

VREF is given from microcontroller DAC.
I tried using N-MOSFET, P-MOSFET, NPN, PNP (with modifications). I set a the output voltage as 20V. This circuit works fine with no load, required voltage is received in the output. But when I tried to give a load of 100mA, the transistors begin to heat very much. I cant even reach 300mA of load. Please assist me to get rid of the heating issue.
The Transistors I tried are TIP127, TIP122, IRF540, IRF9540

#### BobTPH

Joined Jun 5, 2013
8,998
To go from 38V to 20V at 100 mA, the transistor will dissipate 1.8W . That is too much without a heat sink. It gets worse. At 5V and 600 mA it will dissipate 20W. You need a massive heat sink and possibly a fan to do this.

Bob

#### panic mode

Joined Oct 10, 2011
2,757
that is a common characteristic of all linear regulators since they burn excess power. and it gets worse the higher the load current is and greater voltage difference is (Vin-Vout).

load using 5V and drawing 600mA consumes 3W (P=V*I=5V*0.6A).
but the regulator need to pass the same 600mA current and still take the heat for all excess voltage.
at 36V input that means that transistor will need to handle (36V-5V)*0.6A=31V*0.6A = 18.6W.
that is on pair with some soldering irons.

unlike linear regulators, switching regulators use storage element (L or C or both) and can bridge that big voltage difference with much less losses. they do not operate continuously, they use correct timing to correctly switch on/off the connections of storage element. it is more complex design that produces more ripple but it is far more power efficient.

so in some cases a combination of both switching and linear regulator is used (even for adjustable one like in lab PSU, that is called tracking regulator). switching regulator is used as pre-regulator (basically DC transformer) which produces output just couple of volts higher than needed and then linear regulator takes care of the difference making for really smooth output.

Last edited:

#### Papabravo

Joined Feb 24, 2006
21,226
The solution to your problem is to build a buck regulator. They are very efficient

#### BobTPH

Joined Jun 5, 2013
8,998
The solution to your problem is to build a buck regulator. They are very efficient
But requires a different skill level. Probably better to buy one.

Bob

#### Ian0

Joined Aug 7, 2020
9,842

Without any compensation, this circuit will be unstable. Just add a choke and a Schottky diode, and the odds are it will turn itself into a buck regulator (though perhaps not a very good one)

#### Irving

Joined Jan 30, 2016
3,896
As @BobTPH says, you need a heatsink. Even with a buck regulator a small heatsink may be needed. Knowing how to size a heatsink is something all EEs should know.

To size the heatsink you need the maximum junction temperature Tj(max) and the thermal resistance junction to case Thjc from the device datasheet. The latter tells you how much the temperature rises per watt of power.

For most TO-220 cased devices this will be typically 150°C and 0.15°C/W, however we never run things as hot as possible so we will use 130 °C to give a safety margin.

You can think of thermal resistances like electrical ones, they follow similar rules, where temperature change ΔT is akin to voltage and heat flux in Watts akin to current
. So ohms law is V = I*R and the thermal equivalent is ΔT = heat flux * thermal resistance.

Thermal resistances add in series, and there is a thermal resistance from the device case to the heatsink Thcs (thermal compound, typically 0.2°C/W) and from the heatsink to the ambient air Thsa, so the total thermal resistance junction to air is
Thja = (Thjc + Thcs+ Thsa).

From the junction to the ambient air, the temperature differential ΔT must be less than 130°C - 30°C = 100°C, for a power (heat flux) of 20W and therefore

ΔT = 100 < 20 * ( Thjc + Thcs+ Thsa ) or < 20 * (0.15 + 0.2 +Thsa)​
so the Thsa of the heatsink must be < 100/20-(0.15+0.2) or < 4.6°C/W

Something like the below would be good for a maximum disspation of 20W.

#### Papabravo

Joined Feb 24, 2006
21,226
But requires a different skill level. Probably better to buy one.

Bob
No argument there. Choosing and designing an adequate heatsink is also an uncommon skill for most as well.

#### Ian0

Joined Aug 7, 2020
9,842
No argument there. Choosing and designing an adequate heatsink is also an uncommon skill for most as well.
Realising that a heatsink may be required is the first step, and plenty of folk fail at that stage.

#### crutschow

Joined Mar 14, 2008
34,462
When I built my dual-output linear lab supply way back when, I mounted the series pass transistor heat sinks on the outside back of the chassis to have unimpeded air flow to the sinks.

#### ronsimpson

Joined Oct 7, 2019
3,043
If I was building a bench supply and I had 36V, then link

#### DickCappels

Joined Aug 21, 2008
10,187
Following the procedure in @Irving 's post (#7 above) will tell you how many °K/Watt your heatsink needs to be. You can then go through a heatsink manufacturer's catalog and get an idea of what such a heatsink looks like, and that should help you choose the right heatsink from those available or you will know which one to order from the distributor.

I found that an LM317-T and LM337-T using the metal chassis as the heatsink covered the vast majority of my needs, most of which are very low power, and higher voltages and powers could be thrown together quickly. Been using one of two of those since the late 1970's.

#### Irving

Joined Jan 30, 2016
3,896
Interesting to see the differing comments. Personally I'd not want to stop someone experimenting. There's nothing wrong with a linear regulator and its still a fundamental building block even if limited to the adjustable 3-terminal IC solution. My venerable Tenma 72-6905 32v/6A 4-channel linear bench supply c1990 is still going strong, yet without a knowledge of linear power supply operation and techniques I would not have been able to fix it when I lost a channel a couple of years back. And as we've seen, its a good first introduction to power dissipation and heatsink selection.

Fixed output buck converters are very simple to design and build, but a variable one is a very different kettle of fish and definitely not for the beginner.

#### umesh057

Joined Apr 25, 2022
2
Thanks for all your replies, Specially to @BobTPH and @Irving

we can't use buck convertor or Linear Regulator because we need to generate a signal with different level of voltages (refer Attachment). Adding capacitor or an LC in the output will collapse the output signal.

Please suggest a method to generate this signal. Load will consume approx. 100mA at 5V and 450mA at 20V and 600mA at 30V. previously we are using two regulators to generate 5V and 20V and three MOSFET to switch to required output. But now we have to change all the voltage level as variable like mentioned in this post

Joined Feb 20, 2016
4,478
You can indeed use a buck regulator and the circuit you are proposing IS a linear regulator.
But a linear regulator may be the easiest for you to make, and you will have to just allow for the excess heat.

Joined Feb 20, 2016
4,478
How many voltages do you need? Will it be variable or just set levels?
You could use an LM317HV (not LM317) with FET switched resistors to do your job. Once again, on a good heatsink.

#### Ian0

Joined Aug 7, 2020
9,842
How many voltages do you need? Will it be variable or just set levels?
You could use an LM317HV (not LM317) with FET switched resistors to do your job. Once again, on a good heatsink.
Exactly what I thought: Use 2N7000 FETs to switch the lower resistors.
Use as small an output capacitor as you can get away with, otherwise the changes in voltage will be rather slow.

#### DickCappels

Joined Aug 21, 2008
10,187

From the ST Microelectronics LM317 datasheet. If you use bipolar transistors like those shown here you will need to add a resistor in series with the base to limit base current. If you use a MOSFET like the 2N7000 mentioned by @Ian0 in post #17 you won't need resistors in series with the gate.

#### Papabravo

Joined Feb 24, 2006
21,226
Thanks for all your replies, Specially to @BobTPH and @Irving

we can't use buck convertor or Linear Regulator because we need to generate a signal with different level of voltages (refer Attachment). Adding capacitor or an LC in the output will collapse the output signal.

View attachment 270662
Please suggest a method to generate this signal. Load will consume approx. 100mA at 5V and 450mA at 20V and 600mA at 30V. previously we are using two regulators to generate 5V and 20V and three MOSFET to switch to required output. But now we have to change all the voltage level as variable like mentioned in this post
Was there a reason that you did not mention this particular requirement in your original post?
In any case, you're still going to need a heatsink.

#### ronsimpson

Joined Oct 7, 2019
3,043
Adding capacitor or an LC in the output will collapse the output signal.
??You need to go from 20V to 30V and back in well under 200uS?? What is the rise/fall time you require? I think you need to make a 20V more in less than 20uS.
I think you need a 35V 500mA power amplifier.
You did not say what the load is? I see the circuit needs to pull up but does not need to pull down? Is the load like a heating element? Does the load have capacitance or inductance that must be fought?

Think about a 35V supply and a 32V 600mA load. delta V=3V heat 3 X 0.6
35V-20V=15V, 15V x 450mA = heat.
35V-5V= 30V, 30V x .1A = 3 watts.

Last edited: