A!TRACT
This project i#3ol3es the desi$# a#d co#str%ctio# of a# i#di3id%al co#trol ho&e a%to&atio# syste& %si#$ a &icroco#troller2 Ho&e a%to&atio# is the a%to&atic or se&i6a%to&atic co#trol a#d &o#itori#$ of ho%sehold applia#ces a#d reside#tial ho%se feat%res like doors! $ate a#d e3e# the wi#dows e3e# &o#itor te&perat%re a#d li$ht2 This project is a de&o#stratio# of how to desi$# a#d "%ild a &%ltip%rpose re&otely co#trolled syste& that ca# switch O77 a#d ON a#y electrical ho%sehold applia#ce (i#cl%di#$ the sec%rity li$ht0! co#trols a relay for the a%to&atic switchi#$ o# a#d off of the applia#ce2 The res%lts of this project show that a &icroco#troller is a 3ery powerf%l de3ice for "%ildi#$ s&art electro#ic de3ices that ca# a%to&atically co#trol electrical applia#ces! with little circ%itry co&ple8ities a#d co&po#e#ts2
A!TRACT
This project i#3ol3es the desi$# a#d co#str%ctio# of a# i#di3id%al co#trol ho&e a%to&atio# syste& %si#$ a &icroco#troller2 Ho&e a%to&atio# is the a%to&atic or se&i6a%to&atic co#trol a#d &o#itori#$ of ho%sehold applia#ces a#d reside#tial ho%se feat%res like doors! $ate a#d e3e# the wi#dows e3e# &o#itor te&perat%re a#d li$ht2 This project is a de&o#stratio# of how to desi$# a#d "%ild a &%ltip%rpose re&otely co#trolled syste& that ca# switch O77 a#d ON a#y electrical ho%sehold applia#ce (i#cl%di#$ the sec%rity li$ht0! co#trols a relay for the a%to&atic switchi#$ o# a#d off of the applia#ce2 The res%lts of this project show that a &icroco#troller is a 3ery powerf%l de3ice for "%ildi#$ s&art electro#ic de3ices that ca# a%to&atically co#trol electrical applia#ces! with little circ%itry co&ple8ities a#d co&po#e#ts2
AC"#$%&E'GEME#T
I e8press &y si#cere $ratit%de a#d i#de"ted#ess to the project $%ide 5rofessor 'erardi#e I&&ac%late Mary! for her i#itiati3e i# this field of research! for her 3al%a"le $%ida#ce! e#co%ra$e&e#t a#d affectio# for the s%ccessf%l co&pletio# of this work2 Her si#cere sy&pathies a#d ki#d attit%de always e#co%ra$ed %s to carry o%t the prese#t work fir&ly2 fir&ly2 9e 9e e8press o%r tha#kf%l#ess tha#kf%l#ess to 4r2 Ar%l&o:hi3ar&a#! 5ro$ra& 5ro$ra& chair of Electro#ics a#d ,o&&%#icatio# E#$i#eeri#$ !;IT U#i3ersity! ;ellore ;ellore for pro3idi#$ %s with "est facilities i# the 4epart&e#t a#d their 3al%a"le $%ida#ce i# o%r project a#d all o%r frie#ds a#d well6wishers who were i#3ol3ed directly or i#directly i# s%ccessf%l co&pletio# of the prese#t work
5lace< ;ellore 4ate<
ANU= 'U5TA ()*+E,*-./0 ()*+E,*-./ 0
C$#TE#T! Chater
Pae
,E>TI7I,AT ,E>TI7I,ATION222222222222222222222 ION22222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222i 2222222222222222i A+ST>A,T222222 A+ST>A,T22222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222ii 222222222222222222ii A,?NO9@E4'EMENT22222222 A,?NO9@E4'EMENT 2222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222222222222222iii 222222222222222iii ,HA5TE> ONE22222222222222222222222222222222222222 ONE2222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222) 2222222222222222) INT>O4U,TION22222222222222222222222222222222 INT>O4U,TION222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222) 2222222222222222222) AUTOMAT AUTOMATION2222222222222222222222222222222222222222222222 ION222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222222222 222222222 O77I,E AUTOMAT AUTOMATION2222222222222222222222222222222222222222222222 ION222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222B 22222222222222222B +UI@4IN' AUTOMAT AUTOMATIONCC22222222222222222222222 IONCC2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222B 2B 5O9E> AUTOMAT AUTOMATION22222222222222222222 ION2222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222D 2222222222222222222D HOME AUTOMAT AUTOMATION222222222222222222222 ION22222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222 22222222222222222222 5>O=E,T AIM222222222222222222222222222222222 AIM22222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222 5>O=E,T O+=E,TI;E22222222222222222222222222222222 O+=E,TI;E2222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222 2222222222222222222222222222222222F 2222222222F 5>O=E,T S,O5E AN4 @IMITATION2222222222222222222222222222222222222222222222222222222222222222F 5>O=E,T =USTI7I,AT =USTI7I,ATION222222222222222222222222222222222222222222222 ION22222222222222222222222222222222222222222222222222222222222222222222 222222222222222222222222222222222222F 2222222222222F >E5O>T @AYOUT2 @AYOUT22222222222222222222222 222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222/ 222/ ,HA5TE> T9O22222222222222222222222222222222222222 T9O2222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222. 22222222222222222. @ITE>AT @ITE>ATU>E >E;IE9222 >E;IE922222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222. 22222222222222222. HISTO>Y O7 HOME AUTOMATION222222222222222222222222222222222222222222222222222222222222222222. HOME AUTOMAT AUTOMATION ION SYSTEMS22222222222222222222222222222222 SYSTEMS2222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222. 22222222222222222. HOME AUTOMATION STAN4A>4S22222222222222222222222222222222222222222222222222222222222222222)* INSTEON STAN4A>4S222222222222222 STAN4A>4S22222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222)2222)EU>O5EAN HOME SYSTEMS (EHS0 5>OTO,O@2222222222222222222222 5>OTO,O@22222222222222222222222222222222222222222222) 2222222222222222222222)B B GI'+EE ST>AN4A4S222222222222222222222222222222 ST>AN4A4S22222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222222222222222)B 222222222222222)B HOME AUTOMATION AUTOMATION IM5@EMENTATION IM5@EMENTATION 5@ATO7O>MCC22 5@ATO7O>MCC22CC22CC) CC22CC)F F ;ON6NEUMANN A>,HITE,TU>E222222222222222 A>,HITE,TU>E22222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222)F 2222222)F HA>;A>4 A>,HITE,TU>E2222222222222222222222222222222222222222222222222222222222222222222222222222222)/ ,HA5TE> TH>EE22222222222222222222222222222222 TH>EE2222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222-* 22222222222222222222-* METHO4O@O'Y 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 2222222222222222222222222222-* 22222-* 5>E@IMINA>Y ,ONSI4E>AT ,ONSI4E>ATIONS2222222222222222222222222222222222222222222 IONS222222222222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 22222222222222222222222222222-* 222222-* SE@E,TION O7 HA>49A>E ,OM5ONENT2222222222222222222222222222222222222222222222222222-* SYSTEM 4ESI'N222222222222222222222222222222222222 4ESI'N22222222222222222222222222222222222222222222222222222222222 2222222222222222222222222222222222222222222222 222222222222222222222222222222222222222-2222222222222222--
ATME'A/ +@O,? 4IA'>AM2222222222222222222222222222222222222222222222222222222222222222222222222222-D ,ENT>A@ 5O>,ESSIN' UNIT (,5U0222222222222222222222222222222222222222222222222222222222222222- >AN4OM A,,ESS MEMO>Y (>AM02222222222222222222222222222222222222222222222222222222222222222- >EA4 ON@Y MEMO>Y (>OM0222222222222222222222222222222222222222222222222222222222222222222222222222-F IN5UT AN4 OUT5O>T 5O>TS (IO0222222222222222222222222222222222222222222222222222222222222222222-F ,HA5TE> 7OU>2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222B 4ESI'N AN4 IM5@EMENTATION22222222222222222222222222222222222222222222222222222222222222222222B ,HA5TE> 7I;E2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222B) ,ON,@USION CCCCCCCCCCCCC222222222222222222222222222222222222222222222222222B)
&I!T $F FIG*RE!
+lock dia$ra& of the project CCCCCCCCCCCCCCCCCCCCC222-At&e$a/ Architect%reCCCCCCCCCCCCCCCCC2CCCCCCC-D At&e$a/ 5i# 4ia$ra&CCCCCCCCCCCCCCCCCCCCCCCC -/ Software fi$%reCCCCCCCCCCCCCCCCC22CCC2CCCCCC22. 5i# 4ia$ra& of Operatio#al A&plifierCCCCCC2CCCCCCCCCCCC* I#te#sity ;s >esisti3ity i# @4> CCCCCCCCCC22CCC22CCCCCC225ower S%pplyC22CCCCCCCCCCCCCCCCCC2CCCCCCCC ,irc%it 4ia$ra& CCCCCCCCCCCCCCCCCCCCC222CCCCCB 5ower S%pply ,irc%itCCCCC222C2CCCCCCCCCCCC2CCCCC22D Te&perat%re se#sorCCCCCCCCCCCCCCCCCCCC22CCCCC @4> circ%it dia$ra&CCCCC2CCCCCCCCCCCCCCCCCCCCF I> circ%it dia$ra&CC222CCCCCCCCCCCCCCCCCCCCCCC22/
C+APTER , I#TR$'*CTI$#
I&a$i#e how helpf%l it will "e to "e a"le to switch o# yo%r air co#ditio#i#$ syste& te# &i#%tes "efore yo% $et ho&e o# a hot after#oo# i# =a#%ary2 How a"o%t ha3i#$ a sec%rity syste& that will detect s&oke! e8cessi3e electrical power %sa$e! "%r$lar atte&pts a#d %#a%thori:ed &o3e&e#ts i# yo%r ho%se a#d alert yo% This is what ho&e a%to&atio# is a"o%t a#d there is #o e#d to its applicatio#2 I# fact! sophisticated ho&e a%to&atio# syste&s are #ow "ei#$ de3eloped that ca# &ai#tai# a# i#3e#tory of ho%sehold ite&s! record their %sa$e thro%$h a# >7I4 (>adio 7re1%e#cy Ide#tificatio#0 ta$! a#d prepare a shoppi#$ list or a%to&atically order replace&e#ts2 Ho&e a%to&atio# has &ade it possi"le to ha3e what is ofte# referred to as a Js&art ho&eJ! a ho&e that ca# detect a#d ide#tify yo%! a%to&atically adj%st the li$hti#$ to yo%r predefi#ed taste! ope# doors a%to&atically! play yo%r fa3o%rite &%sic! water yo%r flowers i# the &or#i#$! switch o# the sec%rity li$hts at #i$ht a#d switch the& off i# the &or#i#$! heat water for "athe a#d tea! strea& to yo% a#ywhere i# the world 3ia the i#ter#et a li3e 3ideo of what is happe#i#$ i# a#d aro%#d yo%r ho%se2 It &akes it possi"le to li#k li$hti#$
)
e#tertai#&e#t! sec%rity! teleco&&%#icatio#s! heati#$! a#d air co#ditio#i#$ i#to o#e ce#trally co#trolled syste&2 This allows yo% to &ake yo%r ho%se a# acti3e part#er i# &a#a$i#$ yo%r "%sy life2 Nowadays! yo% ca# hardly fi#d a ho%se witho%t a ho&e a%to&atio# Syste& which ca# ra#$e fro& the re&ote for the tele3isio#! "%r$lar alar& a#d hi6tech sec%rity $ates! to a# a%to&ated air co#ditio#i#$ syste& that &ai#tai#s the te&perat%re at a predefi#ed 3al%e2
-
A*T$MATI$#
A%to&atio# is the %se of co#trol syste&s a#d i#for&atio# tech#olo$y to co#trol e1%ip&e#t! i#d%strial &achi#ery a#d processes! red%ci#$ the #eed for h%&a# i#ter3e#tio#2 I# the scope of i#d%striali:atio#! a%to&atio# is a step "eyo#d &echa#i:atio#2 Mecha#i:atio# pro3ided h%&a# operators with &achi#ery to assist the& with the physical re1%ire&e#ts of work while a%to&atio# $reatly red%ces the #eed for h%&a# se#sory a#d &e#tal re1%ire&e#ts as well2 A%to&atio# plays a# i#creasi#$ly i&porta#t role i# the $lo"al eco#o&y a#d i# daily e8perie#ce2 E#$i#eers stri3e to co&"i#e a%to&ated de3ices with &athe&atical a#d or$a#i:atio#al tools to create co&ple8 syste&s for a rapidly e8pa#di#$ ra#$e of applicatio#s a#d h%&a# acti3ities2 Ma#y roles for h%&a#s i# i#d%strial processes prese#tly lie "eyo#d the scope of a%to&atio#2 H%&a#6le3el patter# reco$#itio#! la#$%a$e reco$#itio#! a#d la#$%a$e prod%ctio# a"ility are well "eyo#d the capa"ilities of &oder# &echa#ical a#d co&p%ter syste&s2 Tasks re1%iri#$ s%"jecti3e assess&e#t or sy#thesis of co&ple8 se#sory data! s%ch as sce#ts a#d so%#ds! as well as hi$h6le3el tasks s%ch as strate$ic pla##i#$! c%rre#tly re1%ire h%&a# e8pertise2 A%to&atio# has had a #ota"le i&pact i# a wide ra#$e of hi$hly 3isi"le i#d%stries "eyo#d &a#%fact%ri#$2 O#ce %"i1%ito%s telepho#e operators ha3e "ee# replaced lar$ely "y a%to&ated telepho#e switch"oards a#d
a#sweri#$ &achi#es 2 Medical processes s%ch as pri&ary scree#i#$ i# electrocardio$raph or >adio$raphy a#d la"oratory a#alysis of h%&a# $e#es! "lood plas&as! cells! a#d tiss%es are carried o%t at &%ch $reater speed a#d acc%racy "y a%to&ated syste&s2 A%to&ated teller &achi#es ha3e red%ced the #eed for "a#k 3isits to o"tai# cash a#d carry o%t tra#sactio#s2 I# $e#eral! a%to&atio# has "ee# respo#si"le for the shift i# the world eco#o&y fro& a$raria# to i#d%strial i# the ).th ce#t%ry a#d fro& i#d%strial to ser3ices i# the -*th ce#t%ry2
$FFICE A*T$MATI$#
Office a%to&atio# refers to the 3aried co&p%ter &achi#ery a#d software %sed to di$itally create! collect! store! &a#ip%late! a#d relay office i#for&atio# #eeded for acco&plishi#$ "asic tasks a#d $oals2 >aw data stora$e! electro#ic tra#sfer! a#d the &a#a$e&e#t of electro#ic "%si#ess i#for&atio# co&prise the "asic acti3ities of a# office a%to&atio# syste&! office a%to&atio# helps i# opti&i:i#$ or a%to&ati#$ e8isti#$ office proced%res2
*I&'I#G A*T$MATI$#
+%ildi#$ a%to&atio# descri"es the f%#ctio#ality pro3ided "y the co#trol of a "%ildi#$2 The co#trol syste& is a co&p%teri:ed! i#telli$e#t #etwork of electro#ic de3ices! desi$#ed to &o#itor a#d co#trol the &echa#ical a#d li$hti#$ syste&s of a "%ildi#$2 A "%ildi#$ a%to&atio# syste& is a# e8a&ple of a distri"%ted co#trol syste&2
B
The "%ildi#$ a%to&atio# syste& (+AS0 core f%#ctio#ality keeps the "%ildi#$ cli&ate withi# a specific ra#$e! pro3ides li$hti#$ "ased o# a# occ%pa#cy sched%le! a#d &o#itors syste& perfor&a#ce a#d de3ice fail%res a#d pro3ides e&ail a#dor te8t #otificatio#s to "%ildi#$ e#$i#eeri#$ staff2 The +AS f%#ctio#ality red%ces "%ildi#$ e#er$y a#d &ai#te#a#ce costs whe# co&pared to a #o#6 co#trolled "%ildi#$2
P$%ER A*T$MATI$#
5ower a%to&atio# is the a%to&ated co#trol a#d &o#itori#$ of power pla#ts! s%"statio#s a#d tra#sfor&ers for effecti3e#ess! efficie#cy a#d fa%lt detectio#2 It has &ade it possi"le to ha3e a relia"le &%#icipal or #atio#al electricity syste&! which ofte# co&prises re&ote a#d hard6to6reach tra#sfor&ers a#d power s%"6syste& %#its2 It &akes it possi"le to &o#itor differe#t power %#its! relay their stat%s a#d health i#for&atio#! a#d e3e# carry o%t fa%lt detectio# a#d correctio# witho%t h%&a# i#terfere#ce2 E8a&ple of power a%to&atio# syste& is the S%per3isory ,o#trol a#d 4ata Ac1%isitio# (S,A4A0 syste&2
D
+$ME A*T$MATI$#
Ho&e a%to&atio# &ay desi$#ate a# e&er$i#$ practice of i#creased a%to&atio# of ho%sehold applia#ces a#d feat%res i# reside#tial dwelli#$s! partic%larly thro%$h electro#ic &ea#s that allow for thi#$s i&practica"le! o3erly e8pe#si3e or si&ply #ot possi"le i# rece#t decades2 Ho&e a%to&atio# i#cl%des all that a "%ildi#$ a%to&atio# pro3ides like cli&ate co#trols! door a#d wi#dow co#trols! a#d i# additio# co#trol of &%lti&edia ho&e theatres! pet feedi#$! pla#t wateri#$ a#d so o#2 +%t there e8ists a differe#ce i# that ho&e a%to&atio# e&phasi:es &ore o# co&forts thro%$h er$o#o&ics a#d ease of operatio#2
PR$-ECT AIM
The ai& of this project is to desi$# a#d co#str%ct a ho&e a%to&atio# Bsyste& that will a%to&atically switch o# or off a#y ho%sehold applia#ce co##ected to it! %si#$ a &icroco#troller2
PR$-ECT $-ECTI.E
The o"jecti3e of this project is to i&ple&e#t a low cost! relia"le a#d scala"le ho&e a%to&atio# syste& that ca# "e %sed to re&otely switch o# or off a#y ho%sehold applia#ce! %si#$ a &icroco#troller to achie3e hardware si&plicity2
PR$-ECT !C$PE A#' &IMITATI$#
This project work is co&plete o# its ow# i# a%to&atically switchi#$ o# a#d off of a#y electrical applia#ce #ot li&ited to ho%sehold applia#ces! a#d se#ds a feed"ack &essa$e i#dicati#$ the #ew prese#t state of the applia#ce2 It does #ot i&ple&e#t co#trol of &%ltiple applia#ces or a%to&atic detectio# of fa%lts i# the co#trolled applia#ce2
PR$-ECT -*!TIFICATI$#
This project is of co#tri"%tory k#owled$e to the de3elop&e#t a#d i&ple&e#tatio# of ho&e a%to&atio# syste&s i# Ni$eria %si#$ low cost! locally a3aila"le co&po#e#ts like &icroco#troller
F
REP$RT &A$*T
The e#tire project is co&posed of fi3e chapters! each co3eri#$ a sectio# of the work as s%&&ari:ed "elow< K ,hapter o#e $i3es a# i#trod%ctio# to a%to&atio# as a whole a#d the differe#t types of a%to&atio#2 K ,hapter two co3ers a# e8te#si3e literat%re re3iew of pre3io%s works o# ho&e a%to&atio# syste&s! the differe#t esta"lished sta#dards a#d protocols! a#d the platfor&s o3er which ho&e a%to&atio# ca# "e i&ple&e#ted2 K ,hapter three hi$hli$hts the project ðodolo$y! $i3i#$ reaso#s for choice of specific platfor&s a#d co&po#e#ts! a#d also! co&prehe#si3e details o# "oth hardware co&po#e#ts a#d co&&%#icatio# ser3ices %sed2 K ,hapter fo%r is o# the project desi$# a#d i&ple&e#tatio# with clear practical details of the project desi$#! co#str%ctio#! testi#$! &icroco#troller codi#$ a#d de"%$$i#$2 Special e&phasis is also &ade o# the fle8i"ility a#d scala"ility of the project work with real life ill%stratio#2 K ,hapter fi3e is o# the co#cl%sio# "ased o# the project work with e&phasis o# the relia"ility! &ai#tai#a"ility a#d fle8i"ility of the desi$#2
/
C+APTER 0 &ITERAT*RE RE.IE% +I!T$R $F +$ME A*T$MATI$#
Ho&e a%to&atio# has "ee# aro%#d si#ce the world war ) ().)B0! i# fact! the tele3isio# re&ote (a si&ple ho&e a%to&atio# syste&0 was pate#ted i# )/. (9ikipedia! -**.02 Si#ce the# differe#t ho&e a%to&atio# syste&s ha3e e3ol3ed with a sharp rise after the seco#d 9orld 9ar2 ItJs $rowth has "ee# thro%$h 3ario%s i#for&al research a#d desi$#s "y tech#olo$y e#th%siasts who wa#t a "etter way of $etti#$ thi#$s do#e at ho&e witho%t &%ch effort o# their part2 The syste&s e3ol3ed fro& o#e that ca# a%to&atically do ro%ti#e chores like switch o# a#d off sec%rity li$hts! to &ore sophisticated o#es that ca# adj%st li$hti#$! p%t the tele3isio# cha##el to fa3orite statio# a#d co#trol doors2
+$ME A*T$MATI$# !!TEM!
Ho&e a%to&atio# syste&s &ay desi$#ate electro#ic syste&s i# ho&es a#d reside#tial "%ildi#$s that &ake possi"le the a%to&atio# of ho%sehold applia#ces2 The #ew strea& of ho&e a%to&atio# syste&s has de3eloped i#to a 3ast o#e a#d the c%rre#t &arket is flooded with a fl%rry of ho&e a%to&atio# syste&s a#d de3ice &a#%fact%rers2 The types of ho&e a%to&atio# syste&s "ased o# their co#trol syste&s Are<
.
I#'I.I'*A& C$#TR$& !!TEM!
These types were the first to hit the &arket i# the early years! here each de3ice like the heater or the air co#ditio#er will ha3e a# i#depe#de#t co#trol dedicated to it
'I!TRI*TE' C$#TR$& !!TEM!
The &ai# feat%re of these type of syste&s is e&er$e#cy sh%t6dow#2 9ith this syste& yo% ca# preset or cha#$e the co#trol para&eters of se3eral si&ilar de3ices! for e8a&ple! the ther&ostat of se3eral air co#ditio#ers a#d their ONO77 ti&i#$s2
CE#TRA& C$#TR$& !!TEM!
These are co&p%teri:ed syste&s pro$ra&&ed to ha#dle all f%#ctio#s of &%ltiple %tilities like air co#ditio#i#$ syste&! ho&e e#tertai#&e#ts! doors! wi#dows! refri$erators a#d cooki#$ syste&s! all at the sa&e ti&e re$ardless of whether yo% are at ho&e or away2 Yo% ca# co##ect to the co#trol syste& thro%$h telepho#e or i#ter#et fro& a#ywhere i# the world2 The types of ho&e a%to&atio# syste&s "ased o# the carrier &ode are<
,1 P$%ER &I#E CARRIER !!TEM!
The least e8pe#si3e type of ho&e a%to&atio# syste& operates o3er the ho&eJs e8isti#$ wiri#$! or power li#e carrier2 These ca# ra#$e fro& L)*6 "ased la&p ti&ers! to &ore sophisticated syste&s that re1%ire i#stallatio# "y a trai#ed professio#al2
)*
%IRE&E!! !!TEM!
Also a3aila"le are wireless ho&e a%to&atio# syste&s that %tili:e radiofre1%e#cy tech#olo$y2 They are ofte# %sed to operate li$hts! so&eti&es i# co#j%#ctio# with a hardwired li$hti#$ co#trol syste&2 9ired! or hardwired ho&e co#trol syste&s are the &ost relia"le a#d e8pe#si3e2 These syste&s ca# operate o3er hi$h6$rade co&&%#icatio#s ca"le! or their ow# proprietary "%s ca"le2 That is why it is "est to pla# for the& whe# a ho%se is "ei#$ co#str%cted2 Hardwired syste&s ca# perfor& &ore tasks at a ti&e a#d do the& 1%ickly a#d relia"ly! &aki#$ the& ideal for lar$er ho&es2 They ca# also i#te$rate &ore syste&s i# the ho&e! effecti3ely tyi#$ to$ether i#door a#d o%tdoor li$hti#$! a%dio a#d 3ideo e1%ip&e#t! sec%rity syste&! e3e# the heati#$ a#d cooli#$ syste& i#to o#e co#trol packa$e that will "e easy a#d i#t%iti3e to operate2
I#TER#ET PR$T$C$& C$#TR$& !!TEM!
I#ter#et 5rotocol (I50 co#trol a%to&atio# syste& %ses the i#ter#et! $i3es each de3ice %#der its co#trol a# I#ter#et 5rotocol address! a#d creates a local area #etwork (@AN0 i# the ho&e2 He#ce! the ho&e ca# "e i#teracted with o3er the i#ter#et with possi"ility of li3e 3ideo strea&i#$ a#d real6ti&e co#trol
))
+$ME A*T$MATI$# !TA#'AR'!
There are &a#y esta"lished i#d%stry sta#dards for ho&e a%to&atio# syste&s a#d are i&ple&e#ted o3er the 3ario%s carrier &odes ra#$i#$ fro& power li#e to wireless2 The pop%lar a#d &ajor sta#dards are INSTEON! E%ropea# Ho&e Syste&s (EHS0! Gi$+ee! ?NL! G69a3e! L)*! @o# 9orks! ONE6NET a#d U#i3ersal 5ower li#e +%s (U5+02
I#!TE$# !TRA#'AR'
INSTEON sta#dard is a d%al6"a#d &esh topolo$y e&ployi#$ ac6 5ower li#es a#d a radio fre1%e#cy (>70 protocol to co&&%#icate with a#d a%to&ate ho&e electro#ic de3ices a#d applia#ces! which #or&ally work i#depe#de#tly2 It is a ho&e a%to&atio# #etworki#$ tech#olo$y i#3e#ted "y S&art@a"s I#c2 INSTEON was de3eloped! "ased o# the L)* &odel! for co#trol a#d se#si#$ applicatio#s i# the ho&e2 INSTEON is desi$#ed to e#a"le si&ple de3ices to "e #etworked2
)-
To$ether %si#$ the powerli#e a#dor radio fre1%e#cy (>702 All INSTEON de3ices are peers! &ea#i#$ each de3ice ca# tra#s&it! recei3e! a#d repeat a#y &essa$e of the INSTEON protocol! witho%t re1%iri#$ a &aster co#troller or co&ple8 ro%ti#$ software2 INSTEON is #ot o#ly a# effecti3e syste& for co##ecti#$ li$hti#$ switches a#d loads witho%t e8tra wiri#$! "%t it also for&s the "asis for a &ore sophisticated ho&e a%to&atio# #etwork2 The followi#$ are the possi"le applicatio#s of INSTEON< K Sce#e a#d re&ote co#trol li$hti#$ Sec%rity alar& i#terfaces a#d se#sors! K Ho&e se#sors (e2$2 water! h%&idity! te&perat%re0! K Access co#trol (e2$2 door locks0! K Heati#$! 3e#tilati#$ a#d air cooli#$ (H;A,0 co#trol! K A%dio63ideo co#trol! a#d K Applia#ce &a#a$e&e#t2
)
E*R$PEA# +$ME !!TEM! (E+!) PR$T$C$&!
The E%ropea# ho&e syste&s (EHS0 protocol was ai&ed at ho&e applia#ces co#trol a#d co&&%#icatio# %si#$ power li#e co&&%#icatio# (5@,02 4e3eloped "y EHSA (E%ropea# Ho&e Syste&s Associatio#0 it was &er$ed with two ; 9
> 'Bother protocols to for&
the ?NL protocol! which co&plies with ,ENE@E, #or& EN D**.* sta#dard a#d had a cha#ce to "e a "asis for the first ope# sta#dard for ho&e a#d "%ildi#$ co#trol (9ikipedia! -**.02 The areas of applicatio# of EHS are< K Heati#$! 3e#tilati#$ a#d air cooli#$ (H;A,0 co#trol! K Sce#e a#d re&ote co#trol li$hti#$! a#d K Applia#ce &a#a$e&e#t2
2IGEE !TRA#'AR'!
Gi$+ee is a specificatio# for a s%ite of hi$h le3el co&&%#icatio# protocols %si#$ s&all! low6power di$ital radios "ased o# the IEEE /*-2)D2B 6 -** sta#dard for wireless perso#al area #etworks (95ANs0! s%ch as wireless headpho#es co##ecti#$ with cell pho#es 3ia short6ra#$e radio2 The tech#olo$y defi#ed "y the Gi$+ee specificatio# is i#te#ded to "e si&pler a#d less e8pe#si3e tha# other 95ANs s%ch as +l%etooth2 Gi$+ee is tar$eted at radio fre1%e#cy (>70 applicatio#s that re1%ire a low data rate! lo#$ "attery life! a#d sec%re #etworki#$ (9ikipedia! -**.02 Gi$+ee is a low6cost! low6power! wireless &esh #etworki#$ sta#dard2
)B
The low cost allows the tech#olo$y to "e widely deployed i# wireless co#trol a#d &o#itori#$ applicatio#s! the low power6%sa$e allows lo#$er life with s&aller "atteries! a#d the &esh #etworki#$ pro3ides hi$h relia"ility a#d lar$er ra#$e2 Gi$+ee operates i# the i#d%strial! scie#tific a#d &edical (ISM0 radio "a#ds // MH: i# E%rope! .)D MH: i# the USA a#d A%stralia! a#d -2B 'H: i# &ost j%risdictio#s worldwide2 Gi$+ee chip 3e#dors typically sell i#te$rated radios a#d &icroco#trollers with "etwee# *? a#d )-/? flash &e&ory! s%ch as the 7reescale M,)-)! the E&"erEM-D* a#d the Te8as I#str%&e#ts ,,-B*2 >adios are also a3aila"le as sta#d6alo#e to "e %sed with a#y processor or &icroco#troller2 'e#erally! he chip 3e#dors also offer the Gi$+ee software stack! altho%$h i#depe#de#t o#es are also a3aila"le2 The Gi$+ee Allia#ce is a $ro%p of co&pa#ies that &ai#tai# a#d p%"lish the Gi$+ee sta#dard2
)D
K Ho&e E#tertai#&e#t a#d ,o#trol S&art li$hti#$! ad3a#ced te&perat%re co#trol! safety a#d sec%rity! &o3ies a#d &%sic! K Ho&e Aware#ess 9ater se#sors! power se#sors! s&oke a#d fire detectors! s&art applia#ces a#d access se#sors! K Mo"ile Ser3ices &6pay&e#t! &6&o#itori#$ a#d co#trol! sec%rity a#d access co#trol! &6healthcare a#d tele6assist! K ,o&&ercial +%ildi#$ E#er$y &o#itori#$! H;A,! li$hti#$! access co#trol! a#d K I#d%strial 5la#t 5rocess co#trol! asset &a#a$e&e#t! e#3iro#&e#tal &a#a$e&e#t! e#er$y &a#a$e&e#t! i#d%strial de3ice co#trol2
)
+$ME A*T$MATI$# IMP&EME#TATI$# P&ATF$RM!
Ho&e a%to&atio# ca# "e i&ple&e#ted o3er a #%&"er of platfor&s #a&ely! &icroco#troller! power s%pply ! i#frared circ%it! li$ht depe#de#t resistor! Te&perat%re se#sor2 The &icroco#troller has two $e#eral architect%re types that defi#e its &ode of operatio# a#d desi$#2
.$#3#E*MA## ARC+ITECT*RE
This architect%re has a si#$le! co&&o# &e&ory space where "oth 5ro$ra& i#str%ctio#s a#d data are stored2 There is a si#$le data "%s which fetches "oth i#str%ctio#s a#d data2 A#d each ti&e the ,5U fetches a pro$ra& i#str%ctio# it &ay ha3e to perfor& o#e or &ore readwrite operatio#s to data &e&ory space2 It &%st wait %#til these s%"se1%e#t operatio#s are co&plete "efore it ca# fetch a#d decode the #e8t pro$ra& i#str%ctio#2 The ad3a#ta$e to this architect%re lies i# its si&plicity a#d eco#o&y2 O# so&e ;o# Ne%&a## &achi#es the pro$ra& ca# read fro& a#d write to ,5U re$isters! i#cl%di#$ the pro$ra& co%#ter2 This ca# "e da#$ero%s as yo% ca# poi#t the processor to &e&ory "locks o%tside pro$ra& &e&ory space a#d careless processor &a#ip%latio# ca# ca%se errors which re1%ire a hard reset2
)F
+AR.AR' ARC+ITECT*RE
This Architect%re i&ple&e#ts separate &e&ory areas for pro$ra& i#str%ctio#s a#d data2 There are two or &ore i#ter#al data "%ses which allow si&%lta#eo%s access to "oth i#str%ctio#s a#d data2 The ,5U fetches i#str%ctio#s o# the pro$ra& &e&ory "%s2 If the fetched i#str%ctio# re1%ires a# operatio# o# data &e&ory! the ,5U ca# fetch the #e8t pro$ra& i#str%ctio# while it %ses the data "%s for its data operatio#2 This speeds %p e8ec%tio# ti&e at the cost of &ore hardware co&ple8ity2 Most &oder# &icroco#trollers ha3e the har3ard architect%re2
)/
P$%ER !*PP&
5ower s%pply syste& act%ally ,o#3ert . 3olt to co#sta#t D 3olt2 It is "asically apply o# the F/*D I, is a pi# 3olta$e re$%lator2 The I#p%t 3olta$e fro& F3olt to -D3olt2 Usi#$ - capacitor for fast char$i#$ a#d dischar$i#$2
I#FRARE' !E#!$R
It act%ally detect the o"ject which will co&e across it2 It is a pi# &od%le co##ected to D3olt! $ro%#d ! a#d o%tp%t pi#! we %se this i# &a#y applicatio# "%r$lar alar& ! o"ject detectio# a#d itc
TEMPERAT*RE !E#!$R
it is also a pi# de3ice &od%le operated "etwee# -2F 3olt to D2D 3olt2 7irst pi# is co##ected to D 3olt a#d seco#d to $ro%#d a#d third o#e to O%tp%t data! third o#e pi# will $i3e the di$ital 3al%e2
).
C+APTER 4
MET+$'$&$G
I# desi$#i#$ a ho&e a%to&atio# syste&! o#e or &ore s%ita"le platfor&s are %sed i# order to "%ild a relia"le a#d fle8i"le syste& that ca# "e easily operated a#d adapted for a #ew ho%sehold applia#ce2 Therefore! for the p%rpose of this project so&e specific deli"erate choices were &ade o# the type of platfor&s! hardware co&po#e#ts a#d &ode of operatio# of the ho&e a%to&atio# syste&2
PRE&IMI#AR C$#!I'ERATI$#!
+efore the act%al desi$# of the project work! specific deli"erate choices i# selectio# of appropriate i&ple&e#tatio# platfor&s a#d hardware co&po#e#ts were &ade2 5riority was $i3e# to low cost a3aila"ility! relia"ility! fle8i"ility a#d si&plicity i# all these selectio#s2
!E&ECTI$# $F +AR'%ARE C$MP$#E#T!
There are &a#y platfor&s o3er which a ho&e a%to&atio# syste& ca# "e I&ple&e#ted2 Hardware are followi#$ as6 F/*D I, ! @eds! I> led!photodiode!capacitors!D/ opa&p operatio#al a&plifier!ATME'A/ &icroco#troller "y ATME@!@4>(li$ht depe#de#t resistor0!te&perat%re se#sor (@MD0!i#frared &od%le! 5ower s%pply I %se i# o%r project work 2
-*
!!TEM 'E!IG#
Her instead of using 8051 we are using ATMEL’s atmega8 microcontroller.
here Instead of sing rela! de"ice we are using led for #rotot!#ing. -) ATMEGA5 MICR$C$#TR$&&ER
/6"it At&el with /?+ytes I#6Syste&
5ro$ra&&a"le 7lash
The At&elPA;>P core co&"i#es a rich i#str%ctio# set with - $e#eral p%rpose worki#$ re$isters2 All the - re$isters are directly co##ected to the Arith&etic @o$ic U#it (A@U0! allowi#$ two i#depe#de#t re$isters to "e accessed i# o#e si#$le i#str%ctio# e8ec%ted i# o#e clock cycle2 The res%lti#$ architect%re is &ore code efficie#t while achie3i#$ thro%$hp%ts %p to te# ti&es faster tha# co#3e#tio#al ,IS, &icroco#trollers 2The AT&e$a/ pro3ides the followi#$ feat%res< / ?"ytes of I#6 Syste& 5ro$ra&&a"le 7lash with >ead69hile69rite capa"ilities! D)- "ytes of EE5>OM! ) ?"yte of S>AM! - $e#eral p%rpose IO li#es! - $e#eral p%rpose worki#$ re$isters! three fle8i"le Ti&er,o%#ters with co&pare &odes! i#ter#al a#d e8ter#al i#terr%pts! a serial pro$ra&&a"le USA>T! a "yte orie#ted Two wire Serial I#terface! a 6cha##el A4, (ei$ht cha##els i# TQ75 a#d Q7NM@7 packa$es0 with )*6"it acc%racy! a pro$ra&&a"le 9atchdo$ Ti&er with I#ter#al Oscillator! a# S5I serial port! a#d fi3e software selecta"le power sa3i#$ &odes2 The Idle &ode stops the ,5U while allowi#$ the S>AM! Ti&er,o%#ters! S5I port! a#d i#terr%pt s yste& to co#ti#%e f%#ctio#i#$2 The 5ower dow# &ode sa3es the re$ister co#te#ts "%t free:es the Oscillator! disa"li#$ all other chip f%#ctio#s %#til the #e8t I#terr%pt or Hardware >eset2 I# 5ower6sa3e &ode! the asy#chro#o%s ti&er co#ti#%es to r%#! allowi#$ the %ser to &ai#tai# a ti&er "ase while the rest of the de3ice is sleepi#$2 The A4, Noise >ed%ctio# &ode stops the ,5U a#d all IO &od%les e8cept asy#chro#o%s ti&er a#d A4,! to &i#i&i:e switchi#$ #oise d%ri#$ A4, co#3ersio#s2 I# Sta#d"y &ode! the
--
The A4, Noise >ed%ctio# &ode stops the ,5U a#d all IO &od%les e8cept asy#chro#o%s ti&er a#d A4,! to &i#i&i:e switchi#$ #oise d%ri#$ A4, co#3ersio#s2 I# Sta#d"y &ode! the crystalreso#ator Oscillator is r%##i#$ while the rest of the de3ice is sleepi#$2 This allows 3ery fast start6%p co&"i#ed with low6power co#s%&ptio# 2The de3ice is &a#%fact%red %si#$ At&el’s hi$h de#sity #o#63olatile &e&ory tech#olo$y2 The 7lash 5ro$ra& &e&ory ca# "e repro$ra&&ed I#6Syste& thro%$h a# S5I serial i#terface! "y a co#3e#tio#al #o#63olatile &e&ory pro$ra&&er! or "y a# O#6chip "oot pro$ra& r%##i#$ o# the A;> core2 The "oot pro$ra& ca# %se a#y i#terface to dow#load the applicatio# pro$ra& i# the Applicatio# 7lash &e&ory2 Software i# the +oot 7lash Sectio# will co#ti#%e to r%# while the Applicatio# 7lash Sectio# is %pdated! pro3idi#$ tr%e >ead69hile69rite operatio#2 +y co&"i#i#$ a# /6 "it >IS, ,5U with I#6Syste& Self65ro$ra&&a"le 7lash o# a &o#olithic chip! the At&el AT&e$a/ is a powerf%l &icroco#troller that pro3ides a hi$hly6fle8i"le a#d cost6effecti3e sol%tio# to &a#y e&"edded co#trol applicatio#s2 The AT&e$a/ is s%pported with a f%ll s%ite of pro$ra& a#d syste& de3elop&e#t tools! i#cl%di#$ , co&pilers! &acro asse&"lers! pro$ra& si&%lators! a#d e3al%atio# kits2
-
-B
CE#TRA& PR$CE!!I#G *#IT (CP*)
The ,5U is respo#si"le for all the co&p%ti#$! it fetches! decodes a#d e8ec%tes pro$ra& i#str%ctio#s a#d directs the flow of data to a#d fro& &e&ory2 It perfor&s the calc%latio#s re1%ired "y pro$ra& i#str%ctio#s a#d places the res%lts of these calc%latio#s! if re1%ired! i#to &e&ory space2 Most ,5Us are sy#chro#o%s! &ea#i#$ that they depe#d o# the cycles of a processor clock! this clock $e#erates a hi$h6fre1%e#cy s1%are wa3e %s%ally dri3e# "y a crystal! a >, (resistor capacitor0 or a# e8ter#al so%rce2 The clock is so&eti&es referred to as a# oscillator2 The clock speed! or oscillatio# rate! is &eas%red i# &e$ahert: (MH:0 which represe#ts o#e &illio# cyclesseco#d2
RA#'$M ACCE!! MEM$R (RAM)
The >AM! ra#do& access &e&ory! is %sed to write a#d read data 3al%es as a pro$ra& r%#s2 >AM is 3olatile &ea#i#$ that if the power s%pply to the &icroco#troller is re&o3ed! its co#te#ts are lost2 All 3aria"les %sed i# a pro$ra& are allocated fro& the >AM2 The ti&e to retrie3e i#for&atio# fro& >AM does #ot depe#d %po# the locatio# of the i#for&atio# "eca%se >AM is #ot se1%e#tial! he#ce the ter& ra#do& access2 Most s&all 5I, &icroco#trollers pro3ide 3ery little >AM which forces yo% to write applicatio#s that %se >AM wisely2 Ma#ip%lati#$ lar$e data str%ct%res a#d %si#$ poi#ters! re6e#tra#t or rec%rsi3e f%#ctio#s %se lar$e
-D
a&o%#ts of >AM a#d are tech#i1%es which are $e#erally a3oided o# &icroco#trollers2
REA' $#& MEM$R (R$M)
The >OM! read o#ly &e&ory! is #o#63olatile &e&ory %sed for pro$ra& i#for&atio# a#d per&a#e#t data2 The &icroco#troller %ses >OM &e&ory space to store pro$ra& i#str%ctio#s it will e8ec%te whe# it is started or reset2 5ro$ra& i#str%ctio#s &%st "esa3ed i# #o#63olatile &e&ory so that they are #ot affected "y loss of power! the &icroco#troller %s%ally ca##ot write data to pro$ra& &e&ory space2
I#P*T A#' $*TP*T P$RT (I/$)
9itho%t so&e &ea#s of $etti#$ i#for&atio# a#d si$#als i# a#d o%t! the &icroco#troller will ha3e little or #o %se2 He#ce! the i#p%t a#d o%tp%t ports are %sed to pass data i# a#d o%t of the &icroco#troller i# a co#trolled &a##er! ofte# accordi#$ to a sta#dard protocol2 The 5I, &icroco#troller ports are of two types #a&ely! serial a#d parallel ports2 They ca# operate i# two &ai# &odes #a&ely! sy#chro#o%s a#d asy#chro#o%s &odes2 The parallel IO ports re1%ire a data li#e for each "it i# a "yte! while the serial IO %ses a si#$le data li#e for all the "its i# the data strea& "y tra#sferri#$ the "its i# se1%e#ce2 The sy#chro#o%s &ode i#3ol3es sy#chro#i:i#$ the data tra#sfer with a clock while the asy#chro#o%s &ode does #ot2 5I, &icroco#trollers &ost ofte# ha3e parallel IO capa"ility "%ilt i# a#d the serial IO as a peripheral feat%re2
-
PI# 'IAGRAM
/ cha##el i&plies that there are / A4, pi#s
)* "it resol%tio# i&plies that there are -R)* )*-B steps
/? +ytes I#Syste&
5ro$ra&&a"le 7lash
-F
ATMEGA5 PR$GRAMMI#G
I %se
)2 A3r st%dio B2* -2 A3r d%de for he8 file %pload i# &icroco#troller 2 5ro$ra&&i#$ is do#e i# si&ple c la#$%a$e2
-/
&M465 $PAMP C+IP
These de3ices co#sist of two i#depe#de#t! hi$h6$ai# fre1%e#cy6co&pe#sated operatio#al a&plifiers desi$#ed to operate fro& a si#$le s%pply o3er a wide ra#$e of 3olta$es2 Operatio# fro& split s%pplies also is possi"le if the differe#ce "etwee# the two s%pplies is ; to - ; ( ; to - ; for the @M-.*B0! a#d ; ,, is at least )2D ; &ore positi3e tha# the i#p%t co&&o#6 &ode 3olta$e2 The low s%pply6c%rre#t drai# is i#depe#de#t of the &a$#it%de of the s%pply 3olta$e2 Applicatio#s i#cl%de tra#sd%cer a&plifiers! dc a&plificatio# "locks! a#d all the co#3e#tio#al operatio#al a&plifier circ%its that #ow ca# "e i&ple&e#ted &ore easily i# si#$le6s%pply63olta$e syste&s2 7or e8a&ple! these de3ices ca# "e operated directly fro& the sta#dard D6; s%pply %sed i# di$ital syste&s a#d easily ca# pro3ide the re1%ired i#terface electro#ics witho%t additio#al D6; s%pplies2
-.
TEMPERAT*RE !E#!$R
The @MD is a# i#te$rated circ%it se#sor that ca# "e %sed to &eas%re te&perat%re with a# electrical o%tp%t proportio#al to the te&perat%re (i# o,0 •
It has a# o%tp%t 3olta$e that is proportio#al to the ,elsi%s te&perat%re2
•
The scale factor is 2*);o,
The @MD does #ot re1%ire a#y e8ter#al cali"ratio# or tri&&i#$ a#d &ai#tai#s a# acc%racy of 6*2B o, at roo& te&perat%re a#d 6 *2/ o, o3er a ra#$e of * o, to )** o,2 •
A#other i&porta#t characteristic of the @MD4G is that it draws o#ly * &icro a&ps fro& its s%pply a#d possesses a low self6heati#$ capa"ility2 The se#sor self6heati#$ ca%ses less tha# *2) o, te&perat%re rise i# still air2
&IG+T 'EPE#'E#T RE!I!T$R
@i$ht depe#de#t resistor (@4>0 9he#e3er the li$ht falls o# the @4>! the >esisti3ity of the @4> "eco&e low2 )2@i$ht i#te#sity i#creases resisti3ity 4ecreases a#d 3ice63ersa -2O#e e#d of the @4> is co##ected with A4,* pi# #o2 - a#d a#other to the $ro%#d2 A#d o#e ) ? oh& >) fro& i#p%t @4> pi# side to $ro%#d2
*
I#TE#!IT .s RE!I!TI.IT I# &'R
) P$%ER !*PP&
5ower s%pply syste& act%ally ,o#3ert . 3olt to co#sta#t D 3olt2 It is "asically apply o# the F/*D I, is a pi# 3olta$e re$%lator2 The I#p%t 3olta$e fro& F3olt to -D3olt2 Usi#$ - capacitor for fast char$i#$ a#d dischar$i#$2
-
C+APTER 7 'E!IG# A#' IMP&EME#TATI$# The desi$# of this project i#3ol3ed co%pli#$ se3eral hardware co&po#e#ts2 CIRC*IT 'IAGRAM
P$%ER !*PP& CIRC*IT
,o#3ert . 3olt to co#sta#t D 3olt2 )2 F/*D I, is a pi# 3olta$e re$%lator2 -2 I#p%t 3olta$e fro& F3olt to -D3olt2 2 Usi#$ - capacitor for fast char$i#$ a#d dischar$i#$2
B TEMPERAT*RE !E#!$R
)2Operated "etwee# -2F to D2D 3olt o# first pi#2 -2Seco#d pi# A#alo$ 3olta$e o%tp%t ,o##ected to the A4,) pi# No2 -B of at&e$a/ %c2 2 Third pi# to 'ro%#d2 It co#3erts the a#alo$ 3al%e o"tai#ed fro& the e#3iro#&e#t i#to di$ital 3al%es2 The o%tp%t @E4 starts $low which is o# pi# #o2 )B of the &icroco#troller whe# the te&perat%re "etwee# -D to -. de$ree ,elsi%s! its like i# s%&&er if te&perat%re is i# "etwee# the respecti3e te&perat%res fa# will $oes o# itself if te&perat%re is less tha# that para&eter or hi$h ! fa# will #ot work2
D &'R CIRC*IT 'IAGRAM
@i$ht depe#de#t resistor (@4>0 9he# e3er the li$ht falls o# the @4>! the >esisti3ity of the @4> "eco&e low2 )2@i$ht i#te#sity i#creases resisti3ity 4ecreases a#d 3ice63ersa -2O#e e#d of the @4> is co##ected with A4,* pi# #o2 - a#d a#other to the $ro%#d2 A#d o#e ) koh& >) fro& i#p%t @4> pi# side to $ro%#d2
IR CIRC*IT 'AGRAM
)2I> @E4 is co##ected i# 7orward "ias A#d 'ro%#ded with )koh&(>0 resistor2 -2 5hotodiode is i# >e3erse "ias2 2I# operatio#al A&plifier !positi3e ter&i#al is co##ected "etwee# photodiode positi3e ter&i#al a#d )* koh& resistor(>-0 which is $ro%#ded B2O%tp%t which is o# pi# #%&"er ) of op6a&p co##ected to the A4,D -/th pi# of at&e$a/ %c2 D2 5i# #%&"er B is $ro%#ded 2 5i# #%&"er / is i# D 3olt2 F2 "eca%se of se#siti3ity we &ake photodiode i# the re3erse "ias2
F PR$GRAMMI#G I# MICR$C$#TR$&&ER 3 PR$GRAM
Vi#cl%de Wa3rio2hX Vi#cl%de Wa3ri#terr%pt2hX Vi#cl%deW%tildelay2hX Vi#cl%delcd2h Vi#cl%delcd2c Vdefi#e 7Z,5U )******U@ char "%ffer[D\ char li$h[D\ char i#co&[D\ i#t >eadA4,(%i#t/Zt ch0 ] Select A4, ,ha##el ch &%st "e *6F chch^*"*****))) A4MUL_ch Start Si#$le co#3ersio# A4,S>A _ ()WWA4S,0 9ait for co#3ersio# to co&plete while(`(A4,S>A^()WWA4I7000 A4, I#terr%pt 7la$6 ,lear A4I7 "y writi#$ o#e to it Note yo% &ay "e wo#deri#$ why we ha3e write o#e to clear it his is sta#dard way of cleari#$ "its i# io as said i# datasheets2 The code writes J)J "%t it res%lt i# setti#$ "it to J*J ``` A4,S>A_()WWA4I70 ret%r#(A4,0 3oid &ai#(0 ] lcdZi#it(@,4Z4IS5ZON0 lcdZclrscr(0 lcdZp%ts(te&<0 i#itA4,(0 i#t k!t!&!# i#t 8!s i#t leftZse#sor*! ri$htZse#sor* 44>+ *877 while()0 ] i#itA4,(0 lcdZ$oto8y(*!*0
/
lcdZp%ts(te&<0 lcdZ$oto8y(B!*0 8>eadA4,()0 t(i#t0()***2*D2*(((float080)*-2*00 k(i#t0t)* spri#tf("%ffer!bBd!k0 lcdZp%ts("%ffer0 if(kX-B^^kW-.0 5O>T+*"*******) i#itA4,(0 lcdZ$oto8y(*!)0 lcdZp%ts(li$<0 lcdZ$oto8y(B!)0 s>eadA4,(*0 &(i#t0()***2*D2*(((float0s0)*-2*00 #(i#t0&)** spri#tf(li$h!bBd!#0 lcdZp%ts(li$h0 if(#X*^^#W*0 5O>T+*"******)* else 5O>T+*"******** i#itA4,(0 lcdZ$oto8y(.!*0 lcdZp%ts(I><0 lcdZ$oto8y())!*0 i#t %>eadA4,(D0 i#t 3(i#t0()***2*D2*(((float0%0)*-2*00 i#t w(i#t03)** spri#tf(i#co&!bBd!w0 lcdZp%ts(i#co&0 if(wX-*^^wWB*0 5O>T+*"*****)** else 5O>T+*"********