When you need to switch high currents with a low-voltage microcontroller or logic signal, standard bipolar junction transistors (BJTs) fall short due to base current limits and high saturation voltages. The solution is the Metal-Oxide-Semiconductor Field-Effect Transistor. For practical bench work, selecting the right transistors (MOSFET) comes down to matching the gate threshold voltage to your logic level, ensuring the drain-source voltage exceeds your supply, and keeping the on-resistance low enough to avoid melting the package.
As a direct answer for your next build: if you are switching 12V loads with an Arduino (5V logic), the IRLZ44N is your safe default. If you are driving loads from an ESP32 or Raspberry Pi (3.3V logic), use the IRLB8721. For high-voltage (100V) or P-channel high-side switching, the IRF540N and IRF9540N remain the industry workhorses.
The Data-Dense Reference: Safe Default Transistors (MOSFET)
Before wiring a circuit, you must verify the absolute maximum ratings and the specific gate-to-source voltage (VGS) required to achieve the advertised on-resistance (RDS(on)). A common mistake is reading the threshold voltage (VGS(th)) and assuming the MOSFET is fully enhanced at that voltage. VGS(th) is merely the voltage where the device begins to conduct a tiny leakage current (usually 250µA). To switch high current with minimal heat, you must drive the gate to the VGS listed in the RDS(on) specification.
| Part Number | Type | VDS (Max) | ID (Max) | RDS(on) @ VGS | VGS(th) Range | Best Application |
|---|---|---|---|---|---|---|
| IRLB8721 | N-Ch | 30V | 62A | 8.7mΩ @ 2.8V | 1.3V - 2.35V | 3.3V logic (ESP32/Pi), low-voltage high-current |
| IRLZ44N | N-Ch | 55V | 47A | 22mΩ @ 5.0V | 1.0V - 2.0V | 5V logic (Arduino), 12V/24V automotive loads |
| IRF540N | N-Ch | 100V | 33A | 44mΩ @ 10.0V | 2.0V - 4.0V | 10V+ gate drive, 48V solar/battery systems |
| IRF9540N | P-Ch | -100V | -23A | 117mΩ @ -10.0V | -2.0V - -4.0V | High-side switching, load disconnects |
| AO3400 | N-Ch | 30V | 5.7A | 27mΩ @ 4.5V | 0.7V - 1.4V | SOT-23 SMD, low-power signal switching |
Pinout, Symbol, and Operating Regions
The physical pinout of a MOSFET depends heavily on the package. For the ubiquitous TO-220 through-hole package (used by the IRLZ44N and IRF540N), holding the device with the legs pointing down and the metal tab facing away from you, the pins from left to right are Gate (G), Drain (D), and Source (S). The metal mounting tab is internally connected to the Drain, which is why you must use an insulating thermal pad if mounting multiple MOSFETs to a shared heatsink.
In the schematic symbol, the N-channel MOSFET is drawn with an arrow on the Source leg pointing inward (toward the channel). Crucially, the symbol includes a body diode pointing from Source to Drain. This parasitic diode is a byproduct of the semiconductor manufacturing process. It means an N-channel MOSFET will always conduct current in reverse (Source to Drain) if the Drain voltage drops below the Source voltage, regardless of the Gate state. This is why low-side switching (placing the MOSFET between the load and ground) is standard practice for N-channel devices.
| Region | Gate Condition | Drain-Source Condition | Behavior & Use Case |
|---|---|---|---|
| Cutoff | VGS < VGS(th) | Any VDS | Device is OFF. Only nanoamp leakage flows. Used for open-circuit states. |
| Linear (Ohmic/Triode) | VGS > VGS(th) | VDS < (VGS - VGS(th)) | Acts as a voltage-controlled resistor. This is the target region for power switching. |
| Saturation (Active) | VGS > VGS(th) | VDS > (VGS - VGS(th)) | Acts as a constant current source. Current is limited by VGS. Used for analog amplification, not switching. |
Note on terminology: MOSFET 'Saturation' is functionally equivalent to a BJT's 'Active' region, while MOSFET 'Linear' is equivalent to a BJT's 'Saturation'. This naming collision is a frequent source of confusion for makers transitioning from BJT designs.
Biasing and Selection: Building a Reliable Switch Circuit
A MOSFET gate is essentially a capacitor. When you apply a voltage to the gate, you must charge this capacitor (defined by the Total Gate Charge, Qg, in the datasheet) to turn the device on. If you connect an ESP32 GPIO pin directly to a high-Qg MOSFET gate, the initial inrush current to charge the gate capacitance can exceed the GPIO's absolute maximum rating (typically 12mA to 40mA), damaging the microcontroller. Furthermore, a floating gate acts as an antenna, picking up electromagnetic interference and partially turning the MOSFET on, leading to thermal destruction.
Here is a complete, robust low-side switching circuit for driving a 12V, 2A solenoid valve using an ESP32 (3.3V logic) and an IRLB8721 MOSFET.
Component List and Values
- Q1: IRLB8721 (N-Channel Logic-Level MOSFET)
- R1 (Gate Resistor): 100Ω, 1/4W. Limits the peak charging current into the gate capacitance and dampens high-frequency ringing caused by PCB trace inductance.
- R2 (Pull-down Resistor): 10kΩ, 1/4W. Connected between Gate and Ground. Bleeds off gate charge when the microcontroller is resetting or booting (when GPIOs are high-impedance), keeping the MOSFET firmly off.
- D1 (Flyback Diode): 1N5819 (Schottky). Placed in reverse bias across the solenoid coil (cathode to 12V, anode to Drain). Schottky is preferred over 1N4007 for its faster reverse recovery time.
Wiring Steps
- Connect the ESP32 GPIO pin to one leg of the 100Ω gate resistor (R1).
- Connect the other leg of R1 to the Gate (pin 1) of the IRLB8721.
- Connect the 10kΩ pull-down resistor (R2) between the Gate (pin 1) and Ground.
- Connect the Source (pin 3) of the MOSFET directly to the system Ground.
- Connect the Drain (pin 2) to the negative terminal of the 12V solenoid.
- Connect the positive terminal of the solenoid to the 12V power supply.
- Place the 1N5819 diode across the solenoid terminals, ensuring the silver stripe (cathode) faces the 12V positive side.
With this configuration, when the ESP32 drives the GPIO HIGH (3.3V), the gate charges through R1. Because the IRLB8721 has a very low VGS(th) (max 2.35V) and is specified for 2.8V drive, it enters the linear (ohmic) region fully. The 2A load flows through the channel, dissipating roughly P = I² × RDS(on) = 2² × 0.0087 = 34.8mW. This is well within the TO-220 package's thermal limits, requiring no heatsink.
Failure Modes and Multimeter Diagnostics
MOSFETs rarely fail open; they almost always fail as a dead short between Drain and Source. Understanding why they fail helps you design better protection circuits.
- Thermal Runaway: If the gate voltage is too low, the MOSFET operates in the saturation (active) region instead of the linear region. It acts as a resistor, dissipating massive heat. As it heats, RDS(on) increases, causing more voltage drop and more heat, until the silicon melts and shorts internally.
- VGS Overvoltage: The gate oxide layer is incredibly thin. Exceeding the maximum VGS (usually ±20V) punctures this insulator. Never use a 24V power supply to directly drive a gate without a Zener diode clamp.
- dV/dt Turn-on: A rapidly changing voltage on the Drain couples through the Miller capacitance (Cgd) into the Gate. If the gate impedance is too high (or floating), this coupled charge spikes the gate voltage above the threshold, turning the MOSFET on unexpectedly.
How to Test a MOSFET with a Digital Multimeter
You can verify the health of an N-channel MOSFET on the bench using a standard DMM. This test checks the internal body diode and ensures the Drain-Source channel isn't shorted.
- Set the DMM: Turn the dial to the Diode Test mode (usually indicated by a diode symbol).
- Discharge the Gate: Briefly touch a wire or your finger across the Gate and Source pins to bleed off any stored static charge. The MOSFET must be off for the baseline test.
- Test the Body Diode (Forward): Place the Red probe on the Source and the Black probe on the Drain. The meter should read a typical diode voltage drop, usually between 0.400V and 0.600V.
- Test the Body Diode (Reverse): Swap the probes (Red on Drain, Black on Source). The meter should read OL (Over Limit / Open Loop), indicating the diode is blocking current.
- Check for Drain-Source Shorts: If the meter reads near 0.000V or beeps continuously in both directions across Drain and Source, the internal channel has melted and the device is destroyed. Replace it.
For deeper theoretical background on MOSFET capacitance models and switching characteristics, refer to the All About Circuits semiconductor textbook. When selecting specific modern silicon carbide (SiC) or advanced trench MOSFETs for high-efficiency power supplies, consult the application notes available on the Infineon Power MOSFET portal, which provides detailed thermal impedance curves and gate driver design guides.






