IRF520 MOSFET driver module
The purple IRF520 MOSFET board from Arduino kits: a header for the board pin and screw terminals for the load. Aliases: MOSFET module, IRF520 module.
It is sold as the IRF520 MOSFET Driver Module (Hobby Components' HCMODU0083 and its clones): one IRF520 power MOSFET switching the low side of the load.
Pins
| Pin | What it does |
|---|---|
SIG |
The input from the board pin. It goes straight to the IRF520's gate. |
VCC |
Not connected to anything on the board. |
GND |
Ground: the IRF520's source. Join it to the board's ground. |
VIN |
The load supply's +, on the screw terminal. It is joined to V+. |
GND2 |
The screw terminal marked GND: the same ground as the header's. |
V+ |
The load's +, the same as VIN. |
V- |
The load's -: the IRF520's drain. |
While it runs
The readout under the MOSFET is the load current. The red LED is wired to SIG
through 1 kΩ, as on the real board, so it shows the input: it lights whenever
the pin is high, whether or not the IRF520 is passing anything.
What the model gets right
The board as its schematic draws it: SIG straight to the gate with no series
resistor, 1 kΩ from SIG to ground holding the gate off, and the LED with its own
1 kΩ from SIG to ground (together about 8 mA from a 5 V pin). There is no flyback
diode on the board, so a motor or a solenoid on it needs one across it.
The IRF520 is the MOSFET part's Vishay IRF520 card. It is not a logic-level part. Its datasheet quotes its 0.27 Ω channel only with 10 V on the gate, and its threshold is anywhere from 2 to 4 V. From a 5 V pin the model has it at about 0.95 Ω and it cannot pass more than about 1.1 A: a 4 Ω load on 12 V that wants 3 A gets 1.13 A, and the MOSFET drops more than 7 V and turns 8 W into heat. From a 3.3 V board it is all but off. That is the real board's behavior, and the usual reason one "does not work" from an ESP32. A logic-level MOSFET such as an IRLZ44N, or the D4184 module, switches the same load fully from either.
What it does not model
The IRF520's own spread: its threshold is one number here (3 V, the middle of the datasheet's band), where a real part is anywhere from 2 to 4 V, so two boards from one bag can differ a lot from a 5 V pin. Everything the MOSFET part leaves out is left out here too: heat, and the thermal limit a real IRF520 reaches long before 8 W without a heatsink.