I connected 12V to pump and to a transistor then connnected all of them to an Arduino:

connections are like this

It did not turn on.

I used this program:

int pump = 4;
    pinMode(pump, OUTPUT);
    digitalWrite(pump, HIGH);
  • 3
    \$\begingroup\$ Yes, that circuit won't work. Please ask a question that can be answered. \$\endgroup\$
    – Justme
    Mar 4 at 16:31
  • 2
    \$\begingroup\$ That schematic looks very confusing and very wrong. \$\endgroup\$
    – StarCat
    Mar 4 at 16:31
  • 2
    \$\begingroup\$ Your transistor is upside-down, in the wrong place in the circuit, and missing a base resistor. Try reading through here: electronics.stackexchange.com/questions/5336/… \$\endgroup\$
    – brhans
    Mar 4 at 16:34
  • 2
    \$\begingroup\$ Also, why have you connected VIN and D4 together? \$\endgroup\$ Mar 4 at 16:38
  • 1
    \$\begingroup\$ Does the motor need to be connected to BAT3-, or would BAT3+ be just as well? \$\endgroup\$
    – greybeard
    Mar 4 at 16:54

1 Answer 1


The transistor is intended to carry current in one direction only, and the way you have it wired, that direction is wrong.

You've connected the Arduino's output directly to the transistor's base, which could break something. Use a resistor (R1).

Also, while small motors are unlikely to damage the transistor, it's always a good idea to protect the transistor from the motor with a diode (D1) in reverse across the motor.

The following schematic has these corrections, and will work (assuming motor current is not more than about 1A).

Please note how I've made all the interconnections clear and easy to follow, avoiding wiring intersections where possible. All higher voltages towards the top. Please make a similar effort in your own schematics if you intend to share them, or ask others for help with them.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ The Arduino needs a power source, although the OP is probably depending on power through the USB programming connection. \$\endgroup\$ Mar 5 at 4:52
  • \$\begingroup\$ @PeterBennett Yeah, I didn't want to go where \$V_{IN}\$ and +5V are not the same, maybe this is an IC, maybe it's an Arduino module with regulator, and so on. Perhaps it's important, but I got lazy, and didn't want to go there. \$\endgroup\$ Mar 5 at 7:42

Your Answer

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

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