If you need a reliable field effect transistor switch for DC loads under 30A, the IRLZ44N (N-channel, TO-220 package) is the safest default for 5V or 3.3V microcontroller logic, while the AO3400 (SOT-23 package) handles lighter loads up to 5.8A. Never use a standard IRF520 with a 3.3V ESP32 or 5V Arduino; its gate threshold requires 10V to fully turn on, which will leave the device in its linear region and cause rapid thermal failure. Selecting the right FET means matching the gate-source voltage (Vgs) to your logic level, not just looking at the maximum drain current rating.
Anatomy and Pinout of a FET Switch
Unlike bipolar junction transistors (BJTs) that are current-controlled, a field effect transistor (FET) is voltage-controlled. For power switching, we almost exclusively use Enhancement-mode MOSFETs. Understanding the physical pinout and the intrinsic parasitic components is critical to preventing accidental short circuits on your bench.
- Gate (G): The control terminal. It is capacitively coupled to the channel. Because it has extremely high DC impedance, static electricity can easily punch through the thin gate oxide layer and destroy the part.
- Drain (D): The terminal where current enters the N-channel device (or exits a P-channel). In a low-side switch configuration, the load connects between the positive supply and the Drain.
- Source (S): The terminal where current exits the N-channel device. This connects directly to ground in a low-side switch.
- The Body Diode: Every power MOSFET has an intrinsic parasitic body diode. In an N-channel FET, the cathode is at the Drain and the anode is at the Source. If you wire the FET backward in a DC circuit, this diode will conduct continuously, bypassing your switching control and potentially burning out the trace.
Operating Regions and Biasing for Switching
To use a MOSFET as a switch, you must drive it completely into the Linear (Ohmic) region to minimize the drain-source on-resistance (Rds(on)). Many hobbyists confuse the 'Saturation' region of a BJT with the 'Saturation' region of a MOSFET. In a MOSFET, the saturation region is actually where it acts as a constant-current amplifier—you want to avoid this region entirely when switching, as high Vds and high Ids simultaneously will generate massive heat.
| Region | Bias Condition | Behavior | Use Case |
|---|---|---|---|
| Cutoff | Vgs < Vgs(th) | Switch is OFF. Ids ≈ 0A. | Open switch state. |
| Linear (Ohmic) | Vgs > Vgs(th) AND Vds < (Vgs - Vgs(th)) | Switch is fully ON. Acts as a low-value resistor (Rds(on)). | Closed switch state (Target for power switching). |
| Saturation | Vgs > Vgs(th) AND Vds > (Vgs - Vgs(th)) | Constant current source. High power dissipation. | Amplifiers, linear regulators (Avoid for switching). |
How to Bias and Select: The critical parameter on the datasheet is not just the threshold voltage (Vgs(th)), but the Rds(on) test condition. A standard IRF520 might have a Vgs(th) of 2.0V to 4.0V, meaning it *starts* to turn on at 2V, but its Rds(on) is only guaranteed at Vgs = 10V. If you drive it with 3.3V from an ESP32, it will hover in the saturation region, dropping several volts across the FET and melting the package. Always select a 'Logic-Level' FET (usually denoted by an 'L' in the part number, like IRLZ44N) where Rds(on) is specified at Vgs = 4.5V or 2.5V.
Complete Application Circuit: 12V Load via 3.3V Logic
Below is a robust, low-side switch circuit designed to drive a 12V, 2A inductive load (like a solenoid valve or relay coil) using a 3.3V GPIO pin from an ESP32 or Raspberry Pi.
Bill of Materials
- Q1: IRLZ44N (N-Channel Logic-Level MOSFET, Vds=55V, Id=47A, Rds(on)=0.022Ω @ Vgs=5V)
- R1 (Gate Series): 220Ω (1/4W) - Limits inrush current to the gate capacitance and dampens high-frequency ringing.
- R2 (Gate Pulldown): 10kΩ (1/4W) - Ensures the gate is pulled to ground if the microcontroller pin goes high-impedance during boot, preventing the load from turning on erratically.
- D1 (Flyback): 1N5819 (Schottky Diode, 40V, 1A) - Clamps inductive kickback voltage.
Wiring Steps
- Connect the Load: Wire the positive terminal of your 12V load to the 12V power supply. Wire the negative terminal of the load to the Drain (D) pin of the IRLZ44N.
- Wire the Flyback Diode: Place D1 in parallel with the load. The cathode (stripe) connects to the 12V positive side (or the Drain pin), and the anode connects to the 12V negative side (the load's negative terminal). This provides a safe recirculation path for the inductive spike when the FET turns off.
- Ground the Source: Connect the Source (S) pin directly to the common ground shared by your 12V power supply and your microcontroller. Use a thick wire; this path carries the full load current.
- Install the Pulldown: Solder R2 (10kΩ) directly between the Gate (G) and Source (S) pins. This physically keeps the FET off until driven.
- Connect the Gate Resistor: Solder R1 (220Ω) between the microcontroller's GPIO pin and the Gate (G) pin. Do not connect the GPIO directly to the gate; the initial charging spike of the gate capacitance can exceed the ESP32's absolute maximum GPIO current rating (typically 40mA).
Failure Modes and Multimeter Testing
MOSFETs rarely fail open; they almost always fail shorted. When a FET overheats or experiences a voltage spike, the gate oxide breaches, shorting the Gate to the Source or Drain, or the silicon melts, shorting the Drain to the Source. This often takes the microcontroller down with it if the Gate-Drain short bridges the 12V rail into the 3.3V GPIO pin.
How to Test a FET with a Digital Multimeter
You can verify the health of an N-channel MOSFET using the Diode Test mode on a standard digital multimeter (DMM).
- Discharge the Gate: Touch a piece of bare wire across the Gate and Source pins to bleed off any stored capacitive charge.
- Test the Body Diode: Place the DMM's Red probe on the Source and the Black probe on the Drain. The meter should read a standard diode forward voltage drop (typically 0.4V to 0.6V). This confirms the body diode is intact.
- Test for Drain-Source Short: Swap the probes: Red on Drain, Black on Source. The meter should read 'OL' (Open Loop) or '1', indicating the diode is reverse-biased and the channel is off. If it reads near 0.00V or beeps continuously, the FET is shorted and dead.
- Test Gate Isolation: Set the DMM to resistance mode (Ohms). Measure between the Gate and Source, and Gate and Drain. Both must read 'OL'. Any finite resistance means the gate oxide is punctured.
- Test the Switching Action (Optional): While keeping the Red probe on Drain and Black on Source (reading OL), use a jumper wire to briefly touch the Gate to the Drain (or a 9V battery positive). The DMM should drop to near 0V as the FET turns on. Touch the Gate to Source to discharge it, and the DMM should return to 'OL'.
Frequently Asked Questions
Can I use an IRF520 field effect transistor switch with an Arduino?
Technically you can wire it, but practically you shouldn't. The IRF520 is a standard-level FET designed for 10V gate drives. While an Arduino outputs 5V, the IRF520's Rds(on) is not guaranteed to drop to its rated low resistance at 5V. It will operate in the linear region, acting like a 2-ohm resistor instead of a 0.2-ohm switch. At just 2 amps of load current, the FET will dissipate roughly 8 watts of heat, quickly exceeding the thermal limits of the TO-220 package without a massive heatsink. Always use a logic-level alternative like the IRLZ44N or IRLB8721 for 5V Arduino circuits.
Why does my field effect transistor switch get hot when driving a PWM motor?
If your FET runs cool at 100% duty cycle but gets scorching hot at 50% PWM, you are likely suffering from slow gate transition times caused by the Miller effect. Every time the PWM signal switches, the FET passes through the high-dissipation saturation region. If your gate resistor is too large (e.g., 10kΩ) or your microcontroller GPIO lacks the current drive to charge the gate capacitance quickly, the FET spends microseconds in this high-heat state thousands of times per second. To fix this, lower the gate series resistor to 100Ω-220Ω, or use a dedicated gate driver IC (like the TC4427) to source and sink peak currents of 1A+ into the gate.
Do I need a gate resistor for a low-frequency field effect transistor switch?
Yes, even if you are only switching a relay once a minute. The gate of a MOSFET looks like a dead short to a microcontroller pin for the first few nanoseconds of turn-on as the parasitic gate capacitance charges. A 3.3V GPIO pin attempting to instantly charge a 2000pF gate capacitance will spike well beyond its 40mA absolute maximum rating, degrading the silicon inside the microcontroller over time. A cheap 220Ω resistor limits this inrush current to a safe ~15mA, protecting your expensive ESP32 or Raspberry Pi while only adding a negligible few microseconds to the turn-on time.






