Live data from Hacker News

Built a cheap DIY fan controller because my motherboard never had working PWM

himthe.dev

21–30 of 48 posts

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#21
post #11

Earlier quoted context omitted.

One could go farther and complain that it's a waste of a microcontroller at all to control a fan when an analog circuit for fan speed vs temperature would work fine.

True, a very simple analog circuit would be enough. However the bane of analog circuits was that they age, so a control circuit that works perfectly today will drift and no longer work as intended after some years. The second problem is that analog circuits need adjustments to set them at the exact desired parameters. Adjustments can be done either by using an adjustable element in the circuit, e.g. an adjustable res…

You're over thinking it. If the application is very simple and needs to do one thing, an analog system works fine. Once you start needing sequencing, multiple adjustments, and maybe a little smarts then a CPU can get involved.

I worked at a shop that had an old closed loop water-air chiller for a laser. The water temperature controller was a small PCB with an op-amp chip with some passives and the temperature was set by a potentiometer. That thing ran fine until the compressor died and it sent to scrap.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#22
post #15
post #11

Earlier quoted context omitted.

One could go farther and complain that it's a waste of a microcontroller at all to control a fan when an analog circuit for fan speed vs temperature would work fine.

Nah, it's a much lower part count and much simpler to put a microcontroller in. If you're concerned about cost cheaper parts are available.

Yup. You could use a quad opamp to build a PWM controller with closed loop control but then you need all the passives to setup the oscillator and so on.

I went through this years ago making a fan driver for my vehicles HVAC blower. The analog setup was fun to make but you use more board space, higher BOM count, and really, higher BOM cost vs a micro-controller.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#23
post #12

>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…

Yeah I was going to say that the presence of a PS/2 port almost certainly means it has a SuperI/O chip wired up. You wouldn't be able to shutdown the PC without the LPC bus talking to the SuperI/O. MSI just didn't write code to talk to the fan controller or just didn't bother with displaying it in the BIOS config page.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#24
post #19

Earlier quoted context omitted.

True, a very simple analog circuit would be enough. However the bane of analog circuits was that they age, so a control circuit that works perfectly today will drift and no longer work as intended after some years. The second problem is that analog circuits need adjustments to set them at the exact desired parameters. Adjustments can be done either by using an adjustable element in the circuit, e.g. an adjustable res…

Analog control circuitry is also really hard to patch in production, or to adjust to different behavior during design. Oh, you need a quadratic fan curve instead of a linear one? Have fun starting from scratch!

You can definitely make a PID controller just with opamps and potentiometers.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#25
post #24
post #19

Earlier quoted context omitted.

Analog control circuitry is also really hard to patch in production, or to adjust to different behavior during design. Oh, you need a quadratic fan curve instead of a linear one? Have fun starting from scratch!

You can definitely make a PID controller just with opamps and potentiometers.

I bet you can. But you can't turn a simple single linear amplifier into a PID controller with zero physical changes, can you?

My point was that, if you want additional behavior, you need to bake that in from the start. With an MCU you can trivially switch it in-the-field to literally anything you can imagine.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#26
post #23
post #12

>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…

Yeah I was going to say that the presence of a PS/2 port almost certainly means it has a SuperI/O chip wired up. You wouldn't be able to shutdown the PC without the LPC bus talking to the SuperI/O. MSI just didn't write code to talk to the fan controller or just didn't bother with displaying it in the BIOS config page.

There are multiple pictures of msi 970 master bios displaying temps and fans just fine so it did work at some point in time. Author either updated to some poorly validated bugfix only/beta bios, or maybe wrong bios for the board.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#27
post #6

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. It's PWM, controlled via mraa. mraa_pwm_write()

> peltiers

First time I've come across this technology. A solid-state heat pump? Magic!

https://en.wikipedia.org/wiki/Thermoelectric_heat_pump

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#28
post #15

Earlier quoted context omitted.

Nah, it's a much lower part count and much simpler to put a microcontroller in. If you're concerned about cost cheaper parts are available.

Yup. You could use a quad opamp to build a PWM controller with closed loop control but then you need all the passives to setup the oscillator and so on. I went through this years ago making a fan driver for my vehicles HVAC blower. The analog setup was fun to make but you use more board space, higher BOM count, and really, higher BOM cost vs a micro-controller.

It's crazy how far technology has advanced. A μc with RAM and a bunch of input and output ports and some code is cheaper today than a pile of analog components.

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#29
post #12

>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…

Not sure how LLMs failed me, please elaborate.

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_...

Re: Built a cheap DIY fan controller because my motherboard never had working PWM

#30
post #26
post #23

Earlier quoted context omitted.

Yeah I was going to say that the presence of a PS/2 port almost certainly means it has a SuperI/O chip wired up. You wouldn't be able to shutdown the PC without the LPC bus talking to the SuperI/O. MSI just didn't write code to talk to the fan controller or just didn't bother with displaying it in the BIOS config page.

There are multiple pictures of msi 970 master bios displaying temps and fans just fine so it did work at some point in time. Author either updated to some poorly validated bugfix only/beta bios, or maybe wrong bios for the board.

[deleted]
Post reply on HN