having trouble with water pump


To automatically water my plants, I want to combine a soil humidity meter and water pump. I started with the water pump. I’ve built the exact same circuit as in chapter 9 of the starter kit tutorials: arduino pin 9 to transistor gate (using the irf520 that came with the kit), drain to motor end 1, source to (shared) ground, reverse diode between motor end 1 and end 2. built exactly like the picture.

My software only writes pin 9 high and low with a 1 second interval, so I know that should work.

However, I have the following problems:

  1. the motor may spin continuously
  2. the motor spins even if the arduino isn’t powered (!) so there is no power on the transistor (this is my main issue; how the hell does the current flow?)
  3. the whole thing seems extremely sensitive to static electricity; when I pick up the motor or feel the transistor (which 4. gets extremely hot in about 5 seconds, even when the arduino is not powered) this affects how fast the motor is spinning.

I’ve lost it, I’m pretty handy with arduino but in this case I just can’t figure it out. built the whole circuit from scratch 3 times. used different motors, batteries, transistors, diodes. nothing.

the motor is rated 7.2 volts, 3 to 9v max. I’m giving it 9 volts, either through 9v battery or through a wall adapter that can provide 0.6 amps, both not working.


The MOSFET is sensitive to static electricity. The static in the room which isn't enough to make a spark can blow the transistor just by touching the pins with your fingers.

Since it seems capable of going on and off, just not under command, I would say that it's not blown (yet) and your wire to pin 9 has come loose or broken internally.

The IRF520 needs >=10V to the gate to turn on properly, it is definitely not a logic-level

The random behaviour also strongly suggests you haven't got a 10k resistor between
gate and source to turn the device off when undriven... MOSFET gates "float" when
unconnected, meaning the device can be in any state, which is usually bad news, hence
the gate-source resistor.

So in summary get a MOSFET designed for 5V, and ensure its off by default...

The IRF520 is a very low spec device by todays standards, you should be
able to find a 30V device with logic level gate and on-resistance below 0.03 ohms.

Try the IRLZ44, it need a logic level signal on the gate, and it is rated at 60v