Having trouble running a motor

You have your NPN transistor configured as a high side switch for the motor. This means the positive power supply is connected to the transistor first, next the motor, then GND. For the NPN to work you need to create a voltage large enough to create a biasing current through the base/emitter junction. Since the motor is connected to the emitter and the motor has both a resistance and an impedance, it increases the voltage necessary to create current flow through the base. If the emitter voltage relative to GND isn’t too large, you may be able to make it work by reducing the value of your base resistor.

What you really should do it convert the circuit to a low side drive. In this arrangement, the motor would have one terminal connected to +5V, the other terminal connected to the transistor’s collector, and the emitter tied to GND. The push button would be wired as is. Since the transistor is now GND referenced, you can use the full 5V to set the current through the base and drive the motor. Here is an example of what I mean. Replace CRIO with your switch or Arduino. The 466 Ohm resistor would change to fit the characteristics of your motor and your 5V (vs. 3V) supply.

http://forums.ni.com/t5/image/serverpag … bl-1&px=-1

-Bill