From a851a2d646f439f7126c232ba1524c55a8990872 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Fri, 9 Jan 2026 16:45:56 +0800 Subject: Remove _site from git. --- _site/log/mosfet-switches/index.html | 141 ----------------------------------- 1 file changed, 141 deletions(-) delete mode 100644 _site/log/mosfet-switches/index.html (limited to '_site/log/mosfet-switches/index.html') diff --git a/_site/log/mosfet-switches/index.html b/_site/log/mosfet-switches/index.html deleted file mode 100644 index a91f205..0000000 --- a/_site/log/mosfet-switches/index.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - High-side MOSFET switching - - - - - - - - - - - -
-
-
-

HIGH-SIDE MOSFET SWITCHING

-
22 JUNE 2025
-
-

Needed low-power switching for the fingerprint door -lock. Servo and FPM draw high quiescent current–had to -cut power electronically during sleep. MOSFETs can do this.

- -

Schematics belong to Simon Fitch.

- -

Problem with simple low-side switching

- -

Typical approach: GPIO → gate of N-channel MOSFET on low side, pull-down -resistor between gate and drain. Works if MCU and load don’t share common -ground. Doesn’t work when they do (like controlling a component powered by the -same MCU).

- -

Issue: source potential = gate potential - threshold voltage. Example: 3.3V -gate - 1.5V threshold → 1.8V at load–not nearly enough for a servo. Raising -the gate potential above source is not always practical. Solution: high-side -switch.

- -

P-channel high-side switch

- -

P-channel high-side switching circuit

- -

M1 is P-channel (high-side), M2 is N-channel (level converter). MCU output low -→ M2 off → R1 pulls M1 gate to +6V → servo off. MCU output high → M2 conducts → -M1 gate drops to 0V → servo on.

- -

Note: IRF9540 in the schematic doesn’t work. VGS (-10V) for -RDSon too much for 3.3V ATmega328P to drive. NDP6020P is the only -suitable through-hole MOSFET I could find.

- -

N-channel high-side switch

- -

N-channel high-side switching circuit

- -

Less common but works if you have voltage high enough to drive the gate. Both -M1 and M2 are N-channel. MCU low → M2 off → M1 gate rises above threshold → -servo on. MCU high → M2 on → M1 gate drops → servo off. R2 prevents -high-impedance power-up from switching servo on.

- -

M2 needed in both topologies for level conversion (0V ↔ +6V or +9V). Carries -<1mA. Gate-source threshold must be lower than MCU supply. Common choices: -2N7000, 2N7002, BSS138.

- -

Note: D1 flyback diodes protect MOSFETs from voltage spikes caused by inductive -loads (servos, relays).

- -

A BJT alternative

- -

BJT architecture

- -

Simpler, cheaper, more available. Q2 conducts when MCU outputs high. Q2 -amplifies Q1’s base current. Unlike MOSFETs (voltage-driven), BJTs are -current-driven. R3 and R4 must be calculated for desired base currents. Guide on BJT -switches.

- -

Which topology?

- -

MOSFETs preferred in professional work—more efficient when on. Harder to drive -at 3.3V due to VGS requirements for full saturation (low -RDS(on)).

- -

N-channel: Lower on-resistance, cheaper, more efficient than P-channel. Harder -to drive high-side (gate must be above source—requires extra circuitry like -MOSFET drivers).

- -

Used P-channel high-side for the door lock redesign. Simpler to drive from 3.3V -MCU, no driver needed.

- -

Further reading

- - -
- -
-
-
- - - - - - -- cgit v1.2.3