This document describes an automatic temperature control system with cooling using a microcontroller. It was a project submitted by 5 students to their professor. The system uses an AT89C51 microcontroller, analog to digital converter ADC0804, temperature sensor LM35, Darlington pair ULN2003, relay, and other components. It displays the current temperature and alerts if the temperature goes above 30°C or below 20°C, at which point the cooler is turned on/off to regulate the temperature. The document provides details on the components used and how they interface and function together in the temperature control circuit.
This document describes an automatic temperature control system with cooling using a microcontroller. It was a project submitted by 5 students to their professor. The system uses an AT89C51 microcontroller, analog to digital converter ADC0804, temperature sensor LM35, Darlington pair ULN2003, relay, and other components. It displays the current temperature and alerts if the temperature goes above 30°C or below 20°C, at which point the cooler is turned on/off to regulate the temperature. The document provides details on the components used and how they interface and function together in the temperature control circuit.
Department of Electronics and Communication Engineering and Electronics and Instrumentation Engineering PO!ECT EPOT ON A"TO#ATIC TE#PEAT"E CONTOLLE $ITH COOLING %Y%TE# "%ING #ICOCONTOLLE \ Under the supervision of #r& a'i( )arui %u(mitted )*+ ,-& Arun )era .-& C/andra Pra0as/ 1-& %onal 2umar 3-& a0es/ #is/ra 4-& #u0es/ 2umar ACKNOWLEDGEMENT We would like to express our sincere gratitude towards Mr. Rajib arui! our project guide for his able guidance! co"prehensive suggestions and tre"endous technical support to "ake this project a realit#. We also extend our profound gratitude to $r %anjib %il! Head O !e"art#ent, $C$, for his co"prehensive suggestions and support to co"plete this project successfull#. We would also like to thank the other facult# "e"bers who have helped us whenever we needed an# t#pe of assistance. $ate& '( th Ma#! )'** *. +run era ). %onal ,u"ar -. Mukesh ,u"ar .. /handra 0rakash 1. Rakesh Mishra A)%TACT+5 2his project is designed to control the roo" te"perature auto"aticall# for those te"perature sensitive instru"ents and an# other industrial applications. 2his circuit co"prises of Microcontroller +234%1)! +nalog to $igital /onverter +$/'3'.! 2e"perature sensor 5M-1! *(6) 5/$! $arlington pair 7/1.8! %5*''9! Rela#! u::er! etc. 2his circuit displa#s the current te"perature and an# change in te"perature. 2his circuit concerns over the roo" te"perature! if the te"perature goes over a certain li"it which is fixed here at .1 / then the cooler is set ;< and it will re"ain ;< until the roo" te"perature drops below -1 /. =f the roo" te"perature for an# reason does not drop down and crosses certain higher te"perature! fixed here at 1' C the alarm will be set ON. INDE6 %l&No E7ents Page no& * 5;/,$=+>R+M ;? 0R;@A/2 ) M=/R;/;<2R;55AR - +$/ '3'. . 2AM0AR+2URA %A<%;R 5MB-1 1 *(6) 5/$ ( $+R5=<>2;< 0+=R C UDDAR 8 /=R/U=2 $=+>R+M 3 W;R,=<> /=R/U=2 4 0R;>R+M *' /;</5U%=;< ** RA?AR+</A )loc0 Diagram+5 Relay Darlingt on pair #ICOCONTOLLE AT89%31 + 2he +234%1) is a lowBpower! highBperfor"ance /M;% 3Bbit "icrocontroller with 3 ,b#tes of inBs#ste" progra""able ?lash "e"or#. 2he device is "anufactured using +t"elEs highBdensit# nonvolatile "e"or# technolog# and is co"patible with the industr#Bstandard 3'/1* instruction set and pin out. 2he onBchip ?lash allows the progra" "e"or# to be reprogra""ed inB s#ste" or b# a conventional nonvolatile "e"or# progra""er. # co"bining a versatile 3Bbit /0U with inBs#ste" progra""able ?lash on a "onolithic chip! the +t"el +234%1) is a powerful "icrocontroller which provides a highl#B flexible and costBeffective solution to "an# e"bedded control applications. 2he +234%1) provides the following standard features& 3, b#tes of ?lash! )1( b#tes of R+M! -) =F; lines! Watchdog ti"er! two data pointers! three *(Bbit ti"erFcounters! a sixBvector twoBlevel interrupt architecture! a full duplex serial port! onBchip oscillator! and clock circuitr#. =n addition! the +234%1) is designed with static logic for operation down to :ero freGuenc# and supports two software selectable power saving "odes. 2he =dle Mode stops the /0U while allowing the R+M! ti"erFcounters! serial port! and interrupt s#ste" to continue functioning. 2he 0owerBdown "ode saves the R+M contents but free:es the oscillator! disabling all other chip functions until the next interrupter hardware reset. Pin Description :CC+ 5 %uppl# voltage. GND+ 5 >round. Port ;+5 0ort ' is an 3Bbit open drain bidirectional =F; port. +s an output port! each pin can sink eight 225 inputs. When *s are written to port ' pins! the pins can be used as high i"pedance inputs. 0ort ' can also be configured to be the "ultiplexed lowBorder addressFdata bus during accesses to external progra" and data "e"or#. =n this "ode! 0' has internal pullBups. 0ort ' also receives the code b#tes during ?lash progra""ing and outputs the code b#tes during progra" verification. E<ternal pull5ups are re=uired during program 7erification. Port ,+5 0ort * is an 3Bbit bidirectional =F; port with internal pullBups. 2he 0ort * output buffers can sinkFsource four 225 inputs. When *s are written to 0ort * pins! the# are pulled high b# the internal pullBups and can be used as inputs. +s inputs! 0ort * pins that are externall# being pulled low will source current 7==59 because of the internal pullBups. =n addition! 0*.' and 0*.* can be configured to be the ti"erFcounter ) external count input 70*.'F2)9 and the ti"erFcounter ) trigger input 70*.*F2)AH9! respectivel#! as shown in the following table. 0ort * also receives the lowBorder address b#tes during ?lash progra""ing and verification. Port 1+5 0ort ) is an 3Bbit bidirectional =F; port with internal pullBups. 2he 0ort ) output buffers can sinkFsource four 225 inputs. When *s are written to 0ort ) pins! the# are pulled high b# the internal pullBups and can be used as inputs. +s inputs! 0ort ) pins that are externall# being pulled low will source current 7==59 because of the internal pullBups. 0ort ) e"its the highBorder address b#te during fetches fro" external progra" "e"or# and during accesses to external data "e"or# that uses *(Bbit addresses 7M;IH J$02R9. =n this application! 0ort ) uses strong internal pullBups when e"itting *s. $uring accesses to external data "e"or# that uses 3Bbit addresses 7M;IH J R=9! 0ort ) e"its the contents of the 0) %pecial ?unction Register. 0ort ) also receives the highBorder address bits and so"e control signals during ?lash progra""ing and verification. Port 4+5 0ort - is an 3Bbit bidirectional =F; port with internal pullBups. 2he 0ort - output buffers can sinkFsource four 225 inputs. When *s are written to 0ort - pins! the# are pulled high b# the internal pullBups and can be used as inputs. +s inputs! 0ort - pins that are externall# being pulled low will source current 7==59 because of the pullBups. %T+5 Reset input. + high on this pin for two "achine c#cles while the oscillator is running resets the device. 2his pin drives high for 43 oscillator periods after the Watchdog ti"es out. 2he $=%R2; bit in %?R +UHR 7address 3AK9 can be used to disable this feature. =n the default state of bit $=%R2;! the RA%A2 K=>K out feature is enabled. ALE>POG +ddress 5atch Anable 7+5A9 is an output pulse for latching the low b#te of the address during accesses to external "e"or#. 2his pin is also the progra" pulse input 70R;>9 during ?lash progra""ing. =n nor"al operation! +5A is e"itted at a constant rate of *F( the oscillator freGuenc# and "a# be used for external ti"ing or clocking purposes. <ote! however! that one +5A pulse is skipped during each access to external data "e"or#. =f desired! +5A operation can be disabled b# setting bit ' of %?R location 3AK. With the bit set! +5A is active onl# during a M;IH or M;I/ instruction. ;therwise! the pin is weakl# pulled high. %etting the +5ABdisable bit has no effect if the "icrocontroller is in external execution "ode. P%EN+5 0rogra" %tore Anable 70%A<9 is the read strobe to external progra" "e"or#. When the +234%1) is executing code fro" external progra" "e"or#! 0%A< is activated twice each "achine c#cle! except that two 0%A< activations are skipped during each access to external data "e"or#. EA>:PP+5 Axternal +ccess Anable. A+ "ust be strapped to ><$ in order to enable the device to fetch code fro" external progra" "e"or# locations starting at ''''K up to ????K. <ote! however! that if lock bit * is progra""ed! A+ will be internall# latched on reset. A+ should be strapped to I// for internal progra" executions. 2his pin also receives the *)Bvolt progra""ing enable voltage 7I009 during ?lash 0rogra""ing. 6TAL,+5 =nput to the inverting oscillator a"plifier and input to the internal clock operating circuit. 6TAL1+5 ;utput fro" the inverting oscillator a"plifier. ANALOG TO DIGITAL CON:ETE+5 2he +$/'3'H fa"il# are /M;% 3Bit! successive approxi"ation +F$ converters which use a "odified potentio"etric ladder and are designed to operate with the 3'3'+ control bus via threeBstate outputs. 2hese converters appear to the processor as "e"or# locations or =F; ports! and hence no interfacing logic is reGuired. 2he differential analog voltage input has good co""on "ode Brejection and per"its offsetting the analog :eroBinput voltage value. =n addition! the voltage reference input can be adjusted to allow encoding an# s"aller analog voltage span to the full 3 bits of resolution. Features +5 L 3'/.3 and 3'/3'F31 us /o"patible B <o =nterfacing 5ogic ReGuired L /onversion 2i"e . . . . . . . . . . . . . . . . . . . . . . . . . . M*''Ns L Aas# =nterface to Most Microprocessors L Will ;perate in a %tand +lone Mode L $ifferential +nalog Ioltage =nputs L Works with andgap Ioltage References L 225 /o"patible =nputs and ;utputs L ;nB/hip /lock >enerator L +nalog Ioltage =nput Range 7%ingle O 1I %uppl#9 . . . . . . . . . . . . . . . . . . . . . . 'I to 1I L <o DeroB+djust ReGuired. ADC INTEFACING+ TE#PEAT"E %EN%O L#543 +5 General Description 2he 5M-1 series are precision integratedBcircuit te"perature sensors! whose output voltage is linearl# proportional to the /elsius 7/entigrade9 te"perature. 2he 5M-1 thus has an advantage over linear te"perature sensors calibrated in P ,elvin! as the user is not reGuired to subtract a large constant voltage fro" its output to obtain convenient /entigrade scaling. 2he 5M-1 does not reGuire an# external calibration or tri""ing to provide t#pical accuracies of Q*R.P/ at roo" te"perature and Q-R.P/ over a full S11 to O*1'P/ te"perature range. 5ow cost is assured b# tri""ing and calibration at the wafer level. 2he 5M-1Es low output i"pedance! linear output! and precise inherent calibration "ake interfacing to readout or control circuitr# especiall# eas#. =t can be used with single power supplies! or with plus and "inus supplies. +s it draws onl# (' N+ fro" its suppl#! it has ver# low selfBheating! less than '.*P/ in still air. 2he 5M-1 is rated to operate over a S11P to O*1'P/ te"perature range! while the 5M-1/ is rated for a S.'P to O**'P/ range 7S*'P with i"proved accurac#9. 2he 5M-1 series is available packaged in her"etic 2;B.( transistor packages! while the 5M-1/! 5M-1/+! and 5M-1$ are also available in the plastic 2;B4) transistor package. 2he 5M-1$ is also available in an 3Blead surface "ount s"all outline package and a plastic 2;B))' package. Features *. /alibrated directl# in P /elsius 7/entigrade9 ). 5inear O *'.' "IFP/ scale factor -. '.1P/ accurac# guarantee able 7at O)1P/9 4. Rated for full S11P to O*1'P/ range 1. %uitable for re"ote applications (. 5ow cost due to waferBlevel tri""ing 8. ;perates fro" . to -' volts 3. 5ess than (' N+ current drain 4. 5ow selfBheating! '.'3P/ in still air *'. <onlinearit# onl# Q*R.P/ t#pical 11. 5ow i"pedance output! '.* W for * "+ load LI?"ID CY%TAL DI%PLAY@,ABLCD- +5 FEAT"E% L 1 x 3 dots with cursor L uiltBin controller 7,% ''(( or AGuivalent9 L O 1I power suppl# 7+lso available for O -I9 L *F*( dut# c#cle L F5 to be driven b# pin *! pin ) or pin *1! pin *( or +., 75A$9 L <.I. optional for O -I power suppl# ,AB1 LCD INTEFACING+ DALINGTONPAI +5 2he $arlington pair is basicall# a co"bination of two bipolar transistors connected as shown. =n $arlington pair! two transistors connected together so that the current a"plified b# the first is a"plified further b# the second transistor. 2he overall current gain is eGual to the two individual gains "ultiplied together. $arlington pair current gain! h?A T h?A*U ?A) 7h?A* and h?A) are the gains of the individual transistors9. 2o turn on two transistors 2R* and 2R) at the sa"e ti"e there "ust be '.8I across baseBe"itter junctions of both the transistors. 2o put it si"pl#! *..I is reGuired to turn two transistors on at sa"e ti"e. $arlington pairs are available as co"plete packages in the "arket but #ou can "ake up #our own fro" two transistorsV 2R* can be a low power t#pe! but nor"all# 2R) will need to be high power. 2he "axi"u" collector current = c 7"ax9 for the pair is the sa"e as = c 7"ax9 for 2R). Transistor&B*. /1.8 ). %5*'' )"CCE +5 =t is an electrical u::er.=t reGuires 1v W *) v for operation. CIC"IT DIAGA# +
POGA# + XincludeMreg1*.hY Xdefine ldata 0' Xdefine U02AM0 .1 Xdefine $;W<2AM0 -1 Xdefine +5 1' sbit rs T 0)Z-V sbit rw T 0)Z)V sbit en T 0)Z*V sbit adc[readT 0-Z.V sbit adc[writeT 0-Z-V sbit adc[intrT 0-Z1V sbit outputT0-Z8V sbit alar" T0-Z(V bit loadonT'V void dela#7int ti"e9 \ int i!jV for7iT'ViM*)8ViOO9 \ for7jT'VjMti"eVjOO9 \ ] ] ] void lcd[data7unsigned char a9 \ rsT*V ldataTaV enT*V dela#7*9V enT'V dela#7*9V ] void lcd[c"d7unsigned char a9 \ rsT'V ldataTaV enT*V dela#7*9V enT'V dela#7*9V ] void lcd[string7char Us9 \ while7Us9 \ lcd[data7Us9V sOOV ] ] void lcd[init79 \ lcd[c"d7'x-39V lcd[c"d7'x'e9V lcd[c"d7'x'*9V lcd[c"d7'x'/9V lcd[c"d7'x3'9V ] void "ain79 \ unsigned char valT'!te"pT'V unsigned int xT'V float te"p*V outputT'V alar"T*V rwT'V lcd[init79V lcd[string7^ WA5/;MA_^9V lcd[c"d7'x/'9V lcd[string7^2AM0. MA2AR^9V adc[readT*V adc[writeT*V dela#7*'''9V lcd[c"d7'x'*9V while7*9 \ dela#7*''9V adc[readT*V adc[writeT'V dela#7*9V adc[writeT*V while7adc[intrTT*9V adc[readT'V valT0*V te"p*T77float9valF)119U*''.''V xOT7int9te"p*V dela#7*'9V dela#7*''9V adc[readT*V adc[writeT'V dela#7*9V adc[writeT*V while7adc[intrTT*9V adc[readT'V valT0*V te"p*T77float9valF)119U*''.''V xOT7int9te"p*V dela#7*'9V dela#7*''9V adc[readT*V adc[writeT'V dela#7*9V adc[writeT*V while7adc[intrTT*9V adc[readT'V valT0*V te"p*T77float9valF)119U*''.''V xOT7int9te"p*V te"pTxF-V xT'V if7te"pYTU02AM0 CC loadonTT'9 \ outputT*V loadonT*V ] if7te"pMT$;W<2AM0 CC loadonTT*9 \ outputT'V loadonT'V ] if7te"pYT+59 \ alar"T'V ] lcd[c"d7'x3'9V lcd[string7^2AM0T ^9V lcd[data77te"pF*'9`*'O.39V lcd[data7te"p`*'O.39V lcd[string7^ $A>. /^9V lcd[c"d7'x/'9V if7loadonTT*9 \ lcd[string7^/;;5AR ;< ^9V ] else \ lcd[string7^/;;5AR ;??^9V ] lcd[c"d7'x3'9V ] ] CONCL"%ION + #ain features of t/e circuit are ,- 2he instru"entEs "ain control circuit e"plo#s "icroBcontroller s#ste" and large scale integrated circuit. =t adopts "anB"achine dialogue interface and large screen 5/ character displa# technolog# and is pro"inent in displa#! convenient in operation and hand#. 1- %table and reliable te"perature control s#ste". =t has auto"atic control circuit! 4- %table and reliable air flow s#ste" using fan. ..9/an be i"ple"ented wherever necessar#. F"T"E DE:ELOP#ENT L We will also connect an auto"atic dialer to our /ircuit. When the te"perature will be so "uch i.e. greater than certain te"p. it will auto"aticall# dial a nu"ber. L We will interface a ,e#board so that we can change the range of the te"perature in the field i.e. field progra""able. BIBLEOGRAPHY www.wikepedia.com The 8!1 microcontroller by "a#idi and "a#idi 8!1 t$torial %rom www.8!&.com www.datasheets4$.com