If you need to switch a DC load with a microcontroller, the default safe pick is a logic-level N-channel MOSFET transistor like the IRLZ44N (for high currents up to 47A) or the AO3400 (for low currents up to 5.7A). To drive it reliably from a 3.3V or 5V GPIO pin, wire a 100Ω series gate resistor to limit inrush current, add a 10kΩ pull-down resistor to prevent floating-gate turn-on during boot, and always place a flyback diode across inductive loads. Skip the standard IRF520 unless you are driving the gate with 10V or higher.

MOSFET Transistor Pinout, Symbol, and the Body Diode Trap

A Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET) has three primary terminals: the Gate (G), Drain (D), and Source (S). The Gate is electrically isolated from the channel by a thin silicon dioxide layer, meaning it draws virtually zero steady-state current. You are not pushing current through the gate; you are charging a tiny capacitor (the gate capacitance, Ciss) to create an electric field.

For the ubiquitous TO-220 through-hole package, holding the component facing you with the pins pointing down, the pinout from left to right is Gate, Drain, Source. The large metal tab on the back is internally connected to the Drain. For surface-mount SOT-23 packages (like the AO3400), looking down at the component with the text reading left-to-right, Pin 1 is Gate, Pin 2 is Source, and Pin 3 is Drain.

The Body Diode Trap: The schematic symbol for a MOSFET transistor includes an intrinsic 'body diode' pointing from Source to Drain (in an N-channel device). This parasitic diode means an N-channel MOSFET will always conduct current backwards if the Source voltage is higher than the Drain voltage. This is why N-channel MOSFETs are almost exclusively used for low-side switching (placed between the load and ground). If you try to use one for high-side switching, the body diode will permanently power your load, regardless of the Gate signal.

Operation Regions and the Terminology Trap

To use a MOSFET as a switch, you must drive it fully into its lowest resistance state. However, there is a notorious terminology mismatch between university physics textbooks and power engineering datasheets that trips up many hobbyists.

Region Name (Physics)Region Name (Power Eng.)Condition (N-Channel)Behavior & Typical Use
CutoffCutoffVgs < VthDevice is OFF. Only nanoamps of leakage current flow.
Linear / OhmicSaturation / Fully ONVgs > Vth AND Vds < (Vgs - Vth)Acts as a low-value resistor (Rds(on)). This is your target for switching.
Saturation / ActiveActive / LinearVgs > Vth AND Vds > (Vgs - Vth)Acts as a constant current source. Used for audio amplification, not for power switching (device will overheat).
Information Gain - The Terminology Fix: When a datasheet like the Vishay Siliconix Application Note on MOSFET Basics refers to the 'Saturation Region' for a power switch, they mean the fully-ON, low-resistance state (Rds(on)). Physics textbooks call this the 'Ohmic' or 'Linear' region. When designing a switch, always look at the Rds(on) specification in the datasheet, which is measured in the Ohmic region, to calculate your I²R heat losses.

The Decision Tree: Picking the Right MOSFET Transistor

Do not just grab the first TO-220 part out of your bin. The IRF520 is a classic beginner mistake; it requires 10V on the gate to fully turn on, meaning a 5V Arduino or 3.3V ESP32 will leave it in the high-resistance Active region, causing it to melt under moderate loads. You need a Logic-Level MOSFET, indicated by an 'L' in the part number (e.g., IRLZ44N) or a low Gate Threshold Voltage (Vgs(th)) in the datasheet.

IF your load is...AND your logic is...THEN choose this default partKey Specs (Vds / Id / Rds(on))
< 1A (LEDs, small relays)3.3V or 5VAO3400 (SOT-23 N-Ch)30V / 5.7A / 26mΩ @ 4.5Vgs
1A to 10A (Fans, pumps, strips)3.3V or 5VIRLZ44N (TO-220 N-Ch)55V / 47A / 22mΩ @ 5Vgs
10A to 30A (Motors, heaters)5V (or use gate driver)IRLB3034PBF (TO-220 N-Ch)40V / 195A / 1.7mΩ @ 10Vgs
High-Side Switch (P-Channel)3.3V or 5VNTD5867NL (D-PAK P-Ch)-60V / -16A / 45mΩ @ -4.5Vgs

Application Circuit: Driving a 12V Inductive Load from an ESP32

Let us build a robust low-side switch to control a 12V, 2A PC cooling fan using an ESP32-S3 (3.3V logic). We will use the IRLZ44N. While the All About Circuits Semiconductor Textbook covers the basic theory, practical implementation requires managing gate capacitance and inductive kickback.

Component List & Values

  • Q1: IRLZ44N N-Channel MOSFET
  • R1 (Gate Series): 100Ω 1/4W resistor
  • R2 (Gate Pull-down): 10kΩ 1/4W resistor
  • D1 (Flyback): 1N5819 Schottky Diode (or 1N4007 for slower loads)

Wiring Steps

  1. Pull-down Bias: Connect R2 (10kΩ) between the Gate and Source (Ground) pins of Q1. This ensures the gate is pulled to 0V when the ESP32 pin is floating during boot-up, preventing the fan from spinning wildly on startup.
  2. Gate Drive: Connect R1 (100Ω) between the ESP32 GPIO pin and the Gate of Q1. Why 100Ω? The MOSFET gate acts like a ~63nF capacitor. A direct GPIO connection causes a massive instantaneous current spike that can degrade the ESP32 silicon. The 100Ω resistor limits this inrush while still allowing fast enough switching for standard PWM frequencies (up to 25kHz).
  3. Load Connection: Connect the Source pin directly to system Ground. Connect the Drain pin to the negative terminal of the 12V fan. Connect the positive terminal of the fan to the 12V power supply.
  4. Flyback Protection: Place D1 across the fan terminals. The cathode (stripe) must point toward the 12V positive rail, and the anode points toward the Drain. When the MOSFET turns off, the fan's collapsing magnetic field generates a high-voltage spike. The diode safely recirculates this current, preventing it from punching through the MOSFET's drain-source junction.

Failure Modes and Multimeter Testing

MOSFETs rarely fail open; they almost always fail as a dead short between Drain and Source. This usually happens due to thermal runaway (exceeding the maximum junction temperature of 175°C) or Avalanche breakdown (exceeding Vds without adequate clamping). A secondary failure mode is Gate punch-through, where Electrostatic Discharge (ESD) breaches the ultra-thin silicon dioxide gate insulator, permanently shorting the Gate to the Source.

How to Test a MOSFET Transistor with a DMM

You can verify an N-channel MOSFET's health using your multimeter's Diode Test mode. Remove the component from the circuit before testing.

  1. Discharge the Gate: Touch the meter probes across the Gate and Source pins to bleed off any stored charge.
  2. Check the Body Diode: Place the red probe on the Source and the black probe on the Drain. You should read a standard diode drop (typically 0.4V to 0.6V). Reverse the probes (red on Drain, black on Source); the meter should read 'OL' (Open Loop).
  3. Check for Gate Shorts: Measure between Gate-Source and Gate-Drain. Both must read 'OL'. If you read a low resistance or a diode drop, the gate oxide is punctured. Trash the part.
  4. Force it ON: While keeping the black probe on the Source, briefly touch the red probe to the Gate to charge it. Then move the red probe back to the Drain. The meter should now read a very low voltage drop (near 0.0V or a beep in continuity mode), indicating the channel is enhanced and conducting.

The Bench Inventory: Safe Default Part Numbers

Stop buying random assortments of standard IRF-series parts that require 10V gate drives. Stock your bench with these specific, logic-level, high-Rds(on) tolerant defaults. Prices reflect typical 2026 retail hobbyist pricing.

  • For Micro-Switching (<2A): AO3400A (N-Ch, SOT-23) and AO3401A (P-Ch, SOT-23). Cost: ~$0.15/each. Perfect for PCB design and tight spaces.
  • For General Purpose (2A-15A): IRLZ44N (N-Ch, TO-220). Cost: ~$1.20/each. The undisputed king of the hobbyist bench. Fully turns on at 4.5V, handles massive current with a small heatsink.
  • For High Current (15A-40A): IRLB3034PBF (N-Ch, TO-220). Cost: ~$2.50/each. Incredibly low 1.7mΩ Rds(on). Can handle 20A continuous with minimal heatsinking, but requires a 5V+ gate drive for best performance.
  • For High-Side Switching: NDT2955 (P-Ch, SOT-223). Cost: ~$0.60/each. Use this when your load must remain grounded and you need to switch the positive rail.

By standardizing on logic-level parts and strictly applying the 100Ω/10kΩ gate biasing network, you will eliminate 95% of the erratic behavior, microcontroller resets, and melted components that plague beginner DC switching projects.