I am just starting to learn about making electronic things, so this may be a foolish question. I think this is adequately different to similar questions here.
As a first project I am working on making a fan controller based around an ESP32/ESP8266 MCU (I'm coming from software development, so this feels like a comfortable route in). The fan is a 4-wire PC fan (SUNON PMD1206PMB3-A 12V 3.4W). I have a working system to send the PWM signal to control the fan speed and plan to work on getting back the fan's tacho, but am having an issue with system stability on start up that I believe is due to power stability caused by the fan drawing current while the MCU is booting. An approach that I'm thinking of is to get the MCU to control the power to the fan and only switch it on when the boot is complete (this has the advantage of allowing the fan to be turned off when the set speed is zero – the zero duty cycle oddly leaves the fan running at 20rpm).
Since the ESP32 uses 3.3V logic I cannot directly switch a MOSFET with a line from the MCU, so I was thinking of using something like this.
Is this a sensible approach? Is there a better way to do this?
Note that the +12V and +5V are already available in the circuit – though from looking at this related answer it appears I could draw from the 12V.