I want to control (only on/off) a small water pump (5 V, 200 mA max.) with my Arduino.

I read something about NPN transistor, because the output pins of the Arduino can't supply enough current to the pump. However, I don't know how to choose the right transistor and how to connect it with my Arduino and my water pump.

  • i would use an n-channel logic-level mosfet; 1w is going to be pushing it for signal BJTs.
    – dandavis
    Jun 7 '17 at 8:40
  • @dandavis: Note that 1 W is the power of the load. The switching transistor is not going to dissipate anywhere near that power. Jun 7 '17 at 10:21
  • @EdgarBonet: at least 0.6/5th of it will, and that can get little TO92s quite hot...
    – dandavis
    Jun 7 '17 at 13:44
  • @dandavis: What does “0.6/5th” mean? Jun 7 '17 at 14:07
  • (0.6v / 5v) * 1w = 120mw to dissipate. that's actually probably fine now that i run the math. toasty, but not pushing it. cheers
    – dandavis
    Jun 7 '17 at 14:20

To use an NPN, connect a power rail of 5V to the pump's positive terminal, and from its negative terminal wire it to the transistor's collector pin. Wire emitter to GND, and place a >=220 ohms resistor between your arduino control pin and the transistor base.

If instead using an N-channel MOSFET, wire load to drain, source to GND, and use a 4K7 pull-down on gate.

Also add a diode, with its anode at the pump's negative terminal, and cathode (white ring) at the positive terminal.

  • why do you need a resistor on the mosfet's gate? The MCU grounds the pin when deactivated, so is there an advantage to using an external resistor?
    – dandavis
    Jun 7 '17 at 13:49
  • 1
    @dandavis yes, there is an advantage in that. The switching works best when the MOSFET is absolutely OFF when not absolutely ON. A transient could turn the MOSFET on, or the gate may not discharge quickly enough to allow for fast switching. I had problems with the latter, even on small MOSFETs, like 2N7000.
    – user2497
    Jun 7 '17 at 14:07
  • @dandavis No. The signal from the MCU would just go directly to ground, and the gate would never be charged.
    – user2497
    Jun 7 '17 at 14:25
  • 1
    Connect the output from the MCU directly to the gate. Connect the gate to a 4K7 resistor. Connect the other side of the resistor to ground. Optionally, if the gate has enough capacitance to surge the output, add a 220 ohms resistor in series from MCU output to gate.
    – user2497
    Jun 7 '17 at 14:33
  • 1
    @dandavis: The pulldown on the MOSFET gate ensures it will be off even before your sketch starts, while the Arduino is running the bootloader. Otherwise it would float, as the Arduino pins are in the high-impedance state until you issue pinMode(pin, OUTPUT). Jun 7 '17 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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