OZ REEF

Search
Quick Tips
Make It Easy
Make sure that anything that needs to be done often is simple and easy. Otherwise, over time you are less likely to keep doing it.
 
Main Menu
Home
Equipment
Journal
Gallery
Library
FAQ
DIY Plans
DIY Links
Personal
Search
Site Map
Ask A Question
Support
Finding information here useful? Any financial support to assist with bandwidth expenses is appreciated. Using PayPal you can ...
Visitors: 8980726
DIY Links
Random
Carlson Box 
Tanks 
Simple pH Meter 
pH Controller 
MH Pendants 
DIY Fluoro Light Wiring 
Building a Refugium 
Super Skimmer Plus 
How to Build a Protein Skimmer 
Soft Drink Bottle Trap 

Home arrow DIY Plans arrow Temperature Control arrow Programmable Fan Cooler

Programmable Fan Cooler PDF Print

by Brad Collins

This fan controller uses a picaxe IC to control the speed of two 120mm DC fans. It has the following features:

  • reads water temp using waterproof probe (1/16 degree resolution)
  • programmable on, max and off temperatures
  • programmable min and max fan speed
  • fan speed varies between min and max as temp varies between on and max temp
  • fan defaults to max speed if temp probe comes unplugged

Circuit Diagram

Circuit diagram
Circuit Diagram

Note: It may be a good idea to add a diode across the fan output.

Assembly and Installation

Circuit board assembled
Circuit board assembled.

Parts installed in project box
Parts installed in project box.

Temperature probe
Sealed temperature probe.

Fans
Fans.

Code

'Fan Controller V1.4
'Copyright - Brad Collins 2008
'For PICAXE-08M
'Reads Temp from DS18B20 and adjusts fan speed via MOSFET
SYMBOL MAXTEMP = 480 'temps are degrees x 16
SYMBOL MINONTEMP = 432
SYMBOL MINOFFTEMP = 424
SYMBOL CALIBRATETEMP = 3
SYMBOL MAXSPEED = 200 'must be <= 4 x pwm period (50)
SYMBOL MINSPEED = 50 'must be high enough to start fan
SYMBOL TEMP = w0
SYMBOL SPEED = w1
w2 = MAXTEMP - MINONTEMP 'temp range
w3 = MAXSPEED - MINSPEED 'speed range
w4 = w3 / w2 'integer part of ratio
w5 = w3 // w2 'remainder of ratio
for b12 = 1 to 4 'flash LED on power on
high 1
pause 20
low 1
pause 200
next
do
high 1 'flash LED on temp read
pause 20
low 1
readtemp12 4, TEMP 'read temp from DS18B20
TEMP = TEMP + CALIBRATETEMP
sertxd(#TEMP,13,10)
if TEMP = CALIBRATETEMP then
for b12 = 1 to 4 'flash LED if no temp data
high 1
pause 200
low 1
pause 100
next
high 1
pwmout 2, 0, 0
high 2 'fan on high if no temp data
else if TEMP > MAXTEMP then
pwmout 2, 0, 0
high 2
else if TEMP >= MINONTEMP then
SPEED = TEMP - MINONTEMP * w4 'convert integer part of temp to speed
SPEED = TEMP - MINONTEMP * w5 / w2 + SPEED 'convert remainder part and add interger part
SPEED = SPEED + MINSPEED
pwmout 2, 50, SPEED
else if TEMP < MINOFFTEMP then 'fan will stay on low between MINONTEMP and MINOFFTEMP
pwmout 2, 0, 0
low 2
end if
pause 5000
loop

Completed

Installed fans.
Installed fans.

Complete unit
Completed unit.

Comments

Only registered users can write comments.
Please login or register.

Powered by AkoComment!

 
Next >
New Articles
Most Popular Articles