Home

Electronic Projects
  • Micromite Microcontroller
  • Micromite Plus
  • The Microbridge
  • DDS Signal Generator
  • Super Clock
  • Boat Computer MkII
  • Parking Assistant
  • Micromite LCD Backpack
  • ASCII Video Terminal
  • GPS Controlled Clock
  • GPS Tracker
  • Colour Maximite Computer
  • The Original Maximite
  • The mini Maximite
  • Intelligent Fan Controller
  • GPS Synchronised Clock
  • GPS Boat Computer
  • GPS Car Computer
  • Making the GPS Computer
  • Energy Meter Firmware
  • ISM Band Scanner
  • Utility Power Supply
  • Precise Voltage Reference
  • Game of Pong
  • Water Level Meter


  • General Articles
  • Problems in Open Source
  • The Maximite Story
  • Programming PIC Micros
  • MMBasic on the UBW32
  • The TFT Maximite
  • Surface Mount is Easy
  • Measuring Capacitor ESR
  • EM-408 GPS Module
  • SG12232A LCD Driver
  • Custom PC Boards
  • The Gerber Format


  • Reviews
  • Hantek DSO-2250 Scope
  • Rigol DS1000 Scope
  • PIC C Compilers
  • Brickbats


  • PC Software
  • Weather Station
  • Mazing


  • About

     

     

     

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia (CC BY-NC-SA 3.0)

    Intelligent Fan Controller

     

    The Intelligent Fan Controller is designed to control the noise generated by the fans inside your computer. It does this by varying their speed based on temperatures measured inside the case. When it is cool the fans will run slowly and they will only speed up when needed... when your computer is running hot.

    Anyone with a noisy computer, especially a Media Centre system in the lounge room, will benefit from this project. After installing this device, my computer is now so quiet that I can hardly tell that it is running - and that is a blessed relief.  

    The main features are:


    The Intelligent Fan Controller was featured in the July 2010 issue Silicon Chip magazine. This web page provides updates and errata on the project.

    This page also provides an alternative description of the project but the magazine article goes into much more detail. You can access an electronic copy of the issue online (using the above link) for about the cost of purchasing a printed copy - so it is a good deal.

    Altronics also sell a full kit of parts for the Intelligent Fan Controller (Part nbr K6120). This is an easy way to get everything that you need to build the controller including a pre programmed microcontroller and a printed copy of the full magazine article - ideal if you are not an electronics expert and just want to silence your computer.

    New Windows Software

    A new version (v1.1) of the Windows desktop application is available. The significant differences from the first version (v1.0) are:

    This new version is available from the download section at the bottom of this page. Because it contains some important improvements (particularly the ability to enter the measured value for the +5V supply) it is recommended that you install it.

    The new version can be installed over the old version although the Microsoft .NET framework will only let you do this from the same folder as the original installation. Alternatively you can uninstall the original version and then install the new version. Because all settings are held in the microcontroller on the Fan Controller board you will not loose them, even if you completely uninstall the old version.

    Errata

    Errata for the Silicon Chip magazine article:

    1. Page 32 in the middle of the sidebar "Buck Converters Explained".  The number 230µS should read 30µS.
    2. The best way to determine the minimum fan speed setting is to set the control to manual and progressively reduce the power setting from a high value until the fan stalls then add back a safety margin. The magazine article suggested starting from zero and working up but that is not needed as the fan controller always starts a fan by spinning it at near full speed for a few seconds before reducing it to the set level.

    Construction Notes

    The chokes may emit a high pitched squealing sound. This is caused by loose windings in the choke vibrating at the buck converter's switching frequency (2.5KHz). If they do vibrate the sound should not be audible when the controller is mounted inside the computer's case but, if it does annoy, the best solution is to replace the chokes with 3 amp versions wound on a toroidal core (Altronics L6522 or Jaycar LF1272). These use a heavier gauge wire and will not vibrate, they are also physically larger but you can still squeeze them onto the PC board.

    The power connector is only held down by the solder lugs that are soldered to the PC board. This could be a problem if the power connector to the Fan Controller is regularly plugged and unplugged. For this reason you should run some strong glue under the socket before soldering it onto the board.

    Fans Types

    The Fan Controller will manage the three standard types of fans found in modern computers. These are:

    The photo on the right shows what these connectors look like.

    The Circuit

    The circuit below shows just how simple the fan controller is. In the centre is a Microchip PIC18F2550 microcontroller, it reads the voltage from the temperature sensors (on the left) and controls the voltage converters on the right. It is by varying the voltage output of the converters that the microcontroller can control the speed of the fans.

    Each voltage converter is implemented as a buck converter. The microcontroller generates a string of pulses on each output for each buck converter and, by varying the pulse width, the microcontroller can vary the output voltage. In this implementation the pulse rate is 2.5KHz and the pulse width varies between zero and 170µS to give an output between zero and 12V. Note that IC2 does double duty as a fast switch and a diode - both required in the buck converter design. For $2.20 this is a handy little chip.

    As you can see, there are four buck converters and on each output we can have a pair of fans for a total of eight fans. Each buck converter is controlled independently with different control characteristics and can drive a load of up to 250mA.  As a normal computer case fan draws less than 120mA this allows you to connect two fans (as a pair) onto each output.  You should check each of your fans and if they draw more that 125mA (and less than 250mA) then that fan must be the only one connected to that particular buck converter output.

    Click on the diagram for a large image

     

    This is a simple buck converter design and the output contains a lot of switching noise and is not very linear with respect to the control signal.  This does not matter as a fan is just an electric motor and does not need precise control to vary its cooling power (and noise).  What is important is that we control the fan's speed by varying its supply voltage.  Another method of control, often used in simple designs, is to rapidly switch the fan's supply voltage off and on but that has the unwanted side effect of scrambling the tachometer output, preventing us from measuring the fan's speed.

    When a fan is configured as a 4-wire fan the controller will hold the output of the voltage converter at 12V and control the speed of the fan by generating a PWM signal. This signal is made available by the microcontroller on pins 12 and 13 and is used to control up to four 4-wire fans on connectors 1A, 1B, 2A and 2B. The design of the connectors and the circuit also allows you to plug 2-wire or 3-wire fans into these connectors and they will operate as normal (ie, voltage controlled).

    The tachometer outputs from the fans are wired directly back to the microcontroller which measures and reports the speeds in RPM. The tachometer outputs are open collector so we enable internal pullup resistors within the microcontroller.

    The other components surrounding the microcontroller are standard. The buzzer is used to make an audible alarm when a fan or sensor has failed. The crystal (X1) provides the 20MHz clock and the USB connector is wired directly to the USB transceiver within the micro. The 5V provided by the computer when the USB cable is plugged in is connected to pin 1 of the micro and is used to tell the firmware when to start communicating over the USB.

    The Software

    The great feature of this design is that it comes complete with desktop software for setting up the controller and monitoring its operation. It will work on all modern versions of Windows (XP, Vista and Windows 7) in both 32 and 64 bit modes.

    Unfortunately Mac and Linux users are left out but there is some good news. The Fan Controller implements the CDC (Communication Device Class) protocol over USB and there is native support for this in Linux (the cdc-acm driver) and Apple OS/X.  The Fan Controller appears as a standard serial communications device to the operating system and the commands accepted by it are simple ASCII strings, so it would be easy to write your own software or use simple scripting to communicate with the controller.

    The Windows desktop software works in two modes. In the monitoring mode it will display the temperatures (in °C or °F) and the speed of the fans in RPM. If the fan does not have a tachometer it will display the output power of the voltage converter (0 to 100%).

    The second mode is used to configure the controller. Once you have configured the controller you can uninstall the software as the settings are saved within the microcontroller.  Or, you can leave the software installed to monitor the operation of the controller.

    When configuring the controller you can select:

    The software is available in the download section below and comes in three parts:

    1. The software package for your computer. This includes the serial over USB device driver for Windows and the desktop software shown above. You must be connected to the Internet when you install the desktop application as it uses the Microsoft .NET runtime and during installation components of this will be downloaded from the Microsoft web site.
    2. The program for the microcontroller. This is in the form of a HEX file and must be loaded into the microcontroller using a PIC programmer (not required for the Altronics kit which comes with a pre programmed microcontroller chip).
    3. The source code package which includes the source code for both the firmware and the desktop application. Both use free development environments (Microsoft’s VB Express 2008 and Microchip’s MPLAB C18 compiler). So you can experiment and modify both the firmware and desktop software to suit your own needs - or just look through it to satisfy your curiosity as to how it was done.

    The software will install and run on a computer even though you have not built the fan controller. It was written in this way so that you can test the software and see if it and its characteristics will suit your requirements. It is free and you can easily uninstall it - so why not download it and give it a go?

    Building the Fan Controller

    This section is for readers who know how to source the parts and want to make their own fan controller from scratch. The alternative is to buy the Altronics kit which includes all the parts and a pre programmed microcontroller chip. The kit also includes the magazine article which goes into more detail than I have space for here.

    The PCB design, the parts list, circuit and all software are available in the Construction Pack which can be downloaded from the bottom of this page.

    The PCB is single sided and uses wide tracks with no tracks going between IC pins (these are Silicon Chip design guidelines) so you can easily make it yourself. If you do not want to make your own PCB you can send the Gerbers included in the Construction Pack to almost any PCB house for fabrication (see this page for some examples).

    The parts list includes pointers to suitable suppliers. For the semiconductors the best (and cheapest) source is www.futurlec.com. If you do not have a PIC programmer you can purchase the PIC18F2550 pre programmed with the firmware from Silicon Chip magazine (link).

    The 4 pin connectors used for fans 1A, 1B, 2A and 2B must be specially fabricated The Intel specification includes a drawing of this connector and the best way to make one is to take a standard 4 pin header PCB connector and trim the plastic tongue so that a 3 pin connector can be plugged onto pins 1, 2 and 3 (leaving pin 4 unconnected). If you click on the photo above you can download a high resolution image that will illustrate this simple surgery.

    When purchasing the inductors you must make sure that you use HF chokes with a current rating above 1 amp. Tiny RF inductors are not suitable, even if they have the correct inductance, as their resistance will be too high.

    The sensors consist of an LM335Z temperature sensor wired to a 2 pin header plug which is plugged into the fan controller board.. The diagram on the left will help you in assembling the cable. Note that the left hand pin on the LM335Z is used for temperature compensation and can be cut off as we do not use that feature.

    Installation

    The PCB is designed to fit into a 3½ inch disk drive bay but you can place it anywhere inside your computer. Depending on the location selected you may need to make up mounting brackets to hold it in place.

    The controller is designed primarily to control case fans but it can also control the fan on the CPU or graphics card. In this case you must use a dedicated sensor clamped to the heatsink and thermal conductive paste so that the fan controller can detect and respond to a rapid increase in temperature.

    You can also use the controller to manage the fan inside a power supply - but these are dangerous devices with many of the components inside running at the full 230V mains potential. You should not open one up unless you know what you are doing and in that case you will not need any advice on what to do.

    The firmware running in the microcontroller is designed to be stable but there may be a case where it has been set to an “impossible” configuration. To correct this you can reset the micro to its initial default condition by temporarily placing a wire link that shorts the connector pins for Sensor A together while you apply power to the circuit.

    Downloads

    Firmware HEX file for the PIC2550 microcontroller. Version 1.0 DOWNLOAD
    Windows software package (device driver and application). Version 1.1 DOWNLOAD
    Source code for both the microcontroller (v1.0) and the Windows application (v1.1) DOWNLOAD
    Construction Pack (includes parts list, schematic, PC board, etc) DOWNLOAD



    So, have fun with the Intelligent Fan Controller.

    The photo below shows one of them mounted in the bottom of my multimedia computer.