Fan speed controller

After some bad experiences with commercial fan speed controllers in the PCs in my home, I decided it would be easy to build a better one myself. Indeed, after a few evenings, I obtained these results.

  • 3 temperature sensors are supported, each controlling the speed of a (group of) fan(s).
  • A small potmeter for each sensor allows to choose the actual temperature above which the fan starts running. Higher temperatures cause a linear increase in fan speed.
  • When the measured temperature decreases, the actual fan speed is decreased only very slowly (taking several minutes), to avoid control instability.
  • An additional potmeter provides a minimum fan speed, independent of temperature.
  • The circuit is built with very few components, thanks to a low-cost PIC 16F676 microcontroller. This controller takes care of A/D conversion of the analog inputs, proper signal filtering, and the creation of PWM output signals to drive the fans. The PWM driving of the fans is a fast on/off switching with variable duty cycle, so the output transistors will remain cool even when driving many fans.
  • A bicolor LED gives a visual temperature indication by gradually changing color from green to red.

'C' Source code and compiled 'hex' image.

Implementation

This proto implementation has components installed for two sensors, controlling two groups of fans. The switch is just for safety backup: if something would break or not function as intended the switch provides full fan speed independent of other circuit operation.

Fan speed controller

The full schematics of the circuit (when fully equipped with three sensors and fan groups). Note the use of a 5-pin header for in-circuit programming of the PIC microcontroller, and the diodes in the powersupply, to obtain power during programming either from the PC or from the programmer. The choice of the switching power MOSFETS BUZ72 is very uncritical: most other types will do as well.

The output voltage of the LM60 temperature sensors is somewhat low to directly apply to the PIC analog inputs. To avoid the extra components of analog amplification with opamps, I lowered the AD reference voltage to 1.6 V. This obtains 64 LSB counts for a 10 degrees celcius temperature range, the range used for 0 to 100 % fan speed control.


(Click for download)

jos.vaneijndhoven.net