Constant Current Source, Picking a Mosfet

I’m having hard time understanding which values I should be concerned about when it comes to picking a mosfet for my circuit.

I’m using a IRF3710 N-Channel Mosfet with a transistor to make a current source for some LEDs that's being controlled by an ATMega328-pu to make them blink. My goal is to use this to make a control board for some lights that are being used in a lightbar, such as ones used on emergency vehicles.
The IRF3710 getting warm in a short amount of time. I plugged In a different mosfet into my board a IRLU024. It ran fine and didn’t get hot or warm like the IRF3710 did. Sadly I can’t use that once since it isn’t a TO-220 package like I need it to be.

Can anyone point me in the right direction by explaining why one worked and other didn't like the other one. Also what I should look into for my particular circuit.
Thank you.

Datasheet:IRF3710

Datasheet:IRLU024

-edit the IRF3710 made the leds look more dim than the other mosfet did.

Constant current source credit to Dan GoldWater

Look at Rds with Vgs = 4V and the resulting Id.
One is barely on (250uA = 0.25mA), the other is full on (9A).

The on-resistance specification is the one to go to. It will have one or more entries with a gate-source
voltage (Vgs) and a drain-source resistance (Rds(on)). If there isn't an entry at or below Vgs=5V
then the device is not logic level and cannot be used direct from 5V logic. Typically you'll see
Vgs=4.5V for a logic-level device, and Vgs=10V for a 12V device.

If you want to drive a MOSFET from 3.3V logic then you'll need a device with an even lower Vgs
entry, and these are almost invariably surface-mount devices, not TO220.

Many newcomers make the assumption that the threshold voltage is something to do with a
MOSFET conducting. Its not, its where the device turns fully off. In between the minimum
on-voltage and the threshold voltage is the region where the device is half-on-half-off, a state
you want to avoid (other than to swiftly pass through during switching on / switching off).

With silicon MOSFETs designed for switching (nearly all of them) you can simply make the
assumption that Vgs=0V for off, completely ignoring the threshold voltage.

After a while reading datasheets you'll notice that the minimum gate-drive voltage tends to be
very roughly 3 times the threshold voltage.

So seeing that threshold voltage of 2--4V for the IRF3710 immediately rings warning bells that
this cannot possibly be logic-level, not even slightly.

Note however that the OP is using this as a constant-current driver so the FET is not achieving its RDS(ON) in either case and will always dissipate quite substantial power. The TO-220 did not get as warm because it is bigger as much as anything else. Whatever you use absolutely requires a heatsink.

Sorry but you can't put LEDs in parallel like that. Each string of LEDs needs it's own current limiting. If you do like in your schematic the string with the lowers VF will hog most of the current. Probably some low value resistors in series with each string will do.

My goal is to use this to make a control board for some lights that are being used in a lightbar, such as ones used on emergency vehicles.

In these applications a switching constant-current power supply is normally used. It's similar to a regular (constant voltage) power supply except the current, instead of the voltage is monitored/controlled in a feedback loop.

In this type of circuit the MOSFET is either fully-on or fully-off and energy is stored in an inductor and the MOSFET generates very little heat (depending on it's on-resistance).

It's not an easy thing to build from scratch...

PerryBebbington:
Sorry but you can't put LEDs in parallel like that. Each string of LEDs needs it's own current limiting.

Well that is rather funny, because an awful lot of luminaires do exactly that, ranging from torches, the LED strip on your video monitor screen to light fittings with a large number of LEDs and those "COB" floodlights of 20, 50 and 100 Watts!

Well, the shouldn't! It's crap design and probably explains why LED lights of all kinds have a far shorter life than they should.

CrossRoads:
one is barely on (250uA = 0.25mA), the other is full on (9A).

I'm little confused about what you said. If mosfet isn't getting .25mA its not fully on making my leds dim? Could you please explain little more what you meant by that?

Paul__B:
The TO-220 did not get as warm because it is bigger as much as anything else. Whatever you use absolutely requires a heatsink.

I plan to use heatink, but im more worried if my circuit is working efficiently as it should be. Also by bigger do you mean the size of the TO-220 making it disperse heat better?

DVDdoug:
It's not an easy thing to build from scratch...

Building the circuit from scratch or the lightbar? I got the PCB layout made just need a mosfet that would work best for my circuit.

PerryBebbington:
Sorry but you can't put LEDs in parallel like that.

I've made few of these boards with 5mm leds they were all same brightness and worked fine. Long as they all get the 20mA they need what could go wrong? It seems its other way around. When use a resistor you are playing with voltage. LEDs are current driven devices.

MarkT:
The on-resistance specification is the one to go to. It will have one or more entries with a gate-source
voltage (Vgs) and a drain-source resistance (Rds(on)). If there isn't an entry at or below Vgs=5V
then the device is not logic level and cannot be used direct from 5V logic. Typically you'll see
Vgs=4.5V for a logic-level device, and Vgs=10V for a 12V device.

Thanks for your reply, im still looking over what you said.

LEDs are current driven devices

Correct, so you have to control the current. If you put LEDs in parallel you can control the total current fed to all of them but you can't control the current to each individual string, you are assuming it will divide equally between them but there is nothing to guarantee that it does. Any string that has a slightly lower Vf will take more of the current. Vf can vary between individual LEDs as a result of manufacturing differences, temperature and probably other factors I can't think of.

lightchaser6913:
I plan to use heatsink, but I'm more worried if my circuit is working efficiently as it should be. Also by bigger do you mean the size of the TO-220 making it disperse heat better?

That is precisely what I meant. :grinning: The TO-220 has a tab - with a hole with which to bolt it to a heatsink - which alone is as big as the whole IRLU024 package.

As to efficiency, the constant-current driver necessarily wastes energy in it s operation. Either FET will have the same voltage drop when regulating the same current, thus the same dissipation, they will simply have different gate voltages in order to do so. It the non-logic-level FET cannot pass as much current with the available gate voltage, then it will consequently dissipate less power, not more. :roll_eyes:

lightchaser6913:
I've made few of these boards with 5mm LEDs they were all same brightness and worked fine.

And in practice they generally will, despite the technical objections.

PerryBebbington:
you are assuming it will divide equally between them but there is nothing to guarantee that it does. Any string that has a slightly lower Vf will take more of the current. Vf can vary between individual LEDs as a result of manufacturing differences, temperature and probably other factors I can't think of.

Which is true but the fact is that the effective internal resistance of the LEDs is quite substantial, so the actual variations in current between strings is not that great - only "slightly" - and generally not great enough to cause problems, let alone be visible.

Here is a reasonably valid diagram of typical voltage-current curves:

The lines are nowhere near the vertical that is suggested when you complain about different forward voltage parameters for individual LEDs of the same specification. Admittedly, in manufacturing, LEDs from the same batch are generally used so that their parameters do match closely anyway.

Your circuit works like this:
The current that passes through the resistor R2 creates a voltage drop across it. This voltage drop creates a voltage at the base of the transistor Q1.
The more current that passes through R2 the higher this voltage will become. When this voltage reaches ~0.6v the transistor starts to open, which opens a path from the gate of the MOSFET to the ground, which makes it conduct less current. This loop continues until the MOSFET conducts enough current to keep the voltage drop across R2 below ~0.6v.

Now this has implications for you:
1- The value of R2 is not arbitrary or fixed. It depends on how much your maximum allowable current is. The formula would be R = 0.6/max_current.
2- It is the voltage dropped across the MOSFET that regulates the current. Which means all the extra power will be dissipated through your MOSFET, so you're gonna need good heat sinking for it.
3- The difference between your input voltage and the voltage needed by the LEDs will be dropped across the MOSFET. So in order to keep it cooler you can either reduce your input voltage, or increase the number of your LEDs so that they'll need for example 11.5v instead of 10v. This means the MOSFET will only have to drop 0.5 volts from a 12v battery. (Note that if you increase the number of yoru LEDs they will draw more current and you will have to adjust the R2 value).
Edit: That's not practical because adding another LED in series mean you'll need 10.5 + 3.5(forward voltage of one LED) = 14v input voltage and you're using a car battery. Instead you could add a 33 Ohm resistor in series to each column of your LEDs. At 40mA (400/10) this will drop 1.3v which means your MOSFET will only have to drop ~0.2v. This is much better than dropping all the voltage with the MOSFET.
4- The hotter your LEDs get, the more current they conduct and the more power the MOSFET will have to dissipate. So by keeping your LEDs cool with good heatsinking you can indirectly keep your MOSFET cool.

Regarding the MOSFET choice, I'm too noob to be certain, but I think it's better to choose a logic MOSFET with low Rds(on) in order to make sure it doesn't have a problem passing the full current when fully on. But it seems to me that it will never be fully on anyways, which is why Paul__B says it's mostly the size (heat dissipation) that matters.

Would it also work to insert a single high-wattage resistor - either in the feed from the input to the LEDs, or between the LEDs and the drain of the mosfet? You would want the highest resistor value that still has the LEDs bright enough, so the resistor deals with most of the dissipation rather than the mosfet.

ShermanP:
You would want the highest resistor value that still has the LEDs bright enough, so the resistor deals with most of the dissipation rather than the mosfet.

That is do-able but you need to carefully calculate it based on the minimum supply voltage that will be encountered (depending on what is supplying it - which in this case appears to be a motor vehicle battery under various conditions) and the (known) characteristics of the LEDs plus the 0.6 V of the sensing transistor.

I suspect not worth the trouble given all those factors. :astonished:

pourduino:
Edit: That's not practical because adding another LED in series mean you'll need 10.5 + 3.5(forward voltage of one LED) = 14v input voltage and you're using a car battery. Instead you could add a 33 Ohm resistor in series to each column of your LEDs. At 40mA (400/10) this will drop 1.3v which means your MOSFET will only have to drop ~0.2v. This is much better than dropping all the voltage with the MOSFET.

Thinking about it couldn't I use a step down DC-DC Buck Voltage Regulator. It would give me the voltage I need. Having a set voltage seems better than one that could be 12~14.5v


Edit:
I found cheap one, it worked and the mosfet didn't get hot or warm. Only problem I seen was the indication lights on the buck converter blinking the same as my LEDs from the Arduino.

lightchaser6913:
Thinking about it couldn't I use a step down DC-DC Buck Voltage Regulator. It would give me the voltage I need. Having a set voltage seems better than one that could be 12~14.5v


Edit:
I found cheap one, it worked and the mosfet didn't get hot or warm. Only problem I seen was the indication lights on the buck converter blinking the same as my LEDs from the Arduino.

Constant voltage wouldn't really cut it because what you need for LEDs is constant current. Because as they get hotter their properties change.
You can get a relatively cheap constant current buck converter like this.
Set the voltage to the LEDs nominal voltage and the current to the current required by the LEDs and you are all set.
In that case you should get rid of the transistor and the resistor at the bottom right of the circuit.