Quick jumps: Basic PWM/Thermal - Improved PWM/Thermal controller

Temperature Control

A fan's noise can be reduced with less danger of system parts over-heating under stress by controlling the speed relative to temperature. A thermostatic switch could be used, but the sudden change from peace to noise is more annoying than a steady drone, so variable power regulation is the norm.

A Linear controller

In the first circuit, a voltage regulator output is adjusted by a thermistor in the control potential divider. I used the L200C regulator, as this has a very low reference current (under 10uA) compared to the common LM317 (100uA max), so (a) there's little danger of self-heating the thermistor, and (b) higher-value resistances (like the thermistors readily available) can be used in the potential divider. It is also well-protected against misuse, and output current can be limited with a single resistor (R1 below) if required.

L200 Thermistor circuit

Formula for voltage output is

Vo = 2.77(1+ VR1/Th1)

and if the current limit resistor R1 is fitted, the maximum current, even under short-circuit, is

Imax = 0.45/R1

Juggling with thermistor properties in Excel suggested a 1K @ 25degC NTC thermistor was most suitable, but I also had good results with a 300R thermistor supplied in error :(



Temp/Voltage graph

The graph right shows theoretical output for a 1K thermistor with VR1 set at 1.8K. Note the practical limit with 12V input is about 10V.

VR1 is adjusted to give a minimum output voltage under cool conditions, so the fan will always start. Value will depend on the thermistor; for a 300R thermistor I used a 1k preset but with a 1k thermistor a 2k or 5k preset should be used. Download the spreadsheet to play with your own components.

R1 is optional and can be replaced with a wire link. The value given, 0.47R, limits current to about 1A even if you accidentally short out the output. Without it, the IC will switch itself off if 2A is exceeded.


Construction

L200 stripboard layout

Construction Guide – Component side view

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1                            
2 12V   Reg#1         C1            
3 Fan+     Reg#2     C2   R1   j2      
4 0V 0V Reg#3   j1     C1   (br) j2   VR1a  
5 Th1     Reg#4             j3   VR1w  
6     Reg#5           R1 (br) j3   VR1b  
7 Th1       j1   C2              
Parts List
IC1 L200CV (Vertical mounting)
C1 220n Ceramic or Mylar
C2 100n Ceramic or Mylar
Th1 NTC Thermistor, 300R - 1K @25degC
VR1 Preset pot to suit (see above).
R1 0.47R 3W (optional)
HS1 TO-220 Heatsink, to suit your fans.

My unit was built on stripboard, 7 strips x 14 holes. Note the 2 track cuts by the preset.

Also C2(2) lead could perhaps be more easily positioned on col 7, row 4, both are ground rows. (Stripboard Magic missed that one ;-)

The pre-set potentiometer VR1 can be a cheap single-turn carbon or cermet type, or a more expensive multi-turn (which will give better sensitivity), check the pin spacing is OK. The Maplin horizontal carbon sub-miniatures (eg UH01B, 2k2) will just fit.

The 3W current-limiting resistor R1 (if used) should be mounted vertically for better cooling.

The thermistor is soldered to leads extended from the Th1 positions, length to suit siting. Joints should be insulated with heat-shrink tubing. Maplin don't stock these low value thermistors, I got mine from ESR along with most of the other bits. Rapid Electronics also carry them.

The regulator will need its leads gently bending to suit the stripboard matrix. A small TO-220 heatsink should be fitted (eg Maplin RN77J or any 20C/W or better - (More on choosing a heat-sink)). Make sure the capacitors don't get in the way of this.

The controller shown in the photo is an earlier layout, so don't get confused, the L200 is the other way round to the layout above and other components have been re-arranged. LC200 pin 1 is on the left, looking at the printed (plastic) side.

Prototype L200 thermistor board

Test with a 12V supply, set the preset mid-way before powering up then adjust to give 6.5-7V output at normal room temperature. Then gently warm the thermistor and check the fan speeds up.

Positioning the Thermistor

It's important that the thermistor is sited so that the fan does have a chance to cool that area down, for example, controlling a drive-bay fan with the thermistor taped to a drive. By the same token, don't put the thermistor directly in the cold air stream or it will be cooled more than the area it's monitoring. Experiment to find the best spot(s). One idea is to monitor the psu outlet air temperature, controlling an inlet fan.



Pulse Width Modulation Thermal controller

Here's a very simple circuit based on some ideas at 4QD-TEC.

Basic LM393 thermal control circuit
Power connections

Power lines to the IC as shown left have been omitted on the above and below schematics for better clarity, and smoothing capacitors as shown are recommended to avoid any false switching.

Circuit values chosen give a PWM frequency of about 100Hz. The LM393 dual IC provides both comparators in one 8-pin package. With this comparator, the output goes low on switch-on, so a PNP power switch was chosen, a TIP126 darlington device capable of handling fans up to 5A with negligible base current demand on the comparator.

Wave-forms for 393 circuit

The first comparator generates a triangle-wave (yellow curve B above), switching capacitor C1 between charge and discharge cycles as the capacitor voltage hits the levels set by the resistor potential dividers formed by R1-R5, approximately 1/3 and 2/3 Vs. Not as linear as that produced by the Schmitt trigger-Miller integrator dual op-amp circuit shown on the PWM & SMPS page, but quite suitable for fan control.

A second comparator compares the wave signal with a temperature-dependent reference voltage (blue curve A) from the thermistor-resistor potential divider Th1, R6. When the wave level goes above reference the power transistor is switched off, as it comes back to below reference it is switched on, allowing pulses of power to the fan (shown by green curve C).

The darlington transistor wastes about 0.8V from the supply, for a single fan (under about 500mA, 6W) a normal high-gain PNP transistor (eg 2N2905) would be a bit more efficient, losing under 0.4V.


Construction


stripboard layout

The circuit is shown on a 9 strips high x 20 holes wide sheet of stripboard, no track breaks apart from the 4 between the IC legs. The width will come down a couple of holes (mine is 17 holes but I miscounted) by putting C1 and R5 on the same column and moving the link on column 19 to column 14.

Moving the link also leaves room for the optional 22uF-100uF kick-start capacitor C2 to be fitted on column 19 (positive lead to row 5, negative to row 7), as shown on the circuit below.

All parts are readily available from ESR, Maplin or Rapid Electronics in the UK.

Construction Guide – Component side view

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
1 Fan–   R2       C4 j1     C3(–)             R6    
2                             Q1(b)   R7      
3 Fan+                           Q1(c)          
4 12V R1   R5     C4       C3(+)       Q1(e)       j4  
5       R5   R4 R3     U1#1 (br)   U1#8           j4 Th1
6         C1       j2 U1#2 (br)   U1#7       R7      
7   R1 R2     R4       U1#3 (br)   U1#6         R6   Th1
8 0V       C1     j1   U1#4 (br)   U1#5   j3          
9             R3   j2           j3          

Alternatives to the TIP126 are the TIP125 or TIP127 from the same family (again 5A), BD680 (6A), TIP147 (10A), or for a single fan a BD140 or 2N2905 would do. Basically any PNP transistor that will take the proposed fan current, and enough gain so that the base current (=fan current/gain) is under 10mA. So for a single 200mA fan a BD140 (max current=1.5A, gain=40min) would be fine, but it wouldn't be a good choice for three such fans at 600mA as the 15mA base current needed would be pushing the LM393 (for safety, R7 limits the maximum current sunk by the LM393 to about 10mA ). But if you don't use a TIP125-7, check the transistor's pin-outs first, the B-C-E layout isn't universal.

Parts List
U1 LM393 dual comparator, 8-pin dil socket
Q1 TIP126 PNP Darlington or similar
C1 68nF (0.068uF) Ceramic or Mylar
C2 47uF 16V aluminium electrolytic (optional)
C3 220uF 16V aluminium electrolytic
C4 100nF (0.1uF) Ceramic or Mylar
R1-4 100k (all resistors 5% 0.25W or better)
R5 10k
R6 120k
R7 1k
Th1 NTC Thermistor, 100k @25degC

For modest fan loadings a heat-sink isn't necessary, if you go much over 1A loading check the temperature after a few minutes running. "Quite warm" is not a problem, blisters suggest a small heat sink is advisable.

Capacitor C1 (68nF) was chosen to give a PWM frequency of about 100Hz; a 100nF would give about 70Hz which would work equally well. The long-leaded ceramic or mylar styles are easier to fit on stripboard than the fixed-pitch polyester types.

The smoothing capacitors C3 and C4 are also not critical, 100uF-470uF is fine for C3, 10nF-150nF for C4.

With "brushless" computer fan motors it's not necessary AFAIK to fit the usual protection diode across the load, as they have transistors switching the supply around the right motor windings, with any needed protection already in-fan. Leastways, I've not broken anything so far...

Basic circuit with kickstart cap added

Using 120k for R6 gave me about 6V average to the fan at room temperature (18C). If your fan won't start at that level the kick-start capacitor described below can be fitted. The 47uF shown on my test board gives around 3 seconds at high speed, 22uF-100uF would give satisfactory results. If it still won't run comfortably at 6V, try increasing R6 to 150k or fit the variable resistor VR1 as shown below.

For a dual unit the LM339 quad comparator can be used to save a few pence, but you'll have to do your own board layout.



Bells & Whistles version

Improved LM393 thermal control circuit

This adds

The three additions are all independent, so you can pick 'n mix.

The IC power connections and smoothing capacitors as shown earlier for the basic circuit also need adding.

Construction

To come