Pure Electronics

←Index

MOSFET Magic

by Professor Petabyte

 

What is a MOSFET?

A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a semiconductor device that acts as an electronic switch or amplifier. It controls the flow of current between two terminals (source and drain) by applying a voltage to a third terminal (gate). Essentially, it regulates current flow based on voltage input, making it fundamental in digital and analog circuits.

What is the Difference Between a BJT and a MOSFET

The main difference is that a BJT (Bipolar Junction Transistor) is a current-controlled device, while a MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a voltage-controlled device. BJTs use base current to control collector-emitter current, whereas MOSFETs use gate voltage to control drain-source current. Key differences also include their terminal names (base/collector/emitter for BJT, gate/drain/source for MOSFET), efficiency, and primary applications.

History of Transistors

The transistor was invented in 1947 by John Bardeen, Walter Brattain, and William Shockley at Bell Labs to replace bulky vacuum tubes, with the initial device being a point-contact transistor made of germanium. Their work, which earned them the 1956 Nobel Prize in Physics, led to the development of the more practical bipolar junction transistor by Shockley in 1948 and later the widely used silicon MOSFET. This groundbreaking invention revolutionized electronics by enabling miniaturization, reduced power consumption, and paved the way for modern computers and electronics

Basic Structure & Terminals

There are two main types:

TypeSymbolConducts whenCommon Use
N-channelN-MOSGate voltage > SourceLow-side switching
P-channelP-MOSGate voltage < SourceHigh-side switching

What are MOSFETs Used For?

  1. Switching Power
    1. Turning motors, LEDs, or relays on and off efficiently.
    2. Used in power supplies (DC-DC converters, buck/boost regulators).
    3. Example: Used to control a 12V LED strip using a 3.3V GPIO pin.
  2. Amplification
    1. Small-signal MOSFETs can amplify analog signals.
    2. Used in audio amplifiers, RF circuits, and op-amp internals.
  3. Digital Logic
    1. The foundation of CMOS logic (Complementary MOS).
    2. Billions of tiny MOSFETs form CPUs and memory chips.
  4. Motor Control
    1. Used in H-bridges, ESCs (Electronic Speed Controllers) for DC motors and brushless motors.
  5. Battery Management
    1. Switching charging circuits or isolating batteries when overvoltage/undervoltage is detected.

NPN and PNP MOSFETs

Using NPN and PNP MOSFETs is a bit of a misnomer — MOSFETs are not categorized as NPN/PNP, which are bipolar junction transistor (BJT) types. Instead, MOSFETs come in two polarities:

The following information focuses on how to use N-channel and P-channel MOSFET.

Brief Comparison

Feature N-Channel MOSFET P-Channel MOSFET
Turns ON when... Gate voltage is higher than Source (typically by 2-4V) Gate voltage is lower than Source (typically by 2-4V)
Common Switching Use Low-side switching (between load and GND) High-side switching (between +V and load)
Gate Drive Requirement Needs gate pulled high to turn ON Needs gate pulled low to turn ON
Preferred For Efficiency, speed, cost, availability Simpler high-side switch (but less efficient)
On-resistance (RDSon) Typically lower Typically higher
Availability Widely available and cheaper Less common, especially logic-level types
Control from MCU (5V logic) Direct drive (if logic-level N-FET) Possible, but only if Source is ≤5V and P-FET is logic-level
Internal body diode Conducts from Drain to Source Conducts from Source to Drain

N-Channel MOSFET - Low-Side Switching

Common use: Switching the negative/ground side of a load.

Example: LED control from microcontroller

How to Use:

  1. Connect Source to GND.
  2. Connect Drain to the negative side of the load.
  3. Drive the Gate with a voltage higher than the Source (e.g. 5V) to turn it ON.
  4. Use a pull-down resistor (~10kΩ) to ensure the gate stays LOW when not driven.

Gate-Source Voltage (VGS) must be above the threshold (typically 2-4V for logic-level MOSFETs).

P-Channel MOSFET - High-Side Switching

Common use: Switching the positive side of a load.

Example:

How to Use:

  1. Connect Source to +V (e.g., +5V).
  2. Connect Drain to the positive side of the load.
  3. Pull the Gate LOW (below Source) to turn it ON.
  4. Use a pull-up resistor (~10kΩ) to keep the gate HIGH when not driven.

VGS must be negative enough to turn the MOSFET on (e.g., -4V). That means Gate needs to be pulled close to GND while Source is at +5V.

Tips and Gotchas

  • Gate Driving: MOSFET gates are capacitive; if switching fast or frequently, use a gate driver to charge/discharge properly.
  • Logic-Level MOSFETs: Choose these if driven directly from a 3.3V or 5V GPIO.
  • Body Diode: All MOSFETs have an internal diode (Drain → Source); this affects how current flows in reverse conditions.
  • Avoid floating gates - always tie gates with resistors to defined voltages.
  • Example Components

    Use CaseRecommended Part
    N-Channel (logic level)IRLZ44N, IRL540N
    P-Channel (logic level)IRF9540N, IRF4905

    So What Exactly Do 'High-side' vs 'Low-side' Switching Mean?

    This is one of those fundamental but crucial electronics concepts....

    High-side vs Low-side Switching

    A MOSFET switch is often used to control power to a load (motor, LED, circuit board, etc.).
    The difference comes down to where you place the MOSFET relative to the load and the supply rails.

    Low-Side Switching

    Advantages

    Disadvantages

    High-Side Switching

    Advantages

    Disadvantages

    Summary

    TaskUse N-ChannelUse P-Channel
    Switching ground (low-side)YesRarely
    Switching +V (high-side) Needs driver Yes
    Logic level control (3.3-5V) Logic N-FETLogic P-FET (less common)

    Quick Comparison: N-Channel vs. P-Channel MOSFETs

    FeatureN-Channel MOSFETP-Channel MOSFET
    Turns ON when...Gate voltage is higher than Source (typically by 2-4V)Gate voltage is lower than Source (typically by 2-4V)
    Common Switching UseLow-side switching (between load and GND)High-side switching (between +V and load)
    Gate Drive RequirementNeeds gate pulled high to turn ONNeeds gate pulled low to turn ON
    Preferred ForEfficiency, speed, cost, availabilitySimpler high-side switch (but less efficient)
    On-resistance (RDSon)Typically lowerTypically higher
    AvailabilityWidely available and cheaperLess common, especially logic-level types
    Control from MCU (5V logic)Direct drive (if logic-level N-FET)Possible, but only if Source is ≤5V and P-FET is logic-level
    Internal body diodeConducts from Drain to SourceConducts from Source to Drain

    On-resistance (RDSon) - Is it really lower in N-channel MOSFETs?

    Yes. Here's why:

    What is RDS(on) in a MOSFET?

    RDS(on) = "Drain-to-Source Resistance when on".

    It's the effective resistance between the MOSFET's drain and source terminals when the MOSFET is fully turned on (saturated conduction mode).

    Saturation mode is when a transistor is fully on, acting like a nearly ideal short circuit between its collector and emitter, with current flowing freely through it. This state is achieved by biasing the transistor's base-emitter and base-collector junctions to be forward-biased, allowing significant current to flow. Transistors are typically driven into saturation for use as switches, where a fully on state represents the "closed" position.

    Why it matters

            P = I2 x RDS(on)

    Where:

    Example

    Suppose a MOSFET has:-
       RDS(on) = 10mΩ (or 0.01Ω) and carries 10 Amps:
       P = (10)2 x 0.01 = 1W

    So the MOSFET will dissipate 1 watt as heat.

    If instead:-
       RDS(on) = 50mΩ (or 0.05Ω) and carries 10 Amps:
       P = 100 x 0.05 = 5W

    That's 5 times more heat, which may require a heatsink.

    Trade-offs

    Summary

    RDS(on) is a key figure of merit that tells you how much resistance the MOSFET has when acting as a closed switch. The lower that resistance is, the more current you can pass with less power loss.

    How does RDS(on) Depend on Gate Drive Voltage (Vgs)?

    RDS(on) vs Gate-to-Source Voltage (Vgs)

    A MOSFET doesn't turn on like a light switch — it gradually becomes more conductive as you increase Vgs (the voltage between Gate and Source).

    Example (from a real datasheet)

    Take an IRLZ44N (logic-level N-channel MOSFET):

    So driving it with only 3.3 V logic instead of 10 V increases resistance 5-6x → much more heat.

    Common Pitfall

    People see "Logic-Level MOSFET" and assume it works perfectly at 3.3 V.

    Design Guideline

    In short

    RDS(on) shrinks as Vgs increases. To minimize heating, you need to drive the MOSFET gate with enough voltage for it to reach its lowest RDS(on).

    Example Comparison

    MOSFETTypeP-Channel MOSFET
    IRLZ44NN-channel~0.022 Ω
    IRF9540NP-channel~0.117 Ω

    Both are common power MOSFETs in the same family. The N-channel one has ~5x lower on-resistance.

    Why it matters:








    © 2025 Professor Petabyte