This is a basic question but I would appreciate help. I have:

  1. An Arduino
  2. A 4.5V DC motor
  3. Various transistors, like BC337, 2N7000, 2N2222A

What I'm trying to do is very simple: control the motor with the Arduino. I want to control it with PWM, so I can change the speed.

This is what I tried:

Connect the motor between my 5V power supply (a 500 watt PC power supply) and transistor collector (with protection diode); connect PWM pin of the Arduino to the transistor base, with a 1Kohm resistor; connect the transistor emitter to ground.

The motor doesn't spin, it just makes a little noise! If I connect the motor direct to the power supply it spins.

What might I be doing wrong?

  • \$\begingroup\$ possible duplicate of What determines how much current can flow through a 2N2222 A? \$\endgroup\$ Commented Nov 29, 2014 at 15:04
  • \$\begingroup\$ A picture really does paint 1000 words, a schematic would help here. \$\endgroup\$
    – David
    Commented Nov 29, 2014 at 15:18
  • \$\begingroup\$ Have you connected the grounds together? \$\endgroup\$
    – Majenko
    Commented Nov 29, 2014 at 15:23
  • \$\begingroup\$ You don't say what the power or current rating of the motor is. BC337 is able to handle 500 mA+ but motor may want to take several amps at startup. Measure motor current with an ammeter (DMM on 10A range). \$\endgroup\$
    – Russell McMahon
    Commented Nov 29, 2014 at 16:06
  • \$\begingroup\$ Can you make any reliable statements about the signal from the PWM pin? \$\endgroup\$
    – Kitana
    Commented Nov 29, 2014 at 23:40

1 Answer 1


You might need a bigger transistor. For large motors google "darlington" to get more current gain. Also scope the output of your arduino to see if it really works. No scope: add a second 1kohm resistor feeding a capacitor (few uF) to the output of the arduino and measure with a DMM. At 100% dutycycle you should get close to supply voltage of the chip, at 50% half, etc. Check chip hardware and/or code to make sure you don't have inverted logic: ex 80% duty cycle is not 80% LOW and 20% HI as if driving a PNP transistor.

  • \$\begingroup\$ You are right, i tried with a tip120 and it worked, thanks! \$\endgroup\$ Commented Nov 30, 2014 at 9:36

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.