Report
Report
Abstract :
Generally, electronic devices produce more heat. So this heat
should be reduced in order to protect the device.
The aim of this project is to design a Temperature Controlled DC Fan
which automatically turns on a DC Fan when the temperature increases
above a certain limit and also the temperature limit can be changed anytime
using input from UART .
If the temperature exceeds The microcontroller will turn on the relay. Now,
35 degree Celsius (ambient 12V DC source is connected which starts the fan.
temperature limit of laptop)
If the temperature drops The microcontroller will turn off the relay , but
below 35 degree Celsius the fan speed will slow down gradually which
further reduces the temperature.
2. Introduction :
LPC2148 is a single-chip 16 bit or 32 bit ARM7 family based
RISC Microcontroller.
Components used :
• LM35(Temperature Sensor)
• Single Pole Double throw(SPDT) Relay
• 12V DC Fan
• Virtual terminal
• LM016L (16 X 2 LCD Display)
• Push Button
The LM35 is an integrated circuit sensor that can be used
to measure temperature with an output voltage that is
proportional to temperature (in °C).
Relay is an electromagnetic
switch which allow low power
circuits to switch to a relatively
high Voltage.
1. Pin 2 is the data pin of LM35 which is connected to the analog input pin P0.27
i.e. ADC 0.
2. The last 4 data pins of the LCD are connected to P0.12 to P0.15 of the
microcontroller.
3. A Single Pole Double throw(SPDT) relay is connected to P0.20 pin. The single
pole is connected to 12V DC Source and Normally Open(NO) throw is
connected to 12V DC Fan.
4. The Rx of Virtual terminal is connected to P0.1(TX) pin and TX of Virtual
terminal is connected to P0.2 (RX) pin.
5. The push button with DC supply is connected to P0.16 pin, which is used to
change the temperature limit based on the input from the UART.
3. Algorithm :
1) Configure PINSEL0 pins as GPIO
2) Configure P0.20 as Output which is used as input to RELAY
3) Configure P0.16 as Input for getting input from switch
4) Set temperature limit
5) Make ADC and LCD initialisation
6) While (1)
7) Get Temperature value from ADC
8) If P0.16 is high
9) Get input from UART(PC)
10) End
11) If previous value is not equal to current value
12) Convert Temperature into Fahrenheit
13) Display temperature in Celsius and Fahrenheit
14) If temperature is greater than temperature limit
15) Set P0.20 so that relay is on, in-turn, the connection to fan is on
16) Display “Overheat” in LCD
17) Else
18) Clear P0.20 so that relay is off, in-turn, the connection to fan is off
19) Display “Normal” in LCD
20) End
21) End
22) End
5. Simulation results :
Design :
Initially, temperature is 34°C , Fan is off. The temperature became 35°C , Fan is on.
The LCD display shows “Normal” The LCD display shows “Overheat”
With temperature unchanged , switch is pressed and “37,” is entered in the virtual
terminal. Now, the LCD display shows “Normal” because the TEMP_LIMIT is 37 now
but the current temperature is 35.
With temperature unchanged , again switch is pressed and “32,” is entered in the virtual
terminal. Now, the LCD display shows “Overheat” because the TEMP_LIMIT is 32 now
but the current temperature is 34.
The TEMP_LIMIT with 32 as unchanged , temperature changes to 31. Now, the LCD
display shows “Normal” because the TEMP_LIMIT is 32 now but the current temperature
is 31.