Do I need resistors with MOSFETs by MCUs?

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
If I want drive a MOSFET with an MCU, should I use resistors? I'm going to be using it with a heat gun, so high frequency, high power PWM is how I'm going to actually use it. I know that MOSFETs can have current spikes much higher than the MCUs are rated for but that they're for only for micro- or nanoseconds. Should I use like a 10k pulldown and maybe 100 ohm resistor to the MCU? Or should I use a transistor? Or something else altogether?

PS: also yes, I know I can get PWM controllers for fairly cheap, but I'm trying to do this with as little out of pocket as possible right now and I have resistors, MOSFETs, and some MCUs laying around.
 

ElectricSpidey

Joined Dec 2, 2017
3,313
For a heat gun you don't actually need high frequency, so if the MCU has push/pull outputs you just use a 330Ω from the output pin to the gate. (more or less depending on the MCU)

Then of course you want to use a pull-down resistor of a high value to insure the MOSFET is off in case of a MCU failure.

Of course, if the MCU fails with the output high, you should also have some kind of overheat protection at the gun.

All of this based on using a N-Channel MOSFET.
 
Last edited:

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
For a heat gun you don't actually need high frequency, so if the MCU has push/pull outputs you just use a 330Ω from the output pin to the gate. (more or less depending on the MCU)

Then of course you want to use a pull-down resistor of a high value to insure the MOSFET is off in case of a MCU failure.
I'm sure you're right that I don't need an high frequency, but in is there a reason to not use high frequency if I have it available? I'm not familiar with "push/pull outputs," so idk if my MCUs have it. I know about the pull-down, I just don't know if I should use some resistors from MCU to MOSFET.
 

ElectricSpidey

Joined Dec 2, 2017
3,313
The reason to not use high frequency is eliminating the need to use a driver to keep the MOSFET cool. (Providing high current drive for the gate)

And yes, you should always use a series resistor to the gate to reduce ringing and protect the MCU output. (Exact value depends on some variables such as lead inductance and the MCU current limit, for example)

Push/pull outputs are the ones that go both high and low.
 

DickCappels

Joined Aug 21, 2008
10,661
The reason to not allow current spikes higher than recommended on the data sheet is because exceeding that current density, even in short pulses can cause metal migration over time, resulting a failure because of an open conductor after many, many cycles. That is why the publish a maximum current specification.

That is a good reason to use a driver chip or put a resistor in series with the gate as MaxHeadRoom suggested in post #2.
 

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
The reason to not use high frequency is eliminating the need to use a driver to keep the MOSFET cool. (Providing high current drive for the gate)

And yes, you should always use a series resistor to the gate to reduce ringing and protect the MCU output. (Exact value depends on some variables such as lead inductance and the MCU current limit, for example)

Push/pull outputs are the ones that go both high and low.
Just read a little on MOSFET drivers. What I read is that they're mainly needed for really fast switching. So is that how they would help to keep them cool, because switching faster would mean less time at a high resistance, therefore less heat generated? I'm not too worried about that, the heat gun is a relatively small one mainly for heat shrink tubing, so short duration overall, I think a decent heat sink will be fine. And would it make sense to use more than one in parallel, maybe driven by separate pins (or a transistor?) to still get max switching speed? What frequency would you recommend? A few hundred Hz or maybe just a few kHz?

I can see what the current limit is on my MCUs and figure the appropriate resistance. This really isn't a high precision operation, just wanting to have more than "on" and "off" without using a soldering iron as a 100W resistor or something.
 

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
The reason to not allow current spikes higher than recommended on the data sheet is because exceeding that current density, even in short pulses can cause metal migration over time, resulting a failure because of an open conductor after many, many cycles.
Yeah so that makes sense, I just don't understand what specifically that relates to in regards to this thread, unless you're just explaining why I would want resistors from MCU to MOSFET.
 

DickCappels

Joined Aug 21, 2008
10,661
You seemed to be questioning whether it is important to observe the maximum current specification. Now you can decide whether the resistor is a good idea or not.
 

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
You seemed to be questioning whether it is important to observe the maximum current specification. Now you can decide whether the resistor is a good idea or not.
I'm an electrician, so I do know that staying in spec is important, but I also know that depending on several factors, most devices and wires can handle brief periods of overcurrent without damage. I just saw a video where someone used an Arduino nano (40mA max rated current per pin) to drive a MOSFET at 160mA at 490Hz (default PWM frequency) for several seconds without it seeming to be damaged. That's why I wasn't sure, is if an MCU like that could handle currents that high for a few nanoseconds without really risking damage. But if it's a bit risky, I don't need that fast of switching or any kind of precision like that, I'm sure something like a few hundred or low thousands of hertz should be plenty for the heat gun. I did find a video about MOSFET drivers which explained (as I think you said) that slower switching can greatly increase the heat output. But yeah, with a small heatsink and short usage times like 30-60 seconds, I think it'll be just fine.
 

k1ng 1337

Joined Sep 11, 2020
1,038
I've found conflicting sources whether gate and pull up/down resistors are needed. I always put them in and tune them out as needed. Originally I was worried about current like yourself although once you introduce current limiting the signal becomes attenuated in some way which is a whole new monster. I'm still learning.. the filter components are highly specific to the controller in question and some have it built in which can be enabled. I have 3 Arduinos and I've pushed them far beyond the specs including many short circuits. I attribute that largely to excellent design though unfortunately I think all 3 are now unreliable and will end up in the junk pile.

Also look into push/pull circuits. Useful for defining states.
 
Last edited:

MaxHeadRoom

Joined Jul 18, 2013
30,562
If feeding directly from a Pic micro etc, i generally use the rule as shown in Tahmid's blog, otherwise I use a Mosfet driver push-pull/totem pole out such as a TS4427 etc. inverting or non inverting types avail.
 

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
I've found conflicting sources whether gate and pull up/down resistors are needed. I always put them in and tune them out as needed. Originally I was worried about current like yourself although once you introduce current limiting the signal becomes attenuated in some way which is a whole new monster. I'm still learning.. the filter components are highly specific to the controller in question and some have it built in which can be enabled. I have 3 Arduinos and I've pushed them far beyond the specs including many short circuits. I attribute that largely to excellent design though unfortunately I think all 3 are now unreliable and will end up in the junk pile.

Also look into push/pull circuits. Useful for defining states.
What if I used current limiting resistors but multiple pins to increase total current available to the gate pin? Or should I just use a transistor? I don't have any MOSFET drivers handy, but I do have some N-channel transistors to possibly go with the N-channel MOSFETs?
 

BobTPH

Joined Jun 5, 2013
11,466
I have never used a gate resistor between a micro output and MOSFET gate. They inherently have roughly 100 Ohms, so I see no point in adding another 10 as many people seem to.

And I would recommend 100Hz for PWM. This is low enough that you don’t have to worry about time in the linear region.

Bob
 

dl324

Joined Mar 30, 2015
18,222
What if I used current limiting resistors but multiple pins to increase total current available to the gate pin?
What is the gate cap of the MOSFET you're going to use? I have many projects where microcontroller outputs drive gates of logic level MOSFETs directly. You only need pull up/down resistors if you're concerned about what the MOSFETs will do when the gates aren't being driven.

CMOS outputs tolerate shorts every time they're switched. I doubt that driving a gate directly is going to damage them; unless we're talking about some huge gate capacitance In that case, you should be using a gate driver anyway.
I do have some N-channel transistors to possibly go with the N-channel MOSFETs?
BJTs don't have channels and MOSFETs are transistors too. Being imprecise only leads to confusion...

Kudos to you for spelling MOSFET correctly and not being careless and calling them FETs, of which there are dozens of different types. If you're an old timer, FET would be assumed to be JFET because at one time, that's all that was available.
 

k1ng 1337

Joined Sep 11, 2020
1,038
What if I used current limiting resistors but multiple pins to increase total current available to the gate pin? Or should I just use a transistor? I don't have any MOSFET drivers handy, but I do have some N-channel transistors to possibly go with the N-channel MOSFETs?
These are questions for more experienced users. I was just giving some insight which is basically not to generalize. I've had trouble finding definitive guides on your topic so I'm interested as well in the answer.
 

Thread Starter

LikeTheSandwich

Joined Feb 22, 2021
206
What is the gate cap of the MOSFET you're going to use? I have many projects where microcontroller outputs drive gates of logic level MOSFETs directly. You only need pull up/down resistors if you're concerned about what the MOSFETs will do when the gates aren't being driven.

CMOS outputs tolerate shorts every time they're switched. I doubt that driving a gate directly is going to damage them; unless we're talking about some huge gate capacitance In that case, you should be using a gate driver anyway.
BJTs don't have channels and MOSFETs are transistors too. Being imprecise only leads to confusion...

Kudos to you for spelling MOSFET correctly and not being careless and calling them FETs, of which there are dozens of different types. If you're an old timer, FET would be assumed to be JFET because at one time, that's all that was available.
Looks like 62 nC total gate charge on my MOSFETs: https://www.mouser.com/datasheet/2/308/rfp30n06le-1195941.pdf
The transistors I have are NPN, which I understood to mean the same as N-channel. I had no intention of being imprecise, as you can see I do my best to use terms such as MOSFET correctly. I actually thought I was being precise, I was simply mistaken about terminology such as "channel."

So most likely, I should be able to drive a MOSFET just fine without even the resistor? What sort of frequency would you recommend?
 

ThePanMan

Joined Mar 13, 2020
862
The diagrams in the link you sent said "10R" and doesn't that just mean 10 ohms?
Yeah, I caught that too. I believe you're right, 10R is 10Ω
The reason to not allow current spikes higher than recommended on the data sheet is because exceeding that current density, even in short pulses can cause metal migration over time, resulting a failure because of an open conductor after many, many cycles. (underlined by ThePanMan)
without it seeming to be damaged.
Without it SEEMING to be damaged ? ? ? Just because something works for a five minute video doesn't mean it's a long term solution.

Just guessing here but it seems like you're trying to control the heat output of a heat gun. A thermostat switch should do the same thing without having to build all that stuff and hope it lasts. OK, I did see where you said you wanted to do this with parts in hand. I get it. I do the same thing. Once used a MOSFET rated for 600V on a 12 volt circuit. Not always the brightest idea, but it was what I had in hand, like you.

You mentioned a soldering iron in series with your heat gun. What about a light bulb? Easier to see when something is on or off.
 
Top