If you need to switch a DC load with a microcontroller, skip the bipolar junction transistors (BJTs) and reach for a logic-level N-channel MOSFET. For 90% of bench and hobbyist tasks, the IRLZ44N (TO-220 package, up to 20A continuous) or the AO3400 (SOT-23 SMD package, up to 5A) are your safe, default MOSFET transistors. They turn on fully with 3.3V or 5V logic without requiring a dedicated gate driver IC.

This guide cuts through the semiconductor physics and gives you the exact decision paths, circuit values, and testing procedures you need to put a MOSFET on the board and make it work.

The MOSFET Pinout and Symbol Basics

A Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET) has three terminals: Gate (G), Drain (D), and Source (S). The Gate is the control terminal, electrically isolated from the rest of the device by a thin layer of silicon dioxide. Because of this insulation, the Gate draws virtually zero steady-state current—it only draws current to charge and discharge its internal capacitance.

For the standard N-channel enhancement MOSFET (the most common type used for low-side switching):

  • TO-220 Package: Holding the transistor with the text facing you and the pins pointing down, the pins from left to right are Gate, Drain, Source. The large metal tab on the back is internally connected to the Drain.
  • SOT-23 Package (SMD): Looking down at the three pins with the single pin on top, the top pin is the Gate, the bottom-left is the Source, and the bottom-right is the Drain.

In circuit schematics, the N-channel symbol features three lines for the channel, with an arrow on the Source terminal pointing inward toward the channel. Crucially, the symbol includes a parasitic body diode pointing from the Source to the Drain. This diode is a physical byproduct of how the silicon is manufactured and dictates why we use N-channel MOSFETs for low-side switching (Source to ground) and P-channel for high-side switching (Source to VCC).

Operating Regions and Biasing for Switching

The terminology for MOSFET operating regions is notoriously confusing because it is exactly the opposite of BJT terminology. When using MOSFET transistors as switches, we want them in the Ohmic (Linear) Region, not the Saturation region.

Operating Region Bias Condition Behavior Use Case
Cutoff V_GS < V_th No channel forms. I_D = 0. Acts as an open switch. Switch OFF state
Ohmic (Linear) V_GS > V_th AND V_DS < (V_GS - V_th) Channel is fully enhanced. Acts as a low-value resistor (R_DS(on)). Switch ON state
Saturation V_GS > V_th AND V_DS > (V_GS - V_th) Channel pinches off near the drain. I_D is constant regardless of V_DS. Amplifiers / Constant current sources
Bench Tip: To ensure your MOSFET stays in the Ohmic region when switching, your Gate-to-Source voltage (V_GS) must be significantly higher than the threshold voltage (V_th). If a datasheet lists V_th as 1.0V to 2.0V, driving the gate with 2.5V will leave the device in the linear transition zone, causing it to act as a heater rather than a switch. Always look for the V_GS value at which R_DS(on) is specified (usually 4.5V or 10V).

The Decision Tree: Picking the Right MOSFET

Do not overcomplicate component selection. Use this decision matrix to terminate your search and pick a concrete part number based on your load current and logic voltage.

Application Scenario Required Traits Concrete Part Pick Key Ratings
Signal routing, LEDs, loads < 3A, space-constrained SOT-23 SMD, Logic-Level (V_GS = 2.5V) AO3400 (or Si2302) 30V V_DS, 5.8A I_D, 35mΩ R_DS(on)
Motors, solenoids, heaters 3A - 20A, 3.3V/5V logic TO-220 Through-hole, Logic-Level (V_GS = 4.5V) IRLZ44N 55V V_DS, 47A I_D, 22mΩ R_DS(on)
High-current loads 20A - 60A, 3.3V/5V logic TO-220, Ultra-low R_DS(on), Logic-Level IRLB8721 30V V_DS, 62A I_D, 4.5mΩ R_DS(on)
High-side switching (load connected to ground) P-Channel, TO-220 IRF9540N -100V V_DS, -23A I_D (Requires gate driver for 3.3V logic)

Note: Avoid the classic IRF520 for microcontroller projects. It is not a logic-level MOSFET; it requires 10V on the gate to fully turn on, meaning a 5V Arduino or 3.3V ESP32 will leave it partially on, leading to thermal failure.

A Complete 12V Motor Switching Circuit

Here is a battle-tested circuit for driving a 12V, 5A DC motor using an ESP32 (3.3V logic) and an IRLZ44N. This design includes protection against the three most common MOSFET killers: floating gates, inductive kickback, and gate ring.

  1. The Gate Drive: Connect the ESP32 GPIO pin to the MOSFET Gate through a 100Ω series resistor. This resistor limits the inrush current required to charge the gate capacitance, protecting the microcontroller's GPIO from exceeding its absolute maximum current rating.
  2. The Pull-Down: Connect a 10kΩ resistor between the Gate and Source (Ground). When the ESP32 boots up, its GPIO pins are high-impedance (floating). Without this pull-down, ambient noise can capacitively couple into the gate, partially turning on the MOSFET and destroying it via thermal runaway.
  3. The Load: Connect the motor's positive terminal to the 12V supply. Connect the motor's negative terminal to the MOSFET Drain.
  4. The Flyback Diode: Place a 1N5819 Schottky diode in parallel with the motor. The cathode (stripe) connects to the 12V side, and the anode connects to the Drain. When the MOSFET turns off, the motor's collapsing magnetic field generates a massive reverse voltage spike. The diode clamps this spike to ~0.4V above the supply rail, preventing it from exceeding the MOSFET's 55V V_DS rating and punching through the silicon.
  5. The Source: Connect the MOSFET Source directly to the system Ground.

For a deeper look into why gate resistors and pull-downs are non-negotiable in power electronics, review the application notes on TI's MOSFET gate driver design guides, which detail the Miller plateau and ringing effects.

How MOSFETs Fail and How to Test Them

MOSFET transistors rarely fail gracefully. They typically fail short-circuit, often taking your microcontroller or power supply with them. Understanding the failure modes helps you design better protection.

  • Gate Punch-Through: The silicon dioxide layer between the Gate and the channel is incredibly thin. If V_GS exceeds ±20V (often caused by static discharge or an inductive spike coupling back to the gate), the insulation breaks down. The Gate shorts to the Source, and the device is dead.
  • Avalanche Breakdown: If the Drain-to-Source voltage exceeds the V_DS rating (e.g., a 60V spike on a 55V rated IRLZ44N without a flyback diode), the device enters avalanche breakdown. If the energy exceeds the datasheet's Single Pulse Avalanche Energy (E_AS) rating, the silicon melts internally.
  • Thermal Runaway: Unlike BJTs, a MOSFET's R_DS(on) has a positive temperature coefficient. As it gets hot, its resistance increases. If you are operating near the current limit, higher resistance means more I²R heating, which increases resistance further, creating a positive feedback loop that ends in a melted TO-220 package.

The Multimeter Diode-Test Procedure

You can verify an N-channel MOSFET's health on the bench using a standard digital multimeter (DMM) without desoldering it from a powered-down board (though out-of-circuit is more reliable).

  1. Set your DMM to Diode Test mode.
  2. Short the Gate and Source pins together with a screwdriver or tweezers to discharge any residual gate capacitance.
  3. Place the Red probe on the Source and the Black probe on the Drain. You are forward-biasing the internal body diode. The meter should read between 0.400V and 0.600V.
  4. Swap the probes (Red on Drain, Black on Source). The meter should read OL (Open Loop), confirming the diode blocks reverse current.
  5. Now, leave the Black probe on the Source, and briefly touch the Red probe to the Gate. The DMM's internal battery (usually 3V to 9V) will charge the gate capacitance and turn the MOSFET on.
  6. Move the Red probe back to the Drain (Black remains on Source). The meter should now read near 0.000V (or a very low resistance), indicating the channel is conducting.
  7. Short the Gate and Source together again to discharge it. Re-test Drain to Source; it should return to OL.

If the device reads 0.000V in both directions before you charge the gate, or if it fails to turn on when charged, the MOSFET is blown and must be replaced.

Safe Default Part Numbers for the Workbench

Keep these specific part numbers stocked in your lab. They cover 95% of DC switching requirements and are widely available from major distributors like Digi-Key and Mouser. For comprehensive parameter breakdowns, cross-reference these with Vishay's MOSFET parameter guides or All About Circuits' tutorials on MOSFET specs.

Part Number Type Package V_DS (Max) I_D (Continuous) R_DS(on) @ V_GS Best Used For
IRLZ44N N-Channel TO-220 55V 47A 22mΩ @ 5V General purpose 12V/24V motor and heater switching via 5V/3.3V logic.
IRLB8721 N-Channel TO-220 30V 62A 4.5mΩ @ 4.5V High-current 12V loads (e.g., large LED strips, e-bike accessories).
AO3400 N-Channel SOT-23 30V 5.8A 35mΩ @ 4.5V Compact PCB designs, driving relays or small solenoids from an ESP32.
IRF9540N P-Channel TO-220 -100V -23A 117mΩ @ -10V High-side power routing. Requires a small NPN transistor to level-shift the gate drive.
Safety Caveat: When switching loads above 15A continuously, even a 22mΩ R_DS(on) will dissipate over 5W of heat (P = I²R). At 5W, a bare TO-220 package will exceed its 175°C junction temperature limit and fail. Always calculate your I²R losses and attach an appropriate extruded aluminum heatsink with thermal paste if your continuous dissipation exceeds 2W.