2. AUTOMATIC TEMPERATURE
CONTROLLER
AIM:
To make an automatictemperature controllerusinganheaterandan AC to maintainthe
temperature between30-40.
INTRODUCTION:
Using sensor,we can control the heaterand airconditioner(ac) bymaintainingthe temperature
betweenthe 30-40. If the temperature isless than30 , thenheaterisinON conditionandac isin
OFF condition..If the temperature isgreaterthan40 ,thenheateris inOFFconditionandac isinON
condition.
BLOCK DIAGRAM:
COMPONENTSREQUIRED:
Micro controller8051
Heater( representedasmotorincircuit diagram)
Ac ( representedasmotorincircuit diagram)
2 relays
Lcd(liquidcrystal display)
ADC 0804
GSM(representedasvirtual terminal incircuitdiagram)
Temperature sensor
ADC
0804
LCD
LCDSENS
POT RELAY1
RELAY2
M
1
M
2
GSM
3. Potentiometer
3-resistors
2- transistors
Batteryof 12v
DESCRIPTION:
MICRO-CONTROLLER:A microcontrollerisa single chipVLSIunitwhich,althoughhavinglimited
computational capabilitiespossessenhancedinput/outputcapabilityandanumberof on chip
functional units.Theyare particularlyusedinembeddedsystemsforreal time control applications
withon chip program memoryanddevices.
TEMPERATURE - SENSOR: IT isan automaticinputwhichhas 3pins. We use thisto continuously
monitorthe environmenttemperature.Generallyitgetsactivatedat3.5 volts;and thusit takes
some fixedvaluesinbetween0-5volts.If the sensoroutputisabove 3.5v thenwe can connect
directlytomicrocontrollerbecause itcanaccept onlythe valuesabove 3.5v.if the output valuesare
below3.5vthenwe shall amplifythemtoabove 3.5vby usinga transistor.
LCD: LCD isuseddisplaynumbers , characters,and some special symbolsalso.Usingitsdatalines
we can sendour requireddatawhichhasto be displayed.Itconsistsof 16-pins.
RELAY: It is an electromagneticautomaticswitch.Itisusedto control highvoltage applianceseither
AC or DC. It have 5 pinsc1, c2 , common,normallyclosed(NC) ,normallyopen(no).Itworksonthe
principle of electromagneticinduction.
ADC-0804: It isan analogto digital convertor.Toreadthe continuousvalue we convertanalogdata
to digital data.It has20 pins.Itgivesan8 bitdigital dataas output.Out of 20 pins,11 pinsare
directlyconnectedtomicrocontrollerinwhich8pinsgivesthe digital outputandthe other3 pins
indicatesthe read,write andinterruptmodes.
Potentiometer:Itisusedtosetthe reference voltage inthe ADC.
HEATER: it isusedto heatthe environmenthence topull upthe temperature.
AC: itis usedtocool the environmenthence topull downthe temperature.
GSM: It’sa communicationtechnology(GLOBALSYSTEMFOR MOBILZATION).Itacts as majorrole in
embeddedsystemsforwirelesscommunication.Tooperate thistype of device we use AT
commands.By usingserial communicationwe cansenddata.These Gsmdoesn’thave anyproof of
identity.
4. CIRCUIT DIAGRAM:
WORKING:
Here sensorshall workto monitorthe temperature.Hence we have mentionedinthe program to
switchon the relay1 if the temperature goesdownbelow 30such that the heatercan be set to on
condition;andtemperature canbe raised.
If 0-5 voltsisthe maximumanalogoutputthenmicrocontrollerwill have 0-255no. of data i.e.,256
logics.
Generallysensorwill produce arange of voltages.We shall checkthe maximumvoltage thatcanbe
producedbythe sensor.Thenthe potentiometershall setthe Vref tothe maximumvoltage.
The analog voltage whichshall be producedbythe sensorshall be convertedintodigitalvaluesby
usingan ADC.Andthose valuesshall be senttothe micro controlleranditacceptsthemand thenit
sendsthe data whichisrequiredtobe sent(itdoesthe actionsthat isto be done).
5. We can visualisethe messageslike temp>40(if tempcrosses40)andtemp<30(of tempdecreases
lessthan30) and message sent(whenthe message tothe GSMissent)inthe LCDaccordingly.
Messagesshall be senttoour phone throughGSM if the tempincrease more than40 or if the temp
decreaseslessthan30.
RESULT:
Whenthe temperature fallsbelow30thenwe shall geta message ascan be visualisedbelow inthe
virtual terminal.Andcanalsobe seenininthe lcd. We can see these thingsinbelow attached
picture
if the tempcrossesabove 40 thenwe shall geta message same asthe textwe can see inthe virtual
terminal inthe belowattachedpicture.
6. CONCLUSION:
There by we can see thatwe can evencontrol the temperature byusingasensor.Actually byusinga
sensorwe can getto knowthe temperature statusatanyinstant.There bywe can take following
measurestocontrol it.Here we have writtenaprogram inwhichwe can sense andautomatically
take the requiredsteps.
PROGRAM:
The program we have writtentocontrol the temperature automatically is
#include<reg51.h>
#define ADCP1
#define lcdP2
sbitre1=P3^4;
sbitre2=P3^5;
sbitRS=P2^0;
sbitEN=P2^1;
sbitrd=P3^7;
sbitwr=P3^6;
sbitintr=P3^3;
voidlcdcmd(unsignedintx);