A single MOSFET switch on a small board for turning a 12V or 24V DC load on and off from an Arduino, ESP32 or Raspberry Pi Pico. It suits LED strips, pumps, fans, small motors and solenoids, and it takes PWM, so you can dim a strip or set a motor's speed with analogWrite.
Your signal lights an optocoupler, and the optocoupler turns on the IRF540N from the load supply. So a 3.3V or 5V pin is all it needs, but the load supply has to be 9V or more. On a 5V LED strip or a 6V motor the MOSFET only half turns on and gets hot, so use our 1-channel 5V relay module for low voltage loads. It carries 3A continuously in open air at up to 24V. For bigger motors, or to run one in both directions, our BTS7960 motor driver is the step up.
Specifications
Datasheets
Wiring & getting started
- Connect the load and the supply
The terminals aren't labelled on the board, so hold it with the screw terminals at the top. The left pair is the load: LOAD - then LOAD +. The right pair is the supply: IN - then IN +. Use a 9 to 24V DC supply and tighten the screws firmly.
- Connect your controller
The header reads S, +, - from left to right. S goes to an output pin (D9 on an Uno), + to 5V (or 3.3V on an ESP32 or Pico) and - to GND. Three female jumper wires push straight on.
- Load the test code
Upload this sketch to an Uno. It switches the load on and off, then fades it up with PWM.
Example Arduino codeArduino C++
// IRF540N MOSFET switch module test (MOD-IRF540-1CH). // Module S to D9, + to 5V, - to GND on the Uno. // Load supply 9 to 24V DC on the screw terminals. const int SIG = 9; // a PWM pin, about 490 Hz on an Uno void setup() { pinMode(SIG, OUTPUT); } void loop() { digitalWrite(SIG, HIGH); // load on delay(2000); digitalWrite(SIG, LOW); // load off delay(2000); for (int duty = 0; duty <= 255; duty += 5) { // fade up analogWrite(SIG, duty); delay(40); } analogWrite(SIG, 0); delay(1000); } - Check it works
The load should come on for 2 seconds, go off for 2 seconds, then fade up. If it only glows dimly or the MOSFET gets hot, check the supply is 9V or more. With the load off, LOAD - still reads close to the supply voltage against IN -. That's normal, because the board switches the negative side, so measure across the load instead.
Note: DC only, 24V maximum. Never connect it to household power.

