For a couple weeks, I’ve been looking into improving the Fan Controller in my tank. The purpose of the Fan Controller is to – you guessed it – control the fans. The main drive motors I have can throw off a lot of heat, and having good airflow through the tank is critical in not burning them out. I picked up a few different fans, but the one’s I choose to use are 24V DC brushless fans rated at ~4800RPM/~120CFM. They are really nice, but also use a fair amount of power. To help cut down on power usage, and increase battery life, the Fan Controller is supposed to control the fan speed based on motor temperature. And since I also love collecting all sorts of data, the Fan Controller is designed to record the fan speed.

My initial approach was to use a simple MOSFET with an optoisolator to control the fans from an Arduino’s PWM signal. This is pretty straightforward, and works pretty well. However, when I eventually went to work on the code that reads the fan speed from the fan’s tachometer, I kept on getting some really crazy results whenever the PWM duly cycle was anything but 100%. I finally hooked up the scope to see what the TACH signal looked like and I found that the PWM signal was being superimposed on TACH signal for any duty cycle less then 100%. I have no idea why this happens, but obviously my approach wasn’t going to work.

My first thought was going to be to try to find some 4-wire brushless fans with dedicated PWM input. The ones that I found were $60/each. I’m pretty sure I’ve already invested like $100 in fans, so that was a non-starter.

After some despair, I finally came across a few good resources. The idea was rather then use PWM to control the fan directly, use a PWM signal to control an LM317 adjustable voltage regulator and control the fan speed by varying it’s voltage. Clever Girl!

I modified the circuits referenced by choosing a different OPAMP that can support railed to rail 30V, and adjusted the gain for 24V operation. Below is the completed circuit. The fan controller uses an ATTINY84, OPA251 and an LM317.

MinuteMan Fan Controller

MinuteMan Fan Controller