
IRF520 MOSFET Module Library for Proteus Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the new IRF520 MOSFET Module Library for Proteus Simulation. The IRF520 module is the little board that promises to let an Arduino switch a 12 or 24 V load - an LED strip, a pump, a motor, a lamp - with one pin. It carries an IRF520 power MOSFET, a gate resistor, a pull-down, a signal LED and screw terminals. It works, but with a catch that surprises almost everyone: the IRF520 is not a logic-level MOSFET, so a 5 V pin turns it only half on. With this library you can run a full Proteus simulation of the module and see that catch for yourself - the gate voltage, the drop across the MOSFET, its curves, its loss and its temperature.
IRF520 MOSFET Module Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Filament Bulb: 12 V bulbs with a real hot and cold filament
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
The demo dims a 12 V 21 W bulb with PWM from an Arduino and then switches it fully on - and the pop-up shows where the power goes.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the motor driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the IRF520 MOSFET Module Library for Proteus Simulation:
What Is the IRF520 MOSFET Module?
The IRF520 is an N-channel power MOSFET in a TO-220 package: 100 V, 9.2 A, and 0.27 ohm between drain and source when its gate is at 10 V. The module puts it on a small board as a low-side switch. The supply goes to VIN and GND on the screw terminal; the load goes between V+ - which is simply VIN - and V-, which is the MOSFET's drain. When the gate is high, the MOSFET connects V- to ground and current flows through the load. The 3-pin header takes the signal: SIG goes to the gate through a resistor, GND is the common ground, and VCC, on most of these modules, is not connected to anything.
| IRF520 MOSFET module | |
|---|---|
| MOSFET | IRF520, N-channel, 100 V, 9.2 A |
| On resistance | 0.27 ohm at VGS 10 V |
| Gate threshold | 2 - 4 V |
| Switch | low side: the load between V+ (= VIN) and V- |
| Signal | SIG to the gate, a signal LED, a pull-down |
| Uses | LED strips, lamps, pumps, small motors, solenoids |
Why 5 V Is Not Enough
A MOSFET's gate threshold is the voltage at which it just begins to conduct - for the IRF520 anywhere from 2 to 4 V. Above the threshold the channel opens gradually, and the datasheet's 0.27 ohm is measured with 10 V on the gate. With 5 V from an Arduino pin the IRF520 is only a volt or two over its threshold. Its curves show the result: at VGS 5 V it can carry only about 3 A no matter how much voltage is across it - it is in saturation - and even at lower currents its resistance is two or three times the datasheet value. So a load of a couple of amps leaves a volt or more across the MOSFET, and that volt times the current becomes heat in a TO-220 that has no heatsink.
Logic-Level MOSFETs
MOSFETs made for 5 V and 3.3 V boards are called logic-level: their resistance is specified at VGS 4.5 V or even 2.5 V. The IRLZ44N in our N-MOSFET Library for Proteus is one of them - the "L" in its name is the clue. The IRF520 module remains useful for small loads, an LED strip or a small motor under an amp, or when its gate is driven from 10 - 12 V through a transistor. For anything bigger from a 5 V pin, choose a logic-level MOSFET.
PWM and the Saturation Region
A PWM on SIG switches the MOSFET on and off hundreds of times a second, and the load gets the average. With a lamp this hides another trap. A filament's resistance is low when it is cool, and at a low duty cycle it never gets hot. In every pulse the cool filament asks for more current than the half-on IRF520 can deliver, so the MOSFET sits in saturation with many volts across it. The result is the opposite of what you might expect: the MOSFET can get hotter dimming the lamp than running it at full brightness.
No Flyback Diode
The module has no diode across its output. A motor, a solenoid or a relay coil stores energy in its magnetic field, and when the MOSFET turns off that energy drives the drain voltage up until something gives - usually the MOSFET. Put a diode across such a load, cathode to V+, anode to V-. A lamp or an LED strip does not need one.
The Module in the Simulation
The library models the module as it is wired. SIG feeds the gate through 100 ohm with a 10 kohm pull-down, so the gate gets 99 % of the signal, and the signal LED lights through 1 kohm. The IRF520 itself follows a square law with a smooth threshold at 3.0 V and a gain chosen so that it gives the datasheet's 0.27 ohm at VGS 10 V and about 3 A in saturation at VGS 5 V; a 0.175 ohm drain resistance is solved inside the curve. When the drain goes below the source the channel conducts the other way and the body diode opens. The junction warms through 62 K/W - a TO-220 in free air - and as it warms the MOSFET gets worse: its gain falls and its threshold drops a little, as real silicon does. The pop-up draws the curves for VGS 4, 5, 6 and 10 V, the present gate's curve and the working point, so you can see exactly where the MOSFET is.
Features of the IRF520 MOSFET Module Library for Proteus Simulation
- A real-looking module: the 34 x 24 mm board at its real size, the IRF520 standing at its edge, the resistors, the signal LED that lights, the header and the 4-way terminal.
- A real MOSFET: the threshold, the triode and saturation regions, the drain resistance, the body diode, the temperature effects.
- The 5 V gate problem: the curves at VGS 4, 5, 6 and 10 V and the working point on the present one.
- PWM: measured on SIG; the MOSFET really switches at the PWM, the averages shown.
- The heat: the loss and the junction temperature, with warnings at 150 C and 175 C.
- A pop-up: the circuit with its voltages, the curves, eight tiles - graphs, an event log and a check page.
- A complete package: about 1.6 MB with the library, our 12 V bulb, our Arduino UNO V4.0 and the demo, without the source code of the model.
The IRF520 Module in Proteus
The device is IRF520MODTEP in TEPIRF520.LIB, under Transistors > MOSFET Modules, with the prefix U and the model TEPIRF520.DLL. Search IRF520 or MOSFET in Pick Devices. On the left are SIG, VCC and GND; on the right V+, V-, VIN and PGND - the terminal's GND, printed GND on the board. The module has no properties.
Download IRF520 MOSFET Module Library for Proteus Simulation
Click the button below to download IRF520-MOSFET-Module-Library-for-Proteus-v1.0.zip (about 1.6 MB, without the source code of the models):
IRF520 MOSFET Module Library for Proteus V1.0- README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
- Proteus Library Files:
TEPIRF520.LIB,TEPBULB.LIBandArduinoV4TEP.LIB. - Proteus Model Files:
TEPIRF520.DLL,TEPBULB.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch (no library).
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install IRF520 MOSFET Module Library for Proteus Simulation
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPIRF520.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for IRF520.
Proteus Simulation of a Bulb Dimmer
The demo uses an A4 sheet with our Arduino UNO Library for Proteus V4.0, the module U1 and a P21W 12 V 21 W bulb L1 from our Filament Bulb Library for Proteus. D9 drives SIG with a 490 Hz PWM and GND goes to ground; VIN is on a 12 V terminal, PGND on ground, and the bulb sits between V+ and V-. The Arduino's monitor is built in, the same window as our TEP Serial Monitor Advance for Proteus. Open IRF520-Bulb-Dimmer-ArduinoUnoV4.pdsprj.
The Sketch
The sketch needs no library. One function sets the duty cycle on D9, prints the step and waits:
void step(byte duty, const __FlashStringHelper* what, unsigned long ms) {
analogWrite(PIN_SIG, duty);
The loop dims the bulb in three steps, then holds the pin steady high - which is 5 V on the gate - and switches off:
step(64, F("PWM 25 %"), 1500);
step(128, F("PWM 50 %"), 1500);
step(255, F("100 %: D9 steady HIGH - only 5 V on the gate"), 2500);
analogWrite(255) does not make a PWM at all: the Arduino core simply sets the pin high, so the gate sits at a steady 4.9 V.
IRF520 Simulation Results
Open the project and press Run. The demo runs 8.2 simulated seconds and took about two and a half minutes on our PC with the pop-ups open and the pictures being taken. Click the module for its pop-up, or the bulb for its own. Every number below comes from one simulation run, the demo exactly as it ships.
25 % PWM: the Hardest Job
At 0.5 s the sketch starts a 25 % PWM. The module measures it on SIG - 490 Hz, 25 % - and the signal LED flickers with it. The bulb takes 0.73 A on average and glows dimly. But look at the MOSFET: its average loss is 5.46 W, and the average voltage across it is 10.9 V. The filament stays cool at this duty, so in every pulse it asks for more than the half-on IRF520 can give; the MOSFET saturates at about 2.9 A with some 7 V across it. Dimming a lamp is the hardest job you can give this module from a 5 V pin.
50 % and 75 %
At 50 % the filament is hotter and its resistance higher, so the pulses need less current: 1.01 A on average, and the MOSFET's loss falls to 1.30 W. The working point has moved off the flat part of the curve.
At 75 % the bulb takes 1.35 A on average with 1.53 W in the MOSFET; the junction has climbed from 25 C to 34 C.
100 %: Only Half On
At 5.0 s the sketch writes 255, and the pin goes steady high: 4.88 V on the gate. Now the MOSFET is in its triode region, but at this gate voltage its resistance is 0.62 ohm - more than twice the datasheet's 0.27 ohm, which needs 10 V on the gate. With the bulb drawing 1.67 A, 1.04 V stays across the IRF520 and 1.75 W heats it. The banner says it plainly: HALF ON. The curve card shows why: the working point sits on the 5 V curve, which flattens out near 3 A.
The Heat Builds Up
Two seconds later the numbers have hardly changed - 1.05 V at 1.67 A - but the junction is at 38.5 C and climbing about a degree a second. At 1.75 W and 62 K/W in free air it would settle near 130 C: hot enough to burn a finger, and only 20 degrees under the warning. A logic-level MOSFET at the same current would lose about a tenth of a watt.
At 7.5 s the sketch switches off; the bulb goes dark, the MOSFET's loss drops to zero and the junction starts to cool from 38.8 C.
The Graphs, the Event Log and the Check Page
The Graphs page plots the drain current, VDS, VGS and the junction temperature: the PWM steps, the jump to steady 5 V, and the slow climb of the temperature. The Event log records the half-on warning with its numbers. The Check page sums up the run: the gate at 4.88 V - half on, flagged - the load at 1.67 A with 1.67 A the most, VDS at 1.04 V, an average loss of 1.75 W at full brightness and 5.46 W at 25 % PWM, and the junction at 38.8 C after eight seconds.
The Arduino's monitor lists the steps.
How to Drive an IRF520 Properly
There are two clean ways out. The first is to give the gate what it needs: an NPN transistor or a small driver chip switching the gate between 0 and 10 - 12 V, with a pull-up from the 12 V supply - the MOSFET then reaches its 0.27 ohm and the loss at 1.7 A falls under a watt. The second is to use a logic-level MOSFET such as the IRLZ44N, which is fully on with 5 V on its gate. For an LED strip of half an amp the module as it is works fine: at 0.5 A the drop is a fraction of a volt.
Try It Yourself
- Replace the bulb with a smaller load and watch the drop across the MOSFET shrink.
- Change the PWM to 10 %: the MOSFET saturates even harder in each pulse.
- Feed SIG from a 10 V source instead of the Arduino and watch RDS fall to about 0.27 ohm.
- Let the bulb run longer at 100 % and follow the junction temperature on the Graphs page.
- Compare with the IRLZ44N in our N-MOSFET library on the same circuit.
Ideas to Extend the Demo
- A 12 V LED strip dimmer with a potentiometer on A0.
- A pump controlled by a soil moisture sensor.
- A fan that speeds up with temperature - with a flyback diode across it.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real IRF520 Module
- Gate voltage: 5 V is not enough for amps; 10 V turns it fully on.
- Heat: a TO-220 without a heatsink takes about 1.5 W; watch the loss, especially in PWM.
- Flyback diode: add one across motors, solenoids and coils - the module has none.
- Common ground: the header's GND must connect to the board's GND.
- VCC: not connected on most modules - it does not power anything.
Troubleshooting
- The load does not switch: SIG is under the threshold, the grounds are not common, or the load is not between V+ and V-.
- The load is weak at 100 %: 5 V on the gate - see VDS and the curve in the pop-up.
- The MOSFET gets hot while dimming: saturation in each pulse - drive the gate harder or use a logic-level MOSFET.
- VDS jumps above VIN at turn-off: an inductive load without a flyback diode.
- The part is not simulated:
TEPIRF520.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The gate network, the IRF520's square law with its threshold, the drain resistance, the body diode and the temperature effects follow the datasheet; the board is our own drawing.
- Our own choices: VTH 3.0 V, K 0.75 A/V2, 0.175 ohm in the drain, lambda 0.01 /V, 62 K/W and 1 J/K, VTH -5 mV/K.
- Not modelled: the gate capacitance and the switching transitions, avalanche, and failure past 175 C (it is reported, not simulated).
- Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or the MOSFET's maker.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the IRF520 MOSFET Module Library for Proteus Simulation. I hope it helps you see why a MOSFET's gate voltage matters as much as its current rating - before a real one gets hot under your finger. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!






















Comments
0