Hello, I know that there are a couple of threads on this. However, I still cannot get it to work. I am trying to control a PWM fan with a Uno.
I have the power coming form a power supply and the PWM connected to pin 3.
I am trying to use this fan. http://www.arctic.ac/us_en/arctic-f8-pwm.html
Before looking at the code, did you connect the fan properly? What frequency and voltage level does the fan expect on its PWM cables? Datasheet available?
AFAIK, for a 4-pin fan you just need a stable 12volt source that can handle the ~1A peak fan current.
Connected to the usually red and black wires. Red = positive, black = ground.
And a 5volt top/top ~25Khz PWM signal. Usually the blue wire. Common grounds.
5volt! (100% PWM) on that wire, and the fan will run at max speed.
The yellow wire is just speed information.
With three pin fans, the 12volt is usually PWM chopped at about 30herz.
That gives some knocking at lower speeds, but a higher frequency could be audible.
Been a while since I hooked one up, so better check those facts.