This is only a preview of the January 2018 issue of Silicon Chip. You can view 37 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Make your own Theremin – then make music!":
Items relevant to "The Lathe-E-Boy: high power Lathe Controller":
Items relevant to "Arduino LC Meter Shield Kit":
Items relevant to "High Power DC Fan Controller has loads of applications":
Items relevant to "El Cheapo Modules 12: 2.4GHz Wireless Data Modules":
Purchase a printed copy of this issue for $10.00. |
12V Automotive
Variable Speed
Fan Controller
This 12V speed controller could be used in any
vehicle with an intercooler or one with inadequate
fans – or indeed in any application where there is a
need to control the speed of a low voltage DC fan or
fans in response to changes in temperature. Simple
to wire up, it can control up to 120W of fans.
W
We deliberately kept the design
e designed this Speed
as simple and low-cost as possiController to run the
ble, while satisfying a long list of
intercooler fan on a perrequirements:
formance vehicle. We looked for
• It had to be easy to wire up, bepre-built units on ebay and AliExcause chasing wires and messing
press but nothing really suited the
with a packed fuse box in a motor
application.
vehicle can be a nightmare.
Simple 12V on/off thermostats
• It must not flatten the vehicle
suitable for automotive applicabattery if left unattended for long
tions are available but surprisingly
periods.
expensive given their simplicity.
• It needed to be able to run a
We found very few which could
powerful fan, able to keep a large
actually vary the fan speed and
engine cool.
these were both expensive and
• It needed to be easy to set up
highly complex, with dozens of
and tweak. And so on.
wires.
Our design fits all the above criWhy do variable speed controllers need to be so complicated? Assuming the fan and battery teria – and can do the job anywhere you need to run a 12V
are earthed to the vehicle, all you really need is one wire DC fan to control temperature
for power and one for connection to the fan, a temperature
sensor and maybe a few adjustments to allow you to set the How it works
The general concept is shown in the simplified circuit
temperature threshold and so on.
Of course, some fans may not be earthed – and there are of Fig.1.
In essence, it is a PWM (pulse-width modulation) controller
doubtless many non-automotive applications which will
with inputs for battery voltage and temperature. A compararequire extra connections – but overall, it’s pretty simple!
tor monitors the battery voltage against
But we couldn’t find a suitable controlby Nicholas Vinen
a 4V reference. This stops the fan from
ler, so we decided to build one.
64
Silicon Chip
Celebrating 30 Years
siliconchip.com.au
Features & specifications
running if the battery voltage is below a preset value. • Pro
portional fan control (PW
M, 1% increments)
Trimpot VR1 allows the switch-on threshold
• Runs from 12V DC
voltage to be set between 8.4V and 16.8V. For automotive applications, you would normally set it • Compact, light and easy to build
to switch on for voltages above 13.5V, so that the • Designed to survive in the har
sh automotive electrical
environment
controller will switch on when the alternator is • Fan power up to 120
W (maximum current 10A
)
running and switch off once the engine (and thus • Fan soft
start and gentle spin-dow
n
alternator) stops.
• Under-voltage lockout
(UVLO) with hysteresis
A comparator feedback resistor adds around
0.5V of hysteresis so that once the supply voltage • Adjustable UVLO threshold (8.4-16.8V)
has risen high enough for the fan controller to be • Ultra-low quiescent current when shu
t down (<20µA)
activated, the voltage must drop by a further 0.5V • Fan switch-on temperatu
re adjustable between -7.
5°C and +100°C
below this threshold before it will switch off.
• Maximum fan speed tem
perature also adjustable
This prevents the fan from “chattering”, or being • Sea
led lug-mount thermisto
r can be used for temper
rapidly switched on and off. The PWM controlature sensing
• Minimum and maximum
fan duty cycle can be cha
ler includes a two-second switch-on delay which
nged (default: 25%/100%
• PWM frequency can be
)
also helps prevent this.
set from 50Hz - 1kHz (de
fau
lt: 1kHz)
Temperature is monitored by an NTC thermistor • Fan speed compensation applied
for variations in supply vol
tage
which is connected in series with trimpot VR2,
with the two components connected between the
5V supply rail and GND (0V). This provides a voltage which
varies with temperature, rising as the thermistor gets hot- IC1 to measure the battery voltage.
ter. This is the control voltage input for the PWM controlThis is a power-saving measure; Q2 is held on while the
ler so that the fan duty cycle, and thus speed, rises as the fan is operating but if the low-voltage cut-out is engaged and
temperature increases.
the fan is switched off, Q2 is also switched off, so no current
flows through this divider. It is only energised for around
The circuit
1ms every two seconds, when the unit re-checks the supNow have a look at the full circuit of Fig.2. Both the com- ply voltage to see if it is high enough to continue operation.
parator and the PWM controller functions are provided by
Thus the 0.3mA which would flow through this divider is
a PIC12F675 microcontroller. Compared to a discrete de- reduced to an average of just 0.15µA. That’s important when
sign the micro gives a lower component count and lower the quiescent current of the rest of the circuit is below 20µA.
quiescent current; important when the fan and motor is off. Otherwise, the divider current would swamp it, increasing
The PIC does three main jobs: it monitors the battery the quiescent current by a factor of 15 times.
voltage, reads the thermistor temperature and drives the
We’ve done something similar with the other two dividgate of Mosfet Q1 to control the fan speed in response to ers formed by the NTC thermistor and trimpot VR2, as well
these readings.
as trimpot VR3.
The upper ends of both dividers are shown connected to
Soft start and power saving
+5V in Fig.1 but as you can see from Fig.2, they are driven
The micro provides a soft-start feature where the PWM from output pin GP0 of IC1 instead.
duty cycle will only change by 1% every 100ms.
This pin is brought high, to +5V during normal operation
So if the unit is switched on while the sensor is hot, the but is brought low to 0V when the supply voltage is low, refan will ramp up to maximum speed over about ten seconds. ducing the quiescent current by a further 1mA or so. And
This limits the current drawn
because GP0 drives the base
from the supply and should
of NPN transistor Q3 which in
also reduce its tendency to
turn drives Q2, bringing GP0
“hunt” for a particular speed
high enables all three dividers
(ie, varying up and down pesimultaneously.
riodically).
IC1 checks the battery voltOne particular difference
age every two seconds if it’s
between the full circuit of
inactive (due to low battery
Fig.2 and the simplified vervoltage) or every 100ms if
sion of Fig.1 is that the voltit’s active. The 1nF capacitor
age divider which allows IC1
from pin 6 to ground provides
to monitor the battery voltage
a small amount of filtering for
is not connected directly to the
this battery voltage, rejecting
12V supply.
noise and also reducing the
Instead, current flows from
source impedance for IC1’s
the 12V input, through fuse
internal analog-to-digital conF1 and the 470Ω series resisverter (ADC), which can affect
tor and then to transistor Q2’s
the accuracy of its readings.
emitter. Q2 must be switched
We stated earlier that the
Fig.1: the circuit concept is a comparator to monitor the
on in order for current to flow battery voltage and a thermistor to monitor temperature.
range of low-battery cut-out
to the divider, thus allowing
voltages is from 8.4V to 16.8V.
siliconchip.com.au
Celebrating 30 Years
January 2018 65
Fig2: micro IC1 monitors the battery voltage, the air temperature and sends a PWM signal to drive the mosfet,
which in turn controls the fan speed.
You can verify this by calculating the division ratio of the
UVLO divider with trimpot VR1 at both extremes and then
multiplying this by the pin 6 threshold of 4V, set in the
software.
Actually, the threshold is 4.0V for the unit to switch on
and 3.8V for it to switch off, ie, there is a 0.2V hysteresis.
This translates into a supply voltage hysteresis of around
0.4-0.8V, depending on the setting of VR1 (because of the
voltage divider feeding pin 6). This reduces the chance of
the unit constantly toggling on and off because of the voltage drop caused by the fan switching on.
Temperature sensing
When the voltage at pin 6 is high enough for the unit to
become active, it measures the voltages at input AN2 (pin
5) and input AN3 (pin 3) every 100ms.
The voltage at AN2 is determined by the resistance of
the NTC thermistor (which is connected via CON3) and the
setting of trimpot VR2. The thermistor has a nominal resistance of 10kΩ at 25°C while VR2 can be varied between
about 0Ω and 10kΩ.
As trimpot VR2 is turned clockwise, its resistance drops
and therefore the NTC thermistor resistance must drop further to achieve the same voltage at pin 5. Since by definition, an NTC thermistor’s resistance drops as its temperature
rises, it follows that turning VR2 clockwise increases the
required temperature to achieve a certain voltage at pin 5.
Analog input AN3 is simply connected to the wiper of VR3,
which is connected between GP0 and GND, thus varying the
voltage applied to AN3, providing a convenient way to set
the temperature required to achieve maximum fan speed.
Since IC1’s ADC is configured to use the 5V rail as its ref66
Silicon Chip
erence, and the dividers feeding both AN2 and AN3 are effectively between 5V and 0V, the readings it takes at both
AN2 and AN3 are ratiometric. Thus, variations in the 5V
supply voltage will not change either of these readings, assuming that output GP0 is close to 5V when high; it should
be, given the relatively light loading.
The software compares the reading at AN2 to a fixed 1V
(nominal) reference and the reading from AN3 and uses these
values to compute the required duty cycle for PWM output
GP5. If AN2 is below 1V, the target duty cycle is zero. If it’s
equal to or above the reading for AN3, it will be close to
100% and anywhere in between will result in a duty cycle
value between the programmed minimum and maximum
values (25% and 100% by default).
So as described above, VR1, VR2 and VR3 allow easy adjustment of the three main settings: the switch-on supply
voltage, fan switch-on temperature and maximum fan speed
temperatures respectively.
There are actually three additional settings but these
are not set via trimpots (at least, not directly). These are
the PWM frequency, the minimum fan duty cycle and the
maximum fan duty cycle. They default to 1kHz, 25% and
100% respectively.
There is a procedure to go through if you want to change
any of these, and the altered setting is stored in EEPROM
inside IC1. See below for details.
Fan drive
The GP5 output (pin 2) drives the gate of Mosfet Q1 directly. Q1 is a low on-resistance, logic-level type with a low
gate capacitance. As such, it is reasonably efficient when
driven in this manner (without a dedicated Mosfet driver
Celebrating 30 Years
siliconchip.com.au
or even series resistor), although we have purposefully kept
the frequency low (50-1000Hz) in order to keep switching
losses under control.
Basically, there are two types of losses in the fan drive
system, both of which contribute to heating in Q1 and if the
total is excessive, Q1 could be damaged. These are moreor-less fixed losses due to Q1’s on-resistance and switching
losses due primarily to the fact that Q1 is in partial conduction (ie, higher than normal resistance) while it is in the process of switching on and off.
The faster Q1 switches, the lower the switching losses
but this fast switching requires a high current to be sourced/
sunk to the gate terminal, to rapidly charge and discharge it.
Hence, with a relatively low drive strength available from
the general purpose output pin on the micro, we can expect
higher switching losses.
Switching losses are proportional to the drive frequency since the more gate transitions there are per second, the
more time it spends in partial conduction. Hence, keeping
the frequency relatively low helps. The only real disadvantage is that, since 1kHz is an audible frequency, you may
hear some whine from the fan motor when the duty cycle
is between 0% and 100%.
In our test vehicle, the fan noise is drowned out by the
V8 engine. In fact, it’s hard to tell from behind the wheel,
whether the fan is running at all (this is not true of the factory-fitted radiator fans!).
It may be more problematic if you’re controlling a fan
to cool a desktop PC or some other domestic situation, but
we have provided a way to minimise this, as we shall explain later.
By the way, Q1 is an automotive-rated Mosfet and typical
dissipation can be expected to be under 1W for loads up to
10A, so no extra heatsinking is required.
4A schottky diode D2 is connected across the fan motor
output terminal, to absorb back-EMF when Q1 switches off
and inject it back into the 12V supply. Q1 is avalanche-rated and should survive without D2 but we decided to add it
as a “belts ‘n’ braces” measure; you don’t have to install it
if you are sure it’s unnecessary but it certainly doesn’t hurt.
Battery voltage compensation
Our description of how the duty cycle is calculated above
omitted one detail. While fan speed is related to the duty cycle applied to Q1, it will also vary depending on the supply
voltage. In order to provide a consistent fan speed based on
temperature, we apply some supply voltage compensation.
This means is that when you set the control voltage for
100% fan duty cycle, we consider this to be full speed at
the minimum supply voltage as set by VR1. As the supply
voltage rises above this minimum, the fan duty cycle is reduced proportionally.
So for example, if the switch-on voltage is set to 13V but
the actual supply voltage is 14.4V when the control voltage reaches the maximum setting (as determined by VR3),
the actual duty cycle will be reduced to 90% (100% x 13V
÷ 14.4V). This means the fan speed should not vary (much)
as the supply voltage varies.
However, that does not mean the unit will never exceed a
duty cycle of 90% when the supply is at 14.4V. It will still
increase the duty cycle if the control voltage (ie, temperature) increases further beyond the “maximum” setting. It
will continue increasing duty cycle linearly until Q1 is fully
siliconchip.com.au
switched on (ie, 100% duty cycle). You can think of this as
a bit of a “turbo” mode for your fan when the supply voltage is high enough.
Power supply
Because this unit can be used in automotive (or even marine) applications, where you can expect all sorts of spikes
and dips and other nasties on the supply rail, we have included protection measures to prevent the unit from being
damaged.
Power coming into the unit first passes through 10A blade
fuse F1. This is mainly to protect against a shorted fan motor. In a motor vehicle, the unit should always be connected with an external fuse between the unit and the battery
(either in the fuse box, or inline with the wiring) but it’s a
good idea to have an internal fuse, just in case.
The fan connects directly between the fused 12V rail and
the drain of Mosfet Q1. Q1 is designed for automotive use
and has an avalanche rating of 450mJ, which is relatively
high. This, in combination with the inductance of the fan
motor, should allow it to handle the typical brief (but high
voltage) spikes which can occur in an automotive DC supply.
But the rest of the circuit has separate protection, with a
series 470Ω 0.5W resistor feeding reverse-polarity protection diode D1 and transient voltage suppressor TVS1, which
is bypassed by a 2.2µF ceramic capacitor. These feed REG1,
which is an automotive-rated ultra-low quiescent current
linear regulator.
The 470Ω resistor and 2.2µF capacitor form an RC lowpass filter to reduce the severity of the spikes, while TVS1
clamps the larger ones to a maximum of about 40V, which
is the upper limit to the operating voltage rating of REG1.
The 470Ω resistor also acts to limit the maximum current
that TVS1 must clamp.
REG1 is a low-dropout linear regulator and these tend
to have stability issues depending on the output filter capacitor used. That’s because they have an internal feedback
loop with significantly more phase shift than a traditional
linear regulator. We have carefully chosen the output filter
capacitor to have an ESR in the required range for stability.
We would have preferred to use a ceramic capacitor, as
these tend to be more reliable but they almost universally
have too low an ESR to suit the LM2936 regulator. We could
have added a series resistor but that would be another component on an already packed board.
The Vishay 293D-series tantalum capacitor has an operating temperature range of -55°C to +125°C, with suitable
voltage derating. In fact, we’ve provided a sufficient voltage rating for the capacitor to be OK up to temperatures of
+150°C and Vishay’s reliability calculator suggests this part
in our application should have a mean time between failures (MTBF) of 17 million hours at a constant 125°C. So it
should be OK for, oh, just on 2000 years!
The only additional components in the circuit are the
100nF supply bypass capacitor for IC1 and the 1kΩ pullup resistor at its MCLR input, to prevent spurious resets.
Construction
The Fan Speed Controller is built on a very small double-sided PCB, just 49.5 x 30.5mm and coded 05111171.
Almost all the components are through-hole types and are
fitted to the top side; there are just two SMDs, both on the
bottom side and both easy to solder.
Celebrating 30 Years
January 2018 67
Fig.3: the PCB
component
overlays for the
top side (top
diagram, [a]) and
underside (bottom
diagram [b]), both
shown life size.
There are only
two components
to solder on the
underside – both
are SMDs but
both are quite
large and easy to
solder.
[a]
[b]
One SMD is the 22µF tantalum capacitor in a B-size case
(3.2 x 2.6mm) and this is soldered in place under the mounting location for REG1. It’s a polarised component and will
have a stripe to indicate the positive side. This must go towards IC1; see bottom side overlay diagram Fig.3(b). This
also shows the location for schottky diode D2, with its cathode (striped end) towards the top (near) edge of the PCB.
The main thing to watch for with these components is to
make sure that the solder forms a good fillet between the
rectangular lead on the end of the component and the pad
on the PCB. If you spread a little flux paste on the PCB pads
before soldering, it will help the solder flow down and make
good contact with the PCB.
With those in place, flip the board over and start fitting
the through-hole components, using top side overlay diagram Fig.3(a) as a guide. Start with the resistors, checking
the resistance of each with a DMM before soldering, followed by diode D1, with its cathode stripe orientated as
shown. TVS1 is also polarised and this can be fitted now.
IC1 is next but make sure it is programmed before soldering it in place. It’s difficult to re-program once on the
board and we strongly recommend that you don’t use a
socket since the IC could vibrate loose or corrosion could
form over time, causing intermittent contact and failure.
Double-check that its pin 1 dot is towards the corner of the
board before soldering the pins.
The next job is to mount Q1 on the board by bending its
pins and then attaching its tab using a short M3 machine
screw, shakeproof washer and nut. Once it’s firmly secured,
solder and trim the three leads. You can now fit the three
non-polarised ceramic capacitors in the locations shown.
Now crank out the leads of transistors Q2 and Q3, and
regulator REG1 and solder them as shown in Fig.3(a). Don’t
get the parts mixed up since they look almost identical and
are only distinguishable by their labels. You can then solder
the three identical trimpots, VR1-VR3, with their mounting
screws located as shown.
That just leaves fuse holder F1 and the three connectors.
If you are wiring in the unit with an inline fuse (strongly
recommended for automotive applications), you could replace F1 with a wire link. However, we opted to keep the
onboard fuseholder and we fitted a 10A fuse, with a 7.5A
inline fuse. The idea behind this is that the inline fuse is
68
For clarity,
we’ve shown
the topside
and underside
views of the
PCB a little
larger than life
size. Note the
polarity of the
22µF tantalum
capacitor and
the schottky
diode (D2) on
the underside
pic. There are
some minor
differences
between this
prototype and
the patterns at
left.
Silicon Chip
easier to replace and so should blow first but the onboard
10A fuse has been kept as a last-ditch protection measure.
Assuming you are fitting F1, you will either have two
separate blade fuse clips or a single assembly with both
clips fitted to a plastic base. Either way, you will need to
insert the clips as shown and push them down fully onto
the PCB before soldering.
But if you are using the individual clips, you will have to
be careful because it requires quite a lot of heat to get good
solder adhesion and the solder can unfortunately run down
through the middle of the clip, preventing a fuse from being inserted. We certainly don’t recommend you solder the
clips with a fuse inserted since this can result in the fuse
being soldered to the clips!
So it’s a balancing act; you need to use enough solder
and heat it sufficiently for it to adhere to the clips but not
so much that it runs through. If you do get solder inside the
fuse clips, you will need to use a solder sucker and probably
also some flux paste and solder wick to remove the excess.
Note that we didn’t fit any of the connectors to our prototype because we were concerned that the wires could vibrate loose and contacts could corrode, so we decided to
solder the wires directly to the PCB.
If you do fit the connectors, make sure the wire entry
holes of the terminal blocks face to the outside of the PCB
(ie, to the left as shown in Fig.3). There’s no need to dovetail the terminal blocks as they are spaced apart slightly.
If you aren’t fitting the connectors, we strongly recommend that you make sure the wires will fit through the holes
before going any further. Since the holes are sized to suit
connectors and thus are too small to admit high-current
wires, you will probably be better off soldering PCB stakes
to the board and then solder the wires to the stakes later.
You could drill out the holes for CON1 and CON2 to accept wires but then we suggest you solder them to both
sides of the board, so you can take advantage of the parallel copper tracks top and bottom.
Fitting it in its case
We chose an IP65 flanged polycarbonate case for this automotive application because the unit needs to be waterproof
Celebrating 30 Years
siliconchip.com.au
Testing and set-up
Fig.4 shows an easy way to test and set up the
Fan Speed Controller. The LED and series resistor
take the place of the fan and show you when it will
switch on and how fast it will be running (ie, how
bright the LED is). The 1kΩ potentiometer allows
you to vary the supply voltage to the board and the
10kΩ potentiometer simulates the NTC thermistor
and allows you to simulate changes in temperature.
If you have an adjustable DC bench supply, you
can do without the 1kΩ potentiometer and simply
connect the supply up directly to CON1.
Insert fuse F1, wind the 1kΩ resistor fully anticlockwise, switch on the supply and advance the
1kΩ pot to about half-way. Check that you have at
least 7V across CON1. If you have much less than
that, there could be a short circuit on the board,
so switch off and check it carefully.
Now measure the voltage across the 470Ω
resistor next to D1 on the board. The quiescent
current in this condition should be around 18µA,
giving an expected reading of 8.5mV. If you get a
reading above 15mV or below 5mV then something is wrong so check your work. Depending
on your meter, you may see the reading jump up
every two seconds; this is IC1 waking up to check
the supply voltage.
If you want to alter the PWM frequency or fan
minimum/maximum duty cycle, now is the best
time to do it. See the panel titled “Advanced setup” for instructions.
The first main setting to make is the low supply cut-out voltage. Set the 10kΩ off-board pot to
about halfway, then wind VR1 and VR3 fully clockwise and VR2 fully anti-clockwise. Adjust the 1kΩ
potentiometer (or your DC supply) to the desired
switch-on voltage. Adjust VR1 clockwise until the
test LED switches on.
You can now test it by reducing the supply voltage until the LED switches off. If you measure the
Fig.4: a convenient test jig to set up your fan
speed controller, as explained below
voltage across CON1, it should be around half a volt
lower than the switch-on threshold that you just set.
Next, we set the switch-on and maximum speed
temperatures.
First, refer to the table at right and write down
the thermistor resistance at the desired minimum
and maximum temperatures. For temperatures between those shown, you can simply estimate the
value (it’s all pretty approximate anyway).
For example, for 38°C, we know the resistance
will be somewhere between 6.5kΩ and 5.3kΩ
and probably closer to the latter, so we could take
a guess at 5.8kΩ, which turns out to be spot on.
Now adjust your off-board 10kΩ potentiometer
while measuring the resistance between the two
pins that are wired to the board, until you reach your
computed switch-on threshold value. Then rotate
VR2 clockwise until the test LED lights.
Now, re-adjust the 10kΩ potentiometer to get
a resistance reading that corresponds to your
maximum speed temperature, and rotate VR3 anti-clockwise until the test LED starts to dim, then
slowly rotate VR3 clockwise again until it is back
at maximum brightness.
That completes the set-up; you can now connect
the NTC thermistor to CON3 and apply a heat source
to it and verify that the LED behaves as expected.
(to handle rain, car washes, etc) and also able to handle temperatures up to 100°C (eg, engine coolant) without damage.
At 64 x 58 x 35mm (not including flanges), this case is nice
and compact, making it easy to mount in the engine bay.
While it’s available in a beige and dark grey, unfortunately, the dark grey version is only rated for temperatures
up to 85°C and the beige version would look out of place
in an engine bay.
So we painted the outside of the beige case with a layer of etch primer and then
several coats of matte black Jaycar’s HB1022
engine spray paint (intend- IP65 case is ideal
ed for painting rocker cov- for this project
because it has
ers and such).
We were careful to avoid both a sealing
getting paint into the chan- gasket and
a mounting
nel where the waterproof flange. And
gasket is fitted as this may it’s just big
affect its sealing properties. enough to
Even though the case is house the PCB!
siliconchip.com.au
Temperature Resistance
(°C)
(Ω)
-10
55.3k
-5
42.3k
0
32.7k
5
25.4k
10
19.9k
15
15.7k
20
12.5k
25
10.0k
30
8.1k
35
6.5k
40
5.3k
45
4.4k
50
3.6k
55
3.0k
60
2.5k
65
2.1k
70
1.8k
75
1.5k
80
1.3k
85
1.1k
90
900
95
800
100
700
waterproof, due to the harsh environment of an engine bay
it would also be a good idea to spray both sides of the PCB
(avoid the top of the preset pots) with a conformal coating,
such as HK Wentworth’s Electrolube HPA. This makes the
PCB and components virtually impervious to liquids.
Do this after verifying that the PCB assembly is working properly.
We glued the PCB into the bottom of the case using neutral cure silicone sealant. Don’t use acid cure silicone; it can
corrode metal parts. It was then just a matter
of drilling holes into the case for the wiring, feeding it through, soldering it to the
board and then using silicone to seal the
areas where the wires enter the case.
We chose to solder the wires to the
board, rather than using terminal
blocks and headers, because we
were concerned that vibration
could work the wires loose over
time. Be careful if you do this
Celebrating 30 Years
January 2018 69
Parts List –
12V Fan Speed Controller
1 double-sided PCB, coded 05111171, 49.5 x 30.5mm
1 10A ATO/ATC blade fuse with matching blade fuse clips (F1)
1 M3 x 6mm machine screw, shakeproof washer and nut
2 mini 2-way terminal blocks (CON1,CON2) [optional]
1 2-way polarised pin header (CON3) [optional]
1 NTC thermistor [to suit application]
Semiconductors
1 PIC12F675-E/P microcontroller programmed with
0511117A.HEX (IC1)
1 LM2936-5.0 5V 50mA ultra low quiescent current regulator
(REG1)
1 IPP80N06S2L-07 N-channel automotive Mosfet in TO-220
package (Q1)
1 MPSA92 200V 500mA PNP transistor (Q2)
1 BC546 100mA NPN transistor (Q3)
1 1.5KE30A 30V 1500W unidirectional TVS (TVS1)
1 1N4004 1A diode (D1)
1 SK4200L 4A 200V SMD schottky diode (D2)
Capacitors
1 Vishay 293D226X0016B2T OR 293D226X9016B2T 22µF
16V SMD tantalum capacitor, Case B
1 2.2µF 50V multi-layer ceramic
1 100nF 50V multi-layer ceramic
1 1nF 50V multi-layer ceramic
Resistors (all 0.25W 1% metal film unless otherwise stated)
2 100kΩ
1 22kΩ
1 10kΩ
1 1kΩ
1 470Ω 1/2W metal film
3 10kΩ 25-turn vertical trimpots (VR1-VR3)
Additional parts for radiator fan control
1 radiator fan drawing up to 7.5A <at> 14.7V
(eg, SPAL VA09-AP8/C-27S)
1 radiator fan mounting kit
1 64 x 58 x 35mm IP65 polycarbonate enclosure with
mounting flange (Jaycar HB6211)
1 SAE plug to battery terminal 7.5A fused lead [Jaycar
PP2012]
1 SAE inline socket with 1.8m 16AWG automotive twin lead
[Digi-Key Cat 839-1349-ND]
2 M6 brass nuts (or size to suit battery terminals)
2 M6 beryllium copper crinkle washers (or size to suit battery
terminals) [element14 Cat 2770730]
1 2-pin Nylon Molex plug to suit radiator fan
[Jaycar PP2021]
1 1m length figure-8 10A automotive rated cable (for fan
wiring)
1 10kΩ 1% lug-style NTC thermistor [eg, Altronics R4112]
1 1m length figure-8 light-duty automotive rated cable (for
thermistor wiring)
1 2-way waterproof plug and socket set (optional, for
thermistor wiring; [eg, Jaycar PP2110])
1 adhesive thermal pad or a small tube of thermal paste
heatshrink tubing
petroleum jelly
neutral-cure silicone sealant
a few small pieces of high-density foam
a selection of large and small cable ties
70
Silicon Chip
This cheap
radiator mounting kit
sourced from ebay has four ties,
four springs, four plastic discs
and eight adhesive foam pads.
though since you will probably have to fit PC stakes to the
board and then solder the wires to those. The mounting
holes are too small for anything but the thinnest copper
wire to be fed through.
All the wires soldered to the board had external connectors to make removing the module easy (for maintenance).
The two battery wires go via a water-resistant SAE plug and
socket, the NTC thermistor wires via a 2-pin waterproof plug
and socket set and the fan wires were crimped and soldered
to a Molex socket, to match the existing plug on the fan.
We placed heatshrink tubing over the thermistor and fan
wiring and after shrinking it down, injected some silicone
into the back of the Molex plug and socket to improve their
ability to withstand a soaking.
The silicone was also forced into the ends of the heatshrink tubing to stop water getting inside and possibly entering pinholes in the wire insulation.
Where possible, fit these connectors to the wires after
you have figured out where you’re mounting the unit and
cut the wires to length. Otherwise, you will be left with a
lot of excess cabling to bundle up.
Installation procedure
We used our prototype to control a 300mm fan for a water-to-air intercooler radiator on a supercharged V8 engine.
This is a worthwhile upgrade for any vehicle with an intercooler which will be driven in traffic. See the separate
panel for an explanation of the benefits.
However, this project is just as applicable for normal radiators in vehicles which do not have adequate cooling, for
whatever reason and the installation details will be virtually identical.
As you can see from our photos, the new radiator is a
“pusher” style which is mounted at the front of the radiator stack. We chose this type for two reasons; one, the intercooler radiator is in front of the main radiator and we
wanted fresh air to be forced over it and two, there was already a pair of “puller” radiators mounted at the back of
the radiator stack, which you may be able to see if you examine the photos carefully.
In extreme conditions, the front “pusher” and back “puller” fans will work in concert to force fresh air into the front
of the first radiator, through the air conditioner condenser
and engine radiator and then over the engine itself, where
it will tend to be forced out from under the engine bay.
Fan mounting
The first step was to mount the fan on the radiator. This
was done using a cheap but effective mounting kit compris-
Celebrating 30 Years
siliconchip.com.au
ing four ties, four springs, eight adhesive foam pads and
four plastic discs (see photo opposite).
The ties are a bit like cable ties but they have a flat plate
at one end. You thread one of the adhesive foam pads over
the tie (the pads have a hole in the centre) and then force
the plastic tie between the fins of the radiator, from the opposite side where you want to mount the fan. You then slip
a second foam pad over the tie shaft so it’s in contact with
the opposite side of the radiator.
The tie then goes through the radiator mounting flange
and you slip the spring (small end towards fan) and plastic
disc over the tie. The plastic disc has a hole in the middle
with little teeth which grab the bumps on the tie, giving a
one-way ratchet effect. As you pull the tie through the disc,
it compresses the spring and foam pads until the radiator
is held firmly in place.
The foam pads on either side of the radiator prevent the
force holding the fan onto it from damaging the delicate
fins. Once the ties have been installed on the four corners of
the fan and tensioned appropriately, it’s held in place very
well and won’t budge under normal acceleration, braking
and cornering forces.
In our test vehicle, we had very poor access to the back of
the radiator; there was around a 10mm gap between it and
the radiator behind it at the top, reducing to around 5mm
at the bottom. As such, were only able to attach the fan to
the radiator at its two upper mounting points.
To compensate, after slipping the two adhesive foam
mounting pads between the fan’s two lower mounting points
and the radiator, we then forced a highly compressed block
of closed-cell foam into the gap between the front of the fan
motor housing and the plastic cross-member which sits behind the vehicle’s front grille.
This holds the fan firmly against the radiator, preventing it from moving forward under heavy braking and takes
some of the gravitational load off the two upper mounting points thanks to the resulting friction at the two lower
mounting points. So far, this arrangement seems to have
stood up to the abuse which results from driving on Sydney’s pothole-filled streets.
By the way, when mounting the fan, we made sure it
wasn’t resting on the oil cooler below; a small piece of foam
was inserted between it and the oil cooler while the fan was
being mounted and then finally removed, giving around
5mm of clearance, so that it doesn’t bounce up and down
when going over bumps and damage the oil cooler fins.
Wiring
With the fan in place, we then found a suitable location
to mount the control box itself, next to the headlight housing. It was then secure in place by routing some large cable
ties through the holes in the box flanges and around nearby anchor points. A piece of foam was wedged under the
unit to reduce the vibration transmitted to it while driving.
The fan wiring is simple; having plugged the fan plug
into its matching socket, we simply tied both cables to convenient anchor points to stop the wires flapping around.
We then used a cable tie to clamp the NTC thermistor lug
onto the intercooler radiator right next to the water inlet
pipe. While not shown in these photos, we later wedged
an adhesive thermal pad between the two to ensure good
heat conduction.
With the thermistor wire plugged into the matching
siliconchip.com.au
Advanced set-up
Normally, the unit operates with a PWM frequency of 1kHz, a
minimum duty cycle of 25% and a maximum duty cycle of 100%.
These defaults are stored in the EEPROM of IC1 and so they can
be changed if necessary.
The most common reasons to change these are if you are controlling a fan or fans that use brushless (electronically commutated) motors, such as most computer fans, or if your fan won’t run
properly with a duty cycle of just 25%. In these cases, you might
want to drop the PWM frequency or raise the minimum duty cycle respectively.
The set-up for these parameters takes advantage of the fact that
normally VR3 is adjusted to give a maximum fan speed control voltage above 1V. That’s because the minimum (fan switch-on) control voltage is fixed at 1V so it doesn’t make much sense to have
the maximum voltage be lower than this. So if VR3 is set to apply
a voltage of 1V or below at pin 3 at start-up, this will activate the
advanced set-up mode.
If for some reason you want the fan to switch on at full speed,
you can set VR3 to give a reading just above 1V at pin 3. However,
you will need to be careful to make it high enough to avoid triggering this set-up mode. The actual threshold is close to 1/5th of the
supply voltage, so check the output of REG1 and divide by 5 before
setting VR3, to be safe.
Selecting the parameter
Follow these steps, based on which parameter you want to adjust.
1) PWM frequency – adjust VR3 to give a voltage at TP3 which
is equal to the desired PWM frequency, where 1mV = 1Hz. So for
example, adjust for 500mV if you want 500Hz PWM. Connect a
10kΩ resistor across CON3 (or if you have a 10kΩ pot wired across
CON3, as described in the testing procedure, rotate it fully anticlockwise) and apply power.
Wait for at least one second and then rotate VR3 clockwise until
TP3 is well above 1V. Then adjust VR2 to give a PWM waveform
at pin 2 and check the frequency with an oscilloscope or frequency counter, to verify that it has been set to the correct frequency.
2) Minimum duty cycle – adjust VR3 to give a voltage at TP3
which is equal to the desired minimum duty cycle, where 10mV =
1%. So, for example, adjust for 330mV if you want a minimum duty
cycle of 33%. Disconnect the NTC thermistor (or anything else)
from CON3 and apply power.
Wait for at least one second and then rotate VR3 clockwise until
TP3 is well above 1V. Then re-connect the NTC thermistor or pot
to CON3 and adjust VR2 fully anti-clockwise. Wind it slowly clockwise until you get a PWM waveform at pin 2 and check the duty
cycle with an oscilloscope or DMM with duty cycle measurement,
to verify that it has been set to the correct minimum.
3) Maximum duty cycle – adjust VR3 to give a voltage at TP3
which is equal to the desired maximum duty cycle, where 10mV =
1%. So, for example, adjust for 750mV if you want a minimum duty
cycle of 75%. Short out CON3 and wind VR2 a few turns clockwise,
then apply power.
Wait for at least one second and then rotate VR3 clockwise until
TP3 is well above 1V. Then re-connect the NTC thermistor or pot
to CON3 and adjust VR2 fully clockwise. Wind it slowly anti-clockwise until you get a PWM waveform at pin 2 and check the duty
cycle with an oscilloscope or DMM with duty cycle measurement,
to verify that it has been set to the correct maximum.
Having finished making any or all of the above changes, re-verify
that TP3 is set above 1V and you can then go through the normal
set-up procedure to adjust VR1-VR3.
Celebrating 30 Years
January 2018 71
Adding a fan to an intercooler
An intercooler is a radiator which cools the air going into an
engine. It’s normally fitted between a (turbo)supercharger and
the engine or in some cases, between multi-stage turbocharger
compressors.
It may cool the air directly or there may be a liquid coolant
which transfers the heat energy to a second radiator which is
cooled by ambient air (which is the case in our test vehicle).
This is beneficial because the (turbo) supercharger has the
side-effect of heating the intake air as it compresses it and
forces it into the engine. That increases the chance of the fuel
detonating, which could damage the engine and it also limits
the effectiveness of the supercharger because the hotter air is
less dense, partially negating the benefit of compressing it to fit
more into the cylinders.
Most vehicles can benefit from improved airflow past the intercooler radiator and that’s certainly true in this case. Our test
vehicle greatly benefited from fitting a fan on the intercooler radiator, despite the fact that it is mounted in front of the main
radiator which already has two high-performance cooling fans
on the back.
That’s because an intercooler radiator operates at a much
lower temperature compared to the main engine radiator; the
intercooler is typically around 10°C above ambient compared to
around 90°C (absolute) for the main radiator.
Because of the proximity of the two, when the vehicle is
stopped (eg, at a red traffic light) or moving slowly (eg, in a
queue of vehicles), especially uphill, there is a tendency for
heat from the main radiator to “soak” the intercooler, leading
to increased intake temperatures, reduced performance and a
louder exhaust note.
socket, again we tied both wires to mounting points on the
bumper and chassis to keep it tidy.
That just left the battery wiring. This was routed under
the cross-member which supports the radiators and tied to
it and the clamp which holds the battery in place. It was
then just a matter of removing the inline fuse, fitting the
eyelets over the bolts holding the battery clamps on and
then fixing them in place using a beryllium copper crinkle
washer and brass nut for each terminal.
We made sure these nuts were done up tight, crushing the
washers and forming a good electrical contact between the
eyelet lugs and battery terminals, before smearing both terminals with petroleum jelly to prevent water from encouraging electrolytic corrosion due to the dissimilar metals used.
It was then just a matter of re-inserting the fuse and the
unit was ready for testing and tweaking.
One final comment regarding installation. You will notice that we went to a fair bit of trouble to waterproof our
control box, the wiring and the sensor.
Once the traffic clears and the vehicle starts moving again, the
intercooler gets back to normal temperatures after a couple of minutes but performance suffers until then. And in some cases, you
could hit another red light or more traffic before the intercooler is
back to its normal operating temperature.
That’s solved by fitting an extra “pusher” fan on the front of the
intercooler. It only switches on in situations where the normal airflow is not adequate to keep the intercooler in its ideal temperature
range and the extra fan-forced air helps cool both the intercooler
and also the normal radiator in this situation.
Fitting an electric fan to a normal radiator
You may be aware that most modern cars have electric radiator
fans while older vehicles tend to have belt-driven or clutch-coupled
fans driven directly from the engine crankshaft.
Some of these older vehicles have a tendency to overheat and in
that case, adding an electric radiator fan to replace or complement
the existing mechanically-driven fan is an easy solution.
Part of the reason for this is that older vehicles just weren’t as
well-engineered but also they may not have been designed to sit
in traffic for long periods because they didn’t have the sort of traffic that we have to deal with these days! The added electric fan
will have little effect most of the time but certainly will give you
peace of mind in the summer months, especially if you’re stuck
in a bad traffic jam.
Keep in mind though that if you have an older or classic car
that’s overheating, it could also be due to blocked radiator coolant
passages, a stuck thermostat or some other mechanical ailment.
In that case, it would be better to fix it than to add an electric fan
as a band-aid (despite the fact that this may well solve the problem).
Keep in mind that you could easily get a high-pressure
jet of water at the front of the radiator when washing the
vehicle and that quite a bit of water will enter when driving
in a rainstorm at speed. You don’t want your electronics to
corrode should that water find its way inside.
That’s why we earlier suggested also spraying the PCB
with a conformal coating – just in case!
Final adjustments
For automotive applications, we recommend setting the
low-battery cut-out voltage to between 13.5V and 14.0V.
This way, the fan will only run when the engine is running
and the alternator is charging the battery.
If you set it too close to 13V then you might find that the
fan will try to run sometime after the engine has been shut
off, as the battery voltage can “rebound” to a little over 13V
once the load on it has dropped to minimal levels – it takes
a while for the voltage to settle to the expected 12.9V of a
fully-charged, unloaded lead-acid battery after a long drive.
Resistor Colour Codes
Qty
2
1
1
1
1
72
Silicon Chip
Value
100kΩ
22kΩ
10kΩ
1kΩ
470Ω
4-Band Code (1%)
brown black yellow brown
red red orange brown
brown black orange brown
brown black red brown
yellow purple brown brown
Celebrating 30 Years
5-Band Code (1%)
brown black black orange brown
red red black red brown
brown black red brown
brown black black brown brown
yellow purple black black brown
siliconchip.com.au
If the fan does try to switch on in this condition, chances are it will immediately turn off again because the extra
load on the battery will pull its voltage below 13V. This
can result in the fan trying to spin up every couple of seconds, despite the hysteresis built into the battery voltage
monitoring.
It won’t do any harm but it could be a bit annoying if you
can hear it happening. In that case, all you need to do is
rotate VR1’s screw clockwise a little (say half a turn to one
turn) to increase the threshold until that no longer happens.
The temperature settings will probably require tweaking
too. In our application, we set the switch-on threshold to
40°C and the maximum speed temperature to 55°C, on the
basis that we didn’t want the fan running all the time on
an average summer day (where ambient temperature could
easily exceed 30°C) and that if the intercooler is above 50°C,
engine performance would start to suffer.
We ended up dropping those temperatures slightly, to
around 38°C and 50°C, as this seemed to keep the engine
operating in an optimal manner.
If you’re fitting the fan to the engine radiator, you will
want to use much higher temperatures. You can expect the
coolant exiting a fully warmed-up engine to be around 90°C;
remember, its boiling point should be above 100°C because
of the antifreeze mixed into the water and because virtually all vehicles use a pressurised cooling system to keep
the boiling point as high as possible .
So if your temperature sensor is at or near the entry hose
for the radiator then you will want to set the fan switch-on
temperature somewhere around 90°C.
If the sensor is at or near the exit, it will need to be significantly lower than this. How much lower depends on
how efficient your radiator is.
Chances are you will need to take a guess at the initial
setting and then adjust it based on your observations while
driving. If the fan is running full speed after a normal drive
then you need to increase the temperature setting.
On the other hand, if the fan doesn’t switch on at all
even after a hard drive on a summer’s day, you need to
lower the setting.
In general, it’s probably a good idea to keep the maximum
fan speed temperature close to the switch-on temperature
because the difference between the coolant temperature in
a properly working cooling system and one which is overheating is not huge.
We would suggest setting it around 10°C higher than the
switch-on threshold.
You can increase it a bit if you notice the fan speed “hunting” (oscillating) or reduce it if the fan switches on but the
coolant temperature still rises above what you would consider ideal, despite having an appropriate fan switch-on
temperature.
Controlling computer fans or
other fixed installations
While we designed this project with automotive applications in mind, it would also be quite suitable for controlling “muffin fans”, as used in computers, or to cool various
pieces of industrial equipment, etc. You could even consider using it to control a fan which ventilates your home,
basement, roof cavity, etc, or forces underfloor airflow to
help prevent stale air and mould buildup.
As long as the fan runs off 12V DC and draws no more
than 10A, it will work OK. And you can connect multiple
12V fans in parallel, up to that 10A limit.
The one issue that you will need to keep in mind is that
these muffin fans normally use brushless (electronically
commutated) motors which do not respond well to highfrequency PWM control. So you will probably need to drop
the PWM frequency to somewhere in the range of 50-200Hz.
See the panel titled “advanced set-up” for information
on how to do this.
If you’re lucky enough to have four-wire computer fans,
one of the four wires (the blue one) can be used to provide
PWM control.
So in this case, wire up the red, black and blue wires in
parallel. Connect red to +12V, black to GND and blue to
the negative terminal of CON2. Connect a 1kΩ resistor between the pins of CON2 and the fans should then operate
normally at the default PWM frequency of 1kHz.
SC
The new intercooler
fan was added in
front of the radiator
since the existing
radiator fans were
already mounted at
the back (just visible
near the top of the
photo). You need to
use a “pusher” fan
if it’s being mounted
on the front. Here
you can also see
how we mounted the
temperature sensor
and tied the wiring
to nearby structural
elements to prevent
it from moving while
the vehicle is in
motion.
siliconchip.com.au
Celebrating 30 Years
January 2018 73
|