It’s hot like hell. Let’s move some air around.
Noctua came up with a very high quality 5 V, 200 mm fan, NF-A20 5V PWM.
Let’s say that we’ll control the fan with a Raspberry Pi Zero W, which has a 5 V rail that seems to be connected directly to the USB power input
Andreas Spiess used a MOSFET and the RPi 5 V rail for the PWM signal logic level conversion, and drove the MOSFET with one of the RPi GPIO pins.
Using a bi-directional logic level converter would also allow us to monitor the fan’s Hall effect sensor, and the TXB0108 has additional protection built in.
The fan pulls only max 170 mA at 5 V, which is easily doable.
If we didn’t have a 5 V fan available, which might still happen, we’d have to get a 12 V fan or a few, and a Pololu U3V12F12 step-up voltage regulator which can do up to 1.4 A input, or a Pololu U3V50F12, which can do up to 5 A at a much better efficiency.
Adafruit have a 16-Channel PWM Bonnet that can apparently be jumpered into outputting 5 V PWM. Their material concentrates heavily on servo usage, and its much heavier current draw.
Implementing the controller with a ESP32 would mean much faster bootup times, and more stable PWM timing, with a total parts cost of about $12 USD for the controller, but there would be quite a lot of fiddling with WiFi and Bluetooth. Although, some people have figured out how to start a RPi service in under three seconds from power-on.