Discussion
MSI Forgot to Wire My Fans, So I Built My Own Fan Controller
realaccfromPL: This looks really good! I am trying to do the same thing for cooling 11th gen Intel laptop motherboards with micro RP2050 board but came to the conclusion that I should just do it with ESP32 as mine has some limitations.Would you mind sharing more technical review of what you created?
bobsterlobster: MSI shipped a genuinely good motherboard and forgot to wire one chip, so PWM doesn't work. Instead of tossing the board or living with the noise, I decided to make lemonade.An Arduino Nano generates the 25kHz PWM signal, and a companion Windows application reads CPU temp and sends the duty cycle over serial. The Arduino firmware is open source (MIT).
gzread: What if Windows crashes? It's better to attach a thermal sensor to the heatsink, I think.
johndough: Just send a heartbeat every few milliseconds and set fan speed to 100% if it died. Bonus: You get an audible indicator that the system crashed.
zeroflow: RP2050 would work, as it also has the necessary built-in peripherals. ESP32 would add wifi and better ESPHome support. I suggest you stay away from the ESP8266, as it needs to do PWM in software and struggles with the 25kHz output frequency.From my experience: ESP32/RP2040 work without additional circuitry which works with most fans, but for protection, you want to add level shifters. Not all fans pull up the PWM pin to 3.3V, the spec allows for 5V.Shameless plug, hopefully this is allowed here.I built something like that, that allows fan control via WiFi. First I built it only for myself, but since the spare boards from PCBA quickly sold, I decided to keep it stocked.Short gist: 12V Input, ESP32S2, ESPHome-based. Has 4 PWM-fan outputs, onboard temperature & humidity sensor and Qwiic expansion port.The ESPHome code & schematic is on Github: https://github.com/zeroflow/wifi-fancontrollerIf you want one, it's available on Elecrow for $35,99: https://www.elecrow.com/wifi-fancontroller1.htmlIf you want to build it by yourself, the schematic is in the hardware folder. And if you don't want to use ESPHome - there is no firmware lock, you find the pin assignment on the product page and can write your own firmware if you so desire.
venzaspa: Ironic, the day after the launch of Artemis II that people are using microcontrollers far more powerful than the original Apollo 11 navigation computer to control a single fan in their PCs now.
haktan: Could you use an audio out port for creating the signal and ditch the Arduino?