Pages: 1 [2]   Go Down
Author Topic: Best mosfet for switching DC from 5v Arduino pin.  (Read 13856 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Where can I find a tutorial about using a mosfet gate driver?
Does it need any extra power supply?
Is it easy to use?

Yes pretty easy, signal input, signal output, power and ground. Your Arduino +5vdc would power one fine, most have two channels in a single 8 pin package, so you can use it for two digital output/mosfets per package. You would look for the "low side driver non-inverting" varity:

http://www.ti.com/lit/ml/slub005a/slub005a.pdf

Certainly other manufactures offer similar chips. I bought some cheap on E-bay several years ago, forget the device number and don't want to try and find them at this time.  smiley-wink

Again I would test without it and only look into them if the long cable run turns out to be a problem.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The short answer is that both the IRLZ34N and the STP40NF10L are suitable for your application. You don't need a mosfet driver for your application, you can drive them directly from an Arduino pin through a series resistor in the range 100 to 220 ohms, with a 10K to 100k resistor connected from the pin to ground to ensure the mosfet is off when the Arduino powers up and the pin hasn't yet been set to be an output.

Regarding the switching time, the important factor is the total gate charge at the source-drain voltage you are switching. This charge is made up of the gate-source charge, which is more or less constant, and the gate-drain charge, which increases with voltage because of the Miller effect. So when you see that the total gate charge is greater for the STP40NF10L than for the IRLZ34N, part of the reason for this is that the total gate charge for the STP40NF10L is quoted at Vds=80v but for the IRLZ34N it is quoted at 44v. However, even allowing for this, the IRLZ34N has lower total gate charge when switching 48v.

You can calculate an order-of-magnitude estimate for the switching time using the formula t = QR/V where Q is the total gate charge, R is the series resistor and V is the gate voltage you are using. You only need to use a MOSFET driver if you need the switching to be faster than this figure, bearing in mind that you don't want R to be less than about 100 ohms.
« Last Edit: August 28, 2011, 03:16:36 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

The Netherlands
Offline Offline
Jr. Member
**
Karma: 0
Posts: 88
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I will test it first.

But I want to know about the capacitance of the mosfets.
It seems, if you want an low resistance/high efficiency mosfets, the capacitance goes up.
A small capacitance, and the resistance is getting higher.
Also a higher voltage will make the capacitance allot higher.
I need to find a good balance between the two.
the STP40NF10L seems like a good balance, but does have more capacitance than IRLZ34NPBF.
But I want some more voltage, the IRLZ34NPBF goes to 55v, close to my 48v.
So to have more headroom my first shoice goes to the STP40NF10L.
But how translate those capacitance into mA?
When the mosfet is charging, how much current is flowing for a 880pF @ 25V capacitance?
I gues no matter how high the capacitance, they all switch fast enough for PWM, but just use more current to switch?
How can I calculate how high the capacitance can go?
And I gues I can't measure it with a multimeter because of the short peaks?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But I want to know about the capacitance of the mosfets.
It seems, if you want an low resistance/high efficiency mosfets, the capacitance goes up.
A small capacitance, and the resistance is getting higher.
Also a higher voltage will make the capacitance allot higher.
I need to find a good balance between the two.
the STP40NF10L seems like a good balance, but does have more capacitance than IRLZ34NPBF.
But I want some more voltage, the IRLZ34NPBF goes to 55v, close to my 48v.
So to have more headroom my first shoice goes to the STP40NF10L.
But how translate those capacitance into mA?
When the mosfet is charging, how much current is flowing for a 880pF @ 25V capacitance?
I gues no matter how high the capacitance, they all switch fast enough for PWM, but just use more current to switch?
How can I calculate how high the capacitance can go?
And I gues I can't measure it with a multimeter because of the short peaks?

Ignore the capacitance, concentrate on the total gate charge. The peak current when charging the gate is (5v - a_little)/R where R is the series resistor. That's the point of having a series resistor, and why it shouldn't be less than 100 ohms - you don't want to exceed 40mA output per Arduino pin.

I agree that 55v is uncomfortably close to the 48v you are switching - particularly as the 48v supply is probably unregulated, in which case it may be somewhat higher than 48v when all the LEDs are off.

To get a very rough estimate for the switching losses:

  • Calculate the approximate switching time using the formula I gave earlier
  • Multiply this by 2 (to allow for both switch on and switch off) and then by the PWM frequency
  • For a resistive load, multiply this by the power in the load when the mosfet is on, and divide by 4

In fact for your LED+series resistor load, if most of the 48v is dropped across the LEDs then the switching losses will be much less than this figure.
« Last Edit: August 28, 2011, 03:47:47 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

The Netherlands
Offline Offline
Jr. Member
**
Karma: 0
Posts: 88
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your help, but that to complicated for me.
The only thing I'am not sure of is how much current a mosfet use from the Arduino pin.
Can someone show how to calculate the current peak with for example this mosfet?
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00003023.pdf

Quote
The peak current when charging the gate is (5v - a_little)/R where R is the series resistor. That's the point of having a series resistor, and why it shouldn't be less than 100 ohms - you don't want to exceed 40mA output per Arduino pin.

I understand how to limit the current. But as everyone is saying, you need to drive the mosfet so that it has enough current. But how do I know whats enough.
If I can booste the Arduino pins to 250mA, would that be allot better for some mosfets, and get less hot?
If I do not use a series resistor, thats best for the mosfet?

One Arduino pin may be good for a 40mA peak, but If i use 20 outputs with mosfets, it can't deliver that 40mA anymore on each pin.
Thats why I was thinking about using a small transistor to make each pin 250mA ( I used this transistor to power some 5mm leds that one pin could not provide, and that worked perfect with PWM)
I don't see way this would not work with a mosfet.
« Last Edit: August 28, 2011, 04:38:17 am by mwhens » Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12164
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 40mA rating for Arduino pins is an "absolute maximum" rating - you should not be going near than value, 25mA is a reasonable limit to ensure reliable operation and prevent the chip dying.  For most "abs max" ratings you want to back off by a significant factor, not go near the limit (its the point when some chips start to get permanently damaged - also most max ratings are for single exposure, not repeated...)   

If there is a "continuous" rating or "recommended" rating, use that, not the abs max.

For the same reason using a 55V MOSFET for 48V isn't safe - switching transients can be as much as the supply voltage due to stray inductance in wiring, so in general 48V load means 100V rated MOSFET.  Don't skimp on ratings, things will fail.
Logged

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 40mA rating for Arduino pins is an "absolute maximum" rating - you should not be going near than value, 25mA is a reasonable limit to ensure reliable operation and prevent the chip dying.  For most "abs max" ratings you want to back off by a significant factor, not go near the limit (its the point when some chips start to get permanently damaged - also most max ratings are for single exposure, not repeated...)

Current limits per pin are normally the result of local thermal limitations, so drawing 40mA or even a bit more for a very short period (we are talking about less than 1 microsecond here) isn't going to damage the device. Drawing 40mA from a pin continuously is a different matter.

For the same reason using a 55V MOSFET for 48V isn't safe - switching transients can be as much as the supply voltage due to stray inductance in wiring, so in general 48V load means 100V rated MOSFET.  Don't skimp on ratings, things will fail.

Both the power mosfets we are talking about are avalanche rated and can drive significant inductive loads without a protection diode, so that doesn't apply here.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand how to limit the current. But as everyone is saying, you need to drive the mosfet so that it has enough current. But how do I know whats enough.
If I can booste the Arduino pins to 250mA, would that be allot better for some mosfets, and get less hot?
If I do not use a series resistor, thats best for the mosfet?

The switching time for those mosfets driven from an Arduino pin via 100 to 220 ohms works out at less then one microsecond. So if your PWM frequency is 10KHz or less, we are talking about switching losses of less than 1% of the load power. OTOH if you use a PWM frequency of 100kHz, the losses could be nearer 10% and you would need either a mosfet driver or large heatsinks on the mosfets.

According to the reference, the default PWM frequency is around 490Hz. So the switching losses will be low and you definitely do not need mosfet drivers. If you're worried about the total peak current supplied by the chip when switching lots of mosfets from different pins, you could increase the gate resistors to 470 ohms.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12164
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 40mA rating for Arduino pins is an "absolute maximum" rating - you should not be going near than value, 25mA is a reasonable limit to ensure reliable operation and prevent the chip dying.  For most "abs max" ratings you want to back off by a significant factor, not go near the limit (its the point when some chips start to get permanently damaged - also most max ratings are for single exposure, not repeated...)

Current limits per pin are normally the result of local thermal limitations, so drawing 40mA or even a bit more for a very short period (we are talking about less than 1 microsecond here) isn't going to damage the device. Drawing 40mA from a pin continuously is a different matter.
One failure mode from excess current is electromigration - unless the datasheet makes it clear the abs-max rating is a thermal one we cannot make such an assumption.  Also high switching currents could overload the on-chip decoupling leading to unpredictable behaviour.


Quote

For the same reason using a 55V MOSFET for 48V isn't safe - switching transients can be as much as the supply voltage due to stray inductance in wiring, so in general 48V load means 100V rated MOSFET.  Don't skimp on ratings, things will fail.

Both the power mosfets we are talking about are avalanche rated and can drive significant inductive loads without a protection diode, so that doesn't apply here.

Avalanche breakdown in MOSFETs is the situation when they dissipate the most power and is the easiest way to blow them up - unless you are sure you can calculate the energy dissipation correctly its much wiser to use conservatively rated devices (certainly at high voltages where pulse energies are much bigger).
Logged

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6614
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Avalanche breakdown in MOSFETs is the situation when they dissipate the most power and is the easiest way to blow them up - unless you are sure you can calculate the energy dissipation correctly its much wiser to use conservatively rated devices (certainly at high voltages where pulse energies are much bigger).

Agreed - but you were talking about transients caused by stray inductance, so the energy we are talking about is tiny.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm interested in doing something similar, can any one tell me which transistor the OP is using to amplify the 20mA to 240mA with the PWM signal...

Is the diagram correct, on the first page, I really don't want to blow anything up.

Thanks
Logged

Pages: 1 [2]   Go Up
Jump to: