Electronic – P CHANNEL MOSFET gate directly GPIO

microcontrollermosfetswitching

I'm currently using this circuit to control my load from MCU logic HIGH

It works great, after self reflexion why just not do like this ?

What is the difference from the first circuit ? It's safe for my MCU ?
I use NDP6020P is a Vgs(th) max -1V my VCC is 3.7V.

I know in the last circuit when MCU is LOW my load is "ON" instead the first circuit "LOW" = "OFF"

Regards

Best Answer

You can drive an mosfet directly from the GPIO things. But you need to make sure it will work:

  • The Vgs (V gate-source) threshold is when the mosfet turns on. The GPIO voltage should be able to get above this. Generally a mosfet that does this is called a logic level mosfet.
  • The gate capacitance should not exceed the drive capabilities of the GPIO. This is easily solved by simply adding a resistor of ~100 ohm.
  • The switch-on time meets your requirements. This might be slower than with a gate driver, and can cause extras losses in the mosfet when switching high currents.

This is for an N-channel. That is easy.
There are extra difficulties with a P-channel. Since the voltage to turn the P-channel off should not exceed the maximum level of the GPIO. This will typically be a maximum of 5V on five volt tolerant IO.
Meaning switching a p-fet directly on GPIO is not possible when switching more than 5V.

In case of your NDP6020P, the Vgs(th) graph looks like this: NDP6020P Vgs

When Vgs is < 1 Volt, the fet is not conducting. The pullup to Vcc will do this.
When Vgs is > 2 Volt, the fet is conducting. Shorting gate to ground will do this.
The absolute gate voltage may not exceed the maximum GPIO voltage.

Typical circuit, including MCU internals:

schematic

simulate this circuit – Schematic created using CircuitLab

As you see. The 5V, or switched load voltage, may never exceed Vcc/Vdd of the MCU!