diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-09 16:45:56 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-01-09 16:45:56 +0800 |
| commit | a851a2d646f439f7126c232ba1524c55a8990872 (patch) | |
| tree | 0d8870fae739b72e37fc3ce1a672388ce7592a9c /_site/log/mosfet-switches | |
| parent | 3b0f6bd6879d8a32d89dcccc739a73e0e9e823a7 (diff) | |
| download | www-a851a2d646f439f7126c232ba1524c55a8990872.tar.gz | |
Remove _site from git.
Diffstat (limited to '_site/log/mosfet-switches')
| -rw-r--r-- | _site/log/mosfet-switches/bjt.png | bin | 12838 -> 0 bytes | |||
| -rw-r--r-- | _site/log/mosfet-switches/index.html | 141 | ||||
| -rw-r--r-- | _site/log/mosfet-switches/n_high_side.png | bin | 10825 -> 0 bytes | |||
| -rw-r--r-- | _site/log/mosfet-switches/p_high_side.png | bin | 10724 -> 0 bytes |
4 files changed, 0 insertions, 141 deletions
diff --git a/_site/log/mosfet-switches/bjt.png b/_site/log/mosfet-switches/bjt.png Binary files differdeleted file mode 100644 index 9858fa7..0000000 --- a/_site/log/mosfet-switches/bjt.png +++ /dev/null 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 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>High-side MOSFET switching</title> - <link rel="stylesheet" href="/assets/css/main.css"> - <link rel="stylesheet" href="/assets/css/skeleton.css"> -</head> - - - <body> - - <div id="nav-container" class="container"> - <ul id="navlist" class="left"> - - <li > - <a href="/" class="link-decor-none">hme</a> - </li> - <li > - <a href="/projects/" class="link-decor-none">poc</a> - </li> - <li > - <a href="/about/" class="link-decor-none">abt</a> - </li> - <li> - <a href="/cgi-bin/find.cgi" class="link-decor-none">lup</a> - </li> - <li> - <a href="/feed.xml" class="link-decor-none">rss</a> - </li> - </ul> -</div> - - - - <main> - <div class="container"> - <div class="container-2"> - <h2 class="center" id="title">HIGH-SIDE MOSFET SWITCHING</h2> - <h5 class="center">22 JUNE 2025</h5> - <br> - <div class="twocol justify"><p>Needed low-power switching for the <a href="../fpm-door-lock-lp/">fingerprint door -lock</a>. Servo and FPM draw high quiescent current–had to -cut power electronically during sleep. MOSFETs can do this.</p> - -<p>Schematics belong to <a href="https://electronics.stackexchange.com/users/292884/simon-fitch" class="external" target="_blank" rel="noopener noreferrer">Simon Fitch</a>.</p> - -<h2 id="problem-with-simple-low-side-switching">Problem with simple low-side switching</h2> - -<p>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).</p> - -<p>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> - -<h2 id="p-channel-high-side-switch">P-channel high-side switch</h2> - -<p><img src="p_high_side.png" alt="P-channel high-side switching circuit" /></p> - -<p>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.</p> - -<p>Note: IRF9540 in the schematic doesn’t work. V<sub>GS</sub> (-10V) for -RDS<sub>on</sub> too much for 3.3V ATmega328P to drive. NDP6020P is the only -suitable through-hole MOSFET I could find.</p> - -<h2 id="n-channel-high-side-switch">N-channel high-side switch</h2> - -<p><img src="n_high_side.png" alt="N-channel high-side switching circuit" /></p> - -<p>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.</p> - -<p>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.</p> - -<p>Note: D1 flyback diodes protect MOSFETs from voltage spikes caused by inductive -loads (servos, relays).</p> - -<h2 id="a-bjt-alternative">A BJT alternative</h2> - -<p><img src="bjt.png" alt="BJT architecture" /></p> - -<p>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. <a href="https://teachmetomake.wordpress.com/how-to-use-a-transistor-as-a-switch/" class="external" target="_blank" rel="noopener noreferrer">Guide on BJT -switches</a>.</p> - -<h2 id="which-topology">Which topology?</h2> - -<p>MOSFETs preferred in professional work—more efficient when on. Harder to drive -at 3.3V due to V<sub>GS</sub> requirements for full saturation (low -R<sub>DS(on)</sub>).</p> - -<p>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).</p> - -<p>Used P-channel high-side for the door lock redesign. Simpler to drive from 3.3V -MCU, no driver needed.</p> - -<h2 id="further-reading">Further reading</h2> - -<ul> - <li><a href="https://www.embeddedrelated.com/showarticle/98.php" class="external" target="_blank" rel="noopener noreferrer">Different MOSFET -topologies</a></li> - <li><a href="https://www.embeddedrelated.com/showarticle/809.php" class="external" target="_blank" rel="noopener noreferrer">How to read -MOSFET datasheets</a></li> - <li><a href="https://teachmetomake.wordpress.com/how-to-use-a-transistor-as-a-switch/" class="external" target="_blank" rel="noopener noreferrer">How to use a -transistor as a switch</a></li> - <li><a href="https://forum.digikey.com/t/guide-to-selecting-and-controlling-a-mosfet-for-3-3-vdc-logic-applications/42606" class="external" target="_blank" rel="noopener noreferrer">Guide to -selecting and controlling a MOSFET for 3.3 VDC logic applications</a></li> - <li><a href="https://forum.digikey.com/t/driving-a-large-relay-from-a-3-3-vdc-microcontroller-using-an-npn-darlington-transistor/41751" class="external" target="_blank" rel="noopener noreferrer">Driving a large -relay from a 3.3 VDC microcontroller using an NPN Darlington transistor</a></li> -</ul> -</div> - <p class="post-author right">by W. D. Sadeep Madurange</p> - </div> - </div> - </main> - - <div class="footer"> - <div class="container"> - <div class="twelve columns right container-2"> - <p id="footer-text">© ASCIIMX - 2026</p> - </div> - </div> -</div> - - - </body> -</html> diff --git a/_site/log/mosfet-switches/n_high_side.png b/_site/log/mosfet-switches/n_high_side.png Binary files differdeleted file mode 100644 index c851768..0000000 --- a/_site/log/mosfet-switches/n_high_side.png +++ /dev/null diff --git a/_site/log/mosfet-switches/p_high_side.png b/_site/log/mosfet-switches/p_high_side.png Binary files differdeleted file mode 100644 index 9f5397a..0000000 --- a/_site/log/mosfet-switches/p_high_side.png +++ /dev/null |
