MOSFET Driver Module(IRF520)
The IRF520 MOSFET Driver Module is a module that can be controlled with a PWM signal. It requires a heatsink for currents above 1A.
Specifications
- Operating Voltage: 3.3V ~ 5V
- Input/Output Voltage: 0V ~ 24V
- Input/Output Current: ~5A (Heatsink required for currents above 1A)
Example Required Hardware
- Arduino board
- Jumper cables
- MOSFET module
- DC motor
- 4.5V power supply (AA batteries x3)
Connection
This example demonstrates motor speed control using the MOSFET module. The motor's rotation direction is not considered in this test (connect the motor to the MOSFET module's V+ and V-).
Arduino | Motor | MOSFET Module | 4.5V Power Supply |
D5 | SIG | ||
5V | VCC | ||
GND | GND | ||
VIN | + | ||
GND | - | ||
Connect | V+ | ||
Connect | V- |
Example Code
The example gradually decreases the motor speed until it stops, then repeats the process.
int mosfetSignal = 5;
int val = 0;
int interval = 51;
void setup() {
analogWrite(mosfetSignal, val);
val = 255;
delay(3000);
}
void loop() {
for (int i = 0; i < 6; i++) {
analogWrite(mosfetSignal, val);
val -= interval;
delay(3000);
}
val = 255;
}
Execution Result:
Please refer to the link for the operation video.