I nd o ne s ia n J o urna l o f   E lect rica l En g ineering   a nd   Co m p u t er   Science   Vo l.   21 ,   No .   1 ,  J an u ar y   202 1 ,  p p .   5 4 6 ~5 5 7   I SS N:  2 5 02 - 4 7 5 2 ,   DOI : 1 0 . 1 1 5 9 1 /i j ee cs.v 2 1 .i 1 .   pp 5 4 6 - 557          546       J o ur na l ho m ep a g e :  h ttp : //ij ee cs.ia esco r e. co m   Desig n and  i m ple m en tatio n of  a s ma rt  ho m e sy ste m   w ith  tw o   lev els o f  securi ty  ba sed o n Io T tech no lo g y       M o ha m m e d M ura d 1 ,  O g uz  B a y a t 2 ,  H a m za h M .   M a rho o n 3   1, 2 S c h o o l  o f   En g in e e rin g   a n d   Na tu ra l  S c ien c e ,   A lt in b a s Un iv e rsity ,   İsta n b u l ,  T u rk e y   3 De p a rt m e n t  o f   Co m p u terT e c h n iq u e s E n g i n e e rin g ,   A l - Esra a   Un iv e rsit y   Co ll e g e ,   Ba g h d a d ,   Ira q       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Ma y   24 ,   2 0 20   R ev i s ed   J u l   27 ,   2 0 20   A cc ep ted   A u g   2 ,   2 0 20       Be sid e s  th e   d e v e lo p m e n t  o f  tec h n o lo g y   in   re c e n t  y e a rs,  th e re   h a s  b e e n   a n   e ffe c ti v e   ten d e n c y   to   c o n str u c t  s m a rt  c it ies   a n d   h o m e s.  W h e re a s   th e   sm a rt   h o m e   c o n tro l  sy ste m   c o m p o n e n ts  c a n   b e   in c o r p o ra ted   w it h   th e   e x isti n g   h o m e   a p p li a n c e s  t o   e li m in a te  th e   n e e d   f o r  h u m a n   in terv e n ti o n ,   sa v e   e lec tri c it y ,   p ro tec t  h o m e s  f ro m   a c c id e n ts  a s  w e ll   a s th e   th e f t,   a n d   p ro v id e   h o m e   re sid e n ts   w it h   c o m f o rt.   T h is  w o rk   c o m p ris e s th e   u ti li si n g   o f   th e   in tern e t  o f   t h in g s  (Io T )  tec h n o l o g y   to   b u il d   t h e   p ro p o se d   d e sig n   f o r  th e   s m a rt  h o m e .   T h e   p ro p o se d   d e sig n   in c lu d e s  m a n y   su b s y ste m s   a s  we ll   a s  se v e ra l  t y p e s  o f   se n so rs,  su c h   a s  th e   p a ss iv e   in f ra re d   (P IR)  se n so r ,   th e   g a s  se n so r,   th e   so i l  m o istu re   se n so r,   th e   w a t e r  lev e l  se n so r,   th e   tem p e ra t u re   se n so r,   th e   li g h t  d e p e n d e n t  re sista n c e   (L DR),  a n d   th e   f la m e   s e n so r.   Eac h   se n so r  w il l  b e   c o n n e c ted   to   t h e   A rd u in o   Na n o   f o r  th e   d a ta  p ro c e ss in g   p u r p o se ,   a f ter  w h ich   th e   A rd u in o   Na n o   w il l  b e   c o n n e c ted   t o   th e   No d e M CU  m o d u le  v ia  th e   d ig it a l  p in s  t o   im p lem e n t  th e   Io T   su b sy ste m .   T h e   p r o p o se d   sy ste m   a lso   i n c lu d e s  a   sm a rt  g a r a g e   g a t e   b a se d   o n   Blu e to o th   HC - 0 5   m o d u le w it h   a   sp e c ially   p ro g ra m m e d   a n d ro i d   a p p .   K ey w o r d s :   A r d u i n o   B lu eto o th   HC - 05   I o T   No d eM C U    S m ar t  g ar ag e  g a te   S m ar t  h o m e   T h is  is  a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   Ha m za h   M.   Ma r h o o n   Dep ar t m en t o f   C o m p u ter   T ec h n iq u es E n g i n ee r i n g   Al - E s r aa   U n i v er s it y   C o lle g e   B ag h d ad ,   I r aq   E m ail:  h a m za a laza w y 3 3 @ y a h o o . co m       1.   I NT RO D UCT I O N     I n   r ec en t   y ea r s ,   t h er e  h as  b ee n   a   g r o w i n g   i n ter est  in   s m ar t   h o m e  s y s te m s .   W h er ea s   t h e  au to m ate d   co n tr o l  o f   t h e   ap p lian ce s   en ab les  u s er s   to   p er f o r m   tas k s   b ef o r e  ar r iv in g   at   th e ir   h o m e,   i n   o th er   w o r d s ,   th er e   i s   n o   n ee d   f o r   h u m a n   in ter v e n ti o n .   T h e  s m ar t  h o m e  co n tr o l  s y s te m   o f f er s   a n   ef f ec ti v e  s o lu tio n   f o r   as s is t iv e   t h e   d is ab led   an d   eld er ly   b y   u tili s i n g   t h e  m o b ile  p h o n e  ap p s   as a   r em o te  co n tr o l o r   f o r   m o n ito r in g   p u r p o s es [ 1 ] .   T h e  co n s tr u ct io n   o f   t h e  a u to m atio n   s y s te m s   f o r   t h e  o f f ice s ,   h o m e s ,   co m p a n ies,  a n d   o t h er   i n s ti tu t io n s   h as  b ee n   i n cr ea s ed   o n   a  d aily   b a s is   w it h   n u m er o u s   ad v an tag es  as  w el l  as  s p ec i f icatio n s .   W h er e,   w it h   th e   e m er g e n ce   o f   s m ar t,  ea s y - to - o p er ate,   as  w ell  a s   p r o g r a m m ab le  co n tr o ller s   s u c h   a s   A r d u in o   an d   R asp b er r y   P i,  th er e  h as  b ee n   a   s ig n i f ica n t   in cr ea s e  in   t h e  s m ar t  au to m atio n   s y s te m s .   T h e  r esear ch er s ,   as  w ell  as   m an u f ac t u r er s ,   ar e  w o r k i n g   t o   cr ea te  th e  s m ar t  s y s te m s   t h at  p r o tect  th e   p r o p er ty   f r o m   d is aster s   a n d   s a v e   en er g y   t h r o u g h   a u to m atic  o p er atio n   o f   elec tr ical  ap p lia n ce s   b ased   o n   t h e  n ee d   to   o p er ate  o n l y .   Ho m e  Au to m a tio n   g i v es a n   i n d i v id u al  ab ilit y   to   co n tr o l th i n g s   ar o u n d   t h e  h o m e  r e m o tel y   o r   au t o m a ticall y .   T h e  ter m   o f   th e  h o m e  ap p lia n ce s   m ea n s   a  d ev ice  o r   in s tr u m e n t  d esi g n ed   to   p er f o r m   a  s p ec i f ic  f u n cti o n ,   in   p ar ticu lar   a n   elec t r ical  in s tr u m en t,  f o r   h o u s eh o ld   u s e  [ 1 ,   2 ] .   Sin ce   a   f e w   y ea r s   a g o ,   t h e  ter m   I n ter n et   o f   T h i n g s   ( I o T )   ap p ea r ed   an d   b eg an   to   s p r ea d   wid el y .   T h is   tech n o lo g y   h a s   b ee n   u s ed   in   a  w id e  f ield   t h at  i n cl u d es  s m ar t  h o m es,  s m ar t   co n tr o l,  an d   e v en   m ed ica l   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       Desig n   a n d   imp leme n ta tio n   o f   a   s ma r t h o me  s ystem  w ith   t w o   leve ls   o f  …   ( Mo h a mme d   Mu r a d )   547   ap p licatio n s .   T h is   ter m   is   o f te n   u s ed   to   r e f er   to   t h e  g r o w t h   i n   t h e  n et w o r k   f o r   co n n ec ted   d ev ices,  o r   “ t h i n g s ”,   th at  ar e  ab le  to   ex ch a n g e  d ata  th r o u g h   a  lo w   b an d w id t h   n et w o r k .   T h e  co n n ec ted   d ev ices  s u p p o r t  in s ti tu t io n s   to   i m p r o v e  a u to m atio n   an d   p er f o r m an ce ,   w h ile  at   t h e  s a m e  ti m e  m a y   ex h ib iti n g   t h e  s y s te m   to   th e   s ec u r it y   th r ea ts .   So ,   i n s t itu tio n s   m u s t,   th er ef o r e,   h a v e  a  p r o p er   s ec u r it y   s tr ate g y   a n d   s o l u tio n s   w h ile  d ep lo y i n g   I o T   w it h i n   t h eir   i n f r astru ct u r e,   t h u s   w o u ld   h e lp   th e m   ac h ie v e  t h eir   b u s in e s s   o b j ec tiv es  co r r e ctl y   [3 - 6 ] .   T h e  I o T   s y s te m   co n s i s ts   o f   m a n y   co m p o n en t s   w h ic h   ca n   b e  lis ted   as f o llo w s :    a)   Sen s o r s   an d   ap p lian ce s ,   w h ich   ar e  th e   ele m e n ts   o f   th e   d ev ice   co n n ec tiv it y   la y er .   T h ese  s m a r t  s en s o r s   ar e   co n tin u o u s l y   ac c u m u lati n g   t h e   d ata  f r o m   t h e  e n v ir o n m e n t a n d   tr an s m i t th e  i n f o r m atio n   to   th e  n e x t la y er .   b)   Gate w a y ,   I o T   g ate w a y   co n tr o ls   t h e  b id ir ec tio n al   d ata  tr a f f ic   a m o n g   v ar io u s   n et w o r k s   a n d   p r o to co ls .   T h e  s ec o n d   p u r p o s e  o f   t h e  g ate w a y   is   to   tr a n s late  th e  d i f f er en c e  in   t h e  n et w o r k   p r o to co ls   an d   m ak e  ce r tai n   in ter o p er ab il it y   o f   t h e  co n n ec t ed   ap p lian ce s   an d   s en s o r s .   c)   C lo u d ,   I o T   p r o d u ce s   ex ten s iv e  d ata  f r o m   ap p lian ce s ,   ap p licatio n s ,   an d   u s er s   w h ic h   h a s   to   b e  m an a g ed   i n   an   ex p ed ien t  w a y .   I o T   clo u d   p r o v id es  to o ls   to   h an d le,   p r o ce s s ,   m an a g e,   an d   s to r e  h u g e  a m o u n t  o f   d ata  in   r ea l - ti m e.   I n d u s tr ie s   a n d   s er v ices  ca n   ea s il y   ac ce s s   t h ese  d ata  w ir eless l y   a n d   ta k e  d ec i s iv e   d ec is io n s   w h e n   n ec es s ar y .   d)   User   in ter f ac e,   User   in ter f ac es  ar e  th e  ap p ar en t  an d   p h y s ical  p ar t  o f   th e  I o T   s y s te m   w h ic h   ca n   b e  ac ce s s ed   b y   u s er s ,   Fi g u r e  1   ill u s tr ate s   th e   g en er al  co m p o n en ts   f o r   an y   I o T   s y s te m .           Fig u r e  1 .   T h e  ar ch itectu r e  o f   t h e  I o T   s y s te m       I n   t h is   w o r k ,   t h e  s m ar t   h o m e  s y s te m   d esi g n   w ill   b e  p r o p o s ed   an d   w ill   co n s is t  o f   a   s et  o f   s u b s y s te m s   th at  ca n   b e  lis ted   as  f o llo w s :   th e  f ir s t  p ar t  is   t w o   lev el s   o f   s ec u r it y ;  t h e  f ir s t  lev el  i s   b ased   o n   th e  P ass iv e   I n f r ar ed   ( P I R )   s en s o r   w h ich   r ec eiv ed   th e   e m i tted   in f r ar ed   f r o m   t h e  h u m a n   b o d y   an d   t h e  s ec o n d   lev el  i s   b ased   o n   th e   laser   b ea m .   T h e  s ec o n d   p ar t  o f   t h e  p r o p o s ed   s y s te m   i n cl u d es  t h e  a u to m atio n   as   w e ll  a s   t h e  s a f et y   s y s te m   w h er e  it   w ill   b e  r esp o n s ib le   f o r   t h e  d etec tio n   o f   g as   leak a g e,   f ir e,   lo w   w ater   t a n k   lev el,   m o n ito r   t h e   te m p er atu r e,   a n d   lo w   w ater   le v el  i n   th e   g ar d e n   s o il.   A ls o ,   i n   t h e  to ilet  a   g a s   s en s o r   w ill   b e  in s talled   w h ic h   is   r esp o n s ib le  f o r   ex p lo r in g   th e  u n d es ir ed   s m ell s ,   th er eb y   o p er atin g   t h e  air   ev ac u ato r   an d   th u s   s a v i n g   elec tr ical   en er g y   as   w ell  a s   t h e  in cr ea s in g   th e  o p er atin g   li f e  o f   t h e  d ev i ce .   T h e  t w o   p ar ts   o f   th e  p r o p o s ed   s y s te m   w ill  b e   b ased   o n   th e  I o T   tech n o lo g y ,   as  th e  h o m eo w n er   w i ll  b e  ab le  to   r em o tel y   m o n ito r   h is   h o m e  v ia  a  lo ca l  I P  g r an ted   b y   t h e  No d eM C U  m icr o co n tr o ller   w h ich   e n ab l i n g   th e  u s er   to   ac ce s s   th e  s y s te m 's  Gr ap h ical  U s er   I n ter f ac e  ( GUI ) .   T h e  th ir d   an d   f in al  p ar t  i s   th e  d es ig n   o f   th e  s m ar t  g ar ag e  g ate,   w h ic h   w i ll  b e  o p en ed /clo s ed   u tili s i n g   a  s p ec iall y   p r o g r a m m ed   ap p   in s talled   o n   t h e  An d r o id   s m ar tp h o n e,   allo w i n g   f o r   th e  w ir e les s   co n tr o l  o f   th e  g ar a g e  g ate  v ia  B lu e t o o th   tech n o lo g y .   T h e  p ap er   is   o r g an is ed   as  f o llo w s :  Secti o n   2   illu s tr ates  t h e  p r o p o s ed   s y s te m   m o d u les   as   w ell  a s   s en s o r s   s u c h   th at   f l a m e  s en s o r ,   g a s   s en s o r ,   w ate r   lev el   s e n s o r ,   s o il   h u m id it y   s e n s o r ,   te m p er atu r e   s en s o r ,   f la m e  s en s o r ,   P I R   s en s o r ,   A r d u i n o   Nan o ,   HC - 0 5   B lu eto o th   m o d u le,   A r d u i n o   Me g a,   a n d   No d eM C U  m o d u le.   Sectio n   3   p r esen ts   t h e  n ec e s s ar y   s tep s   f o r   th e  s y s te m   d esi g n ,   i m p le m en ta tio n ,   w o r k i n g   p r in cip le,   an d   th e  o b tai n ed   r esu lt s   af ter   ap p ly in g   t h e  p r ac tical  tes t  f o r   th e   i m p le m en ted   d esi g n .   Fin a ll y ,   Sectio n   4   d e m o n s tr ates t h e  co n clu s io n   o f   th e  p ap er .       2.   SYST E M   H ARDWA RE   I n   th is   p ar t  o f   th e   p ap er ,   th e  h ar d w ar e  a n d   t h e  co m p o n e n ts   t h at  w il l  b e  u t ilis ed   to   b u i ld   u p   th e   p r o p o s ed   s m ar t h o m e  s y s te m   s u ch   a s   th e  s en s o r s   an d   th e  o t h er   m o d u les  w ill b e  ex p lai n ed .     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  21 ,   No .   1 ,  J an u ar y   2 0 2 1   :    5 4 6   -   557   548   2 . 1 .   Arduin o   m icro co ntr o ller   A r d u i n o   is   a  s i n g le - b o ar d   m icr o co n tr o ller   th at  ca n   b e   p r o g r am m ed   u tili s i n g   a n   o p en - s o u r ce   p r o g r am m i n g   la n g u a g e  ca lled   th e  I n te g r ated   Dev elo p m en t   E n v ir o n m e n t  ( I DE ) .   T h e  A r d u in o   ca n   b e  v ie w ed   as  a  s m all  co m p u ter ,   i n   o t h er   w o r d s ,   t h e  A r d u i n o   ca n   b e  p r o g r a m m ed   to   p r o ce s s   in p u t  a s   w el l  as  o u tp u t   d ata   b et w ee n   th e  d ev ice  an d   p er ip h er al  co m p o n en t s .   I n   th i s   w o r k   t w o   t y p e s   o f   th e  A r d u i n o   ar e  u tili s ed ,   th e  f ir s t  o n e  is   t h e  A r d u i n o   Me g a  w h ich   is   b ased   o n   t h e  A T m eg a 2 5 6 0 ,   as  s h o w n   i n   F ig u r e  2 .   T h e  A r d u i n o   Me g a   co m p r is e s   a  5 4   d ig ital  in p u t/o u tp u t  p i n s   ( 1 5   o f   t h e m   ca n   b e   u tili s ed   to   p r o d u ce   th e  an a lo g u e  o u tp u t  v ia  t h e   P W M  tech n iq u e) ,   1 6   an alo g u e  in p u t s ,   4   h ar d w ar e  s er ial  p o r ts ,   a  1 6   MH z  cr y s tal  o s c illato r ,   a  USB   co n n ec to r ,   a  p o w er   j ac k ,   I C SP   h ea d er ,   a n d   a  r estar t   b u tto n   [ 7 - 10 ].   T h e  s ec o n d   u til is ed   m icr o co n tr o ller   is   th e   A r d u i n o   Nan o   b o ar d   th is   t y p e  d o esn ' t  c o n tain   D C   j ac k   s o   th at  t h e  p o w er   s u p p l y   ca n   b e  f ed   u tili s in g   a  s m all  USB   p o r t  o r   ca n   b e  d ir ec tl y   t h r o u g h   th e  VI N  &   GND  p i n s .   T h e  A r d u i n o   Nan o   co n tai n s   a  1 4   d ig ital  in p u t/o u tp u t   p in s ,   6   an alo g u e  in p u t  p in s ,   a n d   1 6   MH z  C L K  s p ee d   [ 1 1 ] .   Fig u r e  3   illu s tr ates  t h e  A r d u in o   N an o   b o ar d   w it h   th e   co n f i g u r atio n   o f   t h e  p in s .           Fig u r e  2 .   A r d u i n o   m e g a  m icr o co n tr o lle r           Fig u r e  3 .   A r d u i n o   n a n o   m icr o co n tr o ller       2 . 2 .   No deM CU  m icro co ntr o ller   No d eM C U  is   a  lo w - co s t,  o p en - s o u r ce   m icr o co n tr o ller   b o ar d   th at  s u p p o r ts   th e  I o T   tec h n o lo g y .   I t   in cl u d ed   f ir m w ar e  r u n n i n g   o n   t h e  E SP 8 2 6 6   W i - Fi  S y s te m   o n   C h ip   ( So C )   f r o m   E s p r ess i f   S y s te m s   a n d   ha r d w ar e  b ased   o n   th e  E SP - 1 2   m o d u le.   T h e  No d eM C U  u s es  th e  m icr o   USB   ca b le  th at  m ak e s   it  p o s s ib le  to   r u n   l ik e  th e  A r d u in o   m icr o co n tr o ller   b o ar d .   Fig u r e  4   i llu s tr ates  t h e  No d eM C U   m o d u le  w it h   it s   p in s   co n f i g u r atio n .   T h is   m o d u le  h as  a  h i g h   p r o ce s s i n g   s p ee d   th an   A r d u in o   an d   s o m e  o th er   co n tr o ller s ,   b u t  th e   m ai n   d r a w b ac k   o f   th i s   m o d u le   is   th e  co n ta in i n g   o f   a  s i n g le  i n p u t a n alo g u e  in p u t p in   [ 1 2 - 1 4 ].   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       Desig n   a n d   imp leme n ta tio n   o f   a   s ma r t h o me  s ystem  w ith   t w o   leve ls   o f  …   ( Mo h a mme d   Mu r a d )   549       Fig u r e  4 .   No d eM C U  m icr o co n tr o ller   b o ar d       2 . 3 .   F la m e  s e ns o r  m o du le   T h e  f la m e  s e n s o r   m o d u le  co n s is t s   o f   a  p h o to d io d e  an d   o p e r atio n al  a m p li f ier   u s ed   u ti lis e d   to   ad j u s t   th e  s e n s it iv i t y ,   t h is   s en s o r   d esig n ed   to   d etec t  th e  p r esen ce   o f   th e  f la m e  a s   w ell  as  t h e  o r d in a r y   l ig h t  w h ic h   h a s   a  w a v ele n g th   in   th e  r a n g e   o f   7 6 0   to   1 1 0 0   n m ,   w it h   a  d etec tio n   r an g e  u p   to   1 0 0   cm .   Gen er all y ,   t h e   m o d u le   co n s is ts   o f   f o u r   ter m i n als,  t wo   o f   w h ic h   ar e  u s ed   f o r   th e  s en s o r   p o w er   s u p p l y   ( i.e .   VC C & GND) ,   th e  t h ir d   ter m i n al  f o r   th e   an alo g u e   o u tp u t,  it s   o u tp u t  v o lta g e  i n cr ea s es   w ith   t h e  i n cr ea s i n g   o f   t h e  f la m e  a m o u n t,  a n d   t h e   lef t  ter m i n al  i s   t h e  d i g ital  o u t p u t  w h ic h   i n d icate s   t h e  HI G H  o u tp u t   in   th e   ca s e  o f   a  f la m e  b ei n g   d etec ted     [1 5 ,   1 6 ] .   Fig u r e  5   illu s tr ates t h e  f la m e  s en s o r   m o d u le  a n d   th e   s en s o r   o u tp u t v o lta g e  v s .   th e  d etec tio n   d is tan ce .           ( a)   ( b )     Fig u r e  5 .   ( a)   Flam e  s en s o r   m o d u le ,   an d   ( b )   Fla m e  s e n s o r   v al u e  v s .   d etec tio n   d is ta n ce       2 . 4 .   So il  hu m i dity   s ens o r   As  s h o w n   i n   Fi g u r e  6 ,   th e  s o il  m o is t u r e  s e n s o r   co n s i s ts   o f   t w o   p r o b es  th at  allo w   th e  c u r r en t  to   p ass   th r o u g h   t h e  s o il  an d   th e n   o b tain   a  r esis ta n ce   v al u e.   W h en   th e  w ater   is   p r esen t,  th e  s o il  w il l  co n d u ct  m o r e   elec tr icit y   an d   g i v e  lo w   r esi s tan ce ,   w h ile  i n   th e  ca s e  o f   d r y   s o il,  th e  f lo w   o f   th e  elec tr i cit y   is   p o o r   s o   th e  r esis ta n ce   h a s   a  h i g h   v al u e.   T h e  u t ilis ed   m icr o co n tr o ller   w i l l  co m p ar e  th e  r esis ta n ce   v alu e   an d ,   d ep en d in g   o n   th e  h i g h er   r e s is ta n ce ,   th e  w a t e r   p u m p   w ill b e  s w itc h ed   o n   [ 1 7 ,   1 8 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  21 ,   No .   1 ,  J an u ar y   2 0 2 1   :    5 4 6   -   557   550       Fig u r e  6 .   So il  m o is t u r e  s e n s o r   m o d u le       2 . 5 .   P a s s iv e  infr a re d sens o r   T h e  P ass iv e  I n f r ar ed   ( P I R )   s en s o r   d esig n ed   to   s e n s e  t h e  m o v e m e n t  d ep en d en t  o n   t h e  e m itted   in f r ar ed   f r o m   th e   h u m a n   b o d y   an d   t h e   o th er   l iv i n g   o r g a n is m s .   T h e  P I R   is   co m p o s ed   o f   a   p y r o elec tr ic   s e n s o r ,   w h ic h   ca n   r ec o g n is e  d i f f er e n t  lev els  o f   in f r ar ed   r ad iatio n .   T h e  lev el  o f   r ad iatio n   w ill  in cr ea s e  w it h   t h e  in cr ea s e  i n   th e  o b j ec t’ s   te m p e r atu r e  w h e n   th e  h u m a n   p ass e s   f r o m   t h e  f r o n t  o f   th e  P I R ,   th e   s en s o r   w ill  d etec t   th e  h u m a n   te m p er at u r e  a n d   r etu r n   a  lo g ic  " 1 "   f r o m   t h e  s e n s o r   o u tp u t  p in   [ 1 9 ,   2 0 ] .   T o   in cr ea s e  th e  d etec tio n   r an g e  o f   th e  s e n s o r ,   a  h e m is p h er ical  le n s   i s   u s ed   to   co llect  r ad iatio n   f r o m   d i f f er en t  a n g le s   an d   d ir ec t  it  to   t h e  s en s o r   as s h o w n   in   Fig u r e  7 .           Fig u r e  7 .   P I R   s en s o r   m o d u le       2 . 6 .   MQ - 0 5   g a s   s ens o r   MQ - 5   g a s   s e n s o r   i s   u s ed   f o r   th e  ap p licatio n s   o f   t h e  g as  l ea k ag e  d etec tio n   i n   b o th   co n s u m er   an d   in d u s tr ial  s y s te m s .   T h is   s en s o r   is   p r o p er   f o r   th e  d etec tio n   o f   liq u ef ied   p etr o leu m   g as,  n at u r al  g a s ,   an d   co al   g as.  T h e  w o r k i n g   p r in cip le  o f   th e  MQ - 5   s e n s o r   m o d u le  ca n   b e  d escr ib ed   in   Fi g u r e  8 .   T h e  h ea ti n g   co il   “ H”  i s   ass o ciate d   w it h   a  Sn O2   f ila m en t,  i n   t h e  p r esen ce   o f   clea n   air ,   its   r esi s tan ce   ac r o s s   t h e  h ea tin g   co il  d o esn 't   v ar y .   B u t  i n   ca s e   o f   co m b u s ti b le  g as  is   p r ese n t,  t h e  r esi s ta n ce   o f   t h e  S n O2   f ila m e n t  d ec r ea s es,  w h ic h   r es u lts   in   a   co r r esp o n d in g   i n cr ea s e  i n   o u tp u t  v o lta g e  p i n   o f   t h e  s en s o r ,   th i s   o u tp u t  v o lta g e  c an   b e  m ea s u r ed   to   in d icate   t h e  co n ce n tr atio n   o f   a n y   co m b u s tib le  g as  [ 2 1 ,   2 2 ].   F ig u r e  9   s h o w s   th e  MQ - 8   g as  s en s o r   m o d u le  w it h   its   p in   co n f i g u r at io n .             Fig u r e  8 .   I n ter n al  s tr u ct u r e  o f   th e  MQ - 5   g as  s en s o r     Fig u r e  9 .   MQ - 5   g as  s en s o r   m o d u le   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       Desig n   a n d   imp leme n ta tio n   o f   a   s ma r t h o me  s ystem  w ith   t w o   leve ls   o f  …   ( Mo h a mme d   Mu r a d )   551   2 . 7 .   Serv o   m o t o r   T h e  s er v o   m o to r   is   an   elec tr ic al  co m p o n e n t  th at   ca n   b e  u tili s ed   to   p u s h   o r   r o tate  a n   o b j ec t  w it h   h i g h   ac cu r ac y .   T h e  s er v o   m o to r   d if f er ed   f r o m   t h e  o t h er   m o to r   t y p es  w h er e  it   co u ld   r o tate  ac co r d in g   to   t h e  r eq u ir ed   an g le s   th at  ca n   b e  o b tain ed   f r o m   t h e  p u ls e  le n g th   w it h   th e  h elp   o f   th e  m icr o co n tr o ller   u n it.  I n   ad d itio n ,   t h e   s er v o   m o to r   is   c h ar ac ter is ed   b y   a   g o o d   to r q u e  an d   co n s tan t  s p ee d   th at  i s   n o t  a f f ec ted   b y   th e  c h an g e  i n   lo ad   [ 23 - 2 5 ] .         3.   SYST E M   DE SI G N  AN D  I M P L E M E NT A T I O N   T h is   s ec tio n   i n cl u d es  th e   n ec e s s ar y   s tep s   f o r   th e   d esi g n   o f   a   s m ar t  h o m e   s y s te m   w it h   t w o   lev el s   o f   s ec u r it y   b a s ed   o n   I o T   tech n o lo g y .   T h is   s ec tio n   al s o   in cl u d es  a  p r esen tatio n   o f   t h e  r esu lt s   o b tain ed   af ter   th e   p r ac tical  test   f o r   th e  p r o p o s ed   s y s te m   h as b ee n   ap p lied .     3 . 1 .   Sy s t e m   des ig n    T h e  p r o p o s ed   s y s te m   co n s i s ts   o f   t w o   m ai n   p ar ts ,   th e  f ir s t  p ar t  is   a  s ec u r it y   s y s te m   a n d   th e  s ec o n d   p ar t  is   an   au to m atio n   co n tr o l  s y s te m .   T h e  s ec u r it y   s y s te m   c o n s is ts   o f   th e  P I R   s en s o r   an d   th e  laser   b ea m   w it h   L i g h t  Dep en d e n t  R e s i s tan ce   ( L D R ) .   W h en   th e   th ief   p ass es   i n   f r o n t  o f   th e   P I R   s e n s o r ,   th e  s en s o r   an al y s es   th e   in f r ar ed   r ad i atio n   th a t  e m itted   f r o m   its   b o d y ,   th e n   th e   A r d u i n o   Na n o   ac ti v atin g   th e   alar m ,   W i - Fi  ca m er a,   a n d   s en d   lo g ic  “ 1 ”  to   th e   No d eM C U  i n   o r d er   to   d is p la y   t h e  al ar m in g   m e s s a g e  o n   t h e  GUI .   B esid es,  w h en   t h e   th ie f   cu t s   th e  d ir ec ted   laser   b ea m   to   th e  L D R ,   th e  r esi s ta n ce   v alu e  w i ll  in cr ea s e  an d   th e  Ar d u in o   Nan o   d o in g   th e  s a m e  p r ev io u s   s tep s .   T h e  s ec u r it y   s y s te m   is   p o w er ed   b y   a  co n tr o l  s y s te m   b ased   o n   t h e  A r d u i n o   Me g a,   r ela y   co n tr o ller ,   an d   a  4   ×  4   k e y p ad ,   as  s h o w n   i n   t h e  co n n ec t io n   d iag r a m   i n   Fi g u r e  1 0 .   I n   o r d er   to   tu r n   ON/OFF  t h e  s ec u r it y   as  w ell  as  th e  au to m atio n   s y s te m ,   a  d if f er en t  p ass w o r d   f o r   b o th   th e  ON  an d   OFF  s tates   s h o u ld   b e  en ter ed .   I n   ad d itio n ,   a  1 6   ×  2   liq u id   cr y s tal  d is p la y   is   also   u t ilis ed   to   in d icate   th at  th e  s y s te m   in   t h e   ON  o r   OFF s tate,   as ill u s tr ates   i n   Fi g u r e  1 1 .           Fig u r e  1 0 .   C o n n ec tio n   d iag r a m   o f   t h e  p o w er   co n tr o l s y s te m           Fig u r e  1 1 .   I m p le m en ted   p o w e r   co n tr o l s y s te m   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  21 ,   No .   1 ,  J an u ar y   2 0 2 1   :    5 4 6   -   557   552   T h e  au to m atio n   a n d   co n tr o l  p ar t  b ased   o n   th e  A r d u i n o   N an o   m icr o co n tr o ller   w it h   m a n y   t y p es  o f   s en s o r s ,   s u c h   as  t h e  t w o   g a s   s en s o r s ,   th e  f la m e  s e n s o r ,   th e  s o il  m o is t u r e  s e n s o r ,   L M  3 5   t e m p er atu r e  s e n s o r ,   an d   th e  w ater   le v el  s e n s o r ,   th e   task   o f   ea ch   s en s o r   in   t h is   p ar t  is   d e m o n s tr ated   in   T ab le  1 .   I n   ad d itio n ,   th e  t w o   p ar ts   o f   th e  p r o p o s ed   s y s te m   ar e  lin k ed   to   th e  No d eM C U  m icr o co n tr o ller ,   w h ic h   s u p p o r ts   th e  I o T   tech n o lo g y ,   w h er e  th e  A r d u i n o   Nan o   r ea d   th e  s en s o r s   d ata  an d   s en d   lo g ic  “ 1 ”  o r   “ 0 ”  to   th e  No d eM C U  to   d is p la y   t h e  n ec e s s ar y   m ess a g es  o n   t h e  GUI ,   t h is   m et h o d   is   u tili s ed   d u e  to   t h e  li m ited   a n alo g u e  i n p u t  p in s   o f   th e  No d eM C U  a s   w ell  a s   to   p r o v id e  th e  r eliab ilit y   to   t h e  p r o p o s ed   s y s te m ,   i f   o n e  o f   th e  m icr o co n tr o ller s   f ai l   o r   d am ag ed   w ill  n o t  ef f ec ts   o n   th e  r est  o f   th e  s y s te m .   T h e  h o m eo w n er   ca n   co n ti n u o u s l y   m o n ito r   h i s   h o m e   r e m o tel y   v ia  lo ca l  I P   ad d r ess ,   en ab lin g   h i m   to   ac ce s s   th e  G UI   w h ic h   i s   p r o g r a m m ed   to   m o n ito r   t h e  h o m e  i n   d if f er e n t  ca s es.  T h e  H C - 0 5   B lu eto o th   w i th   its   co m p atib le  A n d r o id   ap p   an d   th e  s er v o   m o t o r   is   also   u tili s ed   to   r e m o tel y   co n tr o l th e  g ar ag e  g a te.   T h e  A n d r o id   ap p   w as p r o g r a m m ed   t h r o u g h   th e  MI T   A p p   I n v e n to r   p latf o r m ,   w h ic h   w as  cr ea ted   b y   Go o g le ,   an d   s u p er v i s ed   b y   MI T   Un iv er s it y ,   w h ich   b o ils   d o w n   to   t h e  ea s y - to - d ev elo p   g r ap h ical  p r o g r a m m i n g   b lo ck s ,   as illu s tr ated   in   Fi g u r e  1 2 .         ( a)       ( b )   Fig u r e  1 2 .  ( a)   T h e  g r ap h ical  b lo ck s   o f   t h e  p r o g r a m ed   ap p   f o r   th e  g ar a g e  g ate   a n d   ( b )   T h e  p r o g r a m m ed   ap p   in s id e  t h e  Hu a w ei  s m ar t  m o b il e  p h o n e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       Desig n   a n d   imp leme n ta tio n   o f   a   s ma r t h o me  s ystem  w ith   t w o   leve ls   o f  …   ( Mo h a mme d   Mu r a d )   553   Fig u r es  1 3 - 1 6 ;  r esp ec ti v el y ,   i llu s tr ates  t h e  b lo ck   d iag r a m   o f   t h e  p o w er   s u p p l y   co n tr o l,   th e  b lo c k   d iag r a m   o f   t h e  s ec u r it y   p ar t,  th e  b lo ck   d iag r a m   o f   t h e  au to m atio n   a n d   co n tr o l  p ar t  f o r   th e  p r o p o s ed   s y s te m ,   an d   th e  i m p le m e n ted   s y s te m   f o r   th e  s m ar t  h o m e.       T ab le  1 .   T h e  task   o f   ea ch   s en s o r   in   th e  au to m atio n   p ar t   S e n so r   T a sk   F l a me   se n so r   D e t e c t   t h e   f i r e     G a s se n so r   # 1   D e t e c t   t h e   l e a k a g e   o f   t h e   L P G     G a s se n so r   # 2   D e t e c t   t h e   u n w a n t e d   s me l l   i n   t h e   t o i l e t     T e mp e r a t u r e   se n so r   M o n i t o r i n g   t h e   r o o m t e mp e r a t u r e   S o i l   mo i st u r e   se n so r   M o n i t o r i n g   t h e   so i l   mo i st u r e   l e v e l     W a t e r   l e v e l   se n so r   M o n i t o r i n g   t h e   t a n k   w a t e r   l e v e l             Fig u r e  1 3 .   B lo ck   d iag r am   o f   t h e  co n tr o l  cir cu it  f o r   th e  p o w e r   f ee d in g           Fig u r e  1 4 .   B lo ck   d iag r am   f o r   th e  s ec u r it y   p ar t o f   t h e  p r o p o s e d   s y s te m     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 5 0 2 - 4752   I n d o n esia n   J   E lec  E n g   &   C o m p   Sci,   Vo l.  21 ,   No .   1 ,  J an u ar y   2 0 2 1   :    5 4 6   -   557   554       Fig u r e  15 .   B lo ck   d iag r am   f o r   th e  au to m atio n   a n d   co n tr o l p ar t o f   th e  p r o p o s ed   s y s te m           Fig u r e  16 .   T h e  i m p le m e n ted   s m ar t h o m e  an d   s ec u r it y   s y s te m       3 . 2 .   Resul t s   a n d Discu s s io n    Sev er al  s tep s   m u s t  b e  tak en   i n   o r d e r   to   o p e r ate  an d   test   th e  p r o p o s ed   s m ar t  h o m e  s y s te m ,   th e  f ir s t  o f   w h ic h   is   th e  e n ter i n g   o f   t h e  O N  s tate  p as s w o r d   f o r   th e  o p er atio n   o f   t h e  s y s te m   p o w er   s u p p l y   cir cu it,  as  s h o w n   in   Fi g u r e  17 .  T h er ea f ter ,   a  co n n ec t io n   s h o u ld   b e  estab lis h e d   b etw ee n   th e  No d eM C U  m ic r o co n tr o ller   an d   th e   I n ter n et  v ia   th e   W i - Fi.  T h e  l ast  o n e   is   th e   w ir eles s   co n n e ctio n   b et w ee n   t h e  An d r o id   s m ar tp h o n e   an d   th e   A r d u i n o   B lu eto o t h   to   test   th e  r e m o tel y   o p en in g /clo s i n g   o f   t h e  g ar a g e  g ate  t h r o u g h   t h e  p r o g r am m ed   ap p   ( Fig u r e  1 2 - b ) .   Sev er al  m et h o d s   ar e  u tili s ed   to   test   t h e   w o r k   a n d   p er f o r m a n ce   o f   s y s te m   s e n s o r s ,   as   d em o n s tr ated   i n   T ab le  2 .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n d o n esia n   J   E lec  E n g   &   C o m p   Sci     I SS N:  2502 - 4752       Desig n   a n d   imp leme n ta tio n   o f   a   s ma r t h o me  s ystem  w ith   t w o   leve ls   o f  …   ( Mo h a mme d   Mu r a d )   555       ( a)   ( b )     Fig u r e  17 .   ( a)   T h e  ac tiv atio n   o f   th e  p o w er   s u p p l y   c ir cu it   a n d   ( b )   T h e  d ea ctiv atio n   o f   t h e  p o w er   s u p p l y   cir cu it       T ab le  2 .   T h e  p r ac tical  test   p r o ce d u r e  f o r   th e  s y s te m   s e n s o r s   S e n so r   T e st   F l a me   T h e   p e r f o r man c e   o f   t h e   se n so r   w a s   e x a mi n e d   b y   p l a c i n g   a   f i r e   so u r c e ,   s u c h   a s a   l i g h t e r   n e a r   t h e   se n so r ,   a f t e r   w h i c h   t h e   A r d u i n o   N a n o   sw i t c h e s  ON   t h e   L ED   t h a t   r e p r e se n t s  t h e   w a t e r   p u mp   a n d   se n d s l o g i c   “ 1 ”   t o   t h e   N o d e M C U   i n   o r d e r   t o   d i sp l a y   t h e   w a r n i n g   me ssag e   o n   t h e   G U I   G a s   T h e   p e r f o r man c e   o f   t h e   se n so r   w a s   e x a mi n e d   b y   p l a c i n g   a   l i q u i d   g a s   so u r c e   su c h   a s  t h e   o n e   i n   t h e   l i g h t e r   n e a r   t h e   se n so r ,   a f t e r   w h i c h   t h e   A r d u i n o   N a n o   se n d s  a   l o g i c   “ 1 ”   t o   t h e   N o d e M C U   i n   o r d e r   t o   d i s p l a y   a   w a r n i n g   me ssag e   o n   t h e   G U I   T e mp e r a t u r e   T h e   se n so r   w a s   t e st e d   b y   p l a c i n g   a   h e a t   so u r c e   n e a r   i t ,   a f t e r   t h a t   t h e   N o d e M C U   a c t i v a t e s t h e   c o o l i n g   sy st e ms  r e p r e se n t e d   b y   t h e   L ED   a n d   d i sp l a y s t h e   t e mp e r a t u r e   v a l u e   o n   t h e   G U I   P I R   T h e   se n so r   w a s   t e st e d   b y   p a ssi n g   i n   f r o n t   o f   i t ,   t h e n   A r d u i n o   N a n o   a c t i v a t e s   t h e   a l a r m,   Wi - F i   c a me r a ,   a n d   se n d s l o g i c   “ 1 ”   t o   t h e   N o d e M C U   i n   o r d e r   t o   d i sp l a y   a n   a l e r t i n g   me ssag e   o n   t h e   G U I   T a n k   w a t e r   l e v e l   T h e   se n so r   w a s   t e st e d   b y   p u t t i n g   i t   i n   a   smal l   c o n t a i n e r   f i l l e d   w i t h   w a t e r ,   t h e n   t h e   A r d u i n o   o p e r a t e s t h e   w a t e r   p u m p   r e p r e se n t e d   b y   t h e   L ED ,   a n d   t h e   same   p r o c e d u r e   i s   u t i l i se d   t o   t e st   t h e   so i l   mo i st u r e   se n so r       Fig u r e  18   r esp ec tiv el y ,   i llu s tr ate  th e  m es s ag e s   ap p ea r ed   o n   th e  GUI   i n   th e  ca s e  o f   f ir e  d et ec tio n ,   g a s   leak   d etec tio n ,   m o tio n   d etec ti o n ,   an d   th e  s af e  m o d e  ca s e.   F ig u r e  19   p r esen ts   th e  i m p le m e n ted   s y s te m   d u r i n g   th e  ON - t u r n i n g   o p er atio n .               ( a)   ( b )   ( c)   ( d )     Fig u r e  18 .   A p p ea r ed   m es s a g es   o n   th e  GUI   in   t h e  ca s e  o f :   ( a)   Fire   d etec tio n ,   ( b )   Gas le ak   d etec tio n ,   ( c)   Mo tio n   d etec tio n ,   an d   ( e)   Saf e   m o d e     Evaluation Warning : The document was created with Spire.PDF for Python.