Super-Simple Power MOSFET Linear Current Regulator

OddOne

Enlightened
Joined
Mar 5, 2003
Messages
495
I've been using this circuit in my own projects for a while now and it's solid as a rock. So, in the interest of giving something useful back to the community, I present my super-simple power MOSFET linear current regulator.

(NOTE: The text is a duplicate of the article I posted on my LED site, here.)


88x31.png

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.


The most important thing about feeding a power LED is the current flow through the LED. As such a good constant-current supply is a must.

But, building one is a pain.


The easiest known constant-current circuit making the DIY rounds is based on the LM317 voltage regulator. By connecting a resistor across the adjust and output pins and tying its adjust lead to the load, the LM317 becomes a linear current regulator instead of regulating voltage. Two parts and a heatsink and that's it.

The downside is that the LM317 needs at least 3 volts of overhead (the difference between load and supply voltages) to operate this way, and the extra will be converted to heat in the sense resistor and the LM317 itself. This can be exceptionally wasteful if you're working with a low-voltage supply such as batteries. The heat can also be problematic if you're limited on space or cannot provide much of a heatsink.


There is a better way. Presenting, the power MOSFET linear current regulator, inspired by and based on the Instructables post "Circuits for using High Power LED's" by Dan.

MOSFET_Current_Regulator_web.gif


This circuit is about as simple as it gets. So simple, in fact, that adding PWM input support almost doubles the parts count!

Since PWM control is optional, let's ignore the shaded parts for a moment and discuss the actual regulator itself, which uses R1, R2, Q1, and Q2.

The design is elegantly simple. Q1 operates entirely in linear mode and acts as a variable resistor to control current through the load. R1 keeps the gate of Q1 pulled to positive voltage so that Q1 starts up turned on. As the current begins to flow through the load, Q1, and R2, the voltage drop across R2 increases. When the drop across R2 reaches the "knee" or state-transition voltage for the emitter-base junction of Q2, Q2 begins to switch on, and in so doing starts to pull the gate of Q1 to ground. This causes Q1 to increase its resistance, which decreases current flow through itself, the load, and R2, which decreases the drop across R2, which causes Q2 to let Q1's gate float back toward positive supply, which increases the current flow. Within a few milliseconds, the current flow stabilizes around a specific set point determined by the value of R2. Due to the design of the circuit, the required supply voltage overhead is only about 1.2 volts, less than half of what a LM317 regulator circuit requires.

As the value of R2 is based on the transition emitter-base voltage of Q2, calculating it is easy: all you need is Ohm's Law and an idea what voltage to use. Most conventional silicon general-purpose NPN transistors switch fully at around 0.7VDC and start to transition from off to on at 0.56-0.58VDC. Assuming a transition voltage of 0.58VDC and a target load current of 750mA, the math is as follows:

R = V / I

R = 0.58VDC / 0.750A

R = 0.773 Ohms​

Calculating the power dissipation for R2 under normal operation is then a matter of Watt's Law:

P = V * I

P = 0.58VDC * 0.750A

P = 0.435 Watt​

In this case a half-watt resistor will work but a one-watt would have a safety margin of double. The nearest standard value would be 0.75 ohm, which would give an actual limit of ~733mA in the above example. To achieve the same output current from a LM317 circuit you'd need a 1.6 ohm resistor rated for 2 watts, as the dissipation would be 0.9 watt - a loss of over double what we'll waste as heat here!

The circuit's only real disadvantage is that it doesn't fail gracefully - by design, it tries to push as much current through the load as it can as long as the voltage across R2 doesn't exceed what starts to turn Q2 on. So, for increased fault tolerance, the power rating for R2 could be selected based on the worst-case scenario of the maximum amount of available current flow in the event of a catastrophic failure: a short across both the load and Q1. For that, simply calculate dropping the supply power (voltage times current) across R1. It's generally cheaper to simply use a fuse rated for just above the desired current set point, though, as a power supply providing 1A @ 12VDC would require a 15-watt resistor for R2 and this would be far more costly than a simple fuse.

Dissipation through the MOSFET under operating conditions is calculated the same way, only the voltage used in the calculation should be the supply voltage so that the heatsink selection will account for the worst-case scenario of a dead-shorted load at the target current. In the above example, assuming a 12VDC supply and 750mA current limit, the math works out as follows:

P = V * I

P = 12VDC * 0.750A

P = 9 watts​

The IRF520 listed in the schematic is rated to handle 9.2A @ 100VDC, and can dissipate 60 watts, so this part will work perfectly well in this configuration with a modest heatsink.

And now the fault-tolerant approach - dissipation through Q1 with a shorted load. Again, simply calculate the maximum supply power that Q1 will see. If the supply is unregulated and capable of large current flows in short time spans (e.g., batteries), again a fuse would be wise as a last-ditch protective measure against catastrophic failures by blowing the circuit open so it cannot try to short the supply. If the set current is 750mA, a 1A-1.5A fuse in series with this circuit would be a wise, and relatively inexpensive, addition - all the more so for portable projects using lithium batteries, given how these like to catch fire (and for nonrechargeable lithium primaries, explode) when shorted.


The only limiting factors on load current and supply voltage relate to the components - using a suitable resistor for R2, this circuit can easily regulate up to a few amps of current in as little as one square inch of board space. The values shown in the schematic will regulate to ~700mA at any supply voltage from ~1.2VDC to about 40VDC, which is the limit for the 2N3904.


If you need precision, the easiest way to get it is to build a test circuit with a fixed supply (12VDC is a great value, but use the desired or intended supply voltage if there's a need to be precise), a dead short for a load, and a 100 ohm resistor for R2. This will set the current limit to about 6mA. Once the circuit is powered up, measure the drop across R2 to determine the exact transition voltage for Q2, and calculate a specific value for R2 for your current requirements based on the math described earlier.


Now, about that PWM stuff...

The extra parts for PWM support include Q3, R3, and R4 - these are blue shaded in the schematic. Since Q3 is a PNP transistor and R4 biases its base to ground, Q3 starts up turned on and pulls Q1's gate to ground regardless of what Q2 is doing, and this forces both Q1 and Q2 to turn off. R3 limits current draw to the PWM signal source. Provide a positive voltage greater than ~0.7VDC to Q3 through R3, and Q3 turns off, which allows the rest of the regulator to function as described above. In this manner a PWM signal can be used to vary the brightness of a load of power LEDs, or a simple on-off switch effect can be implemented by merely pulling Q3's base to positive supply with a few milliamperes of current. In this manner it would be possible to use the circuit as a self-current-limiting switch that only needs a tiny little low-current button as its actuator even though the load could be an amp or more.


So, how well does it work?

For LEDs, this circuit is the cat's meow in that it's very simple and wastes very little power if the source and load voltages are close enough to each other. Ideally this circuit works most efficiently with the supply being right at 1.5VDC above the ideal load voltage at the set current. Naturally it'll also be crucial to be able to provide at least the set amount of current.

There will be some ripple depending on the type of load being powered, especially during power-up, but decoupling capacitors could be used to compensate for this if it's a problem. The circuit is flexible enough in design that it can be driven directly from any logic circuit (even at 3.3VDC), so this can be a great front end for a microcontroller acting as a lighting controller.

The circuit is load-type-independent, meaning that it will happily drive resistive, inductive, capacitive, or mixed loads. Capacitive loads may well experience slower charge times, as the circuit will clamp the charge current. Inductive loads should be paralleled with a reverse-polarity diode (and in some cases, also a proper snubber capacitor) to suppress any back-EMF from the load when power is disconnected so that the voltage spike won't damage the MOSFET. (Most power MOSFETs include integrated protection diodes, but this should never be relied upon as the sole protection mechanism.)

Amusingly enough, with proper component selection it's possible to use this circuit as the driver stage for a single-ended (e.g., digital/class-D) audio power amplifier, which would make such an amp self-protected against a shorted voice coil or bad capacitor in a crossover network. This has not been tested as of this writing, though, so this implementation is not at all guaranteed. So, YMMV. (Your Mileage May Vary.)

LEDs are an interesting load to drive, in that they want variable voltage at a fixed amount of current, with the voltage being sought as the current reaches the desired amount. If the power supply cannot deliver enough voltage to drive the load at the proper current but does have adequate current capacity, it'll do what it can with what it has. For example, if four series-connected LEDs as a load wanting 350mA @ 11.7VDC total are used, and the supply is rated for 1A @ 12VDC, there's not enough overhead to accommodate the full desired load voltage but there's plenty of current capacity. In that case the circuit will produce a reduced voltage across the load (specifically, Vss - ~0.6VDC, or ~11.4VDC in this example) and the power through the load will seek equilibrium with the load's desired voltage and current; the circuit will seek to and center on the closest match to the set point that it can get the load to accept with the reduced load voltage.

If the power supply cannot deliver enough current to reach the set point, Q1 will go full-on and stay there, the circuit will fall out of regulation and just push as much current as it can get out of the supply. It's important to keep in mind that the circuit is not voltage-dependent, and the voltage through the load will climb almost to Vss (well, Vss minus the drop across R2, which will vary with available current that can be pulled from the power supply) if the load doesn't clamp it naturally. It's also important to be aware of supply voltage droop if the power supply is insufficient for the load's desired voltage and the circuit's set current - a decreasing Vss will further decrease the available load voltage. LED loads tend to auto-clamp the load voltage to their junction voltage totals at a given current level, so they tend to self-regulate the circuit's voltage in undercurrent situations.


And there you have it - a ridiculously simple, relatively efficient, inexpensive linear constant-current regulator that only requires four parts (or seven if you need switching/PWM).
 
Last edited:
Hi OddOne! Great post! I am a big fan of this regulator (the 4-part simple version), having bumped into it on Instructibles 2 years ago as part of 'Dan's Power LED Projects'. I have built this circuit into several dozen LED lighting projects, including the Hydra-2 (see my sig line) and my 21-LED home lighting system.

I wonder though about your 1.2 volt overhead figure. I think it is closer to .5 volt, given that it is the actual voltage across the sense resistor, in my experience. If the mosfet is a very low-ohm type, little to no voltage need be dropped there. I like to use the Fairchild FQP50N06, they are 85 cents in small qty. at Future Electronics.

Thanks for sharing this detailed info! If more folks knew how simple it is to put together, they would use it!

Cheers,
Jeff O.
 
Hi OddOne! Great post! I am a big fan of this regulator (the 4-part simple version), having bumped into it on Instructibles 2 years ago as part of 'Dan's Power LED Projects'. I have built this circuit into several dozen LED lighting projects, including the Hydra-2 (see my sig line) and my 21-LED home lighting system.

I like Dan's original design, and decided to tweak it a bit to make it self-starting without needing a PWM signal, and to isolate the PWM a bit more than he had it, thus the gate resistor to Vss and the PWM/switching controls moved onto additional components. His version certainly works nicely though, so props where due. :D


I wonder though about your 1.2 volt overhead figure. I think it is closer to .5 volt, given that it is the actual voltage across the sense resistor, in my experience. If the mosfet is a very low-ohm type, little to no voltage need be dropped there. I like to use the Fairchild FQP50N06, they are 85 cents in small qty. at Future Electronics.

In my testing my 2N3906s were all kneeing into conductance at ~0.56-0.57VDC but the voltage across the load was dropping off consistently if the supply voltage was within a volt, so I stated the 1.2VDC overhead to compensate for this. With careful part selection I don't see why it cannot be used down to parity with load's desired voltage if the user doesn't mind losing that ~0.6VDC across the load.

So consider the 1.2VDC overhead figure as a planned safety margin so load voltage droop will be less of a concern. :D


Thanks for sharing this detailed info! If more folks knew how simple it is to put together, they would use it!

Indeed.

Here's a potential kicker for folks as well: this circuit can drive a hotwire. Throw in a 555 rigged as PWM source, and hello easy PWM-dimmable incandescents...
 
Last edited:
Q1 operates entirely in linear mode and acts as a variable resistor to control current through the load.
Well, well, well.

I didn't even know a MOSFET could work in linear mode - I thought it was an on-off switch, sort of like a thyristor, only the gate keeps control.

Delighted to be wrong, and here is a two-terminal current regulator that can happily operate with less than a volt of headroom.

(cue applause!)

It knocks my approach to this problem (the elegant but old-school dos-a-dos NPN & PNP Ge power transistor circuit) into a cocked hat.

Congratulations and well done. Four parts and no ICs - that ticks every box.

Just one question.

Could R1 be connected to point W3 rather than W2 without compromising regulation? (I ask because in some installations, the regulator needs to be physically mounted at the supply rather than the bulb end, and making this change would eliminate trickle current.)
 
Well, well, well.

I didn't even know a MOSFET could work in linear mode - I thought it was an on-off switch, sort of like a thyristor, only the gate keeps control.

MOSFETs work in linear mode as amplifiers at low gate currents, and at higher gate currents (usually starting in the tens to hundreds of mA) they slam from state to state and operate as switches. (Their answer to saturation on a typical bipolar.)


Delighted to be wrong, and here is a two-terminal current regulator that can happily operate with less than a volt of headroom.

(cue applause!)

It knocks my approach to this problem (the elegant but old-school dos-a-dos NPN & PNP Ge power transistor circuit) into a cocked hat.

Congratulations and well done. Four parts and no ICs - that ticks every box.

If one wants to get really wild, it's certainly possible to build a double-sided PC board module with the entire regulator circuit in a single square inch of space, and that includes a large surface-mount power resistor for R2. And you could easily fit everything for a reg up to an amp of current in that size board. Throw in a right-angle header for connections and you could build a four-pin reg that would plug into a breadboard or existing circuit as though made for the task. :D

Hmm, I oughtta see if I can design a suitable board layout. Maybe even sell some ready-made units in a variety of currents...


Just one question.

Could R1 be connected to point W3 rather than W2 without compromising regulation? (I ask because in some installations, the regulator needs to be physically mounted at the supply rather than the bulb end, and making this change would eliminate trickle current.)

Ideally you'd want R1 to reach to the positive side of the load instead of the negative, as if the load drops too much voltage it might not allow Q1 to turn on, or may turn Q1 off as the load powers up. (After all, even sensitive-gate MOSFETs need a few volts to fully switch on) Of course the benefit from this change would be auto-killing the regulator if there's a problem with the load, as well as eliminating the trickle.
 
Last edited:
MOSFETs work in linear mode as amplifiers at low gate currents, and at higher gate currents (usually starting in the tens to hundreds of mA) they slam from state to state and operate as switches. (Their answer to saturation on a typical bipolar.)




If one wants to get really wild, it's certainly possible to build a double-sided PC board module with the entire regulator circuit in a single square inch of space, and that includes a large surface-mount power resistor for R2. And you could easily fit everything for a reg up to an amp of current in that size board. Throw in a right-angle header for connections and you could build a four-pin reg that would plug into a breadboard or existing circuit as though made for the task. :D

Hmm, I oughtta see if I can design a suitable board layout. Maybe even sell some ready-made units in a variety of currents...




Ideally you'd want R1 to reach to the positive side of the load instead of the negative, as if the load drops too much voltage it might not allow Q1 to turn on, or may turn Q1 off as the load powers up. Of course the benefit from this change would be auto-killing the regulator if there's a problem with the load.


OK You have my interest- I just designed a circuit on Webbench to drive a bridgelux- 16.6V 1.75A- I was designing it to take 18V in.

This could do the same and doesn't need a massive inductor?
 
OK You have my interest- I just designed a circuit on Webbench to drive a bridgelux- 16.6V 1.75A- I was designing it to take 18V in.

This could do the same and doesn't need a massive inductor?

Yes, and it wouldn't be too bad loss-wise given your supply and load voltages are close to each other. I'd imaging the overall efficiency should be somewhat close to what a buck switcher would do that this small of a voltage differential.

I came up with 0.33 ohms at 2+ watts (dissipation in R2 should be just over a watt at 1.75A) for R2 under operating conditions, so put a 2A fuse between W1 and the circuit as a catastrophic-failure handler and keep Q1 reasonably "heatsunk" and it should work fine.
 
Just for giggles I cooked up a board layout, and yep, the whole circuit will fit on a square inch of board space, using all SMD parts. I also designed in some huge heatsink regions and a ton of vias for heat transfer to the backside, and added a single 0.140" dia. hole for affixing the board to a heatsink. A five-pin header could be attached to provide easy connection.

I wonder, would enough people be interested in these for say $7.50 a pop (for any current setting up to 750mA) to justify a small production run?
 
Similar in principal to this one I've been using for low power LEDs for a long time (drive current ~20 mA as shown):

LED_Driver_1.gif
 
I think I might have just had an idea for an improvement - I'll test my hypothesis over this weekend and post results if it plays out. :D
 
I wonder, would enough people be interested in these for say $7.50 a pop (for any current setting up to 750mA) to justify a small production run?
Yes.

No ifs, buts or conditions.

Yes.

I like the idea of miniature size, but I would also welcome the ability to bolt to a large heatsink, too.

Ya know, this whole circuit could theoretically be encased in a single TO-3 can or TO-220 case. I would just love that. Who knows somebody at Motorola?
 
Just for giggles I cooked up a board layout, and yep, the whole circuit will fit on a square inch of board space, using all SMD parts. I also designed in some huge heatsink regions and a ton of vias for heat transfer to the backside, and added a single 0.140" dia. hole for affixing the board to a heatsink. A five-pin header could be attached to provide easy connection.

I wonder, would enough people be interested in these for say $7.50 a pop (for any current setting up to 750mA) to justify a small production run?

There are drivers on the market, both line and battery, in that range at deal extreme for under the price point.

Thus I would say it's advantage is being in the higher current arena- something that isn't available elsewhere...

Being able to drive 2A- awesome. 22V @ 2A and replacing a Xitanium 50$ driver? Perfect.

Snuggling up next to a 2000 lumen bridgelux- muhahahaha.
http://www.candlepowerforums.com/vb/showthread.php?t=235232
 
I would generally modify the circuit with two components to reduce the voltage drop on R2 and make it more useful with low voltage applications. Lose some accuracy perhaps, but when you are working off batteries, it usually makes sense.

Semiman

cool, i would rather the current be off by ~10% than to have another ~5% of loss (that much) , with way less sence it could be pumping out less heat too.

doesnt a driver like this have very limited Input/output voltage Range to maintain efficency? if the mosfet is becomming a resister, the more it needs to BE a resister, the more losses again?
with the large resistance on the sence, the input voltage has to be higher again, and it is as if the driver item (sorta) needs specific battery led combos to be wonderfull, then it can be tuned more TO that combo. if you still have to DROP that much TO get to various available Input(batt) output(led) voltages Anyways . . .


its sorta like , , , Great idea, now help us out with the specific application type/voltages/and intent "if you build it" (without IDing it) "they wont come". What is the most usefull combo for this item, and THEN what is the losses?
-----------------

there are LOTS of driver thingies that will handle 350-500-750ma , there are few that handle 2-3-5Amps :)
as they shove more and more emitter things in led packages, ya know like 50+W , the progressive future of led psycotics and modding will not be running a single led at 3W. IMO there is more drivers missing on the high amperage side (and high efficency toooo)

If you Use a full sized mosfet package, instead of the tiny stuff, does it really not fit on the boards? only it and the sence are taking mondo heat on, so my (poor) vision is to have the two parts that are taking on all the heat, BE the majority of the driver, even to the point of being able to sync the mosfet Off board. using flea sized controller parts, and mondo "power resistance" parts, it can still be squeesied into small places.

when it comes to the battery led combo, i see very little issue in the driver falling out of regulation WHEN the battery(s) are neer depletion, so getting very close matching combo of items is again preferable for the battery too, sorta a built-in cut-off that doesnt cut OFF, what does this do when the voltage falls below some value? lock the mosfet up or lock the mosfet out?

we will form a focus group and get marketing on it right away :cool: those are just things i am saying, i would never want to alter any plans you have for getting anything done, and selling it in any way. i would rather that it be a hot item, and we had more choices in driver items in general, be they $5 or $20 (that one having levels too of course)
 
Last edited:
The thing with shunt (linear) regulators is that they are not very efficient. Take the example of a 12VDC supply driving a single LED at 0.750A. The power going to the LED is about 2.70W (3.6V x 0.750A). The total power is 9W (12V x 0.75) giving an efficiency of only 30% - 70% of the power is lost as heat (6.3W) which has to be got rid of. The efficiency will go DOWN even further if the supply voltage is increased (it will go UP with lower supply voltages).

A switching buck regulator will typically be 80-90% efficient - lets use 85% as an example. Using the same 12V supply, the buck regulator will draw 265mA instead of 750mA - so for a given battery size, the buck regulator will last 2.83x longer (750/265) than the linear regulator. Also, the amount of power/heat that needs to be got rid off is 0.476W compared to 6.3W - less than 8% of the linear regulator.

A buck regulator is not terribly difficult to put together (a boost, buck/boost or SEPIC is a bit more complex). However, if efficiency is not a concern, then the simplicity of a linear regulator may be a viable solution.
 
I think the low dropout linear regulator comes into its own with battery supplies though.

Suppose you have a battery pack that is say 12 V when discharged and 14 V when fully charged. If you have a load that is well matched to a 12 V supply, you need a regulator that will drop the extra 2 V when the battery is freshly charged and to drop out completely when the battery voltage decreases. In this case a linear regulator that can do that would seem to be an efficient option.
 
Top