🟥 High-side P-Channel Load Switch on discrete components
Now there are many integrated solutions (chips), that specially designed for switching powering, but today we'll take a look at the simple basic solution, that can commutate power with using only discrete components – several MOSFET's and resistors.
Structural Block Diagram
Typically load switches switch positive rail, so we will do the same.
*R2 could be changed to shortcut
The main switching element is P-CH MOSFET, when
- Vg = Vs CLOSED
- Vg = 0V OPEN
Additional N-CH MOSFET give a chance to invert control logic and work with push-pull GPIO control with VIN higher than MCU VCC (e.g. 5V).
The following simulations performed in MicroCap 12 ((Analysis -> Dynamic DC...) Alt+4 shortcut). LEDs with current-limiting resistors only for work demonstration purposes.
MCU_GPIO = 0V (LOW) → DISABLED
When control signal is LOW (about 0V) the output voltage is near zero (load not powered).
MCU_GPIO= 3.3V (HIGH) → ENABLED
When control signal is HIGH (about Vgs threshold of X2 (for logic controlled about 1V min)) the output voltage is near zero (load not powered).
*X1 transistor is physically upside down
* Pull-up resistors 4.7k for other purposes, don't pay attention to them
VIN = 5V
❎ Switch disabled
MCU_GPIO = 0V
VOUT = 0V (20.77 mV)
✅ Switch enabled
MCU_GPIO = 3.3V
VOUT = 5V
And here is how it works in real time:
|MCU_GPIO, V||VIN, V||VOUT, V|