Fan Speed Control using iot and Home Assistant

Hi there. I have off-grid power and have several means of keeping the power conversion equipment cool. One of the things I use is a bank of 16 140mm computer fans, mounted in a cartridge arrangement, that draws the heat out of the room and vents it into the roof space.

Up until now I have been varying the fan speed, according to need, by using four separate buck converters which produce stepped voltages between 7.0VDC and 12.0VDC, and each is switched in and out as required, by an iot relay module with four relays.

It all works fine, but I’m acutely aware that these relays are the weakest link and switching DC is very harsh on contacts. I can’t have this fail and leave my equipment stewing, so I’m going for a different solution. I’d like more of a linear controlled output device that increases or decreases the voltage without using relays.

The fans were all PWM, but I’ve had a bad experience with PWM fans being noisy and noise is a factor, which is why I came up with the setup I have now (and why I cut all of the PWM fly-leads off the fans - probably not the smartest thing I’ve ever done…)

Does anyone out there have any ideas as to how I can achieve this? Ideally, I’d like to be able to send MQTT messages from Home Assistant to the controlling device, to which the device would adjust itself accordingly.



1 Like

Hi Russell
There is only 2 ways I know of to control brushed DC motors, voltage and PWM. You have obviously chosen voltage. PWM is applied to the main voltage supply to the fan so I don’t know what the leads are that you have cut off. Possibly coding to track the speed.

If you are concerned about relay failure you could have the fans connected in 4 banks of 4 fans. Switching could be via a low side Mosfet switch controlled the same way you presently control the relays. You could then switch banks of fans in and out of service as the situation requires to control air volume as you do now or some other exotic means to be decided when you have a basic system operating.

I think this would go very close to what you have now without the worry of relay reliability.
Cheers Bob


Hi Russell,

Welcome to the forum!!

I’d say that regressing to PWM would be the best option (a DC step-down module is a filtered PWM device).
If you keep the frequency of the wave high enough any noise should move out of the human ear threshold (20KHz is what most DC-DC converters and motor controllers operate at).

A custom solution with a Pico would be the way to go if you have programming expereince, here’s some guides that are worth checking out:

Feel free to send through any other questions!

Thanks, Bob and Liam. It looks like the PWM argument is a goer, using the gadgetry Liam has linked. It will do everything I require, with Home Assistant calling the shots based on the umpteen temperature sensors I have installed in my power room…



1 Like