PWM fan controller with current protection

Thread Starter


Joined Mar 14, 2021
I'm working on using a Particle Photon (which is mostly just an Arduino with built in wifi and a more complete "operating system") as a PWM fan controller. Basically just controlling the speed of PC fans. That part is easy, but I want to take it a step further and monitor the current draw and limit the speed based on current. The reason is that it's common in PC systems to "just use a fan splitter" to put a bunch of fans on a system, but often people use fans from a variety of sources and don't know to pay attention to current draw. Most PC fans draw like 0.4A at 12VDC, but some go as high as 3A! And splitters can have EIGHT outputs on them. I have a need for a manual controller and want to limit current based on what the plug they are plugged into can provide in total.

So my plan is pretty simple. First, I'd route the fan power through both a relay (because PWM fans startup at full blast until they get a suitable PWM signal) and then through an ACS712 20A current sensor. The output of the sensor would go to an analog input pin on the Photon. The relay signal comes off a digital pin, and the PWM signal off of a PWM capable digital pin.

Now, one thing I know is that an accelerating fan can draw more current than the fan will actually draw once it gets to a particular speed, too. So I'm thinking about an algorithm that can take its time speeding up the fans. This part seems a little tricky to get right, so I'm curious if anyone has seen anything like this in the wild already? I'm not a great programmer, but I'm pretty good at grabbing open source code that's close to what I want and beating it into submission.

And, anything else I'm missing? I know four pin PWM PC fans also return RPM signals, but since my use case is paralleling a bunch of fans, that signal is going to be fairly useless (because it could be of help if it weren' would be easier to know if the fan were still accelerating or not).

Any input welcome.