Electronic – Two mosfets, one digital pin

component-selectioncomponentsmosfetwiring

Im new to use of mosfets.

If I was to use two Mosfets with an Arduino, would I be able to drive them both with just one digital pin connected to both mosfet's gates but opposite actions?

For example: Digital pin 2 goes High, Mosfet-1 opens a circuit, Mosfet-2 closes a circuit… and vice versa.

I'm currently using n-channel mosfets but I read about p-channel. Having p & n gates tied to one pin?

Best Answer

The answer to your question is, yes sometimes.

Provided the P-Channel device is connected to the same rail as the MCU, you can use a circuit like below quite happily.

schematic

simulate this circuit – Schematic created using CircuitLab

This circuit turns on either LED depending on the state of the GPIO pin. When LOW M1 will be on and D1 will be lit. When high, M2 will be on and D2 will light.

You do however need to be aware that you are doubling the gate capacitance being driven by the MCU pin and as such turn on and turn off times will be extended in this configuration. The double cap also increases the required gate switching current.

Note each MOSFET should have it's own gate resistor, R1 and R2 here, and those should be sized so the switching current of both added together does not exceed the drive current of the GPIO.

The "default condition resistor", R5, can be a pull down as shown, or a pull up, depending on which LED you want to be on when the MCU is not initialized yet.

Both the P and N MOSFETS need to be chosen to have a maximum Vgs-Threshold around Vcc/2.

NOTE: The MOSFETS will not switch at exactly the same time. As such you should not depend on this circuit to drive a push-pull type load or other circuit that depends on edge coincidence.


If the P-Channel is attached to some higher rail, then you need something more complicated, like Wesley's answer.

Related Topic