Simple Fan Speed Controller

As mentioned at the end of the Ming Pi video, one of my challenges with setting up a home temperature monitoring system was the noise of the fan in the power supply. The other being the battery life, that will be covered in a different project.

There was a small space in the PSU behind the fan which I thought would be just big enough to add a fan controller. I checked the voltage going to the fan and it was about 10v.

So I’ve designed a circuit that uses a DS18B20 temperature sensor and a microcontroller to generate a PWM signal to drive the fan. A TIP31C transistor is used apply the power to the fan.

My first step was to prototype a circuit using an Arduino UNO. That allowed me to use the serial debugging to read the temperature from the sensor. I then added an LED to test the PWM signal and finally swapped that out with the power transistor.

Once I was happy that worked, I swapped in a much smaller board I had available. The Digispark Pro which is based on the ATTiny167 MCU. There was a slight challenge there with the temperature library in that it expected a yield function to be defined. So I declared a simple empty version of that which worked ok. It might be that including the Scheduler library would have also worked?

I tested the new circuit with the real fan and ran it from my bench power supply as that allows me to limit current and hence protects the components if I get the assembly incorrect.

My last step is to solder the components onto a strip board and from there I’ll mount it into the case, likely with a stick foam pad, taking care to insulate it from the case and other components. I’ll add some photos once I’ve done that.

The circuit ended up fairly simple, as did the Fan Controller code.

Leave a Reply

Your email address will not be published.

 characters available