Ir directamente al contenido

All items ship from our office in Colorado USA - $5.95 Flat-Rate US shipping & free shipping on orders over $75!

IRF520 24V MOSFET Driver Module User Guide

IRF520 24V MOSFET Driver Module

📋 Overview

The IRF520 MOSFET Driver Module is a compact switching board that bridges the gap between a low-voltage microcontroller and a higher-power DC load. It lets an Arduino, Raspberry Pi, or any other 3.3V or 5V controller switch devices that draw far more current or voltage than the controller's output pins can handle — things like DC motors, LED strips, solenoid valves, fans, miniature pumps, and relays.

At its core, the module uses an IRF520 N-channel power MOSFET as an electronic switch. When the SIG pin is driven HIGH by your microcontroller, the MOSFET turns on and completes the circuit to your load. When SIG goes LOW, the MOSFET turns off and the circuit opens. Because it switches the ground (negative) side of the load — a configuration called a low-side switch — the load's positive supply remains always connected; only the return path is controlled.

The SIG pin also accepts PWM signals, which means you can dim LEDs smoothly, control DC motor speed, or adjust the power delivered to any resistive or inductive load — all from a single microcontroller pin.

IRF520 24V MOSFET Driver Module for Raspberry Pi Arduino ARM Robotics - Top View - Envistia Mall

⭐ Key Features

  • 3.3V and 5V Logic Compatible: Driven directly from Arduino, Raspberry Pi, ESP32, or any microcontroller with 3.3V or 5V GPIO outputs — no additional driver circuit needed.
  • Switches Loads up to 24V / 5A: Controls DC loads well beyond what a microcontroller pin can drive directly.
  • PWM Compatible: Connect SIG to a PWM output pin for LED dimming, motor speed control, and variable power delivery.
  • Low-Side Switch Design: Switches the ground/negative side of the load using the IRF520 N-channel MOSFET.
  • Onboard Status LED: A blue LED illuminates when SIG is HIGH and the MOSFET is conducting, providing instant visual feedback.
  • Screw Terminal Connectors: Secure, tool-tightened terminals for the load connections — no soldering required for the load side.
  • Compact Form Factor: Small board fits easily into project enclosures and on breadboards.

🎯 Applications

  • LED strip and high-power LED dimming via PWM
  • DC motor on/off control and variable speed via PWM
  • Solenoid valve actuation (with flyback diode)
  • Miniature water pump or air pump switching
  • Relay coil driving from 3.3V microcontrollers
  • Fan speed control in cooling systems
  • Heater element on/off control
  • Robotics actuator control
  • Home automation switching (DC loads only)

📊 Specifications

Parameter Value
MOSFET IRF520 N-Channel Power MOSFET
Control (Input) Voltage 3.3V or 5V logic
Output Load Voltage 0 – 24V DC
Output Load Current <5A (see heat sink note below)
Heat Sink Requirement Required for continuous loads above 1A (not included)
Switch Type Low-side (switches the negative/GND side of the load)
PWM Compatible Yes
Signal Type Digital HIGH/LOW or PWM
Onboard Indicator Blue LED (illuminates when SIG is HIGH)
Dimensions Approx. 33 × 24 mm (1.3 × 0.94 inches) L × W
Weight 10g per module

📌 Pinout / Pin Diagram

The module has two sets of connectors: a 3-pin control header and a set of screw terminals for the load.

Control Header (3-pin)

Pin Label Description
1 GND Ground — must be connected to your microcontroller's GND
2 VCC Optional 3.3V or 5V supply for the onboard LED. Not required when using Arduino or Raspberry Pi — the SIG pin drives the MOSFET gate directly.
3 SIG Signal input — connect to a digital output or PWM pin on your microcontroller. HIGH = MOSFET on (load active). LOW = MOSFET off (load inactive).

Load Screw Terminals

Terminal Label Description
1 Vin Positive supply input for the load — connect to your load's power supply positive terminal (up to 24V DC)
2 GND Power supply ground — connect to your load's power supply negative terminal. This GND must also be common with the control header GND.
3 V+ Load positive — internally connected to Vin; connect to the positive terminal of your load
4 V− Load negative (switched) — connect to the negative terminal of your load. When SIG is HIGH, V− is connected to GND through the MOSFET, completing the circuit and turning the load on.

Common ground is essential. The GND on the control header and the GND on the load screw terminals must be connected together. If your load uses a separate power supply from your microcontroller, tie both grounds together at a common point. Without a shared ground, the MOSFET will not switch reliably.


🔌 Wiring / Connections

Arduino Wiring

IRF520 Pin Connect To Notes
GND (control header) Arduino GND Must also be tied to load supply GND
VCC (control header) Not required Leave unconnected for basic Arduino use
SIG (control header) Arduino digital or PWM pin (e.g., pin 9) Use a PWM pin (~) for speed/dimming control
Vin (screw terminal) Load power supply positive (e.g., +12V) Up to 24V DC
GND (screw terminal) Load power supply negative Also connect to Arduino GND
V+ Load positive terminal Internally connected to Vin
V− Load negative terminal Switched to GND when SIG is HIGH

Raspberry Pi Wiring

Wiring for Raspberry Pi is identical to Arduino, substituting a Raspberry Pi GPIO pin for the SIG connection. Use a PWM-capable GPIO pin (e.g., GPIO18 in BCM mode) for variable control. The Raspberry Pi's 3.3V GPIO output is sufficient to drive the IRF520 gate.

Important for Raspberry Pi users: Never connect SIG directly to a Raspberry Pi GPIO pin without a current-limiting resistor of at least 1kΩ in series. While most basic modules include a gate resistor on the board, adding a 1kΩ resistor in the SIG line provides additional protection for the GPIO output driver.


🚀 Getting Started

Example 1 — Simple ON/OFF Switch (Arduino)

This sketch switches the load on for 2 seconds and off for 2 seconds repeatedly. Connect SIG to Arduino digital pin 9.

// IRF520 MOSFET Module — Basic ON/OFF Control
// SIG connected to Arduino pin 9

const int MOSFET_PIN = 9;

void setup() {
  pinMode(MOSFET_PIN, OUTPUT);
  digitalWrite(MOSFET_PIN, LOW);  // Start with load OFF
}

void loop() {
  digitalWrite(MOSFET_PIN, HIGH);  // Turn load ON (LED lights, motor runs)
  delay(2000);
  digitalWrite(MOSFET_PIN, LOW);   // Turn load OFF
  delay(2000);
}

Example 2 — PWM Fade Control (Arduino)

Connect SIG to a PWM-capable Arduino pin (marked with ~ on the board, e.g., pins 3, 5, 6, 9, 10, 11 on the Uno). This sketch fades a load in and out — ideal for LED dimming or soft motor starts.

// IRF520 MOSFET Module — PWM Fade Control
// SIG connected to Arduino PWM pin 9 (~)

const int MOSFET_PIN = 9;

void setup() {
  pinMode(MOSFET_PIN, OUTPUT);
}

void loop() {
  // Fade in: 0% to 100% power
  for (int level = 0; level <= 255; level++) {
    analogWrite(MOSFET_PIN, level);
    delay(8);
  }
  delay(500);

  // Fade out: 100% to 0% power
  for (int level = 255; level >= 0; level--) {
    analogWrite(MOSFET_PIN, level);
    delay(8);
  }
  delay(500);
}

PWM values explained: analogWrite(pin, 0) = fully off. analogWrite(pin, 128) = approximately 50% power. analogWrite(pin, 255) = fully on. Arduino's default PWM frequency is approximately 490 Hz on most pins (980 Hz on pins 5 and 6 on the Uno).

Example 3 — ON/OFF Control (Raspberry Pi, Python)

Connect SIG to a Raspberry Pi GPIO pin. GPIO18 is used here (BCM numbering) as it is PWM-capable.

# IRF520 MOSFET Module — Raspberry Pi ON/OFF Example
# SIG connected to GPIO18 (BCM), via a 1kΩ series resistor

import RPi.GPIO as GPIO
import time

MOSFET_PIN = 18

GPIO.setmode(GPIO.BCM)
GPIO.setup(MOSFET_PIN, GPIO.OUT)
GPIO.output(MOSFET_PIN, GPIO.LOW)   # Start with load OFF

try:
    while True:
        GPIO.output(MOSFET_PIN, GPIO.HIGH)  # Load ON
        time.sleep(2)
        GPIO.output(MOSFET_PIN, GPIO.LOW)   # Load OFF
        time.sleep(2)

except KeyboardInterrupt:
    pass

finally:
    GPIO.cleanup()

Example 4 — PWM Speed / Dimming Control (Raspberry Pi, Python)

# IRF520 MOSFET Module — Raspberry Pi PWM Example
# SIG connected to GPIO18 (BCM), via a 1kΩ series resistor

import RPi.GPIO as GPIO
import time

MOSFET_PIN = 18

GPIO.setmode(GPIO.BCM)
GPIO.setup(MOSFET_PIN, GPIO.OUT)

pwm = GPIO.PWM(MOSFET_PIN, 1000)   # 1 kHz PWM frequency
pwm.start(0)                        # Start at 0% duty cycle

try:
    # Fade in
    for duty in range(0, 101, 5):
        pwm.ChangeDutyCycle(duty)
        time.sleep(0.1)
    time.sleep(1)
    # Fade out
    for duty in range(100, -1, -5):
        pwm.ChangeDutyCycle(duty)
        time.sleep(0.1)

except KeyboardInterrupt:
    pass

finally:
    pwm.stop()
    GPIO.cleanup()

💡 Tips

Tip 1 — Add a flyback diode for inductive loads. When switching DC motors, solenoids, relays, or any coil-based device, always add a flyback (freewheeling) diode across the load terminals — cathode to V+, anode to V−. When the MOSFET turns off, an inductive load generates a voltage spike (back-EMF) that can exceed the MOSFET's breakdown voltage and destroy it. A 1N4007 or 1N4148 diode across the load clamps this spike safely. Without it, your MOSFET may fail silently and unpredictably.

Tip 2 — Add a heat sink for loads above 1A continuous. The IRF520 MOSFET dissipates heat proportional to the current it carries and its on-resistance. For loads above 1A running continuously, attach a small aluminium heat sink to the MOSFET using thermal paste or a thermal pad. Without it, the MOSFET will overheat and its on-resistance will rise, leading to reduced performance or permanent damage.

Tip 3 — VCC is not required for Arduino or Raspberry Pi. The SIG pin drives the MOSFET gate directly. You only need to connect GND and SIG from your microcontroller. The VCC pin provides power to the onboard status LED — if you want the LED indicator to work with the MOSFET driven by SIG alone, leave VCC unconnected; the LED draws its power from SIG through the gate circuit on many module versions.

Tip 4 — Use PWM pins for variable control. For LED dimming or motor speed control, connect SIG to a PWM-capable pin (~) on your Arduino. On the Raspberry Pi, use GPIO18 or GPIO12 (BCM) for hardware PWM, which produces cleaner, more stable waveforms than software PWM for motor applications.

Tip 5 — DC loads only. This module is designed for DC loads only. Do not attempt to switch AC mains voltage (household 120V/240V). The IRF520 MOSFET is a DC device and cannot safely switch AC. For AC loads, use a relay module or solid-state relay (SSR) instead.


🚫 Limitations

  • DC loads only: This module cannot switch AC mains voltage. It is a DC low-side switch only.
  • Low-side switch: The module controls the ground/negative side of the load. The load's positive terminal is always connected to the supply. This is fine for most applications but is not suitable as a high-side switch (where you need to control the positive rail).
  • 5A maximum load current: The PCB traces and screw terminals limit practical current to 5A. Do not exceed this limit. For higher currents, use a MOSFET with larger package and heavier wiring.
  • Heat sink not included: The module ships without a heat sink. Sustained operation above 1A requires adding one.
  • No built-in flyback diode: A separate flyback diode must be added externally when driving inductive loads such as motors, solenoids, or relays.
  • Single direction only: This module switches the load on or off (or controls power via PWM). It cannot reverse motor direction — use a motor driver module (H-bridge) for bidirectional DC motor control.

🛠️ Troubleshooting

Load does not turn on when SIG is HIGH

  • Verify GND on the control header and GND on the load terminals are connected to a common ground. Without a shared ground, the MOSFET gate has no reference and cannot turn on properly.
  • Confirm the load power supply is connected to Vin and GND on the screw terminals and is powered on.
  • Check the SIG pin is actually going HIGH — use a multimeter or LED to verify the output of your microcontroller pin.
  • Verify SIG is wired to the correct pin on the control header (not VCC or GND).

Load stays on and cannot be turned off

  • Check the SIG pin is not permanently connected to VCC or a HIGH signal. Confirm digitalWrite(pin, LOW) or GPIO.output(pin, GPIO.LOW) is being executed.
  • Verify the MOSFET has not failed in the on-state — this can happen from overheating or an unprotected inductive spike. Replace the module if suspected.

MOSFET runs very hot

  • You are drawing more than 1A continuously without a heat sink. Attach an aluminium heat sink to the IRF520 MOSFET immediately to prevent permanent damage.
  • Check that the load current does not exceed 5A — measure it with a clamp meter or inline ammeter.

MOSFET fails repeatedly when driving a motor or solenoid

  • You are not protecting against back-EMF. Add a 1N4007 flyback diode across the load (cathode to V+, anode to V−). This is the most common cause of MOSFET failure with inductive loads.

LED indicator is not lighting up

  • The SIG line may not be going HIGH. Verify your code is executing digitalWrite(pin, HIGH) or the equivalent.
  • On some module versions, VCC must be connected for the LED to illuminate. Try connecting VCC to 3.3V or 5V from your microcontroller.

PWM control is not smooth — motor stutters or buzzes

  • The PWM frequency may be too low for your motor. On Raspberry Pi, switch from software PWM to hardware PWM for cleaner waveforms.
  • Add a 100µF electrolytic capacitor across the motor terminals to help filter noise.
  • Verify the flyback diode is installed — without it, back-EMF spikes can interfere with PWM waveforms.

🏪 Where to Buy

The IRF520 24V MOSFET Driver Module is available from Envistia Mall.

IRF520 24V MOSFET Driver Module (2-Pack)   →

  • 📦 Fast US Shipping
  • 🔄 Hassle-Free Returns
  • 📧 Responsive Customer Support

 

 

Sold and supported by Envistia Mall. Ships from the USA. The manufacturer and Envistia LLC (dba Envistia Mall) are not responsible for any damages or losses resulting from the use of this product. Always follow proper electrical safety practices when working with electronic components. Specifications are based on manufacturer data and are subject to change without notice.

Share this guide:
in

🛒 Related Products

Find the components mentioned in this guide in our store.

Browse Products →