Resources · Checked 9 October 2026
Which MOSFET for Arduino and ESP32, and how to wire it
IRLZ44N, IRFZ44N, IRF520 and AO3400A, read from their data sheets
By Bulan Sarkar, founder of ElectronicsInfoline (since 2000), Durgapur · Every number from the maker's data sheet, 9 October 2026 · About a 10-minute read
This page is for switching a 12 V load, an LED strip, a pump, a small motor, from an Arduino or ESP32 pin. It covers four common MOSFETs sold by Indian maker stores, and the few parts that go around them.
It is not for mains. Anything on 230 V AC goes through a rated relay module or solid-state relay, with the mains side wired by someone qualified.
From a 5 V Arduino, use an IRLZ44N. Its data sheet guarantees 25 mΩ or less with 5 V on the gate, so a 12 V, 3 A strip warms it by about 21 °C without a heatsink.
From a 3.3 V ESP32, use an AO3400A: 48 mΩ or less is guaranteed from 2.5 V, good for about 2.6 A on a small board. The IRLZ44N promises nothing below 4 V.
Skip the IRFZ44N and IRF520 for direct drive. Both are specified only at 10 V on the gate, and their threshold can be as high as 4 V. Wire every one the same way: 220 Ω in the gate, 10 kΩ from gate to source, grounds joined.
The four parts, from their data sheets
The figure people quote, "RDS(on) 17.5 mΩ" or "47 A", is measured with 10 V on the gate. Your pin gives 5 V or 3.3 V. What matters is the lowest gate voltage the maker puts a guaranteed resistance against, so that column comes first.
| Part | Lowest gate voltage with a guaranteed RDS(on) | Threshold VGS(th) | VDS / VGS max | Gate charge Qg max | Package, RθJA | For a pin? |
|---|---|---|---|---|---|---|
| IRLZ44N Infineon (International Rectifier) | 35 mΩ at 4 V | 1 V to 2 V | 55 V / ±16 V | 48 nC at 5 V | TO-220, 62 °C/W (TO-220 in free air) | 5 V pin: yes |
| IRFZ44N Infineon (International Rectifier) | 17.5 mΩ at 10 V | 2 V to 4 V | 55 V / ±20 V | 63 nC at 10 V | TO-220, 62 °C/W (TO-220 in free air) | Needs 10 V on the gate |
| IRF520 Vishay | 0.27 Ω at 10 V | 2 V to 4 V | 100 V / ±20 V | 16 nC at 10 V | TO-220, 62 °C/W (TO-220 in free air) | Needs 10 V on the gate |
| AO3400A Alpha & Omega | 48 mΩ at 2.5 V | 0.65 V to 1.45 V | 30 V / ±12 V | 7 nC at 4.5 V | SOT-23, 125 °C/W (steady state, on 1 in² of 2 oz copper) | 3.3 V or 5 V pin: yes, up to a few amps |
Read from each data sheet on 9 October 2026; the sources give the document and revision. Maximum values at 25 °C. The AO3400A's thermal figure assumes the copper area in brackets; a bare SOT-23 on thin tracks runs hotter.
The gate voltage decides it
A MOSFET's threshold voltage is where it starts to conduct: the IRLZ44N data sheet measures it at 250 µA. A threshold of 2 V does not mean the part is fully on at 3 V. Fully on is the RDS(on) row, and each row names its gate voltage.
Figure 1 puts the threshold ranges against the two pin voltages. The green dot is the lowest gate voltage with a guaranteed resistance. For the IRFZ44N and IRF520 that dot sits off the scale at 10 V, and their threshold reaches 4 V: a 3.3 V pin may not open them at all, and a 5 V pin opens them by an unknown amount.
Figure 2 is the same thing as a lookup. A green cell is a resistance the maker stands behind at that pin voltage. A red cell means the data sheet is silent there, and a part that works on your bench may not work in the next batch.
Our take: buy by the RDS(on) row that names your pin voltage. The 10 V row is for someone else's circuit.
Wiring it
The load goes between the 12 V supply and the drain; the source goes to ground. This is low-side switching, and it lets a pin drive the gate directly because the source sits at 0 V.
- Gate resistor, 220 Ω. The gate is a capacitor (1700 pF input capacitance on the IRLZ44N). Charging it straight from a pin pulls a spike of current. Through 220 Ω the worst instant is 22.7 mA from 5 V, inside the ATmega328P's 40 mA absolute maximum, and 15 mA from 3.3 V.
- Pull-down, 10 kΩ gate to source. At reset and while the sketch uploads, the pin is an input and the gate floats. The pull-down holds the load off. It costs 0.5 mA while the pin is high.
- Common ground. The board ground, the 12 V supply's negative and the source all join. Without it the gate has no reference and nothing switches.
- Diode across coils. Motors, pumps, solenoids and relay coils need one, cathode to +12 V. An LED strip does not. More on this below.
- Thick wires on the load side. The 3 A path runs supply to load to drain to source to supply. Keep it short and off the breadboard rails, which are not made for amps.
Heat: how many amps without a heatsink
A switched-on MOSFET is a small resistor, so it heats by I²R. Multiply by the junction-to-ambient figure from the data sheet and you have the temperature rise. We add one margin: on-resistance grows as the die warms, so we multiply the 25 °C figure by 1.5. The AO3400A data sheet shows why: 26.5 mΩ at 25 °C, 38 mΩ at 125 °C.
With an IRLZ44N on a 5 V pin and a 3 A strip: 3² × 0.025 Ω × 1.5 = 0.34 W, times 62 °C/W is 21 °C above room. Warm, and fine.
The IRF520 at the same 3 A, even with the full 10 V it is specified at: 3² × 0.27 Ω × 1.5 = 3.65 W, which is 226 °C above room. That is far beyond what the part can take, before you even count the 5 V gate it gets on a module. It is a 100 V part with 0.27 Ω, built for a different job.
Figure 4 turns it round: the current each part carries with the junction 60 °C above room (40 °C room, 100 °C die), no heatsink, at the gate voltage you have.
Above those currents, bolt a TO-220 to a heatsink (the heatsinks lesson does the arithmetic), or for the AO3400A give it more copper. The 2.6 A figure assumes the square inch of 2 oz copper its data sheet was measured on.
Our take: the TO-220's 47 A headline assumes the case held at 25 °C and 10 V on the gate. On a breadboard with a pin driving it, think in single amps.
PWM dimming and speed control
analogWrite() on an UNO runs at 490 Hz on most pins. Each time the MOSFET switches it spends a moment half on, with volts across it and amps through it, and that moment heats it too.
A rough upper bound for that moment: gate charge × gate resistor ÷ (pin voltage − maximum threshold). For the IRLZ44N from 5 V through 220 Ω that is 48 nC × 220 Ω ÷ 3 V ≈ 3.5 µs. At 490 Hz the two edges take 0.34 % of each cycle and add about 0.06 W, which is negligible.
Push the PWM to 20 kHz to get rid of motor whine and the same edges take 14 % of every cycle: about 2.53 W of switching loss, several times the conduction loss. The AO3400A, with 7 nC of gate charge, switches in about 0.8 µs from 3.3 V and copes better.
Our take: leave the PWM at the Arduino default for LED strips. For fast PWM on a big MOSFET, put a gate driver chip between the pin and the gate.
Motors, pumps and relay coils
A coil keeps its current flowing when you switch it off. With nowhere to go, that current drives the drain voltage up until something gives, and that something is usually the MOSFET. A diode across the coil, cathode to +12 V, gives the current a loop to die away in.
The MOSFET's own body diode does not do this job; in a low-side switch it faces the wrong way. For a relay, a 1N4007 is enough. For a PWM-driven motor, use a Schottky such as a 1N5819, which recovers fast enough to keep up with the switching. The flyback diode lesson works through the spike.
Choosing in one pass
Tips and checks
- Before you power the load, measure from gate to source with the pin HIGH. You should see the full pin voltage; much less means a missing ground or a wrong pin.
- Touch the TO-220 tab after a minute at full load, with the 12 V side only. If it is too hot to keep a finger on, add a heatsink or cut the current.
- The red "IRF520 MOSFET module" sold for Arduino has the part fixed on the board. Use it for small loads only, or swap the part for an IRLZ44N if the pads allow.
- Fakes exist, so buy from a seller who names the source (our India buying guide lists them).
- On an ESP32, check your board's pinout and avoid pins that change state during boot, so the load does not blink at power-up.
- Put a fuse in the 12 V supply lead. It costs a few rupees and protects the strip, the wires and the MOSFET.
What we'd do: an UNO or Nano switching an LED strip or a pump under 5 A gets an IRLZ44N, 220 Ω and 10 kΩ, and the default PWM. An ESP32 switching under 2.6 A gets an AO3400A on a breakout with generous copper. An ESP32 switching more than that gets a level shifter or gate driver in front of the IRLZ44N, so the gate sees 5 V or more (our level shifting guide covers the choices).
Questions we keep hearing
Can an Arduino drive an IRFZ44N directly? It will often switch, but nothing guarantees it. The IRFZ44N's on-resistance is specified only with 10 V on the gate, and its threshold can be as high as 4 V. Use the IRLZ44N, its logic-level sibling.
Will an IRLZ44N work with an ESP32? Its lowest guaranteed row is 35 mΩ at 4 V, so at 3.3 V you are below what the data sheet covers. It will usually conduct, at an unknown resistance. For small loads use an AO3400A; for big ones, raise the gate voltage with a driver.
Why does my IRF520 module get hot? Its on-resistance is 0.27 Ω even with 10 V on the gate, and an Arduino gives it 5 V. At 3 A that is several watts in a part with no heatsink.
Lessons behind the numbers
- The MOSFET as a switch: why the gate voltage is most of the answer
- MOSFET: threshold, channel and gate capacitance
- Logic levels: what a 5 V and a 3.3 V pin put out
- Flyback diode: the spike a coil makes
- Schottky diode: why it suits PWM motors
- Heatsinks: when free air is not enough
- DC motor: the load behind the diode
- Duty cycle and PWM: what
analogWrite()does
Built with these: the 12 V LED strip system and 15 Arduino projects.
Sources
Every data sheet read on the maker's site on 9 October 2026.
- International Rectifier (Infineon), IRLZ44NPbF data sheet, PD-94831, p. 1–2 (RDS(on) max 22, 25 and 35 mΩ at VGS 10, 5 and 4 V; VGS(th) 1.0 to 2.0 V; VGS ±16 V; Qg 48 nC max at 5 V; Ciss 1700 pF; RθJA 62 °C/W)
- Infineon, IRFZ44NPbF data sheet, Rev. 2.1, 2026-08-11, p. 1–2 (RDS(on) max 17.5 mΩ at VGS 10 V only; VGS(th) 2.0 to 4.0 V; VGS ±20 V; Qg 63 nC max; RθJA 62 °C/W)
- Vishay, IRF520 data sheet, document 91017, S21-0819 Rev. C, 02-Aug-2021, p. 1–2 (VDS 100 V; RDS(on) max 0.27 Ω at VGS 10 V only; VGS(th) 2.0 to 4.0 V; Qg 16 nC max; RthJA 62 °C/W)
- Alpha & Omega Semiconductor, AO3400A data sheet, Rev 3.1, July 2023, p. 1–2 (VDS 30 V; VGS ±12 V; RDS(on) max 26.5, 32 and 48 mΩ at VGS 10, 4.5 and 2.5 V; 38 mΩ max at 125 °C (VGS 10 V); VGS(th) 0.65 to 1.45 V; Qg 7 nC max at 4.5 V; RθJA 125 °C/W max steady state on 1 in² 2 oz copper)
- Microchip, ATmega48A/PA/88A/PA/168A/PA/328/P data sheet, DS40002061B (2020), §29.1 Absolute Maximum Ratings, p. 308 (DC current per I/O pin 40.0 mA, absolute maximum)
- Arduino Language Reference, analogWrite() (UNO PWM frequency 490 Hz (pins 5 and 6: 980 Hz))
Our own choices, not from any source: the 12 V, 3 A example load; the 220 Ω and 10 kΩ values; the ×1.5 hot-resistance margin (from the AO3400A's 25 °C and 125 °C rows); the 60 °C rise limit; the gate-edge estimate, which is a rough upper bound and not a data-sheet figure; and the 20 kHz comparison. International Rectifier (Infineon) is the original IR document Infineon still serves.
How this page was checked
Every rating comes from the maker's own data sheet, downloaded on 9 October 2026, and every derived number is computed in code from those values, so the text and the figures cannot disagree. We print no prices and carry no affiliate links. Found an error? Tell us.
More guides: Resources · 3.3 V and 5 V level shifting · Buying components in India