Despite a lot of readings in this forum, I didn't find anything (?) about the speed control of a 5V fan...so I'm posting.
I made a first try, with a 2N2222 on the pin 11, with a 2.2k resistor between base and pin 11 and a 12V fan. It works and I can control the fan speed through a very simple program.
But when I replace my 12V fan by a 5V fan, it works only when the value on the PWM pin equals 255 (i.e full out). When it goes below this value, the fan stops and nothing more happens except from a very low "bzzzzzzzzzzzzzz"... I tried both with an external power supply and with the 5V pin from the arduino.
My question is: why this happens ?
Do the load drived by the transistor have to be greater than the voltage of the "command" circuit ?