Sunteți pe pagina 1din 79

Cell Phone Based Remote Home Control System May-06-13 Final Report Client: ECpE Department Advisor: Prof.

A med !amal "eam: Adam Mo lin# $CprE% C a& '#&yen $EE% (ssa Drame $EE% Art&ro Pala& $EE% $1st semester only% REP)R" D(*C+A(MER ')"(CE
D(*C+A(MER: " is do,&ment -as developed as a part of t e re.&irements of an ele,tri,al and ,omp&ter en#ineerin# ,o&rse at (o-a *tate /niversity0 Ames0 (o-a. " is do,&ment does not ,onstit&te a professional en#ineerin# desi#n or a professional land s&rveyin# do,&ment. Alt o&# t e information is intended to 1e a,,&rate0 t e asso,iated st&dents0 fa,&lty0 and (o-a *tate /niversity ma2e no ,laims0 promises0 or #&arantees a1o&t t e a,,&ra,y0 ,ompleteness0 .&ality0 or ade.&a,y of t e information. " e &ser of t is do,&ment s all ens&re t at any s&, &se does not violate any la-s -it re#ard to professional li,ensin# and ,ertifi,ation re.&irements. " is &se in,l&des any -or2 res&ltin# from t is st&dentprepared do,&ment t at is re.&ired to 1e &nder t e responsi1le , ar#e of a li,ensed en#ineer or s&rveyor. " is do,&ment is ,opyri# ted 1y t e st&dents - o prod&,ed t is do,&ment and t e asso,iated fa,&lty advisors. 'o part may 1e reprod&,ed -it o&t t e -ritten permission of t e senior desi#n ,o&rse ,oordinator.

Submission Date

'ovem1er 60 3013

May-06-13 Senior Design

Page ii

11/6/2013

Table of Contents List of Figures


FIGURE 1 OVERALL SYSTEM FLOW DIAGRAM............................................................ 2 FIGURE 2 GM28 CELLULAR MODULE............................................................................ 10 FIGURE 3 STK300 STARTER KIT...................................................................................... 18 FIGURE 4 BRACKET CODING STANDARD................................................................. 22 FIGURE 5 THERMOSTAT CONTROL SCHEMATIC...................................................... 32 FIGURE ! THERMOSTAT A""LICATION MODULE SCHEMATIC DIAGRAM.......33

FIGURE # FAN CONTROL SCHEMATIC........................................................................... 3 FIGURE 8 FAN STATUS SIGNAL CIRCUIT SCHEMATIC............................................ 3# FIGURE $ LIGHT SCHEMATIC.......................................................................................... 38 FIGURE 10 DECODE LCD DIS"LAY MATRI%................................................................ 41 FIGURE 11 ORIGINAL "RO&ECT SCHEDULE SUMMARY.........................................5 FIGURE 12 FINAL "RO&ECT SCHEDULE SUMMARY................................................. 5 FIGURE 13 ORIGINAL "RO&ECT RE"ORTING SCHEDULE...................................... 5# FIGURE 14 DESIGN RE"ORT "RO&ECT RE"ORTING SCHEDULE..........................58 FIGURE 15 FINAL "RO&ECT RE"ORTING SCHEDULE.............................................. 5$ FIGURE 1 "RO&ECT DEVELO"MENT SCHEDULE.................................................... 0 FIGURE 1# FINAL "RO&ECT DEVELO"MENT SCHEDULE....................................... 1

May-06-13 Senior Design

Page i

11/6/2013

List of Tables
TABLE 1 STK200 STARTER KIT....................................................................................... 13 TABLE 2 STK300 STARTER KIT...................................................................................... 15 TABLE 3 FREESCALE MC 8HC11E$ STARTER KIT..................................................... 1 TABLE 4 "HILI"S 51 "LUS STARTER KIT.................................................................... 1# TABLE 5 "ERSONAL EFFORT IN HOURS..................................................................... 4$ TABLE FINANCIAL RE'UIREMENTS........................................................................ 54

TABLE # DETAILED CIRCUIT FINANCIAL RE'UIREMENTS .................................. 55

.................................................................................................................................

May-06-13 Senior Design

Page ii

11/6/2013

List of Definitions
DTMF $D&al-"one M&lti-Fre.&en,y% 4 &sed for telep one si#nalin# over t e line in t e voi,e fre.&en,y 1and to t e ,all s-it, in# ,enter. GSM $5lo1al *ystem for Mo1ile Comm&ni,ations% 4 a ,ell&lar ,omm&ni,ation net-or2 standard. GPRS $5eneral Pa,2et Radio *ervi,e% 4 a mo1ile data servi,e offered to 5*M mo1ile &sers. M2M $Ma, ine to Ma, ine% 4 ,on,ept of ,omm&ni,ations 1et-een a devi,e ,ontainin# some amo&nt of data and anot er devi,e t at re.&ires t e &se of t at data. SMS $* ort Messa#e *ervi,e% 4 a servi,e availa1le on most di#ital mo1ile p ones t at permit t e sendin# of s ort messa#es $also 2no-n as te6t messa#in# servi,e%. GCC Com iler 4 C lan#&a#e ,ompiler t at is &sed to ,ompilin# C lan#&a#e so&r,e ,ode.

May-06-13 Senior Design

Page iii

11/6/2013

!" #ntrodu$tory Materials


" is se,tion is intended to #ive an overvie- of t e pro7e,t. *ome of t e .&estions ans-ered in t is se,tion in,l&de - at t e pro7e,t is a1o&t0 - at pro1lems it -ill address0 - at sol&tions it -ill implement to resolve t ose pro1lems0 and - o t e intended &sers are.

!"!" %&e$uti'e Summary


" is do,&ment o&tlines t e May06-13 senior desi#n team8s plan for desi#nin# and developin# a ,ell p one 1ased remote ome ,ontrol system. " e system allo-s a &ser to ,ontrol sele,ted devi,es from a ,ell&lar p one and -ill 1e 1ro2en do-n in t ree main parts: " e ,ell&lar p one $servin# as a platform for instr&,tions and as a devi,e stat&s interfa,e%0 t e ,ontrol &nit $re,eivin#0 interpretin# and iss&in# ,ommands%0 and t e ,ontrolled devi,es. " e ,ontrol &nit -ill ,omprise a ,ell&lar mod&le and a mi,ro,ontroller. " e 1asi, devi,e ,ontrol s,enario -ill start at t e ,ell&lar p one0 - ere t e &ser -ill inp&t a ,ommand in t e form of an *M* te6t messa#e. At t e ,ontrol &nit0 t e ,ell&lar mod&le -ill re,eive t e ,ommand and transmit it to t e mi,ro,ontroller. " e mi,ro,ontroller -ill t en interpret t e ,ommand and iss&e t e appropriate ,ontrol si#nal to t e devi,e to 1e operated. After t e ,ommand is e6e,&ted0 t e ,ontrol &nit -ill send a ,ompletion stat&s messa#e 1a,2 to t e ,ell&lar p one. " e main ,omponents of t e ,ontrol &nit -ill 1e t e *ony Eri,sson 5M39 for t e ,ell&lar mod&le and t e Atmel *"!300 *tarter !it for t e mi,ro,ontroller. " e t ree ,ontrolled devi,es -ill 1e t e :ilo# " ermostat Appli,ation Mod&le 2it0 a ;oney-ell ;"-900-1< fan0 a li# t and t e mi,ro,ontroller pro#rammin# -ill 1e done in C pro#rammin# lan#&a#e. " e team as spent a total of =>1 o&rs and at a rate of ?10.30 per o&r t e la1or ,ost is ?=633.30. @it a ,ost of ?1>9.<1 on parts and materials0 t e total ,ost for t e pro7e,t is ?=991.31 in,l&din# la1or. " e team ended &p &nder 1&d#etin# t e pro7e,t 1y ?119>.A0. (n terms of parts0 t e team8s mi,ro,ontroller starter 2it and t e ,ell&lar mod&le -ere donated 1y t eir respe,tive man&fa,t&rers. " is 2ept t e a,t&al total ,ost at appro6imately alf - at it -o&ld ave ended &p ,ostin#. " e entire flo- of data t ro&# o&t t e system is s o-n in fi#&re 1. May-06-13 Senior Design Page 1 11/6/2013

Cell P one

B*end messa#e BRe,eive stat&s messa#e

5*M 'et-or2

BProvides ,omm&ni,ation

5M39 5*M Mod&le

BComm&ni,ate -it net-or2 B"ransfer data to mi,ro,ontroller

R*333 serial ,onne,tion


Board Features

*"!300 Mi,ro,ontroller *tarter !it


BDe,ode in,omin# messa#es B*end instr&,tions to ,ontrolled applian,es BMonitor C ret&rn stat&s si#nals to &sers

Port A

Port D
Pins 30 30 >: Control Pin1: *tat&s

Port C
Pins 00 10 30 30 >0 A0 6: *tat&s

Pins 00 10 3: Control

Pin3: *tat&s Pins 0: Control

Fan

" ermostat

+i# t

Figure ! ( )'erall System Flo* Diagram

May-06-13 Senior Design

Page 2

11/6/2013

!"2" +$,no*ledgements
*pe,ial t an2s are e6tended to Professor A med !amal for is s&pport and mentors ip to-ards t e development and s&,,ess of t is pro7e,t.

!"-" Problem Statement


" e pro1lem statement is 1ro2en into t-o se,tions: a #eneral pro1lem statement and a #eneral sol&tion approa, . " is se,tion -ill define in #eneral - at some of t e pro1lems t is pro7e,t -ill attempt to solve &sin# #eneral sol&tion approa, ed.

!"-"!" General Problem Statement


" e o17e,tive of t is pro7e,t -as to develop a devi,e t at allo-ed for a &ser to remotely ,ontrol and monitor m&ltiple ome applian,es &sin# a ,ell&lar p one. " is system is a po-erf&l and fle6i1le tool t at8s servi,e is al-ays availa1le0 and from any lo,ation -it t e ,onstraints of t e te, nolo#ies 1ein# applied. Possi1le tar#et applian,es in,l&de $1&t are not limited to% ,limate ,ontrol systems0 se,&rity systems0 li# ts0 and any applian,e t at ,an 1e ,ontrolled t ro&# an ele,tri,al interfa,e.

!"-"2" General Solution +

roa$h

" e approa, &sed for desi#nin# t is system -as to implement a mi,ro,ontroller-1ased ,ontrol mod&le t at re,eives instr&,tions and ,ommands from a ,ell&lar p one over t e 5*M net-or2. " e mi,ro,ontroller t en ,arries o&t t e iss&ed ,ommands and sends t e stat&s of a #iven applian,e or devi,e 1a,2 to t e ,ell&lar p one. For se,&rity p&rposes0 a means of identifi,ation and &ser a&t enti,ation -ill 1e implemented0 and -ill ,om1ine ,aller identifi,ation -it a pass-ord a&t oriEation.

!"." ) erating %n'ironment


" e ,ontrol system -ill in,l&de t-o separate &nits: t e ,ell&lar p one0 and t e ,ontrol &nit. " ere -ill t erefore 1e t-o operatin# environments. " e ,ell&lar p one -ill operate indoors and o&tdoors - ereas t e ,ontrol &nit -ill operate indoors -it in t e temperat&re and &midity limits for proper operation of t e ard-are.

May-06-13 Senior Design

Page 3

11/6/2013

!"/" #ntended 0sers and #ntended 0ses


" is prod&,t is aimed to-ard avera#e ,ons&mers - o -is to ,ontrol o&se old applian,es remotely from t eir ,ell p ones provided t at t e applian,es are ele,tri,ally ,ontrolla1le. E6ample of feasi1le applian,es and appli,ations &nder ,onsideration in,l&deF ena1leGdisa1le se,&rity systems0 fans0 li# ts0 2it, en applian,es0 and ad7&stin# t e temperat&res settin#s of a eatin#GventilationGair ,onditionin# system.

!"1" +ssum tions and Limitations


" is se,tion lays o&t t e ass&mptions and limitations of t e pro7e,t.

!"1"!" +ssum tions List


Follo-in# are t e ass&mptions made 1y t e team:

" e &ser and ,ontrol &nit -ill esta1lis ,omm&ni,ation via 5*M " e ,ell p one and servi,e provider , osen -ill s&pport te6t messa#in# servi,e " e &ser is familiar -it te6t messa#in# on t eir ,ell p one " e ,ell p one -ill s&pport storin# te6t messa#e templates -it in t e ,ell p one8s memory All servi,e , ar#es from servi,e provider apply " e ,ontrolled applian,es -ill ave to ave an ele,tri,al interfa,e in order to 1e ,ontrolled 1y mi,ro,ontroller " e a&dien,e readin# t is do,&ment -ill ave a familiarity -it en#ineerin# terms All meas&rements for temperat&re -ill 1e on Fa ren eit s,ale A pre-paid ,ell p one and sim ,ard -ill 1e &sed for ,onne,tivity to a 5*M net-or2 " e a1ility to send and re,eive messa#es is possi1le t ro&# C pro#rammin# and t e &se of t e #,, ,ompiler. " ro&# t e &se of C pro#rammin#0 t e mi,ro,ontroller s o&ld 1e a1le to send messa#es and de,ode re,eived messa#es " e t ermostat8s driver is al-ays properly f&n,tionin#0 as it is essential to de,odin# t e display.

May-06-13 Senior Design

Page 4

11/6/2013

!"1"2" Limitations List


+isted 1elo- are ,lient-spe,ified limitations: " e re,eiver m&st reside in a lo,ation - ere a si#nal -it s&ffi,ient stren#t ,an 1e re,eived from a 5*M net-or2 " e only person - o ,an ,omm&ni,ate -it t e ,ontrol mod&le is t e person - o -ill 1e s&,,essf&lly a&t enti,ated )nly devi,es -it ele,tri,al ,ontrollin# inp&t ports -ill 1e possi1le tar#ets for ,ontrol *ystem -ill 1e installed in a o&se old ,limate " e ,ontrolled devi,es -ill ave (G) ports t at -ill ma2e ,omm&ni,ation -it t e re,eiver possi1le " e re,eiver m&st ave a po-er so&r,e $130H% atta, ed at all times )peration of t e ,ontrol &nit is only possi1le t ro&# a ,ell p one -it *M* messa#in# ,apa1ilities " e ,ontrol &nit m&st 1e a1le to re,eive and de,ode *M* messa#es. (f t e mi,ro,ontroller is not a1le to send or re,eive messa#es0 t e f&n,tionality of t e system -ill 1e #reatly ,ompromised " e t ermostat8s data 1&s is internal to its CP/ and &navaila1le to 1e de,oded.

!"2" %& e$ted %nd Produ$t and )ther Deli'erables


" e follo-in# is a list of e6pe,ted end prod&,ts and ot er delivera1les: A sin#le M3M ,ontroller mod&le t at ,an perform t e follo-in#: o Re,eive and parse ,ommand instr&,tions from a messa#in# devi,e on a ,omm&ni,ation net-or2 o Monitor a devi,e stat&s from an ele,troni, interfa,e o Control tar#et devi,es t ro&# an ele,tri,al interfa,e A list of approved messa#e inp&t ,ommands t at t e devi,e is ,apa1le of e6e,&tin# Develop a &ser man&al for referen,e 1y t e end &ser A pro7e,t plan and t is desi#n do,&ment -ill 1e -ritten to defined and o&tline pro7e,t approa, es and delivera1les Pro7e,t poster is re.&ired to s o-,ase t e pro7e,t to st&dents and fa,&lty mem1ers Desi#n do,&ment is re.&ired to o&tline t e te, ni,al re.&irements and system8s f&n,tionalities Final report is re.&ired for do,&mentation on t e overall pro7e,t0 in,l&din#F end res&lts0 s&,,ess0 fail&res0 et,.

May-06-13 Senior Design

Page 5

11/6/2013

2"

roa$h and Produ$t Design Results

" e approa, t at -ill 1e ta2en 1y t e team and t e step-1y-step pro,ess of t e desi#n of t e end-prod&,t are des,ri1ed in t is se,tion. *ome of t e ma7or portions of t is pro7e,t and ,o&rse in,l&de t e vario&s re.&irements defined 1y t e team for t is pro7e,t8s s&,,essf&l ,ompletion and t e detailed e6planation of t e different pro7e,t e6e,&tion p ases.

2"!" Fun$tional Re3uirements


" e follo-in# defines e6a,tly - at t e prod&,t s o&ld and s o&ld not do: " e ,ontrol &nit -ill ave t e a1ility to ,onne,t to t e ,ell&lar net-or2 a&tomati,ally. " e ,ontrol &nit -ill 1e a1le to re,eive te6t messa#es and -ill 1e a1le to parse and interpret te6t messa#es for pass-ord identifi,ation and instr&,tions to 1e sent to t e mi,ro,ontroller. " e mi,ro,ontroller -it in t e ,ontrol &nit -ill iss&e ,ommands to t e ele,tri,al applian,es t ro&# a simple ,ontrol ,ir,&it. " e ,ontrol &nit -ill ,ontrol t e ele,tri,al applian,es and dete,t t e stat&s of t e applian,es to 1e relayed 1a,2 to t e mi,ro,ontroller. " e mi,ro,ontroller -it in t e ,ontrol &nit s o&ld 1e a1le to send stat&s messa#es 1a,2 to t e ,ell&lar p one t ro&# t e ,ell&lar net-or2. " e system s o&ld provide &ser a&t enti,ation t ro&# ,ell p one n&m1er identifi,ation andGor pass-ord verifi,ation ,ontained -it in t e $*M*% te6t messa#e.

May-06-13 Senior Design

Page 6

11/6/2013

2"2" Design Constraints


" is se,tion o&tlines t e desi#n ,onstraints of t e prod&,t. " is se,tion is derived from t e ass&mptions and limitations list0 f&n,tional re.&irements and ot er de,isions made 1y t e team mem1ers. 1. " e ,ontrol mod&le -ill need to 1e s ielded a#ainst ele,trostati, dis, ar#es. " is -ill in,rease relia1ility of t e system. 3. " e &ser m&st ave ,onne,tivity to t e 5*M net-or2 and any ,omm&ni,ation -it t e system -ill 1e in t e form of te6t messa#in#. (f t e &ser does not ave a &sea1le sim ,ard to pla,e into t e 5M39 ,ell&lar mod&le0 t en t e system -ill not 1e a1le to re,eive &ser data. @it o&t ,onne,tivity to t e 5*M net-or2 t e system -ill 1e inopera1le. 3. )nly devi,es t at ,an 1e ,ontrolled or monitored via ele,tri,al $nonme, ani,al% means are possi1le ,andidates for &se in t is system. " ere are no movin# parts asso,iated -it t is system. All movin# parts are to 1e in,orporated -it o&r system and interfa,ed via ele,tri,al (G) pins. >. " e system -ill not provide po-er to t e ,ontrolled devi,es. " e ,ontrolled devi,es m&st 1e ,onne,ted to a 130H po-er so&r,e alon# -it t e 5M39 and t e mi,ro,ontroller.

May-06-13 Senior Design

Page 7

11/6/2013

2"-" +

roa$hes Considered and )ne 0sed

" is se,tion dis,&sses t e vario&s soft-are te, nolo#ies and t e te, ni,al approa, es t at t e team as resear, ed in t e pro,ess of de,idin# - i, tools and met ods to adopt prior to t e implementation p ase.

2"-"!

Considered Cellular Modules

Part 4umber5 GM.26.7 Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is ,ell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies +o- po-er &sa#e 3.>->H at 3A0mA voi,e and 3A0mA data. R*333 ,onne,tion availa1le /niversal developers8 2it availa1le (nterfa,e -it *(M dete,tion mod&le Controlled via A" ,ommands Cons5 " e only prod&,t attri1&te t at ma2es it less desira1le in ,omparison to ot er prod&,ts is t at t e R*333 ,onne,tion is t ro&# a 60 pin 1oard on 1oard ,onne,tion0 ma2in# it ne,essary to solder. ;eat from solderin# -it a mere iron instead of ind&strial means may dama#e ,ir,&itry on t e mod&le. Part 4umber5 GM.!6.2 Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is ,ell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies +o- po-er &sa#e AHI-10J at 3A0mA voi,e and 3A0mA data C so&r,e ,ode li1raries availa1le Controlled via A" ,ommands >0 pin D(P ,onne,tion Cons5 " e only attri1&te t at ma2es t is prod&,t less desira1le in ,omparison to ot er prod&,ts is t e i# er po-er &sa#e. " e same ,&rrent is dra-n0 1&t at a i# er volta#e level t an t at of ot er mod&les.

May-06-13 Senior Design

Page 8

11/6/2013

Part number5 GM27628 Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is ,ell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies (nte#rated *(M ,ard older R*333 via DD< ,onne,tor Easily pro#ramma1le in C lan#&a#e Cons5 " e only attri1&te t at ma2es t is prod&,t less desira1le in ,omparison to ot er prod&,ts is t e i# er volta#e &sa#e A-33H. C&rrent val&e spe,ifi,ations of t is mod&le are not availa1le 1&t pres&med ,ompara1le to ot er mod&les. Part 4umber5 GR.26GR.7 Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is ,ell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies +o- po-er &sa#e 3.>->H at 3A0mA voi,e and 3A0mA data Controlled via A" ,ommands /niversal Developers8 2it availa1le Cons5 " e only attri1&te t at ma2es t is prod&,t less desira1le in ,omparison to ot er prod&,ts is t at t e R*333 ,onne,tion is t ro&# a 60 pin 1oard on 1oard ,onne,tion0 ma2in# it ne,essary to solder. ;eat from solderin# -it a mere iron instead of ind&strial means may dama#e ,ir,&itry on t e mod&le. Part 4umber5 %%/. %dge Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is ,ell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies /*D 3.0 ,onne,tion Controlla1le via A" ,ommands /niversal Developers8 2it availa1le )n 1oard *(M ,ard older Cons5 " e only attri1&te t at ma2es t is prod&,t less desira1le in ,omparison to ot er prod&,ts is t e i# er po-er &sa#e ,ompared to ot er prod&,ts at A.A-30H and 3A0mA voi,e and 3A0ma data.

May-06-13 Senior Design

Page 9

11/6/2013

Part 4umber5 CM/2 Pros5 " e follo-in# are t e attri1&tes t at are desira1le a1o&t t is Cell&lar mod&le 9A0G1<00 M;: operatin# fre.&en,ies >0 pin D(P Conne,tor Controlla1le via A" ,ommands /niversal Developers8 2it availa1le Cons5 " e only attri1&te t at ma2es t is prod&,t less desira1le in ,omparison to ot er prod&,ts is t e i# er po-er &sa#e ,ompared to ot er prod&,ts at A.A-13.9H and 1A. Final sele$tion5 GM27 Cellular Module

Figure 2 ( GM27 Cellular Module

Reason for Sele$tion " e 5M39 ,ell&lar mod&le -as , osen for several reasons. For one0 it ,omes -it an internal *(M ,ard reader and as a DD< R*333 serial ,onne,tion ma2in# ,omm&ni,ation more relia1le and eliminatin# t e need for solderin# ,onne,tions dire,tly to t e mod&le. " e ?600 developer8s 2it is not ne,essary for t is entirely en,losed devi,e.

May-06-13 Senior Design

Page 10

11/6/2013

2"-"2

Considered +C6DC interfa$es

"-o te, nolo#ies -ere ,onsidered for t e implementation of fan and li# t ,ontrols: CM)* 1ased #ates and relays. " eir pros and ,ons -ere eval&ated and a de,ision -as made 1ased on t e eval&ation. CM)S based logi$ gates Pros5 Fast s-it, in# 'o stati, po-er dissipation Holta#e levels are ,ompati1le -it t at of a mi,ro,ontroller (ne6pensive Cons5 +o- volta#e levels of operation ma2e t e CM)* in,ompati1le -it 130Holts AC Relays Pros5 Control i# volta#e ,ir,&itry &sin# lo- volta#esF t erefore ,ompati1le 1ot -it t e fan and li# t8s po-er s&pply ,ir,&itry and t e mi,ro,ontroller8s ,ir,&itry Cons5 ;i# er ,ost t an CM)* inte#rated ,ir,&its *ome types or relays dissipate stati, po-er Sele$ted Te$hnology5 Relays -ere , osen in t is ,ase d&e to t e sole fa,t t at t eir main advanta#e of 1ein# ,ompati1le -it 1ot t e mi,ro,ontroller8s lo#i, volta#e levels and 130 HAC ,ir,&itry is not availa1le -it CM)* #ates.

May-06-13 Senior Design

Page 11

11/6/2013

2"-"-

Considered Mi$ro$ontrollers

F&n,tionality re.&irements for mi,ro,ontroller in,l&deF t e a1ility to re,eive and parse te6t messa#es from 5*M mod&le0 ,arry o&t t e re.&ired ,ommands0 monitor applian,e stat&s information0 and send stat&s 1a,2 to t e 5*M mod&le. *in,e a mi,ro,ontroller alone -o&ld not 1e s&ffi,ient0 ,onsiderations of mi,ro,ontrollers -ill 1e done t ro&# a mi,ro,ontroller starter 2it. " e implementation of t e mi,ro,ontroller into t e pro7e,t desi#n s o&ld 1e done e,onomi,ally and as effi,iently as possi1le. " e follo-in# is t e list of mi,ro,ontroller starter 2its &nder ,onsideration

May-06-13 Senior Design

Page 12

11/6/2013

Table 1 STK200 Starter Kit

ST92:: Starter 9it by 9anda


Com atible Mi$ro$ontroller A"tiny13 A"<0*1300 A"tiny13 A"<0**3313 A"tiny1A A"<0*33>3 A"tiny33 A"<0*3333 A"tiny3313 A"<0*>>1> A"tiny36 A"<0*>>33 A"<0*9A1AKK$9! 1ytes in-system pro#ramma1le Flas % A"<0*9A3A A"me#a>9 A"me#a9 A"me#a99 A"me#a9A1A A"me#a9A39 A"me#a16 A"me#a161 A"me#a163 A"me#a163 A"me#a169 A"me#a33 A"me#a333

Board Features Cable6Conne$tion Po*er Consum tion #6)

(*P and R*333 <-1AHDC or =-13HAC 6>-pins *o,2ets for vario&s devi,es 169036300 16390 36>0 pin Highlights so,2et devi,e to s&pport all devi,e pin-o&ts Port ;eaders in,l&des H,, and 5ro&nd for po-erin# e6ternal ,ir,&itry 9--ay 1ar +ED 0 9 *-it, es 3.3HGAH volta#e sele,tion Dro-no&t $3.<H or >.AH level% ADC ,ir,&itry E6ternal Memory for =>;CA=3 address lat, and Flas RAM so,2ets EEPR)M so,2et for 3>C (n,l&des A"<0*9A1A-9PC mi,ropro,essor +$$om anied De'elo ment Soft*are Minimum hard*are and soft*are re3uirements 90396 Pro,essor $>96 Re,ommended% 1 MD Ram 1 MD Free ;ard Dis2 *pa,e @indo-s 3.1 or @indo-s <A $minim&m re.&irement% Soft*are Appli,ation D&ilder AHR *t&dio 3 and > AHREdit and AHR5CC Pri$e ;11

May-06-13 Senior Design

Page 13

11/6/2013

Pros5 " e advanta#e of &sin# t e *"!300 starter 2it is t at t e 2it is ,ompati1le -it a variety of 9-1it0 16-1it0 and 33-1it Atmel AHR mi,ropro,essors. " e 2it also ma2es it easily inter, an#ea1le 1et-een devi,es -it 1690 36300 16390 36>0 pins di#ital so,2ets. Port D-E eaders of t e development 1oard ,ontain H,, and 5ro&nd pins - i, ,an 1e &tiliEed to drive e6ternal ,ir,&itries and ,ontain 9 (G) pins ea, . Pro#rammin# s o&ld 1e very &npro1lemati, 1e,a&se t e Appli,ation D&ilder soft-are in,l&ded -it t e 2it -ill allo- t e &ser to effi,iently set&p ,ode for ports0 timers0 /AR"0 ADC0 *P(0 -at, do# and interr&pts. AHR *t&dio > is a f&ll editor0 assem1ler and sim&lator of all AHR devi,es and AvrEdit and AHR5CC allo- t e &tiliEation of C pro#rammin# lan#&a#e in t e development pro,ess. )t er i# li# ts of t e 2it in,l&de ,omm&ni,ation via R*3330 1ro-no&t ,ir,&itries0 s&ffi,ient (G) ports0 and e6panda1ility -it e6ternal RAM0 Flas 0 and EEPR)M so,2ets. Cons5 " e main disadvanta#e is t at t e A"<0*9A1A-9PC mi,ro,ontroller in,l&ded -it t e 2it is an 9-1it mi,ro,ontroller -it 9! 1ytes in-system pro#ramma1le flas memory0 - i, mi# t 1e ins&ffi,ient memory allo,ation for pro7e,t feasi1ility. Anot er disadvanta#e is t at t e ,lo,2 speed r&ns 1y defa&lt at 9M;E0 #iven a 3.=H po-er s&pply and is advertised to r&n at 16M;E at AH0 1&t t at fa,t is not #&aranteed 1y Atmel.

May-06-13 Senior Design

Page 14

11/6/2013

Table 2 ( ST9-:: Starter 9it

ST9-:: Starter 9it by 9anda


Com atible Mi$ro$ontroller A"me#a103 A"me#a603 A"me#a139KK$139! 1ytes of in-system pro#ramma1le Flas 0 >! 1ytes of in-system pro#ramma1le EEPR)M and >! 1ytes of *RAM% Board Features Cable6Conne$tion (*P and R*333F opt. /*D Po*er <-1AHDC or =-13HAC Consum tion #6) Port A-E $9-pins (G)F H,, and 5nd%F Analo# Port F$9 analo# pinsF analo# 5nd and Ref%F Mis,. ;eaderF 66-pins total Highlights Port ;eaders in,l&des H,, and 5ro&nd for po-erin# e6ternal ,ir,&itry 9--ay 1ar +ED 0 9 *-it, es 3.3HGAH volta#e sele,tion Dro-no&t $3.<H or >.AH level% +CDLs ,onne,tors Drop-in e6ternal RAM0 -it so,2ets for Address +at, , ip and RAM pl&s dip eader (n,l&de da&# ter 1oard -it Atme#a139 mi,ro,ontroller +$$om anied De'elo ment Soft*are Minimum hard*are and 90396 Pro,essor or A1ove soft*are re3uirements 1 MD Ram 1 MD Free ;ard Dis2 *pa,e @indo-s 3.1 or @indo-s <A $minim&m re.&irement% Soft*are *"!300 Appli,ation D&ilder AHR (*P $C-,omplier% AHR and (AR *t&dio are availa1le for do-nload at Atmel -e1site Pri$e ;7/

Pros5 " e development 1oard for t is 2it ,ontains t e same feat&res and f&n,tionalities as t e *"!300 development 1oard0 1&t as 1een modified so it is ,ompati1le -it AHR Me#a mi,ro,ontrollers. " e main advanta#e of t is implementation is t at lar#er pro7e,ts are nofeasi1le -it t e in,orporation of AHR Me#a mi,ro,ontrollers. (n,l&ded -it t e 2it is A"me#a139+-9A( mi,ro,ontroller ,ontainin# 139! 1ytes of in-system pro#ramma1le Flas 0 >! 1ytes of in-system pro#ramma1le EEPR)M and >! 1ytes of *RAM. " is is s&ffi,ient memory allo,ation for pro7e,t feasi1ility. *in,e t e mi,ro,ontroller , ips are s&rfa,e mo&nted on a da&# ter 1oard0 pro1lems -it s&rfa,e mo&ntin# t e devi,e ,an 1e avoided. )t er advanta#es and i# li# ts -it *"!300 are similar to advanta#es and i# li# ts -it *"!300.

May-06-13 Senior Design

Page 15

11/6/2013

Appli,ation D&ilder is also in,l&ded -it t e 2it. Also in,l&ded in t e 2it is AHR (*P soft-are t at s&pports pro#rammin# via PC8s parallel port. Pro#rammin# t ro&# PC8s serial port is still possi1le -it t is 2it. AHR and (AR *t&dio are availa1le to 1e do-nloaded from Atmel -e1sites. AHR *t&dio allo-s easy development and de1&##in# -it its 1&ilt in assem1ler and sim&lator. Cons5 " e main disadvanta#e of t is 2it is t e mi,ro,ontroller is not as easily inter, an#ea1le as *!"300 1e,a&se t e ne- devi,e as to 1e soldered on t e da&# ter 1oards first. Anot er disadvanta#e is t at t e *"!300 s&pports more mi,ro,ontrollers t an t e *"!300.
Table - ( Frees$ale MC17HC!!%8 Starter 9it Frees$ale <Motorola= MC17HC!!%8 Starter 9it Com atible Mi$ro$ontroller MC69;C11E< $13! Flas GEPR)MF A13 RAMF A13 EEPR)MF 39 (G)% Board Features Cable6Conne$tion PC C)M port Po*er Consum tion =-19HDC #6) 39-pins Highlights 3M61.AM *olderless Dread1oard Prototype Area 9M;E ,rystal +CDLs ,onne,tors !eypad ,onne,tors /A: 33!1ytes RAM installed /=: 9!1ytes EEPR)M installed /6: e6panda1le slot for RAM0 EPR)M0 and EEPR)M D&ffalo Monitor &tility for de1&# and test pro#ram +$$om anied De'elo ment Soft*are Minimum hard*are and soft*are re3uirements D)* or @in 3.1 Soft*are AN(DE free Assem1ler0 C ,ompiler and e6ample so&r,e ,ode Pri$e ;88

Pros5 " e main advanta#e of Frees,ale $Motorola% MC69;C11E< *tarter !it (s t at it as a solderless 1read1oard area and prototype area t at ,an 1e easily &tiliEed for prototypin# ,ir,&its as -ell as drivin# different ,ir,&it ,omponents. " e MC69;C11E< mi,ro,ontrollers -it t e installed 33! 1ytes e6ternal RAM and 9! 1ytes e6ternal EEPR)M -ill provide s&ffi,ient memory allo,ation for pro7e,t feasi1ility. Pro#ram -ill 1e stored in 33! 1ytes RAM to 1e tested and de1&##ed 1y D&ffalo Monitor &tility. )t er advanta#es in,l&de pro#ram in assem1ler and C0 s&ffi,ient (G) ports0 and e6panda1le slots. May-06-13 Senior Design Page 16 11/6/2013

Cons5 " e main disadvanta#e of Frees,ale $Motorola% MC69;C11E< *tarter is its pri,e is ,onsidera1ly i# er t en t e previo&s starter 2its. Anot er disadvanta#e -it t is starter 2it is t at it does not allointer, an#ea1ility amon# different mi,ro,ontroller sin,e t e MC69;C11E< mi,ro,ontroller is s&rfa,e mo&nted onto t e development 1oard.
Table . ( Phili s /! Plus Starter 9it 7:/! Starter 9it Phili s >+6RD611& Com atible Mi$ro$ontroller P9<CA1RD3$;% P9<C660 NA-5><KK $6>! 1ytes Flas F 3! RAM% P9<CA1RC3$;% P9<C663 P9<CA1RD3$;% P9<C66> P9<C669 Board Features Cable6Conne$tion *erial Po*er Consum tion <-1AH AC or DC #6) 33 (G) ports Highlights >0-pin D(P >>-pin P+CC so,2ets E6ternal RAM ,ir,&itry +CD ,onne,tion s-it, es and 10--ay Dar +ED +$$om anied De'elo ment Soft*are Minimum hard*are and soft*are re3uirements @in <A Soft*are Appli,ation D&ilder @('(*P and Flas Ma#i, Pro#rammin# "ools C-,ompiler Demos $>! ma6% and *im&lator Pri$e ;8."7:

Pros5 " e main advanta#e of t is 2it is t at t e NA-5>< mi,ro,ontroller , ip t at is in,l&ded -it mat, pro7e,t feasi1ility. " is -ill mean more f&n,tionality and e6panda1ility for t e pro7e,t. )t er i# li# ts of t e 2it in,l&de s&ffi,ient (G) ports for pro7e,t feasi1ility and e6ternal RAM ,ir,&itry. Cons5 " e main ,on,ern -it t is 2it is it t e NA-5>< does not ,ontain any EEPR)M memory and ,o&ld 1e pro1lemati, if t e pro7e,t f&n,tionality re.&ires t e &se of EEPR)M. " e ot er ,on,ern is t e C-,ompiler in,l&ded in t e 2it is only a demo version0 -it ,odin# limited to >! 1ytes. " is -ill limit t e &tiliEation of C pro#rammin# lan#&a#e and t e effi,ien,y of t e ,odin# pro,ess. May-06-13 Senior Design Page 17 11/6/2013

Mi$ro$ontroller sele$ted5 ST9-:: Starter 9it After revie-in# all of t e mi,ro,ontroller starter 2its &nder ,onsideration0 t e team sele,ted *"!300 *tarter !it to 1e t e optimal , oi,e.

Figure - ( ST9-:: Starter 9it

Reason for Sele$tion " e team de,ided to pro,eed -it t e *"!300 *tarter !it 1e,a&se it as all f&n,tionalities of ot er mi,ro,ontroller starter 2its and it is t e most e,onomi,al. " e *"!300 *tarter !it allo-s lar#er pro7e,ts ,ompared to ot er starter 2its to 1e implemented -it t e A"me#a139 mi,ro,ontroller in,l&ded -it t e 2it. (t also allo-s fle6i1ility -it an inter, an#ea1le mi,ro,ontroller desi#n. (t as a s&ffi,ient n&m1er of (G) ports for t e pro7e,t and it as a &ni.&e feat&re t at allo-s t e port eaders to drive e6ternal ,ir,&itry -it H,, and 5nd pins. Codin# pro,ess -it t is 1oard -ill 1e effi,ient 1e,a&se it allo-s ,odin# in i# er level pro#rammin# lan#&a#es C and Appli,ation D&ilder allo-s -iEards to set &p ports0 timers0 /AR"0 ADC0 *P(0 -at, do# and interr&pts. (t is t e most e,onomi,al 1e,a&se t e list pri,e is less t an t e Frees,ale $Motorola% MC69;C11E< *tarter !it and P ilips A1 Pl&s *tarter !it.

May-06-13 Senior Design

Page 18

11/6/2013

2"-".

Programming Language Considerations

" ere are many availa1le soft-are te, nolo#ies t at ,an 1e &sed to develop t is pro7e,t. (n order to ens&re t at t e team -ill ,reate t e 1est prod&,t to t eir a1ilities0 all soft-are sol&tions -ill 1e ,onsidered and eval&ated 1y t e team. " e files t at -ill 1e developed in t e sele,ted development environment -ill t en 1e ported over to t e ,omplier s&pported 1y sele,ted mi,ro,ontroller. Programming in +ssembly Language Assem1ly lan#&a#e pro#rammin# is very lo- level and -ill allo- for more ,ontrol of t e so&r,e ,ode. Dy &sin# t e assem1ly lan#&a#e0 t e ,omplied ,ode -ill ta2e &p less spa,e - en stored into t e mi,ro,ontroller8s memory. A ma7ority of t e team as pro#rammed in assem1ly 1efore in ot er ,o&rses ta2en at (o-a *tate /niversity and is familiar -it t e lan#&a#e. Assem1ly also as a very .&i,2 response time. Assem1ly lan#&a#e pro#rammin# ,o&ld prove to 1e more ,omple6 to implement. Many of t e team mem1ers - om ave ta2en it 1efore -ill need to re-learn t e lan#&a#e. " ere as yet to 1e an e6ample of *M* assem1ly lan#&a#e ,ode or any pro#rammin# li1raries dis,overed 1y t e team from availa1le reso&r,es t at ,an 1e &sed to assist in developin# 2no-led#e for t is pro7e,t. " e team -o&ld ave to interfa,e t e assem1ly pro#ram ,ode -it some ot er lan#&a#e8s already defined li1raries. Programming in C Language " ere are many e6amples availa1le t at t e team as already lo,ated. " e C pro#rammin# lan#&a#e is a &niversally relia1le lan#&a#e -it many reso&r,es availa1le for ,odin# and de1&##in# p&rposes. " ere are C li1raries already -ritten and availa1le for interfa,in# -it t e 5*M net-or2 and serial ,omm&ni,ation , annel. All team mem1ers are familiar -it CI I - i, is similar to t is pro#rammin# lan#&a#e0 s ortenin# t e learnin# ,&rve.

May-06-13 Senior Design

Page 19

11/6/2013

Programming in C?? Language A definite advanta#e of pro#rammin# in CII is t at all t e #ro&p mem1ers ave pro#rammed -it it 1efore. CII is also an o17e,t-oriented lan#&a#e0 ma2in# development easier and allo-in# for m&ltiple developers to ,reate ,ode and import , an#es into t e final pro#ram. " e response time of CI I -ill 1e at least as fast as interpreted lan#&a#es. " e only disadvanta#e to &sin# CII is t at 5*M and serial ,omm&ni,ation li1raries are more diffi,&lt to lo,ate ,ompared to t e C pro#rammin# lan#&a#e. Programming in @+A+ Language Oava is a very i# -level pro#rammin# lan#&a#e -it many online and learnin# reso&r,es availa1le to t e team. Oava also as a lot of 1&ilt-in f&n,tions availa1le to t e developer. " ere are a n&m1er of disadvanta#e asso,iated -it t is pro#rammin# lan#&a#e. )ne is t at a ma7ority of t e team mem1ers ave never developed in Oava. " is -o&ld ,reate a pro1lem of not 1ein# a1le to &tiliEe all team mem1ers for de1&##in#0 developin#0 or testin# t e Oava ,ode. Anot er disadvanta#e is t at t e final ,ompiled ,ode -ill ta2e &p more memory t an ot er lo-er-level lan#&a#es stated a1ove. Finally0 response time of t e Oava pro#rammin# lan#&a#e is poor and -o&ld ,a&se a la# in real-time e6e,&tion. Sele$ted Programming Language5 C " e team as de,ided to &se t e C pro#rammin# lan#&a#e to develop t is pro7e,t. Reason for Sele$tion " e main reason for t is sele,tion is d&e to t e n&m1er of online reso&r,es availa1le to t e team. "eam mem1ers all ave a #ood 1asis in developin# in CII so t e main &rdle -ill 1e identifyin# t e differen,es 1et-een &sin# C instead of CII. " is pro#rammin# lan#&a#e is also s&pported 1y t e team8s sele,ted mi,ro,ontroller.

May-06-13 Senior Design

Page 20

11/6/2013

2"-"/

De'elo ment %n'ironments Considered

" is se,tion dis,&sses t e vario&s ,odin# development environments t e team dis,&ssed for t e ,odin# p ase of t e pro7e,t. %$li se " e E,lipse soft-are is a very po-erf&l Oava-1ased open-so&r,e development environment. (ts ori#inal intent is to 1e &sed as a Oava developin# environment0 1&t t ere is a CGCII pl&#-in t at ,an 1e installed ma2in# it -or2 -it t ese lan#&a#es. " e E,lipse soft-are allo-s a developer to vie- t e val&e of varia1les ont e-fly and step t ro&# ,ode line-1y-line. " is is very val&a1le - en it ,omes to de1&##in# and tro&1les ootin#. " e performan,e of t is soft-are ,an sometimes 1e very poor d&e to t e nat&re of t e Oava virt&al ma, ine $OHM%. ;o-ever0 sin,e it is pro#rammed in Oava0 t e tool ,an 1e &sed on any ma, ine t at ,an s&pport a OHM. Aisual Studio "4%T 2::" is tool is developed and s&pported 1y t e Mi,rosoft Corporation. *imilar to E,lipse0 t is soft-are is free to t e team t ro&# M*D'AA. " is soft-are also in,l&des a ,omplete ran#e of ,apa1ilities from modelers t at aid in vis&ally ,omposin# t e most ,omple6 of enterprise-,lass appli,ations to deployin# an appli,ation on t e smallest of devi,es. His&al *t&dio .'E" 3003 is -idely &sed a,ross t e -orld. Sele$ted De'elo ing %n'ironment5 Aisual Studio"4%T 2::" e team as de,ided to &se t e His&al *t&dio .'E" 3003 developin# environment to develop t is pro7e,t. Reason for Sele$tion " e main reason for t is sele,tion is t at t is reso&r,e ,an 1e o1tained 1y all team mem1ers for free and is ready to start development -it o&t any additional -or2 spent on set&p 1y t e team mem1ers.

May-06-13 Senior Design

Page 21

11/6/2013

2"-"1

Considered Coding Styles

" is se,tion dis,&sses t e vario&s ,odin# styles t e team as dis,&ssed for t e ,odin# p ase of t e pro7e,t. 0se of Bra$,ets All 1ra,2ets -ill ta2e &p an entire line of ,ode. " e openin# and ,losin# of a 1ra,2et pairin# -ill verti,ally line &p in t e same ,ol&mn of te6t at a ta11ed position. Follo-in# an openin# 1ra,2et0 t e pre,edin# line of ,ode s all 1e ta11ed in to t e ne6t level. " is ,odin# style is apparent in Fi#&re >. for(i=0; i<10; i++) { if (sampleFunction ()) return ans; }
Figure . ( Bra$,et Coding Standard

Aariable De$laration *in,e t e de,ision of pro#rammin# in t e C lan#&a#e -as , osen0 all varia1les m&st 1e de,lared at t e 1e#innin# of any and all f&n,tions. " e varia1les s all 1e #ro&ped to#et er -it similar varia1le types. For e6ample0 all inte#ers s all 1e #ro&ped to#et er separate from all , ar0 , arK0 et,. Line Length " e n&m1er of , ara,ters per line s all 1e limited to 90 , ara,ters per line. " e reason for t is is for proper printin# of all so&r,e ,ode. Fun$tion De$larations and ) erations " e ,onvention t is team -ill &se -ill 1e to not in,l&de any spa,in# 1et-een ,omparison operators or f&n,tion elements. An e6ample of t is is s o-n in Fi#&re >.

May-06-13 Senior Design

Page 22

11/6/2013

2"-"2

Testing

"estin# is separated into t-o ma7or types: &nit and inte#ration. /nit testin# is &sed to determine t at a sin#le ,omponent is f&n,tionin# ,orre,tly - ile inte#ration testin# is &sed to determine t at a ne-ly-added ,omponent is f&n,tionin# ,orre,tly -it in t e ,onte6t of t e rest of t e pro#ram. " e follo-in# &nit testin# re.&irements -ill 1e indi,ators t at t e system ,an s&,,essf&lly 1e implemented: GSM 4et*or, Communi$ation " e 5*M re,eiver -ill 1e tested for s&,,essf&l ,omm&ni,ation -it net-or2. " is -ill test in,l&de a&tomation and ,onsisten,y of t e ,onne,tion and -ill 1e ,ond&,ted 1y a team mem1er in t e follo-in# -ay: " e ,ell&lar p one -ill dial t e 5*M re,eivers8 n&m1er )n,e t e ,onne,tion is esta1lis ed a stream of data -ill 1e send to t e 5*M re,eiver. " e 5*M re,eiver -ill 1e #iven data to 1e transmitted to t e ,ell&lar p one.

Su$$ess6failure $riteria: " e data re,eived -ill 1e o1served on 1ot ends to verify its ,onsisten,y. " e test -ill 1e ,onsidered s&,,essf&l if t e inte#rity of t e sent and re,eived data is maintained &pGdo-nstream. (t -ill 1e ,onsidered a fail&re ot er-ise. GSM to Mi$ro$ontroller Communi$ation " e 5*M to mi,ro,ontroller driver -ill 1e tested 1y verifyin# t e inte#rity of ,ommand strin#s sent from t e remote &ser. " e follo-in# pro,ed&re -ill 1e performed in ma7ority 1y a CprE team mem1er: " e remote &ser -ill send a ,ommand to t e ,ontrol mod&le. " e ,ontents of t e data stream -ill 1e o1served at t e 5*M ,omm&ni,ation port. " ese ,ontents -ill 1e ,ompared -it t ose re,eived and stored at t e mi,ro,ontroller8s ,orrespondin# ,omm&ni,ation port. " e pro,ed&re -ill 1e repeated in reverse -it sendin# a data steam to t e 5*M re,eiver. t e mi,ro,ontroller

Su$$ess6failure $riteria: " e test -ill 1e ,onsidered s&,,essf&l if t e inte#rity of t e data sent &pGdo-nstream is maintained. (t -ill 1e ,onsidered a fail&re ot er-ise. May-06-13 Senior Design

Page 23

11/6/2013

GSM Message De$oding Proper de,odin# of t e remote &ser8s ,ommands and iss&an,e of t e e.&ivalent ,ommands to t e ,ontrolled devi,e -ill 1e performed 1y team mem1ers &sin# t e follo-in# pro,ed&re: A sim&lated instr&,tion -ill 1e fed to t e mi,ro,ontroller ,omm&ni,ation port. " e o&tp&t ,ommand at t e (G) interfa,e -it ,ontrolled devi,e -ill 1e o1served. t e ,orrespondin#

Su$$ess6failure $riteria: " e test -ill 1e ,onsidered a s&,,ess if t e res&ltin# ,ommand iss&ed from t e mi,ro,ontroller is sent to t e ri# t (G) address for t e desired ,ontrolled devi,e and if t at ,ommand is ,onsistent -it t e ,ommand - i, is e6pe,ted. " e test -ill 1e ,onsidered a fail&re ot er-ise. Aoltage Con'erter Cir$uit ) eration " e s,alin# ,ir,&it from t e ,ontrolled devi,es to t e (G) -ill 1e tested for proper operation. " is -ill 1e tested 1y EE team mem1ers: " e ,ontrolled devi,es -ill 1e man&ally tri##ered to for,e t e desired volta#e. " e o&tp&t of t e s,alin# ,ir,&it -ill 1e meas&red.

Su$$ess6failure $riteria5 " e testin# -ill 1e ,onsidered s&,,essf&l if t e meas&red o&tp&t volta#e is properly s,aled to t e mi,ro,ontroller8s re.&ired inp&t val&e. " e test -ill 1e ,onsidered a fail&re ot er-ise. #6) Dete$tion and Fun$tionality " e a1ility of (G) to dete,t an inp&t volta#e and store a val&e in t e mi,ro,ontroller8s memory -ill 1e tested 1y team mem1ers: "est volta#es to t e inp&t of t e (G) -ill 1e applied. " e ,ontents of t e memory s all 1e , e,2ed for validity.

Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e val&es of t e memory are as e6pe,ted. " e test -ill 1e ,onsidered a fail&re ot er-ise.

May-06-13 Senior Design

Page 24

11/6/2013

Po*er Surge Performan$e " e ,ir,&it8s po-er s&r#e prote,tion -ill 1e tested for a,,epta1le performan,e 1y EE team mem1ers &sin# t e follo-in# pro,ed&re: " e ,ir,&it8s po-er s&pply -ill 1e removed from t e ,ir,&it and ,onne,ted to a d&mmy load. A sim&lated volta#e spi2e -ill 1e inp&tted 1y &sin# a step si#nal from a si#nal #enerator. " e o&tp&t volta#e and ,&rrent -ill 1e meas&red at t e load.

Su$$ess6failure $riteria: " e s&,,ess of t e test -ill 1e determined 1y verifyin# t at t e o&tp&t si#nal to t e d&mmy load falls -it t e toleran,e indi,ated 1y t e mi,ro,ontroller and t e 5*M , ip8s man&fa,t&rers. " e test -ill 1e ,onsidered a fail&re if t e meas&red , ara,teristi,s of t e po-er s&pply8s o&tp&t do not meet t e man&fa,t&rers8 re.&irements. 0ser +uthenti$ation " e pass-ord a&t enti,ation -ill 1e tested for proper operation. " e follo-in# pro,ed&re -ill 1e performed 1y team mem1ers: " e pass-ord prote,tion of t e ,ode -ill 1e r&n in de1&# mode. A sim&lated mi6 of ,orre,t and in,orre,t pass-ords -ill 1e sent to t e mi,ro,ontroller " e response of t e mi,ro,ontroller -ill 1e o1served for ea, of t e inp&tted pass-ords.

Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e mi,ro,ontroller #rants a,,ess to all t e ri# t pass-ords and none of t e -ron# pass-ords. " e test -ill 1e ,onsidered a fail&re ot er-ise.

May-06-13 Senior Design

Page 25

11/6/2013

#6) Status Trigger Corre$tness " e a1ility of an (G) stat&s to tri##er t e e6e,&tion of stat&s messa#in# s&1ro&tine -ill 1e tested as -ell as t e a1ility to send t e res&ltin# stat&s to t e remote &ser. " e follo-in# pro,ed&re -ill 1e performed 1y team mem1ers: A sim&lated devi,e stat&s -ill 1e -ritten to t e (G) in de1&# mode. " e sim&lated stat&s -ill tri##er t e e6e,&tion of t e mi,ro,ontroller8s devi,e stat&s notifi,ation s&1ro&tine " e s&1ro&tine o&tp&t -ill 1e , e,2ed prior to 1ein# sent to t e 5*M , ip. Herifi,ation t at t e stat&s messa#e -as re,eived 1y t e &ser ,ell p one -ill 1e performed.

Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e sim&lated (G) tri##ers e6e,&tion of t e s&1ro&tine and if t e ,orre,t stat&s messa#e is sent to t e 5*M , ip and t at stat&s messa#e is re,eived 1y t e ,ell p one. " e test -ill 1e ,onsidered a fail&re ot er-ise. %nd Produ$t Testing " e end-prod&,t f&n,tionalities -ill 1e tested 1y team mem1ers and nonteam mem1ers in t e follo-in# -ay: "eam mem1ers -ill ens&re t at all s&1systems f&n,tion properly to#et er from remote &ser ,ommand to e6e,&tion and 1a,2 to ,ompletion stat&s notifi,ation. 'on-team mem1ers from t e #eneral p&1li, -ill 1e allo-ed to a,,ess and &se t e ,ontrol &nit for a frame of time. After-ard0 t e non-team mem1er testin# s&17e,ts -ill fill o&t a s&rvey on t e end-prod&,t8s f&n,tionalities0 ease of &se0 diffi,&lties0 et,.

Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered a s&,,ess if t e testin# s&17e,ts find t e end-prod&,t &ser friendly0 and easy to fi#&re o&t.

May-06-13 Senior Design

Page 26

11/6/2013

Testers Ea, team mem1er is responsi1le for 1ein# t e primary 1la,2 1o6 tester of a #iven mem1erLs ,ode. Dla,2 1o6 testers are to test ,ode -it o&t e6aminin# t e ,ode itself in order to avoid avin# any ass&mptions o&tside of t ose spe,ified 1y t e ,onditions of t e ,ode. 'on-team mem1ers -ill 1e 1ro&# t in to &se t e system and -ill 1e monitored 1y team mem1ers. (f t e non-team mem1ers ,a&se an error in t e system0 t e team mem1ers -ill do,&ment t e nat&re of t e error and address t e iss&e as soon as possi1le.

May-06-13 Senior Design

Page 27

11/6/2013

2"." Detailed Design


" is se,tion dis,&sses t e feat&res and t e desi#n of t e end prod&,t in dept . " e dis,&ssion is 1ased on t e follo-in# se,tions:

Coding Details
" ere -ill 1e si6 main ,odin# mod&les to t e entire system. Five reside on t e ,ontrol &nit lo,ated in t e &ser8s ome and t e ot er mod&le -ill reside on t e &ser8s ,ell p one $K%. " ey are: (nitialiEation C e,2 C Read Messa#es De,ode Messa#es Appli,ation Control *tat&s Monitorin# *end *tat&s Messa#e "e6t Messa#e Command "emplates $K%

May-06-13 Senior Design

Page 28

11/6/2013

#4#T#+L#B+T#)45 The initialization portion will require the following libraries in the project directory: deftypes. 4 +oads type definitions for strin# varia1le R*333. 4 +oads R*333 serial drivers *erComm. 4 +oads serial ,omm&ni,ation types A"Command. 4 +oads A" ,ommands for &se Include the entire EWMSD library in the project: A" Commands PD/ $Proto,ol Data /nit% Formattin# *erial Comm&ni,ation C R*333 !T"InitializeData " is is ne,essary - en dealin# -it em1edded systems in order to initialiEe memory &pon start&p. " is f&n,tion is &sed 1efore initialiEin# , annels or re#isterin# events. !T"#hec$E%ents & or #all !T"SetTi'er $in @indo-s% " is -ill periodi,ally sear, for events A"PC e,2Events and -ill ,all

MS"Establish#hannel " is f&n,tion ,all -ill open t e serial , annel t at -ill 1e &sed to ,omm&ni,ate -it t e 5*M , ip. @ en ,omm&ni,ation -it t e 5*M , ip is ,omplete0 MS"(elease#hannel -ill 1e ,alled in order to 2eep t e , annel availa1le for ot er appli,ations. #)*"Set#o''andEcho $val&e parameter Q 0% E@M*D! -ill not -or2 if A"E is set to 1. +M"Set!T(esponse)or'at $val&e parameter Q 1% " is -ill ena1le ver1ose mode. " e li1rary re.&ires A"H to 1e set to val&e 1 $A"H1% - i, is t e &s&al state of modems. Doesn8t -or2 in A"H0 mode. #)*"Set(eportEquip'entError $val&e parameter Q 1% " is -ill allo- t e li1rary to offer spe,ifi, error ,ode res&lts ret&rned 1y t e mod&le. " ere are 3 modes availa1le: 0 and 3 -ill not interpret error ,odes0 1 -ill ret&rn error ,odes t at ,an 1e referen,ed 1y t e 5*M mod&le8s (nte#rator man&al.

May-06-13 Senior Design

Page 29

11/6/2013

CH%C9 C R%+D M%SS+G%S5 The chec$ and read 'essages coding 'odule will use the following functions ,descriptions of each are pro%ided-: !T.#M*(/0 " is -ill read only messa#e R1 stored in t e memory of t e M3M mod&le. (f t ere is an in,omin# messa#e0 t e messa#e -ill 1e stored as a strin#. Messa#es ,an 1e deleted from t e M3M mod&le &sin# t e ,ommand A"ICMD5Q1. D%C)D%5 *M* messa#es ,ontain information s&, as date0 time0 sender8s n&m1er and messa#e. " e pro#ram m&st perform simple strin# manip&lations to de,ode t is messa#e and store all relevant data. (f t e de,oded messa#e is e.&al to a pre-stored messa#e0 t en t e f&n,tion -ill 1e ,alled for t at parti,&lar ,ommand0 ot er-ise it -ill 1e deleted. + li$ation Control5 The application control coding 'odule will be used for sending co''ands to the 'icrocontroller that will dri%e the I&1 ports located on the 'icrocontroller2 These I&1 ports will cause the controlled unit to perfor' the requested action2 Every appli,ation t at is to 1e ,ontrolled -ill ave its o-n separate f&n,tion. @ en t e f&n,tion is ,alled0 it -ill drive t e (G) ports on t e mi,ro,ontroller to perform t e ,ommand re.&ested. Status Che$,5 The status chec$ of all the de%ices will be slightly different for e%ery de%ice2 Every appli,ation t at is to 1e ,ontrolled -ill also 1e monitored and -ill ave its o-n separate f&n,tion. " e devi,e is not re.&ired to 1e solely &nder t e ,ontrol of t e system. " is means t at t e system ,an not simply , e,2 t e stat&s of t e (G) val&es to determine - et er a devi,e is in t e state t e system is applyin#. Additional ard-are -ill need to 1e ,onne,ted in order to determine t e state of t e devi,e.

May-06-13 Senior Design

Page 30

11/6/2013

Send Status Message5 The send status 'essage coding 'odule will use the following function ,description pro%ided-: *M* messa#es -ill need to 1e sent 1a,2 to sender -it operation. 3Send 'essage to phone nu'ber below atI,m#sQMdestination p one n&m1erM stat&s of

3Write your 'essage at the 456 pro'pt2 7it #ontrol89 to send ,do not hit enter to sendS"est Messa#e 1 Te&t Message Command Tem lates5 These te:t 'essages will be sent to the controlling unit located in the user;s ho'e: " e ,ell p one messa#e ,ommands -ill ave to 1e set&p 1y t e &ser. " e entire list of a,,epta1le messa#es ,an 1e fo&nd in Appendi6 C.

Mi$ro$ontroller Details
" e mi,ro,ontroller -ill 1e t e devi,e ,ontrollin# all t e applian,es. " ere -ill ave to 1e spe,ial -irin# for all devi,es ,onne,ted to t e mi,ro,ontroller. " e follo-in# se,tion -ill s o- in detail o- t e team as dis,&ssed ,onne,tin# t e vario&s devi,es to t e mi,ro,ontroller.

May-06-13 Senior Design

Page 31

11/6/2013

Thermostat Control5

Figure / (Thermostat Control S$hemati$

May-06-13 Senior Design

Page 32

11/6/2013

Digital Thermostat ) eration

Figure 1 D Thermostat +

li$ation Module S$hemati$ Diagram

(mportant ,omponents of di#ital t ermostat: MAN663A 4 <-DitG13-Dit temperat&re sensors -it (3C,ompati1le serial interfa,e. A"3>C139 4 "-o--ire serial EEPR)M =>;C">0A3 4 D&al >-, annel analo# m&ltiple6er0 dem&ltiple6er ;EADER 4 Mi,ro,ontroller (n Fi#&re 6 t e di#ital t ermostat operates 1y ,onstantly readin# t e room temperat&re and is ,onne,ted to t e m&ltiple6er and t e m&ltiple6er is ,onne,ted to t e mi,ro,ontroller. " is means t at t e temperat&re sensor is sendin# t e re,orded temperat&re and t e m&ltiple6er t en ma2es t e si#nal more reada1le for t e mi,ro,ontroller. " e mi,ro,ontroller -ill de,ide0 dependin# on t e desired temperat&re0 - et er to t&rn on t e AGC$,ool do-n% or t&rn on t e eater$-arm &p%.

May-06-13 Senior Design

Page 33

11/6/2013

" e t ermostat also as t ree s-it, es $*10 *30 *3% t ese are &sed to pro#ram different modes of operation or to , an#e temperat&re set point. " e ,ontroller is ,onne,ted to an +CD t at -ill eit er display t e room temperat&re and t e desired temperat&re and - et er t e fan is t&rned on or off. " e EEPR)M is &sed to store t e temperat&re read 1y t e temperat&re sensor. " e operation of t is t ermostat is as follo-s: 1. " e temperat&re sensor , e,2s t e room temperat&re every 6 se,onds and sends t e information to t e mi,ro,ontroller. 3. " e mi,ro,ontroller &ses t is information 1y ,omparin# t e room temperat&re to t e desired temperat&re. " ere are t-o possi1le s,enarios t at -ill res&lt 4 eat or ,ool t e room. (f t e room temperat&re is &nder t e desired temperat&re0 t e li# t 1&l1 -ill t&rn on. " is -ill eat &p t e temperat&re sensor &ntil t e temperat&res are t e same. (f t e room temperat&re is a1ove t e desired temperat&re t e fan -ill t&rn on. " is -ill ,ool t e temperat&re sensor &ntil t e desired and room temperat&res are e.&al. #nterfa$e bet*een Mi$ro$ontroller and Thermostat " e mi,ro,ontroller -ill &se 3 pins from port A as o&tp&ts t at -ill 1e ,onne,ted to an N)R #ate. " e inp&ts to t e N)R #ate are one from t e mi,ro,ontroller and one from t e p&s 1&tton or t e s-it, . " ese -ere sele,ted so t at t e system ,an , oose - i, si#nal are #oin# to 1e &se: eit er t e one from t e 1&tton or t e one from t e mi,ro,ontroller. " e N)R #ate #ives a T1U o&tp&t only - en t e t-o inp&ts are different. /sin# t is set&p0 only one -ill 1e ,ontrollin# t e inp&t for t e t ermostat. " e m&ltiple6er from t e t ermostat0 - i, sends t e temperat&re0 -ill 1e ,onne,ted to 1ot t e mi,ro,ontroller of t e t ermostat and t e remote ,ontrollin# system8s mi,ro,ontroller. " e t ermometer -ill 1e sendin# t e room temperat&re and t e remote ,ontrollin# system -ill 1ot #et it and &se it to send to t e &ser and ot er appli,ations. " is -ill also 1e ,onne,ted to t e o&tp&t of t e t ermostat mi,ro,ontroller t at #oes to t e +CD so t e desired temperat&re ,an 1e read and t en determine o- m&, t e &ser -ants to , an#e t e temperat&re $see t e s, emati, in Fi#&re A%.

May-06-13 Senior Design

Page 34

11/6/2013

Ho* the Thermostat *ill Eor, " e ,ontrol for t e t ermostat -ill -or2 1y avin# t ese messa#es and o- t ey -or2: Tt ermo stat&sU 4 t is instr&,tion -ill send t e &ser t e room temperat&re so t e &ser ,an de,ide - at e -ants to do -it t at information. From t is0 t e &ser -ill de,ide - at a,tion to ta2e. Tset t ermo temp to NNU $desired temperat&re -ill #o ere% 4 t is instr&,tion -ill tell t e mi,ro,ontroller to , an#e t e desired temperat&re of t e room to t e ne- desired temperat&re. Tt ermo offU 4 t is instr&,tion -ill t&rn t e AGC and t e eater off0 t e fan $,ooler% and t e li# t 1&l1 $ eater% -ill 1e dis,onne,ted re#ardless of previo&s state. Fan Control5 " e ,ontrol of t e fan ta2es pla,e at 1its 0-3 of t e *"!300 2it8s port A. " e main feat&res of t e fan ,ontrol are t e follo-in#: Man&alGremote ,ontrol *peed ,ontrol Fan operatin# stat&s dete,tion. " e o&tlined feat&res are implemented in t e follo-in# -ay: Manual6remote $ontrol sele$t5 " is part ass&mes t at t e mi,ro,ontroller is po-ered on. Relay R3 is a sin#le pole do&1le t ro- relay. (ts ,ontrol si#nal ,omes from port A 1it 3 of t e *"!300. " is relay sele,ts t e o&tp&t of eit er t e fan s-it, or t e ,ontrol relays R1-R3 to 1e ,onne,ted to #ro&nd. (ts de-ener#iEed position is on t e fan s-it, ,onta,t and its ener#iEed position is on t e ,ontrol relay ,onta,t. " erefore a lo#i, si#nal of 0 ,orresponds to t e defa&lt man&al ,ontrol and a lo#i, si#nal of 1 ,orresponds to a remote ,ontrol sele,tion. (n t e ,ase of loss of po-er or a,,idental re1oot of t e ,ontrol mod&le0 t e ,ontrol ret&rns to its defa&lt man&al settin#.

May-06-13 Senior Design

Page 35

11/6/2013

Figure 2 (Fan Control S$hemati$

S eed $ontrol5 " e fan8s man&fa,t&red speed ,ontrol ,ir,&itry ,onsists of a > position s-it, Vof - i, 3 positions ,orrespond to fan speeds and t e >t ,orresponds to t e off positionVand of t ree different siEe -indin#s s arin# a metal ,ore -it t e rotor. " e -indin#s all s are a ,ommon 130HAC volta#e so&r,e and t e s-it, sele,ts eit er -indin#0 allo-in# it to ,ond&,t to #ro&nd. " e implemented speed ,ontrol mimi,s t is ,ontrol system 1y ,onne,tin# sin#le pole sin#le t ro- relays R0-R3 in parallel -it ea, s-it, 8s -indin# ,onne,tion and t e man&alGremote sele,t s-it, . R0-R3 is ,ontrolled 1y si#nals from 1its 0-3 of port A of t e *"!300. For ea, s-it, t e defa&ltGde-ener#iEed position is open ,ir,&it0 and t e ener#iEed position is ,losed ,ir,&it. Effe,tively t e asserted 1it sele,ts t e speed of t e fan.

May-06-13 Senior Design

Page 36

11/6/2013

De'i$e o erating status dete$tion5 " e operatin# stat&s of a devi,e is determined 1y meas&rin# a volta#e drop a,ross a very small resistor in series -it t e devi,e load. " e series resistor only de,rease t e normal po-er delivered to t e devi,e 1y 0.9J. " e volta#e a,ross t e series resistor is meas&red 1y an instr&mentation amplifier ,orrespondin# on fi#&re 9 to t e first t ree operational amplifiers on t e left. " e si#nal is t en re,tified 1y a diode 1rid#e and sent to an a,tive op-amp 1ased filter. " e res&lt is a d, si#nal -it volta#e level of A - en t e devi,e is r&nnin# and 0 - en it is off. " is si#nal is read at one off t e ,ontrol &nit8s mi,ro,ontroller (G) ports as a 1inary inp&t.

Figure 7 ( Fan Status Signal Cir$uit S$hemati$

May-06-13 Senior Design

Page 37

11/6/2013

Light Control5 " e implemented ,ontrol of a lamp essentially follo-s a similar desi#n as t e ,ontrol of t e fan. " ere is a sin#le pole do&1le t ro- relay ,ontrollin# t e sele,tion of remoteGman&al operation and t ere is a sin#le pole sin#le t ro- relay in parallel -it t e li# t s-it, mimi,2in# its f&n,tion. " e remoteGman&al sele,tion relay is ,ontrolled 1y port D 1it 1 of t e *"!300 and t e onGoff ,ontrol relay is ,ontrolled 1y 1it 0 of t e same port.

Figure 8 ( Light S$hemati$

GSM Module Details


" e 5M39 ,ell&lar mod&le is &sed to send and re,eive information over t e 5*M ,ell&lar net-or2. " ere -ill not 1e any modifi,ations to t e 5M39. " e 5M39 -ill 1e ,onne,ted via R*333 serial ,omm&ni,ation port to t e serial port on t e *"!300 mi,ro,ontroller developer8s 2it. *ee appendi6 A and D at t e end of t is do,&ment for t e 5*M and mi,ro,ontroller ima#es.

May-06-13 Senior Design

Page 38

11/6/2013

2"/" #m lementation Pro$ess Des$ri tion


" e implementation pro,ess and materials &sed s all 1e des,ri1ed in t is se,tion. " ere -ere t-o main ,omponents to t is pro7e,t: ard-are and soft-are. Ea, of t ese ,omponents -ill 1e dis,&ssed separately. /pon ,ompletin# dis,&ssion on 1ot t e ard-are and soft-are aspe,ts0 t e inte#ration of 1ot parts s all 1e dis,&ssed and any pro1lems en,o&ntered. S)FTE+R% For t e soft-are0 initial development -as to 1e performed on a Mi,rosoft @indo-s operatin# system. (t -as easier to perform t e serial pro#rammin# on a /ni6-1ased system. " ere -ere several serial drivers availa1le for do-nload from t e (nternet. (t -as easier for t e team do develop -it /ni60 so t e development ,ontin&ed in t e /ni6 environment. " e soft-are ran into a pro1lem - en tryin# to send messa#es to t e remote &ser. @ en &sin# Mi,rosoft @indo-8s yper-terminal0 it -as possi1le to send t e A" ,ommand WatI,m#sQUremote/ser'&m1erU8 t en t e system -o&ld prompt 1a,2 -it a prompt. At t e prompt0 t e te6t messa#e s o&ld 1e entered in and t en s&1mitted -it TC"R+I:U. D&rin# t e ,odin# implementation0 t e messa#e WatI,m#sQUremote/ser'&m1erU8 -as a#ain sent. " e system -o&ld a#ain respond -it t e prompt 1&t -o&ld o-ever ,ontin&e to prompt &ntil event&ally a PD/ error res&lted. " e e6a,t definition of t e error is: ?CM% -:. error5 Fin'alid PD0 formatG H+RDE+R% " e (mplementation of t e stat&s dete,tion -as modified to a,,ommodate t e fa,t t at s&,,essf&l appli,ation of po-er s&pply a,ross a ,ontrolled devi,es does not ens&re t at t e devi,e is r&nnin#. C&rrent dete,tion -as , osen as t e preferred means of verifyin# t at a devi,e is a,t&ally r&nnin#. " e initial desi#n only meas&red t e volta#e applied a,ross a ,ontrolled devi,e as an indi,ator of t e s&,,ess of a ,ontrol ,ommand0 - ereas t e desi#n in,l&ded in t is do,&ment meas&res t e potential differen,e a,ross a resistor - i, ,an only 1e d&e to r&nnin# ,&rrent in t e ,ontrolled devi,e. " e &tiliEation of t e *"!300 mi,ro,ontroller as 1een t ro&# t e (DE t at -as in,l&ded -it t e mi,ro,ontroller 2it. Code development too2 pla,e in t e C lan#&a#e and as 1een in developed in 'otepad. After s&, 0 t e ,ode is t en ,ompiled into e6 format &sin# t e avr-#,,.e6e0 - i, t en ,an 1e loaded into t e mi,ro,ontroller. De1&##in# and May-06-13 Senior Design Page 39 11/6/2013

sim&lation of t e developed ,odes -as in t e AHR *t&dio > (DE environment. AHR *t&dio > also as t e ,apa1ility to do real-time in,ir,&it de1&##in# - i, as made ,ode development very effi,ient. " e diffi,&lty t e team en,o&ntered - ile -or2in# -it t e *"!300 as 1een fi#&rin# o&t t e ,onfi#&ration ne,essary so t at t e soft-are ,an ,ompile C lan#&a#es. " is pro1lem -as resolved after see2in# elp from Do&# )s, ner0 a *enior En#ineer at Mayta# Corp. " e team resolved t is iss&e and -as a1le to f&lly &tiliEe C ,ode on t e mi,ro,ontroller. #4T%GR+T#)4 " e soft-are t at -as dis,&ssed previo&sly -as loaded onto t e mi,ro,ontroller and ,ompiled. " ere ad to 1e , an#es made to t e soft-are in order to f&n,tion properly in t e ne- environment. /tiliEation of t e /AR" re#isters -as ne,essary for transmittin# and re,eivin# data over t e serial port. " is meant t at instead of -ritin# to a file as is t e ,ase in a /ni6 environment0 t e team ad to ma2e t is , an#e. (n addition0 readin# from t e serial port re.&ired t e team to , e,2 if t e re,eive 1it -as i# . " is meant t at t e in,omin# 1&ffer ad data -aitin#. (nstead of readin# a line from t e serial port0 it -as none,essary for t e team to read and add to t e strin# in 9-1yte in,rements $t is -as t e siEe of t e (G) 1&ffer%. " e *"!300 inte#ration into t e system is re.&ired for e6e,&tion of vario&s essential system f&n,tions. Dy &tiliEin# t e (G) pins of t e *"!3000 t e team ,an ,ontrol vario&s relays t at -o&ld determine t e different settin#s of ,ontrolled devi,es. " e (G) pins are also &sed to dete,t t e re,tified volta#es from t e volta#e stat&s ,ir,&it to sense t e stat&s of t e ,ontrolled devi,e. " e *"!300 also in,l&ded a serial ,omm&ni,ation port t at ,o&ld send instr&,tions and re,eive information from t e 5M39. "o send instr&,tions to t e 5M390 t e *"!300 sent o&t a strin# of predefined A" ,ommand t at interfa,ed -it t e 5M39. " e re,eive information from t e 5M39 is stored into t e 1&ffer of t e *"!3000 - ere it -as parsed for a&t enti,ation and ,ommand strin#. " e ,ommand strin# initialiEes t e proper f&n,tion to 1e e6e,&ted 1y t e *"!300 to eit er ,ontrol devi,es or sense t e stat&s of a devi,e. "o interfa,e -it t e t ermostat0 a different approa, -ill 1e &tiliEed t at differs from 7&st ,ontrollin# t e relays. " e team identified t at t e +CD for t e t ermostat as nine o&tp&t pins. From t ese nine o&tp&t pins0 t e team de,oded t e ,om1ination re.&ired to ,ontrol ea, se#ment on t e +CD8s display0 see Fi#&re 10. May-06-13 Senior Design

Page 40

11/6/2013

5reenG5ray

Xello-GDl&e Dla,2GDl&e

@ iteG5reen

Dro-nG5rey

@ iteGDl&e

" e si#nal from t ese o&tp&t pins -ill #o t ro&# a re,tified ,ir,&it and t e res&ltin# re,tified si#nal -ill 1e read from t e (G) pins. After re,eivin# t e si#nal from t e (G) pins0 t e mi,ro,ontroller r&ns a f&n,tion t at de,odes t e si#nals and t e +CD display from t e t ermostat ,an no1e read. Readin# t e +CD display is ,r&,ial in ,ontrollin# and monitorin# t e t ermostat 1e,a&se t e ,&rrent temperat&re and temperat&re settin# of t e t ermostat ,an no- 1e re,eived 1y t e mi,ro,ontroller. After #at erin# t e ne,essary information from t e t ermostat0 t e mi,ro,ontroller t en ,ontrols t e 1&ttons of t e t ermostat via (G) pins to e6e,&te of t e &ser8s ,ommand.

May-06-13 Senior Design

Dl2G5reen

Dl2G5old

Figure !: ( De$ode LCD Dis lay Matri&

Page 41

Dl&eG5rey

11/6/2013

2"1" Testing of the %nd Produ$t and Results


"estin# is separated into t-o ma7or types: &nit and inte#ration. /nit testin# is &sed to determine t at a sin#le ,omponent is f&n,tionin# ,orre,tly - ile inte#ration testin# is &sed to determine t at a ne-ly-added ,omponent is f&n,tionin# ,orre,tly -it in t e ,onte6t of t e rest of t e pro#ram. " e follo-in# &nit testin# re.&irements -ill 1e indi,ators t at t e system ,an s&,,essf&lly 1e implemented: GSM 4et*or, Communi$ation " e 5*M re,eiver -ill 1e tested for s&,,essf&l ,omm&ni,ation -it net-or2. " is -ill test in,l&de a&tomation and ,onsisten,y of t e ,onne,tion and -ill 1e ,ond&,ted 1y a team mem1er in t e follo-in# -ay: " e ,ell&lar p one -ill dial t e 5*M re,eivers8 n&m1er )n,e t e ,onne,tion is esta1lis ed a stream of data -ill 1e send to t e 5*M re,eiver. " e 5*M re,eiver -ill 1e #iven data to 1e transmitted to t e ,ell&lar p one. Su$$ess6failure $riteria: " e data re,eived -ill 1e o1served on 1ot ends to verify its ,onsisten,y. " e test -ill 1e ,onsidered s&,,essf&l if t e inte#rity of t e sent and re,eived data is maintained &pGdo-nstream. (t -ill 1e ,onsidered a fail&re ot er-ise.

May-06-13 Senior Design

Page 42

11/6/2013

GSM to Mi$ro$ontroller Communi$ation " e 5*M to mi,ro,ontroller driver -ill 1e tested 1y verifyin# t e inte#rity of ,ommand strin#s sent from t e remote &ser. " e follo-in# pro,ed&re -ill 1e performed mostly 1y a CprE team mem1er: " e remote &ser -ill send a ,ommand to t e ,ontrol mod&le. " e ,ontents of t e data stream -ill 1e o1served at t e 5*M ,omm&ni,ation port. " ese ,ontents -ill 1e ,ompared -it t ose re,eived and stored at t e mi,ro,ontroller8s ,orrespondin# ,omm&ni,ation port. " e pro,ed&re -ill 1e repeated in reverse -it t e mi,ro,ontroller sendin# a data steam to t e 5*M re,eiver. Su$$ess6failure $riteria: " e test -ill 1e ,onsidered s&,,essf&l if t e inte#rity of t e data sent &pGdo-nstream is maintained. (t -ill 1e ,onsidered a fail&re ot er-ise. GSM Message De$oding Proper de,odin# of t e remote &ser8s ,ommands and iss&an,e of t e e.&ivalent ,ommands to t e ,ontrolled devi,e -ill 1e performed 1y team mem1ers &sin# t e follo-in# pro,ed&re: A sim&lated instr&,tion -ill 1e fed to t e mi,ro,ontroller ,omm&ni,ation port. " e o&tp&t ,ommand at t e (G) interfa,e -it t e ,orrespondin# ,ontrolled devi,e -ill 1e o1served. Su$$ess6failure $riteria: " e test -ill 1e ,onsidered a s&,,ess if t e res&ltin# ,ommand iss&ed from t e mi,ro,ontroller is sent to t e ri# t (G) address for t e desired ,ontrolled devi,e and if t at ,ommand is ,onsistent -it t e ,ommand - i, is e6pe,ted. " e test -ill 1e ,onsidered a fail&re ot er-ise.

May-06-13 Senior Design

Page 43

11/6/2013

Aoltage Con'erter Cir$uit ) eration " e s,alin# ,ir,&it from t e ,ontrolled devi,es to t e (G) -ill 1e tested for proper operation. " is -ill 1e tested 1y EE team mem1ers: " e ,ontrolled devi,es -ill 1e man&ally tri##ered to for,e t e desired volta#e. " e o&tp&t of t e s,alin# ,ir,&it -ill 1e meas&red. Su$$ess6failure $riteria5 " e testin# -ill 1e ,onsidered s&,,essf&l if t e meas&red o&tp&t volta#e is properly s,aled to t e mi,ro,ontroller8s re.&ired inp&t val&e. " e test -ill 1e ,onsidered a fail&re ot er-ise. #6) Port Mani ulation and Dete$tion " e a1ility of (G) to dete,t an inp&t volta#e and store a val&e in t e mi,ro,ontroller8s memory -ill 1e tested 1y team mem1ers: "est volta#es to t e inp&t of t e (G) -ill 1e applied. " e ,ontents of t e memory s all 1e , e,2ed for validity.

Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e val&es of t e memory are as e6pe,ted. " e test -ill 1e ,onsidered a fail&re ot er-ise. Po*er Surge Performan$e " e ,ir,&it8s po-er s&r#e prote,tion -ill 1e tested for a,,epta1le performan,e 1y EE team mem1ers &sin# t e follo-in# pro,ed&re: " e ,ir,&it8s po-er s&pply -ill 1e removed from t e ,ir,&it and ,onne,ted to a d&mmy load. A sim&lated volta#e spi2e -ill 1e inp&tted 1y &sin# a step si#nal from a si#nal #enerator. " e o&tp&t volta#e and ,&rrent -ill 1e meas&red at t e load. Su$$ess6failure $riteria: " e s&,,ess of t e test -ill 1e determined 1y verifyin# t at t e o&tp&t si#nal to t e d&mmy load falls -it t e toleran,e indi,ated 1y t e mi,ro,ontroller and t e 5*M , ip8s man&fa,t&rers. " e test -ill 1e ,onsidered a fail&re if t e meas&red , ara,teristi,s of t e po-er s&pply8s o&tp&t do not meet t e man&fa,t&rers8 re.&irements.

May-06-13 Senior Design

Page 44

11/6/2013

0ser +uthenti$ation " e pass-ord a&t enti,ation -ill 1e tested for proper operation. " e follo-in# pro,ed&re -ill 1e performed 1y team mem1ers: " e pass-ord prote,tion of t e ,ode -ill 1e r&n in de1&# mode. A sim&lated mi6 of ,orre,t and in,orre,t pass-ords -ill 1e sent to t e mi,ro,ontroller " e response of t e mi,ro,ontroller -ill 1e o1served for ea, of t e inp&tted pass-ords. Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e mi,ro,ontroller #rants a,,ess to all t e ri# t pass-ords and none of t e -ron# pass-ords. " e test -ill 1e ,onsidered a fail&re ot er-ise. #6) Status Trigger Corre$tness " e a1ility of an (G) stat&s to tri##er t e e6e,&tion of stat&s messa#in# s&1ro&tine -ill 1e tested as -ell as t e a1ility to send t e res&ltin# stat&s to t e remote &ser. " e follo-in# pro,ed&re -ill 1e performed 1y team mem1ers: A sim&lated devi,e stat&s -ill 1e -ritten to t e (G) in de1&# mode. of t e " e sim&lated stat&s -ill tri##er t e e6e,&tion mi,ro,ontroller8s devi,e stat&s notifi,ation s&1ro&tine

" e s&1ro&tine o&tp&t -ill 1e , e,2ed prior to 1ein# sent to t e 5*M , ip. Herifi,ation t at t e stat&s messa#e -as re,eived 1y t e &ser ,ell p one -ill 1e performed. Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered s&,,essf&l if t e sim&lated (G) tri##ers e6e,&tion of t e s&1ro&tine and if t e ,orre,t stat&s messa#e is sent to t e 5*M , ip and t at stat&s messa#e is re,eived 1y t e ,ell p one. " e test -ill 1e ,onsidered a fail&re ot er-ise.

May-06-13 Senior Design

Page 45

11/6/2013

%nd Produ$t Testing " e end-prod&,t f&n,tionalities -ill 1e tested 1y team mem1ers and nonteam mem1ers in t e follo-in# -ay: "eam mem1ers -ill ens&re t at all s&1systems f&n,tion properly to#et er from remote &ser ,ommand to e6e,&tion and 1a,2 to ,ompletion stat&s notifi,ation. 'on-team mem1ers from t e #eneral p&1li, -ill 1e allo-ed to a,,ess and &se t e ,ontrol &nit for a frame of time. After-ard0 t e non-team mem1er testin# s&17e,ts -ill fill o&t a s&rvey on t e end-prod&,t8s f&n,tionalities0 ease of &se0 diffi,&lties0 et,. Su$$ess6failure $riteria: " e testin# -ill 1e ,onsidered a s&,,ess if t e testin# s&17e,ts find t e end-prod&,t &ser friendly0 and easy to fi#&re o&t. Testers Ea, team mem1er is responsi1le for 1ein# t e primary 1la,2 1o6 tester of a #iven mem1erLs ,ode. Dla,2 1o6 testers are to test ,ode -it o&t e6aminin# t e ,ode itself in order to avoid avin# any ass&mptions o&tside of t ose spe,ified 1y t e ,onditions of t e ,ode. 'on-team mem1ers -ill 1e 1ro&# t in to &se t e system and -ill 1e monitored 1y team mem1ers. (f t e non-team mem1ers ,a&se an error in t e system0 t e team mem1ers -ill do,&ment t e nat&re of t e error and address t e iss&e as soon as possi1le.

May-06-13 Senior Design

Page 46

11/6/2013

2"2" %nd Results of the ProHe$t


" e end res&lt for ea, ma7or ,omponents of t e prod&,t -ill 1e s&mmariEed in t is se,tion. " is -ill in,l&de e6pe,ted to a,t&al operation ,omparison of ea, system ,omponent and ,omponent satisfa,tory. Any si#nifi,ant a,,omplis ments or resear, a,tivities not ,overed else- ere and ma7or fail&res -ill also 1e do,&mented in t is se,tion. 5M39: " e overall operation of t e 5M39 mod&le mat, ed t e team e6pe,tation. " e mod&le -as a1le esta1lis ed ,omm&ni,ation -it t e 5*M net-or20 re,eive *M* messa#es0 and relay t e re,eived messa#es via serial port. " e team is still in t e pro,ess of resear, in# o- to &tiliEe t e sent messa#e f&n,tion on t e 5M39. )n,e t is is esta1lis ed0 t e 5M39 -ill t en mat, all of t e re.&ired ,riteria o&tlined in t e *e,tion 3.>. "eam mem1ers are satisfied for avin# , osen t is mod&le 1e,a&se it -as ,ompa,t0 en,losed0 and easy to interfa,e. *"!300: " e *"!300 as all t e f&n,tionality o&tlined in *e,tion 3.>. " is in,l&des (G) pins interfa,e and serial ,omm&ni,ation ,apa1ility. " e AHR *t&dio > in,l&ded allo-s t e team to sim&late t e pro#ram 1efore loadin# it onto t e mi,ro,ontroller and t e O"A5 2it in,l&ded allo-s t e team to do in,ir,&it de1&##in#. " ese feat&res -ill allo- t e team to ,ode very effi,iently. " e team did not anti,ipate t e amo&nt of time re.&ired to set &p t e (DE soft-are in,l&ded -it t e 2it to 1e ,ompati1le -it C. " is iss&e is no- resolved. "eam mem1ers are satisfied for avin# , osen t e *"!300 1e,a&se it is a versatile 2it t at as f&n,tionality far e6,eeds - at -as o&tlined 1y t e desi#n report. " e 2it also allo-s effi,ient pro#rammin# 1e,a&se it as a sim&lation and in-,ir,&it de1&##in# ,apa1ilities. Control Applian,es: " e ,ir,&it desi#ned for ,ontrollin# t e fan and t e li# t in *e,tion 3.> -as s&,,essf&lly implemented in la1 -or2. " e t ermostat temperat&re -as also s&,,essf&lly read 1y loo2in# from t e +CD o&tp&t pins. " e ,ir,&it for ,ontrollin# t e temperat&re settin# of t e t ermostat still needs to 1e implemented. " e ma7or pro1lem t at t e team en,o&ntered is in redesi#nin# volta#e dete,tor ,ir,&it to a ,&rrent dete,tor ,ir,&it to 1e &se as a stat&s si#nal. " is pro1lem is d&e to avin# same #ro&nd for 1ot AC and DC volta#es and -ere resolved. May-06-13 Senior Design

Page 47

11/6/2013

-"

Resour$es and S$hedule

" is se,tion in,l&des an estimate of t e reso&r,es re.&ired for t e pro7e,t. Reso&r,es defined in,l&de t e n&m1er of o&rs ea, team mem1er -ill spend on different pro7e,t areas0 any e.&ipment t at -ill 1e ne,essary for t e pro7e,t0 and t e total dollar amo&nt t at t e team -ill need for s&,,essf&l pro7e,t ,ompletion.

-"!" %stimated Resour$e Re3uirements


Personal o&rs and material ,osts ma2e &p t e estimated reso&r,e re.&irements. " ere are t ree parts to ea, of t ese ,omponents: t e ori#inal estimate0 a ,om1ination of a,t&al personnel o&rs to date and revised f&t&re personnel o&rs0 and t e a,t&al o&rs. " e ori#inal ,ase s all 1e ,ompared to t e revised ,ase and t e reason$s% for t e differen,e s all 1e e6plained.

-"!"!" Personnel Resour$es


Follo-in# is an &pdate to t e material presented in t e same se,tion of t e pro7e,t plan. " is ta1le o&tlines t e pro7e,ted and ,&rrent o&rs spent 1y team mem1ers on t e pro7e,t as -ell as ot er reso&r,es o&rs to 1e spent on t e pro7e,t. )t er reso&r,es are mem1ers of t e #eneral p&1li, t at -ill 1e as2ed to &se t e system. " e team is plannin# to &se o&tside so&r,es for testin# in order to see if persons &nfamiliar -it t e pro7e,t -ill try to perform operations not a,,o&nted for 1y t e team. " e pro1lem definition and te, nolo#y ,onsiderations are ,omplete0 so t e times refle,ted -ill not , an#e.

May-06-13 Senior Design

Page 48

11/6/2013

Table / ( Personal %ffort in Hours

May-06-13 Senior Design

Page 49

11/6/2013

Sele$tionTe$hnology Consideration and

#m lementation%ndDProdu$t

Do$umentation%ndDProdu$t

Demonstration%ndDProdu$t

%ndDProdu$t Testing

Design%ndDProdu$t

Problem Definition

ProHe$t Re orting >3 3A >A 30 0 !/2 A6 A0 AA A3 0 2!-

Total

)riginal ProHe$ted %ffort 1A 30 30 3A 0 7: A A A A 0 2: 3A 3A 30 0 9 87 3A 3A 30 0 9 87 3A 30 1A 0 0 1: 3A 30 1A 0 0 1: 10 10 10 0 0 -: 10 10 10 0 0 -: !7. !2: !22 2: 7 1:. !8: !27 !7. 2. 7 1-.

Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& )t er Reso&r,es Total Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& )t er Reso&r,es Total

A A A A 0 2: 6 A 6 6 0 2-

13 10 13 10 0 .. 13 19 39 11 0 2:

+dHusted ProHe$ted Total %ffort

Final Total %ffort Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& )t er Reso&r,es 6 A 6 6 0 213 19 39 11 0 2: A A A A 0 2: 3A 3A 30 0 3 82 >A 30 30 0 0 7/ A A A 0 0 !/ 6= A6 A= A3 0 2-2 21! 2-. 2.7 2. 2 72:

May-06-13 Total Senior Design

Page 50

11/6/2013

May-06-13 Senior Design

Page 51

11/6/2013

'ote t at t e end-prod&,t demonstration is e.&ally distri1&ted amon# t e mem1ers sin,e t is -ill 1e a team effort for 1ot t e preparation and t e a,t&al presentation. " e pro7e,t reportin# ,ol&mn -ill also in,rease in val&e 1e,a&se t e team is re.&ired to ,ontin&e reportin# and ,reate a final report. )verall0 t e team &nderestimated meas&rements for o&rs spent on t e tas2s. " ere -as m&, more resear, t at needed to 1e done in order to a,,ommodate all t e possi1le sol&tions to t e pro7e,t. " e team also #reatly &nderestimated t e amo&nt of time t at -o&ld #o into t e development sta#e of t e pro7e,t. " ere -ere many &nforeseen errors t at arose d&rin# development. *ome of t e tas2s $s&, as ,&rrent dete,tion% t at did not so&nd very diffi,&lt ended &p re.&irin# a lar#e amo&nt of o&rs to resolve. For ot er reso&r,es0 t e team ,onta,ted a former mana#er of one of t e team mem1ers for elp settin# &p t e mi,ro,ontroller. " is mana#er elped #et a C ,ompiler installed and -or2in# and elped t e team &nderstand o- to manip&late t e (G) ,onne,tions.

May-06-13 Senior Design

Page 52

11/6/2013

-"!"2" Finan$ial Re3uirements


" is se,tion dis,&sses t e e6pe,ted ,osts of t e pro7e,t0 1ot revised0 ,&rrent0 and total pro7e,ted. "a1les =0 9 and < 1elo- represent t e appro6imate estimates for t e pro7e,t -it and -it o&t la1or ,osts of t e team mem1ers. " e items ave 1een separated into t-o se,tions: parts and materials e6penses0 and la1or ,osts. +a1or ,osts in,l&de t e amo&nt ea, team mem1er -o&ld ave earned 1ased on t eir o&rs and a ?10.30G o&r -a#e. " e -a#e -as sele,ted 1ased on - at appeared to 1e an avera#e amo&nt from ot er senior desi#n #ro&ps. As t e ta1le s o-s0 t e amo&nt earned is proportional to t e total individ&al o&rs spent on t e pro7e,t.

May-06-13 Senior Design

Page 53

11/6/2013

Table 1 ( Finan$ial Re3uirements

#tem

Eithout Labor

Eith Labor

)riginal ProHe$tion Parts and Materials Comp&ter ;ard-are C ?0.00 *oft-are Final Pro7e,t En,los&re ?3.00 M3M 5*M Controller ?1>0.00 Mis,. Ele,troni, Components ?9.00 Poster ?A0.00 Subtotal ;2:!":: Labor (at $10.30/hr) Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& Subtotal Total

;:":: ?19<A.30 ?1=A1.00 ?1==1.60 ?=31.00 ;1!-7"7: ;1--8"7:

;:"::

ProHe$ted Total Cost Parts and Materials Mis,. Ele,troni, Components ?9.00 5M39 5*M Cell&lar mod&le ?331.00 5M39 Po-er *&pply ?33.00 5M39 Antenna ?33.00 Mi,ro,ontroller *tarter !it ?9A.00 Poster ?A0.00 Subtotal ;.28":: Labor (at $10.30/hr) Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& Subtotal Total ?1<A=.00 ?1933.>0 ?19<A.30 ?=63.30 ;1..2"7: ;1721"7:

May-06-13 Senior Design

Page 54

11/6/2013

Final Total Cost Parts and Materials 5M39 5*M Cell&lar mod&le ?0.00 5M39 Po-er *&pply ?0.00 5M39 Antenna ?0.00 Mi,ro,ontroller *tarter !it ?0.00 Prepaid Cell&lar P one ?30.00 Fan ?30.00 " ermostat ?1A.16 Ca1le ?A.<A Mis,. Ele,troni, Components ?30.33 Poster ?1=.A0 KK Additional ,ir,&it ,omponents $"a1le = 1elo-% ?>0.09 Subtotal ;!.7"8! Labor (at $10.30/hr) Adam Mo lin# C a& '#&yen (ssa Drame Art&ro Pala& Subtotal Total ?3699.30 ?3>10.30 ?3AA>.>0 ?=63.30 ;7.!/"!: ;7/1.":!

Table 2 ( Detailed Cir$uit Finan$ial Re3uirements Part '&m1er A99-13FR090 A11-/A=>1C' A13-1'3A<A 660-RC1G>""A3R10>O A99->3F->! 3<3-3!GREE+ 3<>-1!-RC 1>0-M+'PA0H.33 6AA-"==*1D10-0A 6AA-"=3*AD1A-0A P(C19+F>A3-(GP Des,ription .9 o m res op amp diodes 1002 res. >2 res. 32 res. 12 res. 330nf ,ap. *P*"-') relay *PD" relay 1a,2&p mi,ro,ontroller /nit pri,e 1.A6 0.3A 0.09 0.13 1.<1 0.1 0.1> 0.3 1.A6 3.03 A.<= Yty > 16 13 A 3 3 6 A A 3 1 Total *&1total ?6.3> ?>.00 ?0.<6 ?0.6A ?A.=3 ?0.03 ?0.9> ?1.A0 ?=.90 ?6.0< ?A.<= ?.:":7

May-06-13 Senior Design

Page 55

11/6/2013

-"2" S$hedules
"o date0 t e team as mana#ed to stay ,lose to t e pro7e,ted s, ed&le. " e only ma7or differen,e 1et-een t e previo&s and ,&rrent 5antt , art is t at t e team8s pro7e,t poster as 1een moved to t e 3 nd semester of t e ,o&rse. " e rest of t e s, ed&lin# iss&es -ill 1e addressed in t eir related s&1-se,tions.

Figure !! ( )riginal ProHe$t S$hedule Summary

" e only differen,e 1et-een t e ori#inal pro7e,t s, ed&le and t e ,&rrent pro7e,t s, ed&le is t at t e poster as 1een moved to t e ne6t semester. " is is also refle,ted in t e detailed pro7e,t reportin# s, ed&le

Figure !2 ( Final ProHe$t S$hedule Summary

May-06-13 Senior Design

Page 56

11/6/2013

*, ed&lin# for t e team -as separated into t e t-o main se,tion of t e pro7e,t0 pro7e,t reportin# and pro7e,t development. " e pro7e,t development follo-ed very ,losely to t e pro7e,ted o&rs0 o-ever t e development did not. " e development too2 a little lon#er to 1e#in d&e to delays from !anda in sendin# t e team8s mi,ro,ontroller. " e follo-in# 5antt , arts s o-s t e o&rs spent on ea, portion of t e pro7e,t.

Figure !- ( )riginal ProHe$t Re orting S$hedule

May-06-13 Senior Design

Page 57

11/6/2013

Figure !. ( Design Re ort ProHe$t Re orting S$hedule

KK 'oti,e t e pro7e,t poster is t e only , an#e from t e previo&s to t e ,&rrent s, ed&le.

May-06-13 Senior Design

Page 58

11/6/2013

Figure !/ ( Final ProHe$t Re orting S$hedule

For t e final pro7e,t reportin# s, ed&le0 t ere is not m&, of a , an#e to report 1e,a&se a ma7ority of t e reportin# -as ,ompleted t e previo&s semester. " e only ma7or , an#e to 1e reported is t at t e team did not start -or2 on t e final report as planned. (nstead0 -or2 1e#an appro6imately one -ee2 later t an e6pe,ted. " e reason for t is is t e team -as 1&sy -or2in# on t e development portion of t e pro7e,t.

May-06-13 Senior Design

Page 59

11/6/2013

Figure !1 ( ProHe$t De'elo ment S$hedule

*in,e t e team ad not rea, ed t e development sta#e 1y t e time of t e desi#n report0 t ere -as never a proposed , an#e to t e pro7e,t development s, ed&le. " is 1ein# t e ,ase0 t ere is only an ori#inal and an a,t&al pro7e,t development s, ed&le to report.

May-06-13 Senior Design

Page 60

11/6/2013

Figure !2 ( Final ProHe$t De'elo ment S$hedule

" is s, ed&les s o-s - at t e team -as a1le to ,omplete over t e ,o&rse of t e t-o semester of enrollment in t e senior desi#n ,o&rse.

May-06-13 Senior Design

Page 61

11/6/2013

." Closure Materials


" is se,tion provides ,onta,t information for all si#nifi,ant parties involved in t e pro7e,t. Also in,l&ded are a ,losin# s&mmary intended to #ive t e reader a final perspe,tive on t e - ole pro7e,t and a list of referen,es t e team -ill 1e &sin# d&rin# t e ,o&rse of t e pro7e,t.

."! ProHe$t %'aluation


" ere are many fa,tors to ta2e into ,onsideration - ile eval&atin# t e overall s&,,ess G fail&re of t is team pro7e,t. " e most lo#i,al -ay of eval&atin# t e pro7e,t is to follo- t e 5antt , arts ,reated at t e 1e#innin# of t e pro7e,t and referen,ed in t e previo&s se,tion. " e reportin# for t e entire pro7e,t -ent very -ell. " e team s o-ed improvement on all do,&ments as t e semester pro#ressed. All do,&ments -ere ,ompleted on time -it minimal T,r&n, timeU every re.&ired 1y t e team mem1ers. " e only e6,eption to t is -as for t e final report. " e team -as very 1&syin# -or2in# on t e development sta#e t at t e do,&mentation -as p&s ed 1a,2 and started one -ee2 later t en - at -as planned. " e poster -as ori#inally pres&med to 1e d&e d&rin# t e first semester0 so t e team ad t is nearly ,ompleted 1efore t e end of t e first alf of t e semester. " is is - y t e 5antt , art s o-s -or2 on t e poster spannin# over s&, a #reat deal of time. " ere -as too m&, information to pla,e onto t e poster in order to ,ompletely meet all t e poster ,riteria and t e main ,omplaint a1o&t t e team8s poster -as t at t e type -as too small. Development for t e team -as m&, more diffi,&lt t an ori#inally e6pe,ted. " ere -as not eno&# s&pport on t e team to ,omplete t is pro7e,t -it 7&st t ree mem1ers. " e team often ,a&# t t emselves -or2in# 10 o&r days d&rin# t e -ee2 and sometimes more on t e -ee2ends. Most of t is time -as spent resear, in# o- to manip&late t e ,omponents of t e system. Alt o&# a #reat deal of 2no-led#e -as o1tained d&rin# t is time0 some o1sta,les still remained &n,ompleted.

May-06-13 Senior Design

Page 62

11/6/2013

(n order to ,omplete t e pro7e,t on time0 some tas2s -ere dropped from t e team8s proposed development tas2 set. A ma7ority of t ese -ere not re.&ired0 7&st -ere t o&# t to 1e ,onvenient to t e system. " ese tas2s are as follo-s: (mplement s&r#e prote,tion Dattery 1a,2&p implementation "est 1attery 1a,2&p operation "est 1attery 1a,2&p lifetime F&n,tionality men& interfa,e )t er feat&res -ere met d&rin# t e development of t e system. " ese tas2s are as follo-s: "est se,&rity proto,ols "est &ser messa#e inte#rity All of t e proposed ,ontrolled devi,es ave 1een sim&lated 1y t e team and ,an 1e ,ontrolled 1y applyin# volta#es to t e ,orre,t (G) pins. " e team -as a1le to also de,ode t e +CD display of t e t ermostat and manip&late t e val&es sent to t e +CD. " is -as very impressive 1e,a&se t e team -as not s&re if t is ,o&ld 1e done. " e pro1lem -it t is is t at it re.&ired many more (G) pins to read and de,ode t e val&e of t e +CD. Fort&nately0 t e team a,,o&nted for t e need for additional (G) pins and t is -as t erefore not a pro1lem. Compilin# ,ode on t e *"! mi,ro,ontroller -as a s&,,ess. " is allo-ed t e team to 1e a1le to read (G) pins t at -ere ,onne,ted to t e ,ontrolled devi,es. " is -as also vie-ed as a s&,,ess 1y t e team. Conne,tivity to t e 5M39 -as esta1lis ed. *oft-are -as ,reated t at -as a1le to re,eive messa#es sent 1y remote &sers and t e data -as parsed and made availa1le for pro,essin#. *ettin#s on t e 5M39 -ere also a1le to 1e set and manip&lated providin# for additional f&n,tionality. A ma7or o1sta,le for t is portion of t e pro7e,t -as sendin# a messa#e to t e remote &sers res&lted in t e 5M39 ret&rnin# a ICME 30> error: Tinvalid PD/ formatU. " is error means t at t e messa#e to 1e sent -as not of a valid PD/ format0 o-ever t e team -as not sendin# messa#es in t e PD/ format $t e team -as &sin# te6t format%. Even after , an#in# to t e PD/ format and , an#in# t e modem to a,,ept PD/ format messa#es0 t e pro1lem still persisted. /pon r&nnin# t e soft-are on t e *"!0 t e pro1lem resolved itself.

May-06-13 Senior Design

Page 63

11/6/2013

*tat&s dete,tion for t e team proved to 1e .&ite an o1sta,le. @ at seemed to 1e a simple tas2 1e,ame a len#t tas2. " e team -as finally a1le to ans-er t is pro1lem and a ,&rrent dete,tion ,ir,&it is s o-n in fi#&re 9. "a2in# all of t ese fa,tors into ,onsideration0 t e pro7e,t -as seen to 1e almost as a s&,,ess. /sers -ere a1le to ,ontrol devi,es from a remote lo,ation. " e stat&s of a devi,e -as a1le to 1e a,.&ired. " e &sers intera,tin# -it t e system ,o&ld 1e properly a&t enti,ated. /sers -ere a1le to re,eive notifi,ation of t e res&ltant o&t,ome of t eir re.&est. " e only pro1lems t at arose d&rin# t e pro7e,t -ere t at t ere -as not eno&# time to do f&ll system testin#. All t e testin# ad to 1e done alon# t e -ay.

May-06-13 Senior Design

Page 64

11/6/2013

."2 Commer$ialiIation
" is system ,an 1e &sed to &tiliEe M3M ,onne,tivity and provide a #reat deal of effi,ien,y to a 1&siness environment. Primary ,andidates for remote monitorin# in,l&de 1&t are not limited devi,es s&, as: Monitorin# a vendin# ma, ine and reportin# 1a,2 - en a parti,&lar prod&,t is r&nnin# lo-. " is -o&ld in,rease sales if a prod&,t -as al-ays availa1le to t e ,&stomer. Remotely monitorin# t e &se of applian,es in a 1&ildin# Creatin# a lo# of t e a,tions -it in a 1&ildin# s&, as - en a door -as opened0 li# t t&rned onGoff0 et,. " is prod&,t -o&ld 1e feasi1le for ,ommer,ialiEation to a typi,al o&se old d&e to t e amo&nt of effort t at #oes into interfa,in# t e system -it tar#et ,ontrolled devi,es. A ,ompany ,o&ld profit from and save man o&rs 1y &sin# t is system. " is system ,o&ld repla,e sendin# an employee to a remote site for simple monitorin# of an event. (f an entity -anted to 1e si#naled - en an event too2 pla,e0 t ey ,o&ld &se t is system. " e ,ost of avin# a se,&rity #&ard0 for e6ample0 -o&ld 1e m&, more e6pensive t an installin# t is system. A messa#e ,o&ld 1e sent statin# t at a door as 1een opened and proper a,tions ,o&ld t en 1e deployed. All printin# -as performed from t e Coover la1s and -as ta2en from team mem1er8s print .&otas. " ese ,osts -ere i#nored d&e to t e fa,t t at t e team did not in,&r any additional finan,ial 1&rdens from printin# in t is manner.

."- +dditional Eor,


*in,e t is pro7e,t is not an on#oin# pro7e,t0 t ere -ill not 1e any -or2 to 1e done after t e end of t is semester. (f t is pro7e,t -as to 1e anded on to anot er team0 t e do,&mentation and ,&rrent ,ir,&it desi#ns -o&ld 1e made availa1le to t e in,omin# team. An informative session lastin# appro6imately one o&r -o&ld also 1e ne,essary to #&arantee any spe,ial instr&,tions -ere in,l&ded.

May-06-13 Senior Design

Page 65

11/6/2013

.". Lessons Learned


" e follo-in# is a list of t e e6perien,es #ained 1y t is #ro&p in t e pro,esses of developin# t is pro7e,t. " e e6perien,es are ,lassified in t-o #ro&ps: Pro7e,t e6perien,e and ne- te, ni,al 2no-led#e #ained. 4e* Te$hni$al ,no*ledge " e me, ani,s of and +CD matri,es " e details of ACGDC si#nal ,onversion " e *M* te6t messa#e *erial pro#rammin# F&rt ered C pro#rammin# s2ills Development of ,ode for a mi,ro,ontroller " e &se of relays0 and opto,o&plers for ,ontrol appli,ations F"P and s ared stora#e reso&r,es for files and ot er information ProHe$t %& erien$e Professional pro7e,t plannin#0 s, ed&lin#0 ,ond&,tin# and mana#ement. Personal time mana#ement re.&ired to effi,iently ,ontri1&te to t is type of pro7e,t /se of o&tside reso&r,es - en t e team -as not a1le to fi#&re o&t t e ,ompli,ated iss&es (n,l&din# Wsla,2 time8 is very important in a pro7e,t and is ne,essary to andle &nforeseen events. " e need for an individ&al to fa,ilitate t e pro7e,t also e6ists. *omeone to ma2e s&re t at tas2s start on time and are 1ein# ,ompleted in a reasona1le amo&nt of time. "ime mana#ement

May-06-13 Senior Design

Page 66

11/6/2013

."/ Ris, and Management


" e anti,ipated potential ris2s and planned mana#ement for t e pro7e,t are as follo-s: 1. +oss of team mem1er$s% " ere -ill 1e al-ays at least t-o team mem1ers t at are involved -it desi#nin# of every s&1system. " is -ill ens&re t at at least t-o team mem1ers - o are familiar -it every s&1system. *o in t e event of losin# a team mem1er0 t ere -ill 1e a se,ondary team mem1er - o ,an ta2e over t e responsi1ilities. 3. +a,2 of e6pertise in team mem1ers Ade.&ate time to resear, t e te, nolo#y -ill 1e re.&ired after sele,tin# t e te, nolo#y to 1e &sed in t e pro7e,t. "eam mem1er are also responsi1le to see2 o&t elp - ere ever it applies. Fre.&ent meetin# and pro7e,t &pdate -it fa,&lty advisor -ill ens&re ,orre,t approa, es are &tiliEed in t e ,ompletion of t e pro7e,t. (n t e even t at t e team is not a1le to perform t e ne,essary development on t eir o-n0 o&tside so&r,es -ill 1e ,ons&lted. 3. +e#al ris2 of prod&,t fail&reGdefe,t Appropriate -arnin#s -ill a,,ompany t e prod&,t. >. Ele,tri, s o,2 Proper ele,tri, devi,e pra,ti,es -ill 1e in,l&ded in t e prod&,t man&al and -arnin#s -ill 1e posted in a i# ly visi1le spot on t e prod&,t. A. Delay in re,eivin# ,omponents (n t e even t at one of t e system ,omponents appens to 1e delayed0 t e team -ill -or2 on ot er portions of t e prod&,t. " is -ill ens&re t at t e pro7e,t -ill not fall 1e ind s, ed&le and ,reate sla,2 later in t e pro7e,t8s life.

May-06-13 Senior Design

Page 67

11/6/2013

" e anti,ipated ris2s a,t&ally en,o&ntered and t e s&,,ess in mana#ement of t e ris2s -ill no- 1e dis,&ssed. 1. +oss of a team mem1er " e team fo&nd o&t rat er early on in t e pro7e,t t at one of t e team mem1ers -o&ld only 1e -or2in# on t e pro7e,t for alf of t e semester. For t is reason0 t is team mem1er -as assi#ned to mostly do,&mentation and ot er tas2s t at -o&ld not ne,essarily 1e follo-ed. " is -ay t is team mem1er -o&ld not ,a&se s&, an impa,t on t e team after t ey left. 3. +a,2 of e6pertise amon#st team mem1ers For t is ris20 t e team ,ons&lted a former employee of one of t e team mem1ers t at -as profi,ient -it mi,ro,ontroller pro#rammin#. " is individ&al -as a1le to elp t e team ,ompile C ,ode on t e mi,ro,ontroller and perform initial serial ,omm&ni,ation. 3. Delay in re,eivin# ,omponents " e team mem1ers fo,&sed on ot er aspe,ts of t e pro7e,t s&, as ,ir,&it desi#n and testin#.

May-06-13 Senior Design

Page 68

11/6/2013

" e &nanti,ipated ris2s en,o&ntered -ill no- 1e dis,&ssed. " e attempts to mana#e t ese ris2s and t e s&,,ess andGor fail&res of - i, -ill no1e dis,&ssed. 1. Fail&re of a system ,omponent " e team appened to 1rea2 t e fan ,omponent of t e system. " e initial de,ision to &se t is fan -as 1e,a&se one of t e team mem1ers o-ned t is same fan and ad performed t e initial desi#n development at ome. " e de,ision -as made to t en &se t is fan0 and if t is fan is also dama#ed0 t e team -ill p&r, ase anot er fan for t is mem1er. " e team 2no-s - at appened to ,a&se t e fan to 1e dama#ed and ,an t erefore prevent t is from appenin# a#ain. 3. Fail&re of t e Pre-Paid ,ell p one sim ,ard " e team p&r, ased a Pre-Paid ,ell p one from @al-Mart and ad planned to &se t is sim ,ard in t e 5M39 to 1ed &sed in t e system. @ en a,tivatin# t e sim ,ard0 t e team ad to re#ister a p one serial n&m1er as -ell as a serial n&m1er for t e sim ,ard. " e sim ,ard -as t en pla,ed in t e 5M39 and t e 5M39 ret&rned a T'o 5*M servi,e availa1leU or T'o sim ,ard dete,tedU. /pon pla,in# anot er sim ,ard in t e 5M39 from a team mem1er8s p one0 t e 5M39 performed as pro7e,ted. " e team realiEed t at t e re#istered sim ,ard only -or2ed in t e mat, in# ,ell p one. Dot sim ,ards &sed t e same 5*M net-or2 and s o&ld ave at least 1een ,lassified as Troamin#U if t ey did not &se t e same ,arrier. " e team de,ided to ,ontin&e &sin# t e team mem1er8s sim ,ard. 3. Fail&re of t e C ,ode to perform messa#e sendin# Dy -ritin# to t e serial port in a /'(N environment0 t e 5M39 -o&ld ,a&se a TICME 30> error: Winvalid PD/ format8U. " e team t en de,ided to send sms messa#es t e 5M39 -o&ld ave to to##le 1et-een te6t and PD/ format in order to send messa#es. " is o-ever0 also prod&,ed t e same response. " e res&ltant , an#es made to t e ris2 mana#ement 1e,a&se of t e en,o&ntered &nanti,ipated ris2s are t at t ese ris2s -ere added to t e ris2 se,tion of t e do,&mentation.

May-06-13 Senior Design

Page 69

11/6/2013

."1 ProHe$t Team #nformation


Client #nformation *enior Desi#n0 (o-a *tate /niversity Dr. Oo n @. +amont 33> "o-n En#ineerin# Ames0 (A A0013 $A1A% 3<>-3600 7-lamontZee.iastate.ed& ---.e,e.iastate.ed& Fa$ulty +d'isor #nformation Prof. A med E. !amal0 Professor (o-a *tate /niversity Ames0 (A A0011-3060 $A1A% 3<>-3A90 FAN A1A 3<>-9>33 2amalZiastate.ed& ---.p&1li,.iastate.ed&G[2amal Department of Ele,tri,al and Comp&ter En#ineerin# 3333 Coover ;all Ames0 (o-a A0011 Student Team #nformation Art&ro Pala& 4 EE 90 +inden Devitt Ames0 (A A0011 $A1A%=09-3913$Cell% apala&Ziastate.ed& (ssa Drame 4 EE >33A Frederi,2son Co&rt Ames0 (A A0010 $A1A%A=3-=930 issadZiastate.ed& C a& '#&yen 4 EE 13= *. Fran2lin Ave. Ames0 (A A001> $31<%331-961< , aymanZiastate.ed& Adam Mo lin# 4 CprE 363A !napp *t. Ames0 (A A001> $A1A%3<3-3161$Cell% mo 1andyZiastate.ed& Prof. Ralp Patterson ((( 336 "o-n En#ineerin# Ames0 (A A0013 $A1A% 3<>-3>39 repiiiZiastate.ed&

May-06-13 Senior Design

Page 70

11/6/2013

."2 Closing Summary


Alt o&# t is ,ell p one 1ased remote ome ,ontrol system is applied to a limited n&m1er of devi,es in t is pro7e,t0 its 1asi, 1&ildin# 1lo,2s -o&ld remain t e same0 s o&ld one implement t e remote ,ontrol of any ot er ele,troni,ally ,ontrolla1le devi,e. Pro#rammin# and ard-are additions -o&ld ma2e s&, an &nderta2in# possi1le. Moreover0 #iven t e s&,,essf&l 1id to inte#rate f&n,tionalities into ,ell p ones0 ,ell&lar ,ompanies may find t e idea of t e remote ome ,ontrol system to 1e an attra,tive option0 t erefore s&, a system as a potential for s&,,ess in ,ommer,ial appli,ations.

."7 Referen$e5
*enior Desi#n Co&rse 'otes 4 (o-a *tate /niversity Availa1le at ttp:GGseniord.ee.iastate.ed&GnotesG

."8 +

endi&

May-06-13 Senior Design

Page 71

11/6/2013

Appendi6 A
5M39 5*M Mod&le (ma#es

May-06-13 Senior Design

Page 72

11/6/2013

Appendi6 D
*"!300 Mi,ro,ontroller Developers !it (ma#es

May-06-13 Senior Design

Page 73

11/6/2013

Appendi6 C
+ist of approved ,ommands for t e Cell P one Dased Remote ;ome Control *ystem
L#GHT5 +(5;" )' +(5;" )FF +(5;" *"A"/* F+45 FA' *"A"/* FA' )FF FA' +) FA' MED FA' ;( TH%RM)ST+T5 ";ERM) *"A"/* A+ER" ";ERM) AD)HE NN A+ER" ";ERM) DE+)@ NN ('CREA*E ";ERM) "EMP DX NN DECREA*E ";ERM) "EMP DX NN *E" ";ERM) "EMP ") NN SJST%M C)MM+4DS C;A'5E PA** *X*"EM *;/"D)@'

May-06-13 Senior Design

Page 74

11/6/2013

S-ar putea să vă placă și