Resistor configuration on MOSFET high side/low side switches

Hello everyone,

as recommended by larryd, I'm trying to implement a P-channel MOSFET high side switch in a circuit of mine to connect peripherals and sensors to Vcc, alongside with an N-channel low-side switch for a relay (so that I have used both configurations once).

While researching for the last three hours or so, I've come across various different resistor configurations of each switch type and I can't quite figure out which one to use and how to dimension the resitors.

First, there are configurations which use both a pull up/pull down resistor on the Gate and a resistor in series with the control I/O pin: |500x384

Then, there are configurations which use pull up/pull down resistors on the Gate, but no resistor in series with the pin: |500x325

And finally, on the same website, a P-channel high side switch configuration is shown with a resistor in series with the I/O pin, but no pull up resistor: |500x331

Now, I can't quite wrap my head around the fact that all three variants are suggested in multiple sources online.

To my understanding, the resistor in series with the control pin is required to prevent any short term high current flow from the MOSFET gate into the I/O due to capacitive properties of the MOSFET Gate. Therefore, I would assume leaving it out puts the Arduino in danger. I found multiple sources that suggested using a 1k resitor in series with the pin, but no explanation for this value. Can anybody help me out here?

Second, I realize that the pull up/pull down resistors are used to keep the gate voltage clean at a high or low level and prevent it from floating. However, if the I/O pin is either explicitly set to 5V or explicitly set to GND (using digital write) at all times, the gate voltage shouldn't float even without a pull up/pull down resistor in place?

Read this. Leo..

A resistor in series with the Arduino pin is to limit the current spikes to safe values for the Arduino pin.

MOSFET gates are like capacitors and will pull short sharp spikes in current when being switched.

The resistor between gate and source is to turn the MOSFET off when the circuit is powered down, when the microcontroller is reseting or starting up. Since a gate is a capacitor it could otherwise be on when the circuit starts up (due to storing charge from last time).

series resistors will be a few hundred ohms or so, gate/source discharge resistors 10k to 100k or so (large enough not to interfere normally).

Note that for high-side switching from a 5V microcontroller you need a level-shifting circuit unless the voltage being switched is 5V.

If switching with 5V the MOSFET must be logic-level.

FYI

|500x375

Let's try that again - click to expand! |500x375 Expand!The "Reversible" example in the bottom right corner is very risky!

Leo's link - from our Nick Gammon, a long-time contributor here - gives detailed explanation.

The first two diagrams above, |500x384 are wrong and misleading as the gate-source resistor is on the wrong side of the series resistor.

And it is important that you can only implement high-side switching with the FET directly from the microcontroller control pin if the supply voltage is the same as to the microcontroller. If the switched supply is at a higher voltage, you require a low-side driver to control the high-side driver. :grinning:

“ The "Reversible" example in the bottom right corner is very risky!”

You are going to “shoot through” that circuit ;)

Paul__B: Leo's link - from our Nick Gammon, a long-time contributor here - gives detailed explanation.

This is gold, thanks for sharing! By fat the best/most concise explanation of the topic I've seen so far.

larryd: |500x375

Great overview, thank you larry!

This answers my questions, I appreciate the help everyone :)

Paul__B: The first two diagrams above, |500x384 are wrong and misleading as the gate-source resistor is on the wrong side of the series resistor.

And it is important that you can only implement high-side switching with the FET directly from the microcontroller control pin if the supply voltage is the same as to the microcontroller. If the switched supply is at a higher voltage, you require a low-side driver to control the high-side driver. :grinning:

Yeah, I found out about that distinction while reseraching MOSFET switching :) But thanks for the reminder.

I also noticed that in many diagrams the pull up was connected to the other side. The shown picture was quoted on several websited regardless - would you mind giving me a heads up on why it makes a difference where the pull up is connected? To my understanding, the level seen by the Gate should be closer to Vcc/GND when the pull up/pull down is connected between the Gate and the series restitor, rather than between the I/O and the series resistor...?

Lets clear one thing up, the relative position of the series current limiting resistor and the gate-source turn-off resistor doesn't actually matter at all.

The series resistor is a few hundred ohms, the gate-source resistor is 10k to 100k. The voltage difference seen at the MOSFET gate through switching them over is insignificant as 5V * (10000 / 10220) = 4.9V, and logic-level MOSFETs are rated for 4.5V or more gate drive.

If it worries you use 100k for the gate-source resistor, then its 4.99V against 5.00V, totally irrelevant.

MarkT:
Lets clear one thing up, the relative position of the series current limiting resistor and the gate-source turn-off
resistor doesn’t actually matter at all.

If you scale the resistors that way, that is.

Not always done however. :grinning:

So the discipline of understanding that the “gate-source turn-off resistor” is not there because of any problem with the FET but is there to hold the controlling microcontroller output until it is correctly initialised and therefore belongs on the microcontroller side, is worth following and avoids any concerns about scaling the resistors. They could even be equal! :astonished: (Not that there would be any obvious advantage, of course.)


So why am I fussy about this then? Well, I tend to pick up on problems caused when people - that is, engineers - do things without understanding what, or why, they are doing them. This is such an example. :sunglasses:

Is there any good reason to put the turn off resistor on the gate side?

I can imagine a situation when you want the turn off resistor quite strong. If the load is heavy, MOSFET have large gate capacitance and the MCU suddenly resets a weak resistor will cause the MOSFET turn off slowly - possibly damaging it.

Smajdalf: Is there any good reason to put the turn off resistor on the gate side?

No, because if you attempt to use a sufficiently low resistor value here which would help to turn off the FET, then it will cause the voltage divider problem.

It has been suggested that putting the resistor on the assembly adjacent to the FET provides protection in case this is disconnected from the microcontroller, however this suggestion is clearly spurious because both the parallel (pull-down) resistor and the series resistor would and should be on the assembly immediately adjacent to the FET.