According to the reference for AnalogWrite(), this will generate PWM at a frequency of about 490 Hz. This pretty inefficient. It means that you deliver a parcel of energy every \$1/490Hz \approx 2ms\$. Normally the inductance of the motor smooths out these parcels such that you get a mostly constant current, but at this low speed, the inductance of your motor probably isn't sufficient to do that.
It's as if you are turning a shaft with pulses of torque and hoping it will turn at a constant speed, but you have a tiny flywheel on it. Torque is proportional to current, and an inductor is like a flywheel for current in that it resists abrupt changes in current. Bigger inductors resist more, like a heavier flywheel resists changes in speed more.
If you are supplying the motor with 5V, and the motor inductance is 1.5mH, then the current will change at a rate of:
$$ \frac{di}{dt} = \frac{v}{L} = \frac{5V}{1.5mH} \approx 300 A/s $$
Over the course of the \$2ms\$ between pulses, that equates to a change on the order of:
$$ 300A/s \cdot 2ms \approx 600mA $$
These are just very rough estimates, because the analysis of what the current will actually do over the PWM period is more complicated, but the point is this: the current in the motor windings is changing a lot with the PWM waveform.
The torque the motor produces is proportional to the winding current. So what happens is probably this: the PWM switches high, and the current gets pretty big. This would turn the motor, except that before long, the PWM switches low, and the current goes back down to about nothing. So you aren't applying a constant torque; you are just applying spurts of torque. These short spurts of torque aren't enough to get the motor going unless you turn the duty cycle way up, so you motor just hums at about 490 Hz.
I bet if you attach some mass to the motor (like a flywheel), and give it a little shove, it will get going. In this case, you are augmenting your lack of "electrical flywheel" (inductance) with a real mechanical flywheel. A higher PWM frequency would be more efficient, but isn't necessary to have a working system.
You want to use your transistor as a switch. I found a nice site about that which gives this circuit:
Now forget about all the garbage and strip the design down to this:
simulate this circuit – Schematic created using CircuitLab
Your circuit is correct, except that it's missing the base resistor (R1) and the pull-down resistor (R2). Also, the load (your motor) has to be on the collector of the transistor, not on the emitter. At last, use a flyback or flywheel diode with the cathode to Vcc, like in the first image, to avoid high voltages.
So in the end, your schematic would look like:
simulate this circuit
Explanation of the circuit:
- R1 is required to limit the current on the base of the resistor and thereby the current drawn from the Arduino. If you do not use the base resistor, your Arduino might break.
- R2 is a pull-down resistor which makes sure the voltage on the base of the transistor is low enough to not conduct whenever there is no input signal from the Arduino. So this resistor makes sure you know in what state the circuit is when the Arduino is disconnected. This resistor is not required, but recommended.
- D1 is a flyback diode which eliminates the voltage spike when the motor stops or starts working. It goes too far to explain why, but whenever you let a current flow through a coil or when you stop letting the current flow, a voltage spike may occur. With the flyback diode, you make sure that spike is eliminated immediately. Usage of this diode is highly recommended.
One last thing to explain: why the motor has to be on the collector side and not on the emitter side of the transistor. Wouter explains this in his answer, in short: with the load on the collector side you are in charge of what voltage the motor gets; with the load on the emitter side, this voltage cannot be higher than the voltage on the base (minus something).
Best Answer
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.