Fan PWM Converter
Idea
Create a simple board which can translate the mainboards 4-pin PWM connector to a speed-controllable 3-pin DC connector.
I only have a certain set of transistors and I want this to be really simple (so even I can understand what's going on).
There are mainboards out there which can switch fan connectors between PWM and DC controlled but unfortunatelly mine can't. So, if you're looking to control a DC fan (3-wires) on an PWM connector (4 pins) like me, check first if your BIOS doesn't support this already.
Solution
This is meant for a small fan with a power rating of 12V / 0.18A. For more power-hungry fans you might want to consider using a MOSFET or PWM-controllable DC-DC converter circuit instead!
This is the mainboard pinout:
| Pin | Function | Color |
|---|---|---|
| 1 | GND | black |
| 2 | +12V | red |
| 3 | Tacho | yellow |
| 4 | PWM | blue (or other) |
The 3-pin fan's pinout is only the first three of those where pin 2 can be DC voltage controlled by some mainboards to controll the fan speed. As mine can't, I'll have to implement that myself.
The main solution is to hack down the +12V using pulse-width-modulation and thus turning it on and off quickly so that the effective median voltage is reduced and thus the fan runs slower if the PWM duty cycles (on-phases) get smaller.
This does work with an 2N2222 NPN transistor but as it has to dissapate quite a lot of power, it quickly (in a matter of seconds) gets too hot and burns. So, I'll use a BC327 PNP transistor which not only can actually handle the fan's current but also sits in series between the positive side of the fan connector so that the fan has a constant ground connection which is helping with a stable Tacho (fan speed) reading.
Unfortunatelly, the BC327 can't be driven by the mainboard's PWM signal directly, though. Thus, I'll use a BC517 NPN transistor to drive the BC327 PNP transistor which in turn will drive the fan.
The PWM pin on the board is usually a 25kHz 5V drain-control so we'll need to pull it up to 5V. I'll use a voltage divider here because I do not want to use any other connectors than the ones the fan connector provides. You could also use a simple 10kΩ pullup-resistor on a power supply 5V line, though. I chose a voltage provider with a 10kΩ to +12V and 6.8kΩ to GND wich results in a pull-up to about 4.9V, which is enough.
We'll also need a 10kΩ pull-up resistor for the BC327 as it's drain-controlled, a 22kΩ resistor (20kΩ or 2x10kΩ in series is okay, too) for the BC517 base control and a 1kΩ resistor for the BC327 base control.
The ciruit
So these are the required parts:
- 1x BC517
- 1x BC327
- 2x 10kΩ resistor
- 1x 6.8kΩ resistor
- 1x 22k resistor (or 20kΩ or 2x10kΩ in series)
- 1x 1kΩ resistor
- Wires (preferably black, red, yellow and blue)
- 4-pin socket
- 3-pin header
- Solodering equipment
┌──┬──────────────────────┬────────┐
│ ┴ ┴ │
GND o─────┐│ 10k 10k │
+12V o─────╪┘ ┬ ┬ ,─◄──┘
Tacho o───┐ │ │ ,─────┤1k├──┴─(┤BC327)
PWM o───╪─╪───┼─┤22k├─(┤BC517) `────┐
│ │ ┴ `─►─┐ │
│ │ 6.8k │ │
│ │ ┬ │ ┌──╪──o GND
│ └───┴──────────────┴─────────────┘ └──o +12V
└────────────────────────────────────────o Tacho
╪ := jump over
Testing
I tested this with my fan and it works perfectly. Using the FanControl app, I can now sucessfully control the fan speed and the RPM readings are correct.
Note that I am using a specific fan with 12V / 0.18A from Mr. Voice which happens to handle this kind of switching circuit quite well. When I tested this with another unlabeled fan which seems to draw about 12V / 0.4A, the transistor already ran at about 60°C and the RPM readings were garbage. So, this circuit is only for low-power fans which can handle PWM power switching and still have a working tachometer when the power is turned on and off rapidly.