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:

V_{DSS} |
maximum drain-source voltage. In my case, it should be at least 15V |

I_{D} |
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. |

P_{D} |
maximum power dissipated in the MOSFET. This is calculated as R_{DS(on)} * I^2. |

V_{GS(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 |

R_{DS(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. |

T_{J} |
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, V_{DSS}=40V, I_{D}=160A, P_{D}=200W, R_{DS(on)}=0,004Ω in a TO-220 package".)

It looks good because:

- it is logic-level activated
- it can handle 15V
- it can handle 60A
- it has a low R
_{DS(on)}which means that the P_{D}will be low (P_{D}= R_{DS(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 (T_{amb} is the max operating ambient temperature. in Denmark the temperature is never above 35 so that should be a safe value):

Tj = P_{D}* R_{ΘJ-A}+ T_{amb}= R_{DS(on)}* I^2 * R_{ΘJ-A}+ T_{amb}= 0,004Ω * 20A^2 * R_{ΘJ-A}+ T_{amb}= 1.6W * 62 °C/W + 35 °C = 99,2 °C + 35 °C = 134,2 °C

Perform this calculation with your own values with this Instacalc calculator.

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-T_{amb})/P_{D}= (175-35)/P_{D}= 140°C / R_{DS(on)}*I_{D}^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*

Links:

A lot about thermal resistance and heatsinks: http://www.jaycar.com.au/images_uploaded/heatsink.pdf

About choosing a MOSFET and explanation of the MOSFET's parameters: http://robots.freehostia.com/SpeedControl/MosfetBody.html