TIP120 or IRL540N for a general "control whatever DC gizmo"-use?

Dear forum

I'm in the act of buying a bunch of transistor to control whatever solenoids, motors, lamps and the like that I'd like to attach to the Arduino.

Typically that will be less than 24 volts, but sometimes several Amperes.
The use will be both as ON/OFF and for PWM.

(for 230V AC, I use solid state relays, and I'll keep doing that)

I have seen people use TIP120 Darlington transistors or IRL540N MOSFETs for that purpose.

As far as I can see, the TIP120 is a little cheaper, but the IRL540N can handle a much higher current.

Are there any other reasons to prefer one over the other for general use?

I'm a good chemist, but quite a noob in electronics: How about survivability in case of wrong polarity, forgetting the flyback diode and similar lapses?

Greetings
Peter

The use of power Darlingtons must end!
[Friends don't let friends use TIP-1anything.]

Electronics is no less dependent on detail than chemistry is.

Are there any other reasons to prefer one over the other for general use?

For switching low current, they are indistinguishable.

For switching high current:

  • the tip is easier to drive. the irf requires a driver to be efficient.
  • the irf is more efficient. the tip has a higher voltage loss thus more dissipation.
1 Like

No contest, the logic level N channel power IRL540N MOSFET is by far the better choice of the two. For typical switching applications (on/off or PWM) the low Ron value will mean a cooler running package then the NPN darlington transistor which can have up to 2 volts fixed voltage drop across it when fully switched on.

Lefty

1 Like

Peter_I:
Dear forum

I'm in the act of buying a bunch of transistor to control whatever solenoids, motors, lamps and the like that I'd like to attach to the Arduino.

Typically that will be less than 24 volts, but sometimes several Amperes.
The use will be both as ON/OFF and for PWM.

(for 230V AC, I use solid state relays, and I'll keep doing that)

I have seen people use TIP120 Darlington transistors or IRL540N MOSFETs for that purpose.

As far as I can see, the TIP120 is a little cheaper, but the IRL540N can handle a much higher current.

Are there any other reasons to prefer one over the other for general use?

I'm a good chemist, but quite a noob in electronics: How about survivability in case of wrong polarity, forgetting the flyback diode and similar lapses?

Greetings
Peter

Both are usable. The TIP-120 will need a resistor between the Arduino port and the base of about 180 ohms to give a base current of about 20 milliamps. The MOSFET can be tied to the port directly with no resistor (and ignore the people who tell you that a resistor is needed for the MOSFET because of it's gate capacitance).

The VCE (sat) of a TIP-120 with Ic=5 amps and Ib=20 mA is 4 volts max, whereas the Rds of the MOSFET is quite low and the voltage drop across a saturated MOSFET will be lower (meaning less heat dissipated by the MOSFET).

All in all, the MOSFET is a better choice.

ignore the people who tell you that a resistor is needed for the MOSFET because of it's gate capacitance

It is far less clear cut than that.

dhenry:

ignore the people who tell you that a resistor is needed for the MOSFET because of it's gate capacitance

It is far less clear cut than that.

OK then, tell me why you think a resistor is needed.

If you drive a mosfet from an Ardino pin without a series resistor, then every time the mosfet switches, the input capacitance of the mosfet has to be charged or discharged. This results in a current pulse, the amplitude of which is limited by the internal resistance of the Arduino pin. This resistance is around 20 ohms, so the peak current into or out of the Arduino pin can be as high as 200mA or so - way above the absolute maximum rating of 40mA. If we take a typical power mosfet with a total gate charge of 20nC, the pulse will last for about 100ns.

Is a 100ns current pulse of 5 x the absolute maximum continuous current rating likely to damage the Arduino? I suspect the answer is that nobody knows. However, as Atmel does not specify a pulse current rating for the output pins, we have to take the view that it might. Even if we tested a thousand mcus driving mosfets with no series resistor for a year and none of them failed, Atmel might change their manufacturing process tomorrow in a way that makes the mcus less tolerant of pulses of excess current.

So a series resistor is recommended. A 100 ohm series resistor will result in a 40mA (max) pulse lasting about 500ns instead.

Thanks for the answers.
You have convinced me that the IRL540N is the best choice.

And just to be on the safe side, I'll place 100 ohms between the Arduino output and gate on the MOSFET.

Should I hook something else up in the wrong direction, that could save the poor pin from getting fried too?

I've seen some people use 10k between gate and ground, to make sure it really is low and not just floating.
As far as I understand it, the output pin is pulled low on the Arduino, so that should not be needed?

I've seen some people use 10k between gate and ground, to make sure it really is low and not just floating.
As far as I understand it, the output pin is pulled low on the Arduino, so that should not be needed?

That is true as long as the arduino is powered up and holding the output pin LOW. However a majority of applications using a power mosfet are using an external voltage source of higher voltage and/or current then the arduino can supply directly and if there is a chance the arduino can or will be powered off when the external voltage is still on then you can get into a situation of a 'floating' gate causing problem. A simple 10k ohm resistor wired from gate to source will fix that situation and is cheap insurance.

Lefty

dc42:
If you drive a mosfet from an Ardino pin without a series resistor, then every time the mosfet switches, the input capacitance of the mosfet has to be charged or discharged. This results in a current pulse, the amplitude of which is limited by the internal resistance of the Arduino pin. This resistance is around 20 ohms, so the peak current into or out of the Arduino pin can be as high as 200mA or so - way above the absolute maximum rating of 40mA. If we take a typical power mosfet with a total gate charge of 20nC, the pulse will last for about 100ns.

Is a 100ns current pulse of 5 x the absolute maximum continuous current rating likely to damage the Arduino? I suspect the answer is that nobody knows. However, as Atmel does not specify a pulse current rating for the output pins, we have to take the view that it might. Even if we tested a thousand mcus driving mosfets with no series resistor for a year and none of them failed, Atmel might change their manufacturing process tomorrow in a way that makes the mcus less tolerant of pulses of excess current.

So a series resistor is recommended. A 100 ohm series resistor will result in a 40mA (max) pulse lasting about 500ns instead.

The output drivers of the AVR chip are MOSFETS. They have an inherent Rds which limits the current they can supply.

The picture attached is a model of a MOSFET output stage. If one switch or the other switch is closed and the output pin is shorted to VCC or GND, what happens? One of the resistors smokes. What happens if the short circuit only lasts for 100 nanoseconds? NOTHING happens. Other than one of the resistors (MOSFETS) gets a microscopic fraction of a degree warmer.......

Peter_I:
Thanks for the answers.
You have convinced me that the IRL540N is the best choice.

And just to be on the safe side, I'll place 100 ohms between the Arduino output and gate on the MOSFET.

Should I hook something else up in the wrong direction, that could save the poor pin from getting fried too?

I've seen some people use 10k between gate and ground, to make sure it really is low and not just floating.
As far as I understand it, the output pin is pulled low on the Arduino, so that should not be needed?

Completely unnecessary... but I'll admit that it can't HURT. :slight_smile:

They have an inherent Rds which limits the current they can supply.

Right on.

tell me why you think a resistor is needed.

Sure, in no particular order:

  1. dead time management;
  2. stability;
  3. load isolation;
  4. minimize switching losses.
    ...

Krupski:
The output drivers of the AVR chip are MOSFETS. They have an inherent Rds which limits the current they can supply.

Yes, it's about 20 ohms as I said (I described it as the pin output resistance).

It's not just heating in the mosfets that you need to consider, it's also the aluminium interconnects. Heating is not the only effect of overcurrent, there is electromigration (Electromigration - Wikipedia) to consider as well. Five times the absolute maximum current rating means twenty five times more power density and local heating.

Krupski:

Peter_I:
I've seen some people use 10k between gate and ground, to make sure it really is low and not just floating.
As far as I understand it, the output pin is pulled low on the Arduino, so that should not be needed?

Completely unnecessary... but I'll admit that it can't HURT. :slight_smile:

That's for safety, not some electronic engineering reason. It's there so the transistor doesn't switch on before the Arduino program starts running (who knows, the Arduino might even fail to start...)

fungus:

Krupski:

Peter_I:
I've seen some people use 10k between gate and ground, to make sure it really is low and not just floating.
As far as I understand it, the output pin is pulled low on the Arduino, so that should not be needed?

Completely unnecessary... but I'll admit that it can't HURT. :slight_smile:

That's for safety, not some electronic engineering reason. It's there so the transistor doesn't switch on before the Arduino program starts running (who knows, the Arduino might even fail to start...)

If you look at the original post, I highlighted a line in blue and that's what I commented on... the fact that a 100 ohm resistor in series with the Arduino and MOSFET gate "couldn't hurt". I was not talking about the 10K pulldown.