Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Temperature-Based Fan Control Using the MAXQ2000 Microcontroller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Temperature-Based Fan Control Using the MAXQ2000 Microcontroller

[attachment=21926]


Introduction

With its numerous features, the MAXQ2000 can create a multitude of useful applications, such as controlling a
fan's speed by pulse width modulation (PWM). Among the many features of the MAXQ2000 are its timer with
PWM and Serial Peripheral Interface (SPI™) and 1-Wire® capabilities. This application note describes how the
MAXQ2000 can be used to drive a fan and change its speed, in real time, by PWM. This process requires the use
of another Maxim product, the MAX1407 multichannel data-acquisition system (DAS). Using SPI, the MAXQ2000
can communicate with the MAX1407 (containing a 16-bit analog-to-digital converter [ADC] and digital-to-analog
converter [DAC]). As an alternative to using a thermistor, the MAXQ2000's 1-Wire bus master can be used in
conjunction with a temperature iButton (DS1920). The source code used in this application note is available for
download.

Overview

This program runs on the MAXQ2000 evaluation kit (Rev. B), with the help of a temperature iButton (DS1920),
or an external thermistor. The MAXQ2000 evaluation kit (Rev. B) includes an LCD display, two pushbuttons, a
MAX1407 ADC, two UARTs, three timers, 1-Wire, and many other features. The program uses the LCD display,
the pushbuttons, and the MAX1407 or 1-Wire for reading the temperature. In addition, a DC fan and applicable
drive circuitry, a thermistor, and a power supply will also be needed. The MAXQ2000 evaluation kit will drive an
external circuit to control the fan speed. The LCD display shows current temperature, and changes periodically
from Celsius to Fahrenheit. The pushbuttons allow the user to change the low- and full-speed temperature
thresholds for the fan.
The default method to detect the temperature is through use of an iButton, but if the correct iButton is not
available or there is a problem in communication, the program uses a thermistor through the MAXQ2000's SPI to
get the temperature reading. The iButton (DS1920) is a temperature-sensing 1-Wire device. The program uses
an RL1005-5744-103-SA thermistor in conjunction with the MAX1407.
Once the temperature is read, the display is sent to the LCD, and the PWM duty cycle is adjusted based on the
temperature reading.
There are two thresholds in the program, the minimum temp and the maximum temp. If the temperature is
below the minimum temperature threshold, the fan turns off; if it is above the maximum temperature threshold,
the fan is set to its maximum speed. If the temperature is between the minimum threshold and the maximum
threshold, the speed is proportional to the fractional distance between the two temperature thresholds.
The two thresholds are configurable through the two pushbuttons labeled SW4 and SW5. SW4 toggles the
threshold to change—either base or maximum. The threshold selected for the change is shown between the
numerical data and the C/F character. An underscore states that the base threshold will be changed, while an
overscore means the maximum threshold will be changed. SW5 increases the currently selected threshold by 1.
Each time one threshold is changed, the fan speed is recalculated.
Page 1 of 12
This application requires using two of the three timers on the MAXQ2000. Timer 1 is devoted to periodically
checking the temperature through the thermistor, while Timer 0 uses the PWM output from P6.5 to control the
fan. Timer 1 cannot be used for the PWM because it has hardware resources that are used during communication
with the MAX1407.


Pushbuttons Interrupt
The pushbuttons allow the user to change the base_temp and max_temp thresholds. SW4 (interrupt 10)
changes the threshold that will be changed, while SW5 (interrupt 15) increases the threshold by 1. If the
max_temp reaches 149, it lowers itself to base_temp+1. If the base_temp is one lower than the max_temp, the
base_temp becomes 50.