ElectronicsInfoline

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.

PartLowest gate voltage with a guaranteed RDS(on)Threshold VGS(th)VDS / VGS maxGate charge Qg maxPackage, RθJAFor a pin?
IRLZ44N
Infineon (International Rectifier)
35 mΩ at 4 V1 V to 2 V55 V / ±16 V48 nC at 5 VTO-220, 62 °C/W (TO-220 in free air)5 V pin: yes
IRFZ44N
Infineon (International Rectifier)
17.5 mΩ at 10 V2 V to 4 V55 V / ±20 V63 nC at 10 VTO-220, 62 °C/W (TO-220 in free air)Needs 10 V on the gate
IRF520
Vishay
0.27 Ω at 10 V2 V to 4 V100 V / ±20 V16 nC at 10 VTO-220, 62 °C/W (TO-220 in free air)Needs 10 V on the gate
AO3400A
Alpha & Omega
48 mΩ at 2.5 V0.65 V to 1.45 V30 V / ±12 V7 nC at 4.5 VSOT-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.

3.3 V pin5 V pinIRLZ44NIRFZ44NIRF520AO3400A0123456gate-source voltsthreshold rangeRDS(on) promised from here
Figure 1. Threshold ranges from each data sheet against a 3.3 V and a 5 V pin. Green dot: the lowest gate voltage with a guaranteed RDS(on); the IRFZ44N and IRF520 have none below 10 V.

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.

partgate at 3.3 Vgate at 5 VIRLZ44Nno promise≤ 25 mΩIRFZ44Nno promiseno promiseIRF520no promiseno promiseAO3400A≤ 48 mΩ≤ 32 mΩ
Figure 2. The guaranteed maximum on-resistance at each pin voltage, taken from the nearest RDS(on) row at or below it. Red: the data sheet gives no figure.

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.

  1. 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.
  2. 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.
  3. 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.
  4. Diode across coils. Motors, pumps, solenoids and relay coils need one, cathode to +12 V. An LED strip does not. More on this below.
  5. 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.
+12 Vloadstrip, motor, coildiode,coils onlypin220 Ω10 kΩDSGpin ground, supply ground and source all joined
Figure 3. Low-side switch: 220 Ω into the gate, 10 kΩ gate to source, the load on the drain. The red diode goes in only for motors and coils.

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.

IRLZ44N, 5 V gate5.1 AAO3400A, 5 V gate3.2 AAO3400A, 3.3 V gate2.6 AIRFZ44N, 10 V gate6.1 AIRF520, 10 V gate1.5 A3 A load012345678amps, no heatsink
Figure 4. Current for a 60 °C rise with no heatsink, from the guaranteed RDS(on) × 1.5 and each data sheet's junction-to-ambient figure. The red line is a 3 A load.

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.

on, conducting0.34 Wedges at 490 Hz0.06 Wedges 0.34 % of each cycleedges at 20 kHz2.53 Wedges 14 % of each cycleheat in the MOSFET, watts
Figure 5. Heat in an IRLZ44N switching 12 V at 3 A from a 5 V pin through 220 Ω: the steady on-state loss, then the edge loss at 490 Hz and at 20 kHz.

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.

switch on+12 VcoilONcurrent builds up in the coilswitch just turned off+12 VcoilOFFcoil current circles through the diode
Figure 6. Left: switch on, current builds in the coil. Right: the switch opens, and the coil's current carries on round the diode instead of spiking the drain.

Choosing in one pass

Load on 230 V mains?yesrated relay or SSRno5 V pin (UNO, Nano)?yesIRLZ44N, ≤ 5.1 A bareno3.3 V pin, ≤ 2.6 A?yesAO3400A on coppernoBigger, from 3.3 V?yesdriver, then IRLZ44N
Figure 7. The order we ask the questions in. Mains is always a rated relay or SSR, wired by a qualified person.

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.

Do I need a gate resistor? Yes. Without one the pin charges the gate capacitance with a current spike limited only by the pin itself. 220 Ω keeps the first instant under 23 mA from 5 V.

Does an LED strip need a flyback diode? No. An LED strip is resistors and LEDs, with no coil to store energy. Motors, pumps, solenoids and relays need one.

Lessons behind the numbers

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.

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