MOSFET as a switch, try to understand transient behaviour

Yep, I missed a NPN to pull the PNP base low to drive the MOSFET gate high.

That’s got it.

Thanks!

I tried with another MOSFET, which is logic level rated: IRLML0030TRPBF

Interestingly it's still the same problem, it won't work with 5V gate voltage. Obviously I will need at least a transistor for every MOSFET to properly open it!

I would think this transistor is OK for this application assuming 5V arduino. Possible problem is you are switching huge currents (20V/0.6 Ohm ~ 33A!). With such currents you need to be very careful what you are doing.

  1. You can easily damage something
  2. You cannot assume wires have zero resistance. You need to connect Arduino GND directly to the transistor Source - otherwise the Source may have higher voltage than Arduino's GND which will reduce the Gate-Source voltage. You have only very small margin.

I guess you haven't understood the concept of Gate Threshold Voltage yet. If you have a look into the datasheet you provided it says

VGS(th) Gate Threshold Voltage: 1.3-2.3 V with condition VDS = VGS, ID = 25μA

So, with drain current of 25µA, so 0.000025A. The MOSFET begins to open - for lower voltages they can be considered as "closed".

Same data sheet, front page:

ID @ TA = 25°C Continuous Drain Current, VGS @ 10V = 5.3A
ID @ TA = 70°C Continuous Drain Current, VGS @ 10V = 4.3A
IDM Pulsed Drain Current = 21A

For Gate-Source Voltage of 10V!

And, taking the comment of @Smajdalf into account, the MOSFET isn't a good choice. With 27mOhm RDS_on you will overload the device as initial current will be above 21A....

5V is clearly >2.3V, and the RDs_on for 4.5V is still very low...

Yes, I know I have to be careful with 33 A. That's why I only discharge the amount of energy stored in a capacitor of 1E-3F. May be I'll find another MOSFET with a higher pulsed current rating. I learned it's better to use a gate voltage of >10V to be safe!

Sorry, but capacitance is not driving factor. Simply speaking is the current at t=0 given by the capacitor voltage divided by rDS_On ...

i(t=0) = u(Capacitor, t=0) / rDS_on

As you can see: no capacitor value in that equation.

The only reason why your MOSFET hasn't burnt yet is that within your setup there are additional resistors (wiring), stray inductances, that capacitors have internal resistance limiting maximum output current, and that, even though current has been out of MOSFET's specification it wasn't enough current dumped into the MOSFET to destroy the device.
So, it has worked, but no guarantee that it will be always in the future. So look for another MOSFET or get better insight into other current limiting factors (as just described above), add them up, and then you may figure out that your selection may be already good.

It's clear, that the initial current is only dependant on the voltage and not on the energy stored in the capacitor. Because the time constant is so small, thermal impact is not an issue. It's clear, that the MOSFET could not even handle such a current for a second!

Why not put a low value resistor in there, sufficient to bring the instantaneous current to within the transistor spec?

Perhaps it has something to do with the fact that a mosfet is not a capacitor.

Might be the most simple solution....

There is also a solenoid in the circuit. Since it is an inductor i(0) ~ 0. The solenoid has resistance about 0.6 Ohm, order of magnitude more than the used MOSFET R_DS when driven properly.

The second MOSFET used has peak rating less than theoretical maximum current. I think exceeding this value may damage the transistor by other means than simple dissipated energy.

I think there is something wrong in that calculation. The very first referenced MOSFET has a rDS_on of 64mOhm, so current (without solenoid) is i(t=0) = 20V/0.064Ohm = 312.5A, and not ~33A. I think you missed a zero in the beginning and now another one comes around ... isn't it?

Nevertheless, so even with solenoid the current is about 20V/0.7Ohm ~ 28A (--> too much).

With respect so solenoid it may help, but just with solenoid's stray inductance ... I believe.

Well, what is the initial current? The DC resistance is 0.6Ohm and that is always present. In my understanding the DC resistance of 0.6 Ohm determines the 33A. The IRF530N has a pulsed current rating of 60A, so I think it should be fine!

Well, now it was me looking into the wrong row in the data sheet :roll_eyes:.

You are right, as long as the switched current stays within the limits for pulsed current, anything should be fine. Just take care not only about amplitude (33A conservative approach) into account but also duration and duty cycle.

If you are taking the device up to the limits like this you almost certainly need a solid gate drive circuit - the more current through the channel the more gate charge is needed to turn the device on. The ideal component to do this is a MOSFET gate driver chip, naturally.

For 33A load the on-resistance of the MOSFET should ideally be 5 milliohms or less to keep a nice low dissipation that can be managed with a modest heatsink.

So yes, the FET is a capacitor!

Well, that's a stretch. I wonder what a side by side charging curve comparison would show.
For starters , where do you get the fet capacitance value?

At risk of sounding facetious, it’s in the FET data sheet…

"So yes, the FET is a capacitor!"

You mean pF ?
Oh yeah, that's one hell of a cap isn't it ?

It's one thing to say a cap and a fet have some similarities since there is gate capacitance. It
quite another thing to say they are the same thing, which is obviously not true. They are
totally different devices with totally different
functions. The comparison is only valid to point
and is limited to the pF range.