# jenswilly.dk

## Choosing the correct MOSFET

I just found out I forgot to post this article about choosing the right MOSFET for the autogun project. Here it is:

When switching on the gun, we're passing a significant amount of current through the MOSFET.
As shown on the power test tables in this posting, we should expect a peak of 50 Amps and a sustained current of about 20 Amps.
So the MOSFET should be able to handle at least 15V and 60A. And since we are turning on the MOSFET from the MCU control circuitry at 5V the gate threshold should be low enough for the MOSFET to turn fully on at 5V. In practice this means a logic-level MOSFET.

The datasheets of MOSFETs will list a whole bucketful of specifications. Some of the important ones are:

 VDSS maximum drain-source voltage. In my case, it should be at least 15V ID maximum drain current. In my case, it should be at least 60A to be safe. (Although the *sustained* current will only be 20A.) Be careful with this one. Often it will be specified as one value "silicon-limited" and another - lower one - as "package-limited". This means the chip itself can handle a high current but the casing might melt or burst into flames. Which is bad. So use the lower one. Also, it might be specified as one value "@ 25 °C" and another - again, lower - "@ 110 °C". Again, use the lower one since it is highly unlikely that the MOSFET will be at 25 °C when we are pulling 20A through it. PD maximum power dissipated in the MOSFET. This is calculated as RDS(on) * I^2. VGS(th) gate threshold voltage. This is a measure of how much voltage on the gate is required to turn the MOSFET on. As mentioned, since we're dealing with logic-level voltages, it should be no more than 2.5V RDS(on) drain-source resistance when fully on. This will determine how much power is dissipated in the MOSFET's junction. Since all the power dissipated in the MOSFET junction is converted into heat we need to check how fast we can get rid of that heat. Otherwise, the MOSFET will heat up and eventually break. And possibly (albeit not likely) melt and/or burst spectacularly into flames. Therefore, we will also take a good, long look at the following: RΘJ-A thermal resistance between junction and ambient. This is a measure of how much power can be dissipated as heat from the junction to the surrounding air without any help. RΘJ-C thermal resistance between junction and case. We might need this if we need a heatsink. In that case we need to add this with the thermal resistance of the heatsink (RΘHS) and check if we are below the max allowable thermal resistance. TJ maximum operating temperature for the junction. We need this to check if enough heat is dissipated.

Browsing through dozens of MOSFETs, this one looked promising: IRL1404PbF. It is listed as a "N-LogL 40V 160A 200W 0,004R TO220AB" MOSFET.
(Which means "N-channel, logic-level, VDSS=40V, ID=160A, PD=200W, RDS(on)=0,004Ω in a TO-220 package".)
It looks good because:

1. it is logic-level activated
2. it can handle 15V
3. it can handle 60A
4. it has a low RDS(on) which means that the PD will be low (PD = RDS(on) * I^2 = 0,004Ω * 20A^2 = 1,6W) which means that we just might be able to get by without a heatsink

To check if we can dissipate the heat fast enough, we need to calculate how hot the junction becomes under load by using the following formula (Tamb is the max operating ambient temperature. in Denmark the temperature is never above 35 so that should be a safe value):

```Tj  = PD * RΘJ-A + Tamb
= RDS(on) * I^2 * RΘJ-A + Tamb
= 0,004Ω * 20A^2 * RΘJ-A + Tamb
= 1.6W * 62 °C/W + 35 °C
= 99,2 °C + 35 °C
= 134,2 °C```

The result is below the specified 175 °C.
(If, however, we were to run 25A continous current through, we would end up with a junction temp of 190 °C (do the math yourself) which is too high.)

As you can see the current rating for a MOSFET should be taken with a grain of sand. The IRL1404 MOSFET is rated to 160A. But without a heatsink it can't even handle 25A continously.

### Bonus reading: choosing a heatsink

If we ended up with a too high temperature, we would need to mount a heatsink to the MOSFET in order to lower the thermal resistance.
In that case, instead of using RΘJ-A for thermal resistance, which is junction-to-ambient air resistance, we would use the combined thermal resistance by adding the following:

 RΘJ-C junction-to-casing (0,75 °C/W for the IRL1404) RΘC-S casing-to-heatsink (0,5 °C/W for a "flat, greased surface" and typically between 0,5 and 1,5 depending on whether you use thermal grease, mica or bolt it directly on) RΘHS heatsink-to-ambient (depending on the heatsink)

We can calculate the maximum thermal resistance that will dissipate the heat from the junction fast enough by using the above formula (transposed a bit):

```maxRΘJ-A = (Tj-Tamb)/PD
= (175-35)/PD
= 140°C / RDS(on)*ID^2
= 140°C / 0,004Ω * 20 A ^2
= 140°C / 0,004Ω * 400 A^2
= 140°C / 1.6W
= 87.5 °C/W```

In this case the max thermal resistance of the junction-ambient without heatsink is lower than that (per the datasheet it is 62 °C/W) so we don't need a heatsink, but if we calculated it for a 25A sustained current we would end up with a max thermal resistance of 56 °C/W and since the j-c plus c-s is about 2 °C/W (if we don't use thermal grease) we would need a heatsink with a maximum RΘ of 54 °C/W. Like this little one here which has a thermal resistance at normal airflow (as opposed to "forced", i.e. fan ventilated) of 16,2 °C/W.

*whew*