How to use a MOSFET as a Switch
Introduction
MOSFETs are typically used as switches to turn on or off a circuit based on a digital input. Their main advantage over BJTs is that they require little current to operate (the input impedance is very high). This makes them particularly suitable to be driven from the GPO of a microcontroller. They also have a very low channel resistance, which makes them suitable for handling high current loads.
The project files are available here
Comparison over BJTs
Feature |
BJT |
MOSFET |
|---|---|---|
Drive |
Current driven |
Voltage driven |
Drive power |
Higher |
Low |
Swithching time |
Low |
Low |
Temperature stability |
Poorer, depends on \(h_{fe}\) |
High |
Low-Side and High-Side Switches
High-side and low-side switch configuration
PMOSFET Devices
The PMOSFET devices work as follows:
ON mode
OFF mode
Typically, \(V_{th} ~ -3 V\). Because of this, PMOSFET devices are used as high-side switches. The following simulation use the Qucs-S model for a IRF4905 device.
PMOSFET DCIV curves.
The next simulation shows how the PMOSFET device can be driven from a GPO (without additional drivers) as it requires less than 1 mA to reach saturation.
PMOSFET as a digitally-controlled switch. Low input: ON, High input: OFF.
Notice that in the previous arrangement, the PMOS requires a low-voltage input to turn on, but the logic can be easily inverted by using a NPN transistor.
PMOSFET as a digitally-controlled switch. Low input: OFF, High input: ON.
NMOSFET Devices
NMOSFET devices are used as low-side switches
ON mode
OFF mode
Typically, \(V_{th} ~ 2 V\). Because of this, PMOSFET devices are used as high-side switches. The following simulation use the Qucs-S model for a IRF510 device.
NMOSFET DCIV curves.
Similarly as with the PMOSFET, the NMOSFET requires a tiny gate current to be tuned on and has a low channel resistance.
NMOSFET as a low-side switch.
Notice that it requires a high gate voltage to get proper saturation. In general, GPOs cannot provide such voltage. The next circuit fixes that by driving the NMOSFET with a NPN transistor, so that it can be triggered with lower voltages
NMOSFET as a low-side switch driven with a NPN transistor to lower the control voltage
References
Rohm Semiconductor. “Basics of Si Power Devices”