Transistor MOSFET DC Switch Relay, 5V Logic, DC 24V/30A
Overview
The RobotDyn MOSFET DC Switch is a single-channel driver module that lets a microcontroller switch high-current DC loads (motors, LED strips, pumps, solenoids) up to 24 V and 30 A. It uses an IRF520 N-channel MOSFET as the switching element and an optoisolator to electrically separate the logic side from the load side.
The trigger input accepts a clean digital signal (3.3 V or 5 V) or a PWM signal for variable-speed/brightness control.
Why Optoisolation Matters
Without isolation, motor inrush current or back-EMF from inductive loads can spike voltages on the microcontroller’s GPIO and brown out or destroy the MCU. The optoisolator means:
- No electrical connection between MCU and load side
- No common ground required (you can power the load from a 24 V battery and the MCU from USB without sharing ground)
- Surge protection for the MCU
Pinout
Logic side (3-pin header):
| Pin | Function |
|---|---|
| VCC | 3.3 V or 5 V (powers the optoisolator’s LED) |
| GND | Logic ground |
| SIG | Digital control input (HIGH = MOSFET on) |
Load side (screw terminals):
| Terminal | Function |
|---|---|
| VIN+ | Load power supply positive (up to 24 V) |
| VIN− | Load power supply negative |
| VOUT+ | To load positive |
| VOUT− | To load negative |
PWM Control (Variable Speed)
For motor speed control or LED dimming, drive SIG with PWM:
const int mosfetPin = 9; // PWM-capable pin
void setup() {
pinMode(mosfetPin, OUTPUT);
}
void loop() {
for (int duty = 0; duty <= 255; duty++) {
analogWrite(mosfetPin, duty);
delay(10);
}
}
Note: The IRF520 is not a logic-level MOSFET — at 5 V gate drive, RDS(on) is around 0.27 Ω. For currents above ~5 A continuously, you’ll need active cooling or a heatsink. For switching at high PWM frequencies (>10 kHz), consider a logic-level MOSFET module instead (e.g., IRLZ44N).
Heatsink Sizing
| Continuous Current | Cooling |
|---|---|
| Up to 3 A | No heatsink |
| 3–8 A | Small clip-on heatsink |
| 8–15 A | Larger heatsink + thermal paste |
| 15–30 A | Forced air + substantial heatsink (short duration only) |
The IRF520’s tab is connected to the drain — if you bolt it to a metal chassis, isolate with a mica or silicone pad.
Compatible Loads
Works with:
- DC motors (12 V / 24 V)
- LED strips (12 V common, 24 V high-density)
- Solenoid valves
- Small pumps
- Relay coils (for higher-current relays)
Does NOT work with:
- AC loads (use a TRIAC dimmer instead)
- High-frequency PWM > 50 kHz (gate capacitance too high)
Common Uses
- 3D printer heater bed control
- LED strip brightness via PWM
- Robotics motor drivers (single direction)
- Water pump controllers
- Power MOSFET switching from low-voltage logic
Where to Buy in 2026
IRF520 modules are abundant. Look for boards explicitly marked with optoisolator (cheap clones omit it — dangerous for inductive loads).
Documentation
- Pinout PDF — coming soon
- IRF520 datasheet link — coming soon