I'm new to electrical engineering and I am currently trying to make a motor turn on for one second, turn off for one second, and repeat.

I'm using an Arduino Uno's digitalWrite() feature to activate a transistor, allowing the external 9V battery to turn on the motor.

Although everything is responding, instead of the motor turning on and off like I want it to, it spins fast for a second, then spins slower for a second. I would like the motor to stop completely, but cannot figure out how to do that.

Here's the schematic of my circuit:


simulate this circuit – Schematic created using CircuitLab


void setup(){    
  pinMode(9, OUTPUT);

void loop(){    
  digitalWrite(9, HIGH);    
  digitalWrite(9, LOW);    

Why isn't the motor completely turning off?

  • 2
    is that REALLY exactly how you have the cct?
    – JonRB
    Jan 24, 2016 at 21:06
  • At first glance: your base resistor is way too high allowing only a small amount of current to flow through the collector.
    – Marco
    Jan 24, 2016 at 21:06
  • And you forgot your flyback diode...
    – Marco
    Jan 24, 2016 at 21:08
  • 5
    Another arbitrary migration- this has no particular relevance to Arduino- it could be any micro. 8-( Jan 24, 2016 at 21:22
  • 2
    This is an electronics question - although the word "Arduino" does happen to appear in it.
    – Nick Gammon
    Jan 25, 2016 at 1:32

2 Answers 2


I can't make much sense of your diagram- but this is the correct way to do it:


simulate this circuit – Schematic created using CircuitLab

R1 is low enough that the base gets 10-15mA of drive, sufficient for a few hundred mA of motor current. D1 protects the transistor Q1 when it turns off (from the motor inductance). The emitter of the NPN transistor should be grounded and then the collector will either be near ground or at the 9V level depending on whether it is off or on.

You may have damaged the transistor you are using (due to breaking it down in reverse across the E-B junction) so I would suggest proceeding with a new one. You didn't mention it, but it probably got quite warm.

  • My precious reputation :(
    – Marco
    Jan 24, 2016 at 21:16
  • 1
    Have an upvote, my friend. Jan 24, 2016 at 21:18

There are multiple things wrong with your drawn schematic:

  • The ground symbol is not wrong but really misleading.
  • You forgot to add a flyback diode.
  • You wired the load the wrong way: the load is placed between the collector and VCC, not between emitter and GND.
  • The base resistor is way too high.

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.