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).
If windows crashes, then the audio generation crashes, so the fan will start to operate without PWM. Should default to 100%. At least that's how the PWM fans I have behave when the PWM signal suddenly disappears.
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?
I've built 4 different fan controllers for my companies' embedded board so far.
We work in very hot greenhouses, so fans (and peltiers) are essential. And proper thermal sensors. I check 4 different ones. Esp. needed is also a humidity sensor, because we don't want it to cool down below the dew point.
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.
I am not controlling a single fan though.
It's wired to a fan hub, so the PWM signal is sent to all the fans in the system.
I also wrote a companion windows application that reads CPU temps using PawnIO or HWiNFO which follow a curve that the user sets, and it sends the proper duty cycle to the arduino.
It's not just a dumb fan controller that I could've bought off aliexpress.
>This board has a Fintek F71878AD, a perfectly capable Super IO controller that can read temperatures, control fan PWM, and monitor fan speeds, but MSI just didn't connect it to the board.
is not true. There is a diagram available for this mobo and U32 (F71889AD) is connected over LPC (modern serial ISA version). Its a full Super IO and it cant be _not connected_ as it also provides keyboard/mouse, serial and printer ports.
The problem must lie elsewhere, most likely bad BIOS.
>Here's what I knew:
> Windows can read CPU temperature directly from the CPU's internal thermal diode, completely bypassing the useless Super IO chip.
why not read temperature directly from Fintek using HwInfo?
I can show you a HWiNFO screenshot of it not reading anything off the SuperIO except Chassis Intrusion: https://imgur.com/a/dYPETWz
The only way I can get a temperature reading is off the CPU probe directly, which I am already making use of. As the article covers in later parts, I'm using HWiNFO and/or PawnIO to do exactly what you say (reading off the CPU probe sensor) and feed it into a fan curve, which then sends the appropriate duty cycle to the arduino.
In the BIOS there's no temperature reading, no fan speed display, and no PWM control whatsoever.
So maybe MSI did wire up the SuperIO, I can't say for sure, but they definitely didn't wire up something, otherwise the BIOS could at least control the fans or see their RPM.
And I've also tried with multiple BIOS versions, so it can't be BIOS related.
Some people online had working sensors on their MSI 970 boards, some didn't, leading me to believe it must've been a defective batch where they forgot something.
> Its a full Super IO and it cant be _not connected_ as it also provides keyboard/mouse, serial and printer ports.
Maybe the ps/2 port and serial/parallel ports also don't work? Lots of people use USB for human inputs, and few people use serial/parallel ports, so I wouldn't expect OP to have tested those ports.
They probably work on most boards, just like the PWM probably works on most boards. But his board seems to have a broken trace or a faulty chip.
Glad you shared this. I ran into something similar when I tried using a Pico W as a USB HID device, hardware was up to the task, but the firmware just wouldn’t let me get where I wanted..
Using Arduino and serial is a smart way to go here. Still, it’s worth remembering: the Pico W has built-in WiFi, so you don’t have to lean on serial if you don’t want to. You could have your temp-reading app send control signals over HTTP instead. No need to tie up the USB port, and the connection isn’t killed if someone yanks the cable.
And yes, big agreement on the watchdog or failsafe. Any fan controller that doesn’t ramp up to 100% if it loses connection is just waiting for trouble. Fire risk is real.
13 comments
[ 2.7 ms ] story [ 35.4 ms ] threadAn 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).
Would you mind sharing more technical review of what you created?
We work in very hot greenhouses, so fans (and peltiers) are essential. And proper thermal sensors. I check 4 different ones. Esp. needed is also a humidity sensor, because we don't want it to cool down below the dew point.
It's PWM, controlled via mraa. mraa_pwm_write()
It's not just a dumb fan controller that I could've bought off aliexpress.
is not true. There is a diagram available for this mobo and U32 (F71889AD) is connected over LPC (modern serial ISA version). Its a full Super IO and it cant be _not connected_ as it also provides keyboard/mouse, serial and printer ports.
The problem must lie elsewhere, most likely bad BIOS.
>Here's what I knew:
> Windows can read CPU temperature directly from the CPU's internal thermal diode, completely bypassing the useless Super IO chip.
why not read temperature directly from Fintek using HwInfo?
https://www.hwinfo.com/forum/threads/faulty-sensor-readings-... and yes it also works on 970 https://forum-en.msi.com/index.php?threads/msi-970-cpu-temps...
not to mention MSI Command Center can read those sensors AND set FAN speeds/curves, and most likely also SpeedFan.
> asked LLMs
LLM failed this person :(
Also not sure how you found that model number, it's literally an F71878AD, here's proof: https://www.modders-inc.com/wp-content/uploads/image/2015/02... Taken from here: https://www.modders-inc.com/msi-970-gaming-mobo/2/
I can show you a HWiNFO screenshot of it not reading anything off the SuperIO except Chassis Intrusion: https://imgur.com/a/dYPETWz
The only way I can get a temperature reading is off the CPU probe directly, which I am already making use of. As the article covers in later parts, I'm using HWiNFO and/or PawnIO to do exactly what you say (reading off the CPU probe sensor) and feed it into a fan curve, which then sends the appropriate duty cycle to the arduino.
In the BIOS there's no temperature reading, no fan speed display, and no PWM control whatsoever.
So maybe MSI did wire up the SuperIO, I can't say for sure, but they definitely didn't wire up something, otherwise the BIOS could at least control the fans or see their RPM.
And I've also tried with multiple BIOS versions, so it can't be BIOS related.
Some people online had working sensors on their MSI 970 boards, some didn't, leading me to believe it must've been a defective batch where they forgot something.
Image of an MSI 970 Gaming bios where temp and fans work properly: https://forum-en.msi.com/index.php?attachments/msi_snapshot_...
Maybe the ps/2 port and serial/parallel ports also don't work? Lots of people use USB for human inputs, and few people use serial/parallel ports, so I wouldn't expect OP to have tested those ports.
They probably work on most boards, just like the PWM probably works on most boards. But his board seems to have a broken trace or a faulty chip.
Using Arduino and serial is a smart way to go here. Still, it’s worth remembering: the Pico W has built-in WiFi, so you don’t have to lean on serial if you don’t want to. You could have your temp-reading app send control signals over HTTP instead. No need to tie up the USB port, and the connection isn’t killed if someone yanks the cable.
And yes, big agreement on the watchdog or failsafe. Any fan controller that doesn’t ramp up to 100% if it loses connection is just waiting for trouble. Fire risk is real.