Preface

Very Short Summary:

The fan controller described on this project page, controls one or more PWM controlled 12V PC fans. It uses the input from two precise DHT22 based temperature sensors. The MCU is an Arduino Uno, which is powered using a 12V power source. On top of the Arduino Uno, there is the Adafruit data logger shield — and on top of that is an Adafruit LCD shield. The software is a simple, custom written PID controller.

Recently I had the problem some expensive components did overheat in my server rack. The ventilation was not optimal and I had to install additional fans. Because this rack is in my office and I like a quiet working place, the ventilation had to be as quiet as possible.

First I thought about buying a off-the-shelf product, but then I realised: If this controller does not work as I expect and the fans will spin too fast/loud, this will drive me crazy over time. So I decided to build a own fan controller. A very simple one, where I can write own code and tweak it until it runs as I like.

This project page describes how I built this particular controller. It is not meant you really reproduce this same controller exactly as shown, but maybe understand some basic principles to build your own controller.

For the start, here a photo of the final controller, without the case. You can see the display, with custom characters, the power wire on the left, two sensor wires on the right and one wire for where the fans and the PWM signal is connected. You can also see the SD card on the left side, where all values are recoded.

Fan Controller

Used Parts

  • Arduino Uno
    I am using an original Arduino Uno revision 3 board with the ATmega328P chip on it. I have chosen this board because it can be powered with a 12V power supply which is required for the fans. Also I had already the two shields, which were only compatible with the Arduino Uno.
  • PWM Controlled PC Fan
    For my setup I use two very quiet Noctua 80cm NF-A8 PWM fans. They are very powerful but almost make no audible noise. They especially keep that quite over their lifetime. Using the PWM input I can control the speed of the fans very precisely.
  • Adafruit Data Logger Shield
    This shield contains a RTC (real time clock) and a slot for a SD card. There is also a level converter which provides the required 3.3V for the SD card. It also contains a prototyping area, where I added required components and sockets.
  • Adafruit LCD Shield
    A very comfortable LCD shield which can be accessed over I²C. It shares this bus with the RTC. Beside of the display, there are also a number of handy buttons which can also be accessed over the same I²C bus.
  • DHT22 Temperature and Humidity Sensors
    I used this sensors for many other projects. They are not cheap, but quite precise. The only downside is the very slow readout, but for this project absolute no obstacle.
  • A reliable 12V power supply
    With enough power for the fans and the display.
  • Wires, resistors, sockets and plugs.
    For the fans, there were additional cables with many sockets and plugs in the package. I used them to solder a short cable with the default four pin socket to the board. So any PC fan could be connected. For the sensors I soldered two simple four pin male headers to the board, so I could easily plug-in the sensors.

The Hardware

The hardware for this project is very simple, because it mainly consists of off-the-shelf components.

At the bottom of the stack is a Arduino Uno. I have chosen this board because it can be powered with a 12V power supply which is required for the fans. Also I had already the two shields, which were only compatible with the Arduino Uno.

Fan Controller

On top of the microcontroller, I added the Adafruit data logger shield.

Fan Controller

In the prototyping area of this shield I added two sockets with four pins for the temperature sensors. I also connected the wire which ends in another four pin socket to power the fans.

Fan Controller

The bottom side of the prototype area is used to connect the different wires and components.

Fan Controller

The schema for the fan controller is pretty simple:

Fan Controller Schema

Please note the RTC and display are not visible in the schema. They are connected via I²C on the SDA and SCL pins.

The Software

To use the software, you will need the Arduino IDE, version 1.6.12 or newer. First you need to install the Adafruit RGBLCDShield and RTClib library. Both from Adafruit. You will find instructions how to install these libraries on the product pages for the Adafruit Data Logger Shield and Adafruit LCD Shield.

You will find my software on GitHub here:

Epilogue

I hope you enjoyed the description of this simple project. If you have questions, suggestions or corrections do not hesitate and either leave a comment or write a message. Also leave a link if you created a own project inspired from this page.