I n t e r n at ion al   Jou r n a l   of   I n f o r m at ics   an d   Com m u n icat ion   T e c h n ol ogy  ( I J - I CT )   Vo l .   14 ,   N o .   2 A ugus t   20 25 ,   pp.   540 ~ 554   I S S N:  2252 - 8776 DO I 10 . 11591/i ji c t . v 14 i 2 . pp 54 0 - 554                 540       Jou r n al  h o m e page ht tp: // ij ict . iaes c or e . c om   C r e a t in g a s m ar t  b e d r oo m  f or  c h il d r e n  b y  c on n e c t in g P IR an d   L D R  se n sor s t o a m ic r oc on t r ol le r  A r d u in o U N O AT m e ga 3 28P       Ragm M .   M u s t af a 1 ,   K u j t im   R .   M u s t af a 2 ,   Re f ik   Ram ad an i 1   1 F a c ul t y   of  C omput e r  S c i e nc e , P ub li c  U ni ve r s it y   K a dr Z e ka ,  G ji la n, R e pub li c   of   K o s ov a   2 F a c ul t y   of  E l e c tr i c a a nd C omput e r  E ngi n e e r in g, U ni ve r s it y   H a s a n P r is ht in a , P r is ht in a , R e publ i c   of   K o s ov a       Ar t ic l e   I n f o     AB S T RA CT   A r ti c le  h is tor y :   R e c e i ve d   J u l   8 2024   R e vi s e No v   19 2024   A c c e pt e De c   15 2024       I n t e l l i g e n t   el ec t ro n i c   s y s t em s   ar i n c r e as i n g l y   p rev al en t   i n   mo d e r n   s o ci e t y .   T h e   d e v el o p me n t   o s m art   b e d r o o m s   f o y o u n g   ch i l d r en ,   e s p ec i a l l y   t h o s w i t h   d ev e l o p men t al   d i s ab i l i t i e s ,   it   i s   b as e d   o n   t h e   r e s p o n s es   o p as s i v i n frar e d   (PI R)  a n d   l i g h t   d e p e n d e n t   r e s i s t o r   (L D R)  s en s o rs .   T h e   P I s e n s o d e t ec t s   c h i l d r e n s   m o v eme n t   d u r i n g   t h n i g h t ,   t ri g g e r i n g   t h e   mi c ro co n t ro l l e r   t o   s en d   b i t   o f   1   t o   t h m i c r o c o n t ro l l e p i n   co n n ec t ed   t o   an   e l ec t ro m ag n e t i c   r el a y ,   w h i ch   t h en   s w i t ch e s   o n   2 2 0   V A l i g h t   t o   i l l u mi n at e   t h e   b e d r o o m .   T h i s   o n l y   o ccu rs   i f   t h e   L D R   s en s o h as   h i g h   r e s i s t an ce ,   i n d i c at i n g   t h at   t h e   en v i ro n me n t   i s   c o m p l e t e l y   d ark .   T h fu n c t i o n al i t y   o t h i s   i n t e l l i g e n t   s y s t e m ai n l y   d e p en d s   o n   t h e   p ro g ra m   co d (s k e t c h )   u p l o ad ed   t o   t h A r d u i n o   U N O   mi c ro c o n t ro l l e r   mo d u l e .   T h e   m i c r o c o n t ro l l e i s   p ro g ra mme d   t o   p e rf o r m   s p eci fi fu n c t i o n s   b as e d   o n   t h s en s o rs   d at a.   I t   i s   b as ed   o n   t h e   r e s p o n s e s   o f   P I R   an d   L D R   s en s o rs .   T h e   P I s e n s o d e t ec t s   c h i l d ren s   m o v eme n t   d u ri n g   t h n i g h t ,   t ri g g e r i n g   t h mi c r o c o n t ro l l e r   t o   s e n d   a   b i t   o 1   t o   t h m i c r o c o n t ro l l e r   p i n   c o n n ec t e d   t o   an   e l ec t ro m a g n e t i c   r el a y ,   w h i c h   t h en   s w i t c h e s   o n   2 2 0   V A l i g h t   t o   i l l u m i n at t h b ed ro o m .   T h i s   o n l y   o cc u rs   i f   t h e   L D R   s en s o h as   h i g h   r e s i s t an ce ,   i n d i c at i n g   t h at   t h e   en v i ro n me n t   i s   co m p l e t el y   d ark .   K e y w o r d s :   A r du i n o   C o de   L DR   s e ns o r   P I R   R oo m   S ke t c h   S m a r t   Th i s   i s   a n   o p en   a c ces s   a r t i c l u n d e r   t h CC  B Y - SA   l i cen s e.     C or r e s pon din A u th or :   K u j t im   R .   M us t a f a   F a c u l t y   o f   E l e c t r i c a l   a n C o m put e r   E n g i n e e r i n g,   Uni ve r s i t y   Ha s a n   P r i s h t i n a   Af r im   V i t i a   2,   10000  P r i s h t i n a ,   P r i s h t i n a ,   R e pu bli c   o f   K o s o v a   E m a i l ku j t i m . m us t a f a @ u ni - pr . e du       1.   I NT RODU C T I ON   T hi s   pa pe r   pr e s e n t s   t h e   de v e l o p m e n t   o f   a n   i n t e ll i ge n t   l i g h t i n s y s t e m   f o r   c hil dr e n s   b e dr o o m s ,   de s i g n e to  e n ha n c e   s a f e t y   a n c o nv e ni e n c e   dur i n ni g h t t i m e .   B y   m e a s ur i ng  m o v e m e n t   a n a m bien t   l i g h t   i n t e n s i t y ,   t h e   s y s t e m   a uto m a t i c a ll y   a c t i v a t e s   a   s o f t   l i g h t   wh e n   c hil dr e n   wa ke   up,   a ddr e s s i n a   c o m m o c h a ll e n g e   f o r   f a mi li e s   w i t h   y o u n c hil dr e n .   T h e   i m p l e m e n t a t i o n   ut i li z e s   v a r i o us   e l e c t r o n i c   c o m po n e n t s ,   i nc l ud i ng  a   l i g h t   de pe n de n t   r e s i s to r   ( L DR )   f o r   m e a s ur i n a m b i e n t   l i g h t   l e ve l s   a n a   pa s s i ve   i nf r a r e ( P I R )   s e n s o r   f o r   de t e c t i n m o t i o n .   A dd i t i o n a ll y ,   a   r e l a m o du l e   w i t h   a   c o i l   c o r e   r a t e a t   5   VD C ,   f e a t ur i n b ot n o r m a ll y   c l o s e ( NC )   a n n o r m a ll y   o pe n   ( NO )   c o n t a c t s ,   i s   u s e to   c o n t r o l   t h e   l i g h t i n g.   Al l   c o m po n e n t s   a r e   i n t e r c o nn e c t e us i n c o ppe r   wi r e   j u m pe r s   to  f o r m   a n   e f f e c t i ve   e l e c t r i c a l   s y s t e m .   A t   t h e   c o r e   o f   t hi s   s m a r t   s y s t e m   i s   t h e   A r du i n o   UN A T m e ga   328P   m i c r o c o n t r o l l e r ,   whi c h   s e r v e s   a s   t h e   pr o g r a m m a bl e   l o g i c   de vi c e .   T h e   e l e c t r i c a l   c o nne c t i o ns   a r e   de s i g n e t o   h a n d l e   c o n t i n uo us   c ur r e n t s   s upp l i e d   by   a   VD C   s o ur c e ,   wi t h   po t e n t i a l   i n f l ue n c e s   f r o m   a l t e r n a t i n c ur r e n t   a t   220  [ VA C ]   i n   c e r t a i n   s e t ups   a s   s h o w n   i t h e   F i gur e   1 .   T h e   f u n c t i o n a li t y   o f   t h e   s y s t e m   is   go v e r n e by   a   s ke t c h - a   pr o gr a m   de v e l o pe i C   o r   C + +   w i t hi n   t h e   A r du i n o   I DE   e n vi r o nm e n t .   T hi s   s e n s o r - b a s e s y s t e m   n o o nl y   im pr o v e s   t h e   c a r e   o f   c hil dr e n   b ut   a l s o   s uppor t s   e l de r ly   i nd i v i dua l s ,   c o upl e s ,   a n pe r s o n s   w i t h   s pe c i a l   n e e d s ,   e nh a n c i ng  t h e i r   a ut o n o m y   a n s a f e t y   dur i n ni g h t t i m e .   Unl i k e   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t   J   I n f   &   C o m m u n   T e c hn o l     I S S N:   2252 - 8776         C r e ati ng  s mar be dr oom  f or   c hil dr e by   c onne c t ing  P I R   and   L DR   s e ns or s     ( R agmi  M .   M us ta f a )   541   t r a di t i o na l   m e t h o ds   o f   c o n t r o l li ng  b e dr o o m   l i g h t i n g - s uc h   a s   m a n ua l   s w i t c h e s   o r   pa r e n t a l   pr e s e n c e - t hi s   i nn o v a t i v e   a ppr o a c h   e l im i na t e s   t h e s e   dr a w b a c k s ,   f o s t e r i n gr e a t e r   i n de pe n de nc e   f o r   c hi l dr e n   a n pe a c e   o f   m i nd   f o r   pa r e n t s .   W hi l e   s i mi l a r   s y s t e m s   m a y   e xi s t ,   t hi s   r e s e a r c h   hi g hli g h t s   t h e   uni que   i n t e gr a t i o n   o f   t h e s e   t e c h n o l o g i e s   i n   c r e a t i n a   pr a c t i c a l   s o l ut i o n   t a i l o r e f o r   m o de r n   f a mi li e s .           F i gur e   1.   B l o c s c h e m e   o f   t h e   i n t e l li ge n t   b e dr oo m   f o r   c hil dr e n       2.   E QUI P M E NT   USE D   T h e   f o l l o w i ng  too l s   we r e   ut i li z e d   f o r   t h i s   s c i e n t i f ic  s t udy   a n i t s   f u n c t i o n a li z a t i o n L D R   s e ns o r ,   P I R   m o t i o n   s e n s o r ,   p r otot y pe   b o a r f o r   b r e a db o a r c o n n e c t i o n ,   c o n t a c t   r e l a y   220  V, 10  A   w i t h   c o i l   VD C ,   r e s i s t o r s   10  kΩ ,   220   ,   l i g h t   e m i t t i n d i o de   ( L E D )   a n e l e c t r i c a l   c o n du c t or   wi t h   p i n - j u m pe r   a n l i g h t   p ot  we r e   i n t e gr a t e wi t h   t h e   A r du i n o   UN O   m o du l e   to  c r e a t e   a n   e f f e c t i v e   a n r e s po n s i ve   l i g h t i n s o l ut i o n   f o r   c hil dr e n b e dr o o m s .     2 . 1 .     Ar d u in U NO   m od u l e   T h e   A r du i n o   UNO  m i c r o c o n tr o l l e r   wa s   s e l e c t e f o r   t hi s   pr o j e c t   due   to   i t s   o pe n - s o ur c e   n a t ur e   a n s u f f i c i e n t   i n put /o u t pu t   p o r t s ,   m a k i ng  i t   i d e a l   f o r   e xpe r i m e n t i n w i t h   t h e   c o n c e pt s   pr e s e n t e i n   t hi s   pa pe r .   I t   i s   e qu i ppe w i t h   t h e   A T m e g a 328P   m i c r o c o n tr o l l e r ,   whi c h   f e a t ur e s :     14  di g i t a l   i nput / o u t pu t   pi n s   ( o f   whi c h   c a n   be   us e a s   P W M   o ut pu t s ) .     a n a l o i n put s .     USB   c o n n e c t i o n .     R e s e t   b utt o n .   T hi s   c o nf i gur a t i o n   a ll o ws   f o r   ve r s a t i l e   c o nn e c t i vi t a n c o n t r o l   o v e r   v a r i o us   s e n s o r s   a n c o m po n e n t s .   As   i ll us t r a t e i n   F i gur e   2,   t h e   A r du i n o   UNO  m o d u l e   i s   c o nn e c t e to   a   c o m put e r   vi a   a   USB   c a bl e ,   wh e r e   t h e   p r o g r a m   c o de   f o r   t h e   s m a r t   b e dr oo m   s y s t e m   i s   de v e l o pe a n up l o a de us i ng  t h e   A r du i n o   i nt e gr a t e d   de v e l o p m e n t   e nvi r o nm e n t   ( I D E )   v e r s i o n   1. 8. 19  o r   a ny   c o m pa t i bl e   ve r s i o n   [ 1] .   T a bl e   l i s t s   t h e   t e c h ni c a l   s pe c i f i c a t i o ns   o f   t h e   A r du i n o   UN A T m e ga 328P   m o du l e   [ 2] .           F i gur e   2.   Vi e o f   t h e   A T m e g a 328P   c hi a n t h e   A r du i n o   [ 2]   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2252 - 8776   I n t   J   I n f   &   C o m m u n   T e c hn o l ,   Vo l .   14 ,   N o.   2 A ugus t   20 25 540 - 554   542   T a bl e   1.   T e c h ni c a l   c h a r a c t e r i s t i c s   f o r   t h e   A r du i n o   UNO  m o du l e   D e v i c e s  i n t h e  A r dui n o  A T me ga 328P   m o du le   T e c hni c a s pe c i f i c a ti o ns   M ic r oc o nt r o ll e r   A T m e ga 328P   O pe r a ti ng  vo lt a g e   5 V D C   I nput   vol ta ge   7 - 12 V D C   D ig it a I /O pins   14 ( 6 of  w hi c th e y  a r e   o ut put s  P W M )   P W M  di gi ta pi ns   6   A na lo g pi ns   6   C ur r e nt  di r e c t e d p e r  pi n   20 mA   C ur r e nt  di r e c t e d t o  pi n 3,3 V   50 mA   F la s m e m o r y   32 K B   S ta ti c  r a nd o m - a c c e s s  me m o r y   ( S R A M )   2 K B   E le c tr ic a ll y   e r a s a bl e  p r o gr a mm a bl e  r e a d - o nl y  m e m o r y   ( E E P R O M )   1 K B   S pe e d - f r e qu e n c y   of  w or k   16 M H z   P r o c e s s or   8   bi A V R       2 . 2   L DR   s e n s or   T h e   L DR   i s   a   t y pe   o f   s e n s o r   wh o s e   n a m e   r e f l e c t s   i t s   f u n c t i o n a li t y .   T hi s   s e mi c o n duc t o r - b a s e s e ns o r   e xhi b i t s   a   de c r e a s e   i r e s i s t a n c e   w h e n   e x po s e to   l i g h t .   A s   l i g h t   i n t e n s i t y   i nc r e a s e s ,   t h e   r e s i s t a n c e   o f   th e   L DR   d i mi n i s h e s ,   a l l o w i ng   f o r   a c c ur a t e   m e a s ur e m e n t s   of   a m bi e n t   l i g h t   l e v e l s .   F i gur e   il l us t r a t e s   t h e   L D R   s e n s o r F i gur e   3 ( a )   de p i c t s   i t s   p hy s i c a l   a ppe a r a n c e ,   a n d   F i gur e   3 ( b )   pr e s e n t s   a   gr a p h   i ll u s t r a t i n t h e   r e l a t i o n s hi p   b e t we e n   r e s i s t a n c e   a n l i g h t   i n t e n s i t y   [ 3] ,   [ 4] .         ( a )     ( b )     F i gur e   3.   L DR   S e n s o r   a ppe a r a n c e   a n r e s i s t a n c e   g r a ph   de pe n d i ng  o n   l i g h t   i n t e n s i t y   [ 5]   ( a )   de pi c t s   i t s   phy s i c a l   a pp e a r a n c e   a n ( b )   pr e s e n t s   a   gr a ph   i ll us t r a t i n t h e   r e l a t i o ns hi b e t we e n   r e s i s t a n c e   a n l i g h t   i n t e n s i t y       T h e   o pe r a t i n pr i nc i p l e s   o f   t h e   L DR   s e n s o r   a r e   i l l u s t r a t e i n   F i gur e   4.   W h e n   li g h t   s t r i ke s   t h e   s e ns o r s ur f a c e ,   i t   s t i m u l a t e s   t h e   m o v e m e n t   o f   e l e c t r o n s   w i t hi t h e   m a t e r i a l ,   r e s u l t i ng  i i nc r e a s e c o n d uc t i vi t y .   C o n s e que n t l y ,   t h e   s e ns o r s   r e s i s t a n c e   de c r e a s e s   a s   t h e   li g h t   i n t e n s i t y   i nc r e a s e s ,   a ll o w i ng  f o r   e f f e c t i ve   d e t e c t i o o f   a m bi e n t   l i g h t   l e v e l s   [ 5] ,   [ 6] .           F i gur e   4.   W o r ki n pr i n c i p l e s   o f   t h e   L DR   s e n s o r   [ 5 ]   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t   J   I n f   &   C o m m u n   T e c hn o l     I S S N:   2252 - 8776         C r e ati ng  s mar be dr oom  f or   c hil dr e by   c onne c t ing  P I R   and   L DR   s e ns or s     ( R agmi  M .   M us ta f a )   543   2 . 3   P I s e n s o r   T h e   de m a n f o r   s e ns o r s   h a s   s ur ge a c r o s s   va r i o us   i n dus t r i e s ,   l e a d i ng  t s i g ni f i c a n t   a dv a n c e m e n t s   i t h e i r   de v e l o p m e n t ,   m a k i ng  t h e m   m o r e   r e l i a bl e   a n d   c o s t - e f f e c t i v e   [ 7 ] - [ 9] .   P I R   s e n s o r s   a r e   pa s s i v e   de vi c e s   t h a de t e c t   t h e   h e a t   e m i t t e by   m o vi ng  o bj e c t s   w i t h i n   t he i r   m o ni t o r i n r a n ge .   Kn o wn   f o r   t h e i r   hi g h   a c c ur a c y ,   qu i c k   r e s po n s e   t i m e ,   l o c o s t,   a n m i nim a l   po we r   c o n s u m pt i o n ,   P I R   s e n s o r s   a r e   wi de ly   ut i li z e f o r   m ot i o n   de t e c t i o n .   F i gur e   i ll u s t r a t e s   t h e   m e c ha ni s m   o f   t h e   P I R   s e n s o r ,   hi g hl i g h t i n i t s   f u n c t i o n a li t y   i de t e c t i n m o ve m e n t .           F i gur e   5.   W o r ki n pr i n c i p l e   o f   t h e   P I R   m o t i o n   s e ns o r   [ 10]       P I R   s e n s o r s   a r e   f a v o r e i n   n u m e r o us   a pp l i c a t i o n s   du e   to  t h e i r   d i s t i n c t   a dv a n t a ge s   o v e r   ot h e r   m ot i o s e n s o r s .   T h e y   a r e   c o m m o nly   e m p l o y e i n   s mar b u i l d i ngs   f o r   i n t e r n e t   o f   t hi n g s   ( I o T ) - b a s e e n e r g y   m a n a ge m e n t ,   a uto n o m o us   i n s t r u m e n t   c o n tr o l ,   in t r us i o n   de t e c t i o n ,   a n a pp li c a t i o ns   i nv o l vi ng  a r t i f i c i a i n t e l l i g e n c e .   Am o n g   t h e s e ,   I oT - b a s e d   e n e r gy   m a n a g e m e n s y s te m s   i n   s m a r b u i l d i n gs   h a v e   ga r n e r e d   s i gn i f i c a n t   a tt e n t i o n ,   pa r t i c ul a r l y   i n   r e s p o n s e   to  th e   g r ow i n c o n c e r n   o v e r   e x c e s s i v e   e n e r gy   c o n s u m p t i o n   [ 8 ] - [ 11 ] .   Al s o   r e f e r r e to  a s   pa s s i v e   i nf r a r e s e ns o r s ,   P I R   s e n s o r s   a r e   de pi c t e i n   F i gur e   6,   s h o wc a s i ng  t h e i r   de s i g n .           F i gur e   6.   P I R   s e n s o r   f o r   m o t i o n   de t e c t e [ 11]       T h e   t e c hni c a l   c ha r a c t e r i s t i c s   o f   t h e   P I R   s e ns o r   us e i n   t hi s   pr o j e c t   a r e :     I n put   v o l t a ge DC   4. 8~20  VD C     C ur r e n t 50       Out pu s i g n a l L O W VD C ,   HI GH T :   3. 3   VD C   ( HI GH   o u t pu t   wh e n   we   ha v e   m o t i o n   de t e c t i o n )     F i e l o f   vi e w:  < 100  de gr e e s     M a xi m u m   m o t i o n   de t e c t i o n   d i s t a n c e m     2 . 4   Cont ac t in r e l ay   E l e c t r i c a l   c o n t a c t   r e l a y s   a r e   a m o n t h e   m o s t   pr e v a l e n t   c o m po n e n t s   i n   m o de r n   t e c h n o l o g i c a l   s y s t e m s .   T h e y   a r e   f o un i n   a   wi de   r a n g e   o f   a pp l i c a t i o n s ,   i n c l ud i ng  t a n ks ,   a i r c r a f t ,   s hi p s ,   wa s hi ng  m a c hi ne s ,   m icr o wa v e   o v e ns ,   a n m e d i c a l   d e vi c e s .   I n   f a c t ,   i t   i s   d i f f i c u l t   to  f i nd  a n   i ndus t r y   t h a c a n   o pe r a t e   e f f e c t i v e ly   w i t h o ut  r e l a y s .   M a ny   a d v a n c e a ut o m a t i c   c o n tr o l   s y s t e m s   i n   i n du s t r i a l   s e tt i n g s   ut i l i z e   h u n dr e ds   o r   e v e n   t h o us a n ds   of   r e l a y s .   I n   t h e   po we r   ge n e r a t i o n   s e c t or ,   n o   e l e c t r i c a l   e qu i p men t   i s   a ll o we to   f u n c t i o n   w i t h o ut  t h e   a ppr o pr i a t e   pr ot e c t i v e   r e l a y s   [ 6] .   F i gur e   s h o wc a s e s   o n e   o f   T h o m a s   A .   E di s o n s   200  pa t e n t s   r e l a t e to   r e l a y s   [ 12 ] ,   whi l e   F i gu r e   i l l us tr a tes   a n   e l e c tr o m a gn e t i c   r e l a y   f e a t u r i n g   tw t y p e s   o f   c o n t a c t s :   N C   a n d   N O   [ 12 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2252 - 8776   I n t   J   I n f   &   C o m m u n   T e c hn o l ,   Vo l .   14 ,   N o.   2 A ugus t   20 25 540 - 554   544       F i gur e   7.   On e   o f   T h o m a s   A .   E di s o s   pa tt e r n s   r e l e a t e to  r e l a y s   [ 12]           F i gur e   8.   E x a m p l e   o f   e l e c t r o m a g ne t i c   r e l a y   e n a bli n t wo  t y pe s   o f   c o n t a c t s   NC   a n NO   [ 12]       W h e n   v o l t a ge   i s   a pp li e d,   t y p i c a ll y   pr o vi de by   a   pr o gr a m m a bl e   l o g i c   c o n t r o l l e r   ( P L C )   o r   mi c r o c o n tr o l l e r ,   i t   ge n e r a t e s   a   s m a l l   b ut   s uf f i c i e n t   c ur r e n t   to  c l o s e   t h e   NO   c i r c u i t ,   whi l e   s im u l t a n e o us ly  o pe ni ng  t h e   NC   c i r c u i t .   T h e   e l e c t r o m a g n e t i c   r e l a y   o pe r a t e s   b a s e o n   t h e   pr i nc i p l e   o f   e l e c t r o m a g n e t i c   in duc t i o ge n e r a t e by   t h e   c o i l .   T hi s   m e c h a ni s m   i s   f u n d a m e n t a l   to   t h e   r e l a y s   ut i li z e i n   o ur   p r o j e c t .   F i gur e   i ll us t r a t e s   t h e   o pe r a t i n s y s t e m   o f   t h e   e l e c t r o m a g n e t i c   r e l a y   [ 13] .           F i gur e   9.   W o r ki n pr i n c i p l e   o f   t h e   e l e c t r o m a g ne t i c   r e l a y   [ 13]   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t   J   I n f   &   C o m m u n   T e c hn o l     I S S N:   2252 - 8776         C r e ati ng  s mar be dr oom  f or   c hil dr e by   c onne c t ing  P I R   and   L DR   s e ns or s     ( R agmi  M .   M us ta f a )   545   2 . 5   Re s is t or   R e s i s t o r s   a r e   e s s e n t i a l   c o m po n e n t s   f o un i n   m o s t   e l e c t r o ni c   c i r c u i t s ,   s e r vi ng  a s   c r uc i a l   e l e m e n t s   f o r   c o n t r o l l i ng  t h e   f l o o f   e l e c t r i c   c ur r e n t .   T h e s e   pa s s i ve   e l e c t r i c a l   c o m po ne n t s   r e gul a t e   e l e c t r o n   f l o w,   e n a bli ng   c ur r e n t   to   f l o f r e e ly   b a s e o n   t h e i r   r e s i s t a n c e   v a l u e s .   R e s i s t o r s   c a n   m a n a ge   s i g n a l   l e v e l s   i e l e c t r o ni c   c i r c u i t s ,   r e duc e   c ur r e n t   f l o w,   a n f u nc t i o n   a s   v o l t a ge   d i vi de r s .   T h e y   p l a y   a   s uppo r t i v e   r o l e   f o r   a c t i v e   c o m po n e n t s   s uc a s   t r a n s i s t or s ,   m i c r o c o n t r o l l e r s ,   a n i n t e gr a t e c i r c u i t s   [ 14] .   T h e   pr o pe r t y   o f   r e s i s t a nc e   i n   a   r e s i s t o r   c a n   b e   qua n t i f i e us i n O hm s   L a w.   T h e l us e r s   i de n t i f y   r e s i s t a n c e   v a l ue s ,   r e s i s t or s   a r e   o f t e n   m a r ke w i t h   c o l o r e b a n ds   t h a t   c o r r e s p o n to   s pe c i f i c   r e s i s t a n c e   v a l ue s   b a s e o n   a   de c o di n s c h e m e .   F i gur e   10  i l l u s t r a t e s   r e s i s t o r s   wi t h   v a r i o us   c o l o r   b a n ds   [ 15] .           F i gur e   10.   T h e   a ppe a r a n c e   o f   a   r e s i s t o r   a n i t s   c o l o r s   [ 15]       T h e   f o r m u l a   f o r   c a l c u l a t i n t h e   r e s i s t a n c e   va l u e   a c c o r di n t o   Ohm s   L a c a n   b e   de r i ve f r o m   t h e   v o l t a ge   f o r m u l a :       =     ( 1)     S o,   i t   f o l l o ws   t h a t   t h e   f o r m u l a   f o r   r e s i s t a n c e   i s :       =     ( 2)     F i gur e   11  i ll us t r a t e s   a n   e x a m p l e   o f   h o to  de t e r mi ne   t h e   r e s i s t a n c e   v a l ue   o f   a   r e s i s t or   by   i n t e r pr e t i n t h e   c o l o r e s tr i p s   o n   i t s   b o d y .   R e s i s t o r s   t y p i c a l ly   us e   a   c o l o r   c o de   to  i n d i c a t e   t h e i r   r e s i s t a nc e   v a l ue s ,   w i t h   e a c c o l o r   c o r r e s p o n d i n t a   s pe c i f i c   d i g i t   o r   m u l t i p l i e r .           F i gur e   11.   R e s i s t o r   c o l o r   s c h e m e   ( t hi s   he l ps   u n de r s t a n r e s i s t or   v a l ue s )   [ 1 4 ]   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2252 - 8776   I n t   J   I n f   &   C o m m u n   T e c hn o l ,   Vo l .   14 ,   N o.   2 A ugus t   20 25 540 - 554   546   T h e r e f o r e ,   t h e   r e s i s t a nc e   o f   t h e   s e n s o r   i n   t hi s   c a s e   is :     = 35 1   [ ] ± 5% = 35   [ ] ± 5%   ( 3)     W e   m u s t   a l w a y s   us e   v a r i o us   c o m bi na t i o ns   o f   r e s i s t o r   c o n n e c t i o ns   to   a c hi e ve   t h e   de s i r e l e v e l   o f     r e s i s t a n c e   v a l ue .   T h e   pa r a ll e l   c o nne c t i o n   a n t h e   s e r i e s   c o nn e c t i o n   a r e   t h e   t w o   t y pe s   o f   r e s i s t o r   c o n n e c t i o ns   t h a t   we   h a v e   a v a il a bl e ,   b ut   n a t ur a l ly ,   t h e y   m u s t   f r e que n t l y   b e   c o m bi ne to   o b t a i n   t h e   r e qu i r e v a l u e s   a s   s h o wn   i n   F i gur e   12  [ 15] .           F i gur e   12.   S e r i e s   a n pa r a l l e l   c o nn e c t i o ns   o f   r e s i s t o r s   [ 15]       2 . 6   L E d iod e s   T h e   m o s t   o b vi o us   k i nd  o f   s e mi c o n duc t o r   di o de   i s   t h e   L E d i o de .   W h e n   a   c ur r e n t   pa s s e s   t h r o ugh   t h e m ,   t h e y   r e l e a s e   a   r e l a t i ve ly   s m a ll   b a n dw i dt h   o f   vi s i b l e   l i g h t   i n   v a r i o us   c o l o ur   wa v e l e n gt h s ,   a s   we l l   a s   i nv i s i b l e   i nf r a r e l i g h t   f o r   r e m o t e   c o n t r o l s   o r   l a s e r - l i ke   li g h t   o r   l a s e r - l i ke   li g h t   [ 1 6 ] ,   [ 1 7 ] .   S i nc e   th e y   a r e   c o n c e pt ua l l y   qu i t e   l i k e   P di o de s ,   l i g h t   e m i t t i ng  di o de s ,   o r   L E Ds   a s   t h e y   a r e   m o r e   c o m m o nly  kn o wn ,     a r e   e s s e n t i a ll y   j u s t   a   s pe c i a li z e d   t y pe   o f   d i o de .   A c c o r di n g l y ,   a n   L E w i ll   a ll o c ur r e n t   to  f l o i n   o n e   d i r e c t i o n   b ut   w i ll   o bs t r uc i t   i n   t h e   o t h e r   [ 1 8 ] .   L E di o de s   a r e   ubi qu i t o us   i n   a pp li c a t i o ns   r e qu i r i ng  il l u mi n a t i o n   o r   s i g na l i ng.   T h e y   a r e   c o m m o nly   ut i li z e i n   a   v a r i e t y   o f   t e c hn o l o g i c a l   de vi c e s   f o r   s i g n a li ng  pur po s e s ,   s uc h   a s   i nd i c a t o r s   a n di s p l a y s .   A dd i t i o n a ll y ,   L E D s   a r e   i n c r e a s i ng l y   us e f o r   ge n e r a l   l i g h t i n due   to  t h e i r   e n e r g y   e f f i c i e nc y ,   hi g h   l u m e n   o ut pu t,   l o h e a t   ge n e r a t i o n ,   a n r e m a r ka bl e   s t a bi li t y .   T h e i r   l o e l e c t r i c i t y   c o n s u m pt i o m a ke s   t h e m   a n   i de a l   c h o i c e   f o r   s us t a i n a bl e   l i g h t i ng  s o l ut i o ns   [ 1 7 ] .   F i gur e   13  s h o wc a s e s   t h e   L E D   di o de   a s   a   c r i t i c a l   e l e c t r o ni c   c o m po ne n t ,   hi g hli g h t i n i t s   de s i g n   a n f u n c t i o n a li t y .   I n   F i gur e   14  s h o ws   t h e   wo r ki n pr i n c i p l e   o f   a n   L E d i o de .           F i gur e   13.   P a r t s   i ns i de   t h e   L E d i o de   [ 1 7 ]   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t   J   I n f   &   C o m m u n   T e c hn o l     I S S N:   2252 - 8776         C r e ati ng  s mar be dr oom  f or   c hil dr e by   c onne c t ing  P I R   and   L DR   s e ns or s     ( R agmi  M .   M us ta f a )   547       F i gur e   14.   W o r ki n pr i n c i p l e   o f   L E Ds   w i t h   PN - c on t a c t   [ 19 ]       2 . 7   S c h e m e   of   e l e c t r on ic  c on n e c t ion s   f o r   t h e   r e al i z at ion   of   t h e   s m ar t - in t e ll igent   r oo m   T r e a l i z e   t h e   s m a r t   b e dr oo m   f o r   c hi l dr e n ,   we   uti li z e s pe c if i c   too l s   o u t l i ne i n   t h e   m e t h o do l o g y   s e c t i o n   o f   t hi s   s c i e n t i f i c   wo r k .   C e n t r a l   to   o u r   p r o j e c t   i s   t h e   A r du i n o   UNO  m i c r o c o n tr o l l e r ,   de pi c t e i   F i gur e   15.   A s   a n   o pe n - a c c e s s   pr o g r a m m a bl e   e l e c t r o ni c   m o du l e ,   t h e   A r du i n o   UN O   o f f e r s   a   v a r i e t y   o f   i n put   a n o u t pu pi ns ,   e n a bli ng  s e a ml e s s   i n t e gr a t i o n   w i t h   va r i o us   s e n s o r s   a n e l e c t r o ni c   de vi c e s .   T h e   a c c o m pa nyi ng   s o f t wa r e   s ke t c h   c o de   f a c il i t a t e s   t hi s   i n t e gr a t i o n   [ 2 0 ] .   C o l l e c t i v e ly ,   t h e s e   c o m po n e n t s   a l l o f o r   t h e   di g i t i z a t i o o f   a   b e dr oo m   t a i l o r e f o r   c hi l dr e n   a ge to  10 ,   p a r t i c u l a r l y   t h o s e   wi t h   de v e l o p m e n t a l   d i s a bi li t i e s ,   a s   we l l   a s   e l de r ly   i n d i v i dua l s   a n c o upl e s   i n t e r e s t e i n   t e c hn o l o g y .   No t a bl y ,   w hi l e   s e v e r a l   a ut h o r s   h a v e   e m p l o y e s i mi l a r   e l e c t r o ni c   e qu i p m e n t   i n   t h e i r   r e s e a r c h ,   n o n e   h a v e   s pe c i f i c a ll y   a ddr e s s e t h e   c o n c e pt   o f   a   s m a r t   b e dr oo m .           F i gur e   15.   A r du i n o   Un o   a n s o m e   e l e c t r o n i c   c o n ne c t i o ns       T h e   c o n ne c t i o n s   o n   t h e   m i c r o c o n t r o l l e r   a r e   a s   f o l l o ws :     M i c r o c o n t r o l l e r   po r o f   VD C   i s   c o nn e c t e to  t h e   b r e a d b o a r wi t h   r e j u m pe r   to   di s t r i b ut e   VD C   v ol t a ge   to  ot h e r   de vi c e s .       T h e   m i c r o c o n t r o l l e r   po r t   o f   GN c o nn e c t i o n s   i s   p l a c e w i t h   bl a c j u m pe r   o n   t h e   b r e a d b o a r to   pr o vi de   gr o un d i n to  ot h e r   de vi c e s .     An a l o po r A i s   c o nn e c t e to   t h e   L DR   s e ns o r   to   r e c e i v e   t h e   li g h t   l e v e l   s i g n a l   ( o f   c o ur s e   a l s o   us i n t h e   a de qua t e   r e s i s t or   to  pr ot e c t   t h e   A p i n   o f   t h e   A r du in o   UN O) .     I n   t h e   di g i t a l   c o nn e c t i o n   o f   p i n   2,   t h e   P I R   s e n s o r   i s   p l a c e t r e c e i v e   i nc o m i n s i g n a l s   -   i n put s   wh e ne v e r   m o v e m e n t s   o c c ur   i n   i t s   m o ni t o r i n f i e l d.   T h e   d i g i t a l   c o nn e c t i o n   o n   p i 12  i s   de s i g na t e a s   a o u t pu t   whi c h   c o n t r o l s   t h e   c o nn e c t e r e l a y .   F i gu r e   1 s h o ws   t h e   c o n n e c t i o n   o f   t h e   L DR   s e ns o r   to  t h e   pr otot y pe   b r e a d b o a r d.   Evaluation Warning : The document was created with Spire.PDF for Python.
                                I S S N :   2252 - 8776   I n t   J   I n f   &   C o m m u n   T e c hn o l ,   Vo l .   14 ,   N o.   2 A ugus t   20 25 540 - 554   548       F i gur e   16.   L DR   s e ns o r   c o n n e c t e to  t h e   b r e a d b o a r d       T h e   r e c a bl e ,   whi c h   ha s   a   v o l t a ge   o f   VD C ,   i s   c o n n e c t e to  t h e   b r e a db o a r d s   L DR   s e ns o r ,   whi c pr o vi de s   t h e   s y s t e m   w i t h   i nf o r m a t i o n   o n   t h e   i ll u m i na t i o n   l i g h t s   i n t e n s i t y .   T h e   m o s t   s ui t a bl e   a m o u n t   o f   r e s i s t a n c e   t h a t   c a n   b e   pr o vi de f o r   t hi s   s e n s o r   i s   a   10  kΩ   r e s i s t o r ,   whi c h   i s   c o nn e c t e i n   s e r i e s   w i t h   th e   gr e e c a bl e   t ha t   i s   c o nn e c t e to   t h e   b r e a d b o a r d.   T h e   pa t h   t h e n   c o n t i n ue s   to   m i c r o c o n t r o l l e r   p i n   A 0,   w hi c h   i s   s u i t a ble   f o r   m e a s ur i n t h e   a n a l o gue   s i g n a l   t ha t   t h e   L DR   s e ns o r   r e c e i v e s   [ 2 1 ] .   F i gur e   17  de p i c t s   h o t hi s   e lec t r o ni c   c o n n e c t i o n   a ppe a r s .   G i v e n   t h a t   t h e   L DR   s e ns o r   i s   a n   e x c e ll e n t   s e mi c o n duc t o r ,   i t s   r e s i s t a n c e   v a r i e s   w i t h   t h e   i n t e ns i t y   o f   li g h t   f a ll i ng  o n   i t .   T h e   c h a n ge   i n   r e s i s t a n c e   o c c ur s   a c c o r di n to   a n   e x po n e n t i a l   f u n c t i o n .   W h e n   t h e   l i g h i n t e n s i t y   i s   hi g h ,   t h e n   t h e   r e s i s t a n c e   o f   t h e   L DR   s e ns o r   i s   o f f e r e t o   z e r o   v a l ue .   T o   p r ot e c t h e   A r du i n o   Un o   m odul e   f r o m   d e s tr uc t i o n ,   p r e c i s e l y   i t s   A 0   p or t,   th e w e   us e   t h e   10   kΩ   r e s i s tor   a s   a   v o l t a ge   di vi de r .   W he r e a s   t h e   v a r i a bl e   r e s i s tor   i s   a   m o m e n o f   t h e   ope r a t i n m ode   un de r   t h e   a v e r a ge   l u m i n a n c e   o f   t h e   L DR   s e n s or   [ 2 0 ] - [2 2 ].   T h e   r e s o l ut i o n   o f   t h e   A /D  ( a n a l o gue   t di g i t a l )   c o n ve r t e r   i s   10  bi t s ,   whi c h   m e a n s   t h a t   t h e   mi c r o c o n tr o l l e r   pr o c e s s o r   i s   10  bi t s   f o r   a   s upp ly   vo l t a ge   o f   VD C ,   a n t h e   r e a v a l ue s   o f   t h e   a n a l o g ue   s i g na l   a r e   i n   t h e   r a n ge   [ 0, 1023] .   Gi v e n   t h a t   t h e r e   a r e   o nl t w p o s s i bl e   bi t s   ( a n 1) ,   t h e   r e s u l t i n d i g i t a l   v a l ue s   c a r a n ge   f r o m   to  2 10 .     2 10 = 1024   ( 4)     W h a t   a r e   t h e   c a us e s   o f   t h e   va l u e s   l i s t e a b o v e   f a ll in w i t hi t h e   r a n ge   [ 0, 1023] ?   T h e r e f o r e ,   t h e   f o r m u l a   f o r   t h e   r e t u r n   o f   d i g i t a l   r e a v a l ue s   a t   e a c h   i ns t a n t   i n   v o l t a ge   m us t   b e   f o u n d!   T h e   v o l t a ge   U 0   o n   p i n   A o f   t h e   A r du i n o   UN m o du l e   i s   m e a s ur e us i ng  ( 5) .     0 =                         0 5   [ ] 1023   ( 5)     F i gur e   18  de p i c t s   t h e   c o nn e c t i o n   o f   t h e   P I R   s e ns o r   f o r   de t e c t i n t h e   m o v e m e n t   o f   h o t   b o di e s   o r   l i v i ng   b e i ng s   ( pe o pl e ,   do gs ,   c a t s ,   r a bbi t s ,   bi r ds ,   a n s im il a r ) .   W h e r e   U 0   r e pr e s e n t s   t h e   v o l t a ge   a t   pi n   A o f   t h e   A r du i n o   UNO.           F i gur e   17.   C o n ne c t i n L DR   p h oto r e s i s t o r   to   A r dui n o   Un o   [ 2 2 ]   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t   J   I n f   &   C o m m u n   T e c hn o l     I S S N:   2252 - 8776         C r e ati ng  s mar be dr oom  f or   c hil dr e by   c onne c t ing  P I R   and   L DR   s e ns or s     ( R agmi  M .   M us ta f a )   549   T h e   P I R   s e n s o r   i s   m o u n t e o n   t h e   b r e a d b o a r by   be i ng  c o nn e c t e to   t h r e e   c a bl e s ,   t wo  o f   w hi c h   e n a bl e   t h e   po l a r i z a t i o n - s upp ly   o f   t h e   s e ns o r   a n o n e   o f   whi c h   [ 2 2 ] ,   t h e   y e ll o c a bl e ,   pr o vi de s   t h e   s e ns o r   wi t i n f o r m a t i o n   a b o ut  t h e   pr e s e n c e   o f   h o b o di e s   i n   m o t i o n .   I n t e r n a l   pr o c e s s i ng  i s   do n e   o n   t h e   da t a   b e f o r e   i t   i s   s e n t   a s   d i g i t a l   i nf o r m a t i o n   to  t h e   m i c r o c o n tr o l l e r   vi a   t h e   y e ll o c a bl e ,   t h e   b r e a d b o a r d,   a n di g i t a l   p i n   n u m be r   o f   t h e   m i c r o c o n tr o l l e r .   T h e   mi c r o c o n t r o l l e r s   p i n   i s   c o nf i gur e to   o nl y   a c c e pt   I NPU T   s i g n a l s   [ 2 3 ] .   W he n   t h e r e   i s   n o   m o ve m e n t   de t e c t e d,   t h i s   t y p e   o f   P I R   s e n s o r   o u t pu t s   L OW   ( 0) ,   whi l e   w h e n   m o v e m e n t   i s   de t e c t e d,   i o u t pu t s   HI GH   ( 1)   [ 2 4 ] ,   [ 2 5 ].   T h e   e l e c t r o m a g n e t i c   r e l a y s   w i r i ng  d i a gr a m   i s   s h o wn   i n   F i gur e   19.   I h a s   t w c o n t a c t s ,   o n e   NO   a n d   t h e   ot h e r   NC ,   a n i t   h a s   a   c o i l   s upp ly   o f   VD C .   T h e   P I R   s e ns o r   i s   m o un t e o n   t h e   b r e a db o a r by   b e i ng   c o n n e c t e to  t h r e e   c a bl e s ,   t w o f   whi c h   e n a bl e   t h e   po l a r i z a t i o n - s upp ly   o f   t h e   s e ns o r   a n o n e   o f   whi c h   [ 2 2 ] ,   t h e   y e ll o c a bl e ,   pr o vi de s   t h e   s e n s o r   w i t h   i nf o r m a t i o n   a b o ut  t h e   pr e s e n c e   o f   h o t   b o di e s   i m o t i o n .   I n t e r n a l   pr o c e s s i n g   i s   do n e   o n   t h e   da t a   b e f o r e   i t   i s   s e n t   a s   di g i t a l   i nf o r m a t i o n   to   t h e   m i c r o c o n t r o l l e r   vi a   t h e   y e l lo w   c a bl e ,   t h e   b r e a db o a r d,   a n di g i t a l   p i n u m be r   o f   t h e   m i c r o c o n tr o l l e r .   T h e   m i c r o c o n tr o l l e r s   p i n   i s   c o nf igur e to  o nl y   a c c e pt   I N P UT   s i g n a l s   [ 2 3 ] .   W h e n   t h e r e   i s   no  m o v e m e n t   de t e c t e d ,   t h i s   t y pe   o f   P I R   s e n s o r   o u tput s   t h e   t e n s i o n   L O W   o r   s e n ds   bi t   ( 0)   i n   p i 2,   whil e   w h e n   m o v e m e n t   i s   de t e c t e d,   i t   o u t pu t s   c o n ve y s   t e n s i o n   HI GH   or   s e n ds   bi t   ( 1)   [ 2 4 ] ,   [ 2 5 ] .   T h e   e l e c t r o m a g n e t i c   r e l a y s   w i r i ng  d i a gr a m   i s   s h o wn   i n   F i g ur e   19.   I t   h a s   t w o   c o n t a c t s ,   o n e   NO   a n t h e   ot h e r   NC ,   a n i t   h a s   a   c o i l   s upp ly  o f   VD C .   T h r e e   c a bl e s   a r e   us e to  a tt a c h   t h e   r e l a y   to  t h e   b r e a d b o a r d.   T w o   o f   t h e   c a bl e s   a r e   us e to   p o we r   t h e   r e l a y ,   a n t h e   t hi r d,   a   b r o wn   c a bl e ,   i s   c o nn e c t e to   t h e   r e l a y s   I N1  p i n ,   w hi c h   i s   h o t h e   m i c r o c o n t r o l l e r   c o m m u ni c a t e s   [ 2 6 ] - [2 8 ]   wh e t h e r   to   t ur n   t h e   r e l a y   o n   or   o f f .   T h e   NO   t y p e   o f   t hi s   r e l a y s   o pt i o n s   s u i t s   us   i n   t hi s   c a s e ,   s o   we   c o n n e c t e t h e   c a bl e   f o r   v o l t a ge   220  VA C   t o   t h e   i nput   C OM a n us e t h e   r e l a y s   o ut pu to  c o n n e c t h e   l i g h t   to   NO 1   a s   s h o wn   i n   F i gur e   20.               F i gur e   18.   P I R   m o t i o n   de t e c t i o n   s e n s o r   F i gur e   19.   E l e c t r o m a g ne t i c   r e l a y           F i gur e   20.   C o m p l e t i o n   o f   a ll   e l e c t r o ni c   c o nn e c t i o ns   f o r   t h e   r e a l i z a t i o n   o f   t h e   i n t e l li ge n t   c hil dr e n s   r oom     Evaluation Warning : The document was created with Spire.PDF for Python.