1. You have the diode connected in the wrong place, you'll blow the transistor if you leave it like that. Connect it in parallel with the motor, anode to TIP120 collector, cathode to +9v. This will also make the circuit more efficient and more likely to work as intended.
Just doing this helped _a lot_ . I can now run down to PWM values of 160 which is pretty good for what I need to do.
If this is the best way to wire up a TIP120 and a motor, I'm surprised at the number of wrong tutorials that can be found by googling. Lots of them suggest wiring the diode the way I originally did.
2. I recommend adding a large capacitor (e.g. 1000uF) between motor +ve terminal and TIP120 emitter.
I suppose a ceramic capacitor will be ok, or is an electrolytical cap ok too ?
For the sake of learning, what's the purpose of this capacitor ? Is it for smoothing out the current going to the motor ?
3. A TIP120 like any Darlington has a relatively high voltage drop, it could be as high as 3 volts depending on motor current. You can measure the voltage drop across the TIP120 when you digitalWrite HIGH to the pin. Darlingtons are obsolete, mosfets are much better for switching large currents.
4. If the 9v supply is a 9v rectangular battery, then unless it's the expensive lithium variety, it's unlikely to be able to supply enough current to drive the motor well.
The supply is a laptop PSU, it's rated 3.5A @ 9.5V, so I think it should be fine, even considering the voltage drop of the darlington.
I've read that mosfets are more sensitive to static and in general less rugged than transistors, and I'll need to use this circuit in an environment that is not extremely friendly. I may of course be misinformed.
Do you have any suggestion for a good mosfet that can replace the TIP120 for driving relatively small motors (from printers or RC toy cars) ?
5. If you get the motor working with PWM but it still makes a noise, increasing the PWM frequency will help make it quieter.
Noise is rather ok now. But if I want to increase the PWM frequency, do you think using this code will be ok ?
http://arduino.cc/playground/Code/PwmFrequency