5v powering from external source

Hey there.

I want to control a 5v 500mA pump from my Arduino.

I know that the Arduino cannot provide enough power for that, so I know I cannot use directly the Arduino output.

But I am wondering if it would be possible to connect the pump to external 5v source (the one powering the Arduino on +5v pin ) and to connect Arduino output to the pump ground. The pump will be powered from external source, and will be activated when setting output to LOW. Is this correct ? Or is it dangerous for the Arduino ?

If it is dangerous, I would be using a MOSFET, but I have absolutely no idea of the model I should use. I've heard about flyback diode but I didn't really understood how it works

Thanks !

You need to use a MOSFET to act as a switch to supply current to the pump. Is 500mA the running current or is it the stall (starting) current for the pump? The MOSFET must be sized to handle the stall current.

The flyback diode is there to shunt the high reverse voltage that is generated when a motor is shut off. When the motor is running there is a magnetic field around the motor. When the motor is powered off that magnetic field collapses around the motor windings, generating the reverse voltage in the motor windings (tens to hundreds of volts). Without the diode, the reverse voltage is high enough to fry the MOSFET.

Ok thanks for those explanation ! I think that 500 mA is the stall current, and the running current is about 300 mA.

Any idea of a MOSFET model that would suit my needs ?

Not off the top of my head and I am on my tablet, right now, so doing a search is difficult. Look for a logic level N channel MOSFET with continuous drain current of 2 to 5 Amps. Go to Digikey, Mouser, etc. and use their parametric search. Sparkfun or Adafruit (and others) have MOSFET modules, too.

Here is a schematic of a DC motor driver. The diode could be a 1N4007 or equivalent. The capacitor helps to filter out high frequency noise.

Here's one that I use often:
https://www.digikey.com/product-detail/en/infineon-technologies/IRLB8721PBF/IRLB8721PBF-ND/2127670