Constant current with IRFZ46N

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
Hi, I am driving an array of 15 LED in parallel from a 5v source, i intend to drive them using a IRFZ46N, but i need to regulate the current with a very nice precision, what would be the best approach to this issue? I would like that each LED receives it's 20mA, or even 19~~21mA. I created a topic recently and the guys helped solve a problem related to the BJT, but the current isn't constant, that's why i would like help. I intend to supply the voltage at the gate of the mosfet with a 555 and a pull down resistor, the 555 is there for dimming purposes. Thanks in advance.
 

MikeML

Joined Oct 2, 2009
5,444
For running 15 LEDs in parallel, you need 15 current regulators; not one. :(

If you put a resistor in-series with each LED, and the supply voltage is 5V+-0.5V, then you really don't need a current regulator other than the series resistor.

Put one switch (either high-side or low-side, BJT or FET) to PWM the entire assembly, and then just let the 15 resistors do their thing.
 

crutschow

Joined Mar 14, 2008
34,420
Note that the IRFZ46N MOSFET is rated at a Vgs of 10V to fully turn on.
5V may be sufficient for the 300mA you are switching but you'd have to try it to see if it is fully on.
Otherwise go to a logic-level MOSFET that is specified fully turn on at 5V [as shown in the data sheet for the Rds(on) test conditions].
 

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
I see, i feared that it would need 15 regulators, but nevertheless, what would be the resistor choice for my arrangement? At the drain side? Also i'll take my time to read what you sent. The vf of each led is different so, assuming a perfectly matched resistors, it will still vary right?
 

crutschow

Joined Mar 14, 2008
34,420
The resistor value for each LED is (5V-Vf) / 20mA where Vf is the forward drop of the LED.
If the LEDs vary in brightness with this arrangement then you can change the value of the individual resistors up or down slightly to give a better match.
If you need a finer adjustment then the step between two resistor values, you can put two resistors in parallel (one larger and one smaller) to get as close as you need.
 

mcgyvr

Joined Oct 15, 2009
5,394
The resistor value for each LED is (5V-Vf) / 20mA where Vf is the forward drop of the LED.
Just so its clear to the OP... Its (5V-Vf)/.02
The formula uses "amps" so 20mA is .02 Amps
Example..
If LED Vf = 2 then
(5-2) = 3/.02 = 150 ohm resistor

and to calculate the wattage rating of the resistor its
I^2 * R = P and P is watts
or
(.02^2* 150) *2
So .12 watts (1/8W resistor)
Note the *2 is a safety factor..You always want to use a resistor with a wattage 2 times (or more) the calculated dissipation
 

ian field

Joined Oct 27, 2012
6,536
Hi, I am driving an array of 15 LED in parallel from a 5v source, i intend to drive them using a IRFZ46N, but i need to regulate the current with a very nice precision, what would be the best approach to this issue? I would like that each LED receives it's 20mA, or even 19~~21mA. I created a topic recently and the guys helped solve a problem related to the BJT, but the current isn't constant, that's why i would like help. I intend to supply the voltage at the gate of the mosfet with a 555 and a pull down resistor, the 555 is there for dimming purposes. Thanks in advance.
If you take the standard auto-bias BJT common emitter circuit, with a set (preferably stabilised) base voltage - the emitter resistor determines the collector current.

The same applies to a MOSFET, except the gate voltage has to be about 7V above the source as opposed to a base being 0.7V above the emitter.

The VGSthr has a much bigger spread than Vbe on a transistor, so in most cases there's not much to be gained from using a MOSFET.

Its better to put a current sensing resistor in the "other" rail and use the voltage developed across it to bias the B/E of a BJT - the collector shunts the gate bias away from the MOSFET so the current flow settles on equilibrium.

The supply rail needs about 7 - 8V more headroom, because that's how much higher the gate needs to be than the source - there's ways of doing that, but 1 or 2 BJTs is just so much easier.
 

dannyf

Joined Sep 13, 2015
2,197
i need to regulate the current with a very nice precision,
You probably want to ask yourself if you really need that. LEDs brightness doesn't change much from 19ma to 21ma.

And if you are attaching them to a fixed voltage, there are only a limited number of factors that can impact the current going through the LEDs. If those factors are not applicable in your particular application, you have spent all the brain power, parts and hard work for nothing.

The best solution, in many cases, is to get rid of the need to have a solution.
 

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
Yes, i exagerated when i said "need", and i tend to exagerate. I said that because i wanted to see if anyone had a solution to the constant current problem. I could easily go to an LED driver ic, but is an overkill, as a mosfet is too. It's up to me now, MikeML already helped me alot, and it's still helping me in the other thread. As this is an led array for a desk lamp with some additional features, i came up with a different idea using two 555 or a single 556, so it would need two mosfets two drive each array of leds, this is expensive where i live, so bjt will solve the problem. Thanks for all the answers and also for the awesome thread about led controlling.
 

dannyf

Joined Sep 13, 2015
2,197
i came up with a different idea using two 555 or a single 556
A bjt 555 outputs 200ma (steady state) typically, good for 10 LEDs @ 20ma each. And it allows a wide range of pwm adjustments (brightness control).

That's a much better solution than a linear solution you had been looking for.

You will see that if you tell people what you are really looking for, rather than "how to precision set current to 20ma", you get much better answers.
 

AnalogKid

Joined Aug 1, 2013
11,038
For running 15 LEDs in parallel, you need 15 current regulators; not one.
OR, 15 ballast resistors but only one current regulator pass transistor. Select the resistors for the max LED current when the pass transistor is saturated.

For an analog current control circuit, you can use the voltage drop across any one of the ballast resistors as feedback for the current regulator. Since many opamps have an input common mode range that includes the negative rail, this works better if the pass transistor is a PNP (no 10V gate drive issues) sourcing current to the LEDs, and the ballast resistors go to GND.

For PWM brightness control, the pass transistor is a switch rather than part of a regulator. In this case the circuit can be turned over with the system +5 sourcing the LEDs and an NPN or logic level N-channel MOSFET switching the paralleled LEDs to GND. If the PWM max. duty cycle is less than 99%, you can increase the LED current (reduce the ballast resistors) such that the average current is20 mA. For example, if the LED continuous current rating is 20 mA and the maximum duty cycle is 80%, then you can increase the peak LED current to 25 mA.

ak
 
Last edited:

Thread Starter

André Ferrato

Joined Apr 5, 2015
215
@dannyf i know about this, but when feeding it with 5v, it's a very tight space to deal with resistors and how much the output is going to drop and stuff...

@AnalogKid A ballast resistor is a normal resistor ? And i know there are some very complicated (for me) and highly accurate choices to deal with this, but UNFORTUNATELY i don't, and it's capslocked because it's really a sad thing, because i see many designs using opamps, feedback.. and i don't know how they work or how to design.
 
Top