How to eliminate noise from PWM controlled 12V fan at low speed I am trying to build a simple fan controller (single fan). So far I have successfully created a circuit which powers the fan with an external 12v DC adapter and added a transistor (NPN) to switch it on and off. The transistor is connected to a PWM port on the Arduino. 

When putting HIGH on the port the fan works perfectly at high speed, but when I want to lower the speed (say analogWrite(fanPin, 150)) it starts to make a humming noise. I believe this is caused by the use of PWM.

What is the best way to control the speed of the fan without (too much) noise?

ps. The fan is a Cooler Master 3-wire PC fan. Transistor is a P2N2222A.

Update: Here is the schema I am using:
I had the same problem with a 5V fan.  Something simple worked for me: To decrease the PWM frequency.  You probably want to do this using pin 9 or 10 (for the Uno) as changing the frequencies of other PWM pins messes up the delay and millis functions.  Details on how to do it and a very convenient function are provided in http://playground.arduino.cc/Code/PwmFrequency.  In my case, using the lowest frequency possible (31250/1024 = 31Hz), I completely eliminated the hum for higher speeds and significantly reduced it for lower speeds.  And by the way, I used the PWM pin to drive a MOSFET since the current of my fan was 140 mA, much higher than the 20 mA Arduino pins can safely provide.