Might also strive including an inverter level to switch off the fet on power off. @Ivan ,i missed your datasheet anyhow, attempt the use of an inverter in among d3 and relaxation of the ckt of yours. Sometyhing like this;. Currently i'm running on a controller to power a pwm fan (datasheet). I am the usage of a atmega32u4 and it sends a 25khz pwm signal to the fan and it's working well. I need the fan to be off after i cut the energy to the controller, so i added a pull down resistor like under:.