Part 1 - Schematic
Buck Converters
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.
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:
- 2-wire fans: These generally use a 3 pin header connector with pin 1 as ground, pin 2 as +12V and pin 3 vacant.
- 3-wire fans: These are the same as 2-wire fans with the addition of a tachometer output on pin 3. The tachometer can generate 1, 2 or 4 pulses per revolution and the fan controller will accommodate all of these.
- 4-wire fans: This is an Intel specification and is the same as a 3-wire fan with the addition of a PWM speed control input on pin 4. The connector is a special type that allows 3 pin and 4 pin connectors to be interchanged.
The photo on the right shows what these connectors look like.
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.
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 is single sided and uses wide tracks with no tracks going between IC pins (these are Silicon Chip design guidelines) so you can make it yourself. The PCB design has been registered with BatchPCB (here) who will make a board for about US$42 or you can send the Gerbers to almost any PCB house for fabrication. The PCB is silk screened so it is easy to assemble but if you make your own or get a non silk screened version you can refer to the image in the PCB download pack while assembling your board.
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.
Part 3 - Software and controller configuration