I use this Chinese MOSFET module to drive mini DC pump using control signal from Arduino (simply on off with blibk sketch) enter image description here enter image description here I know that we need to add flywheel diode but it this case unfortunately, it's not. The problem is when the pump switch on and off there are something happen seem like voltage-spike with Arduino digital output and also effect 5V pin via internal- input eds diode of the Arduino. My question is what actually happen and how? I think gate is isolated from other pin so I'm confusing right now. Small capacitance between those pin shouldn't be the problem.

  • \$\begingroup\$ Sounds like poor decoupling. Your schematic shows none. Is that the case? \$\endgroup\$
    – winny
    Commented Apr 11, 2021 at 9:28

4 Answers 4


There are a few issues with that board, but luckily enough you can cure them rather painless.

1. You really must fit a freewheeling diode across the output posts.

Best location is also the easiest, just solder it on the output terminal strip pins bottomside your pcb. This will prevent load and load wiring inductance to push your MOSFET into avalanche at every turn-off.

Virtually any diode rated at least twice your supply and pump current would do, 1N4002 for instance or anything you have handy. Contrary to common belief a fast recovery is not really needed for "seldom" on/off switching. It could be useful for PWM driving only.

Avalanche is usually not too bad for the MOSFET itself if energy is below allowed Eas, but in turn may generate high voltage (over 100V) high dv/dt pulses which can easily be conducted around doing weird things to your Arduino controller.

2. You must replace your IRF520 MOSFET with one suitable do be driven by Arduino 5V output.

IRF520 should be driven at least 10V for reliabily turn on, fit an IRL520 instead.

IRF may sometimes seem to working fine but it will, at best, heat more than what's due. But at worst it may only partially drive your pump and/or work today with your very specimen but not if you try do build a second one another day.

3. Not really a must but would help a lot -and I would definitely do- add some bypass capacitance across power Vcc pins.

Again solder bottomside just across terminal strip pins, value somehow depends on load but it is not critical, a few microfarads alluminium should do. This would create a short loop for both on and off transient currents reducing the chance to have noise around in the system and hence weird erratic controller behaviour.

4. Take care of power and controller current flows. (Credits to Kartman)

Try to keep them separated, draw the schematic of Arduino, switching module, load and power supply(ies) keeping in mind that every line you draw is not an ideal wire with zero voltage drop, but a real one with its own resistance and inductance messing up the things when shared by a fast, heavy power current and a tiny control signal.

And now last but not least:

0. Try not to buy poor enginered cheap boards.

We have come to a point where virtually nothing of the original board is left as good.

  • \$\begingroup\$ I like "0. Try not to buy poor enginered cheap boards." Yep, could not agree more. \$\endgroup\$
    – M lab
    Commented Apr 11, 2021 at 13:44

The gate is isolated but just barely, after all the insulating oxide layer might only be a few atoms thick. Sufficiently high voltages will degrade or blow the gate oxide and there are still parasitic capacitances such as that between drain-gate through which high frequency currents on the drain can travel through to inject itself into the gate.

It doesn't matter if the capacitance is very small if the frequency or rising/falling edge is very very high, and it will be because MOSFETs can switch on and off very very quickly.

  • 2
    \$\begingroup\$ Transients can flow via the 0V wiring - you need to understand where the current is flowing and ensure your wiring makes it flow where it should. If the load current is flowing back through the Arduino, you'll most likely have problems. Current flows in a loop. Understand where the loop is. \$\endgroup\$
    – Kartman
    Commented Apr 11, 2021 at 7:52

I know that we need to add flywheel diode but it this case unfortunately, it's not.

Without the diode, when the FET turns off, the energy stored in the inductive load means the current doesn't stop immediately. It causes drain voltage to rise until something breaks. This will usually be the MOSFET going into avalanche mode. Here the simulator predicts a nice >100V spike.

enter image description here

If this goes on at each PWM cycle, the MOSFET will overheat and burn very quickly. Also the ringing and voltage spiking can destroy the gate oxide insulator, which then internally shorts gate to source and/or drain, which will also destroys whatever drives the MOSFET if it is not protected against a sudden influx of high voltage on its output. Notice drain voltage the ringing reaches 40 volts here, with only a 12V supply, so that's pretty nasty. This will also create tons of electromagnetic noise, which can do funny things like make the micro crash and reboot, or even latch-up, overheat and burn if it gets coupled into an input.

So, add the diode. Pick one that switches fast enough for your PWM frequency. If you don't use PWM, just pick a diode that can handle the current. And it would be preferable to add a gate resistor to slow down the switching.

enter image description here

Note IRF520 is not specified to turn fully on with Vgs=5V, so it may turn on just a bit, or have a much higher RdsON than the datasheet value which is specified at Vgs=10V. Then it will overheat and burn. Fortunately it's probably a counterfeit IRF520 so maybe you got a low voltage FET instead, who knows...

  • \$\begingroup\$ This module is just piece of miserable engineering. I buy this to drive heater 12V 3A and it become heater its self. After that ,my colleage bring this module to me again. it seem fine to drive small pump with small current until these doom happen. \$\endgroup\$
    – M lab
    Commented Apr 11, 2021 at 13:43
  • \$\begingroup\$ Yes, if it is genuine IRF520 it will not work with 5V gate drive... too bad for arduino lol \$\endgroup\$
    – bobflux
    Commented Apr 11, 2021 at 19:18

To reduce this effect I suggest you to slow down the MOSFET command by:

  1. Adding a 10 nF capacitor or more between the Gate and the Source, that is, in parallel to the 1 k resistor.

  2. Adding a 1 k resistor between SIG and the GATE.

The voltage spikes amplitude depends a lot on where you put the negative clip of the probe of your scope.

To correctly measure the voltage spikes amplitude on the +5 V power supply of the microcontroller, solder a short wire on the GND signal that is near the +5 Volt pin you are probing.

If you can't solder the short wire, than look at this picture:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.