Fan Control Theory

PS - just noticed you are trying to use pin 3. You can't get accurate 25KHz PWM from pin 3 because that pin is controlled from an 8-bit timer. If you use analogWrite then the PWM frequency you get is about 490Hz. The code I posted in the other thread generates 25KHz PWM on pin 10 (on a Uno).