Flyback diode on PWM fan?

This setup worked for me numerous times. Just also add a resistor to the pin running to the FET gate.