I have a custom watercooling setup in my desktop PC and, to control fans and for monitoring purposes, I would like to be able to measure the water temperature. Since my old motherboard did not have a dedicated header for a thermistor, I simply used one of these DS18B20 1-wire thermometers hooked up to an STM32F103 “blue pill” board, for which I wrote a simple firmware that allowed reading the current temperature over USB-serial.

However, I recently bought a new CPU and a motherboard to go with it: An ASUS Pro WS X570-ACE. This board has a built-in thermistor header to which you can connect one of the readibly available watercooling sensors. This is all well and good, but I soon learned that the hardware fan controller is pretty limited and annoying to use, so I thought I would just write my own. But, to my disappointment, the thermistor readout was not showing up in any monitoring apps or libraries except for HWiNFO. System sensors are usually connected to the Nuvoton NCT* chips most motherboards use, but for some reason, this sensor is not. However, as HWiNFO was able to show the temperature, it had to be possible to access the sensor somehow, so I started digging and found a small python project that was apparently capable of reading the sensor on linux by reading the embedded controller memory via a debug interface. Since I am using Windows on my desktop, I tried to port this script.

As it turned out, it’s not so easy to access the embedded controller registers on Windows because you have to do it in kernel mode / ring 0. Luckily, WinRing0 exists, which basically allows you to read these registers from user mode without having to write your own kernel driver. Borrowing some code from LibreHardwareMonitor and NoteBook FanControl, I managed to write a very minimal C# app to read the sensor.

Example

Long story short, if anyone is looking for a way to read the T_SENSOR thermistor temperature on an ASUS X570 motherboard (and possibly other related products) to e.g. write a custom fan controller or to monitor it, check out this project.