Upload
anonymous-l9fb0xu
View
217
Download
0
Embed Size (px)
Citation preview
8/19/2019 Bluetooth Relay Control MAIN FULL Report
1/76
A
PROJECT REPORT
Submitted on
“ HOME AUTOMATION USING ANDROID PHONE OVERBLUETOOTH”
Submitted in !"ti!# $u#%##ment o$ t&e
Re'ui"ement( $o" t&e !)!"d o$ t&e de*"ee o$
BACHELOR O+ TECHNOLOG,
IN
E#e-t"oni-(. / Communi-!tion En*inee"in*0
Submitted To1 Submitted B21
De!"tment o$ E#e-t"oni-(. / Communi-!tion En*inee"in*
8/19/2019 Bluetooth Relay Control MAIN FULL Report
2/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Ab(t"!-t
The past decade has seen significant advancement in the field of consumer electronics.
Various ‘intelligent’ appliances such as cellular phones, air-conditioners, home
security devices, home theatres, etc. are set to realize the concept of a smart home.
They have given rise to a Personal Area Netor! in home environment, here all
these appliances can "e interconnected and monitored using a single controller.
#usy families and individuals ith physical limitation represent an attractive mar!et
for home automation and netor!ing. A ireless home netor! that does not incur
additional costs of iring ould "e desira"le. #luetooth technology, hich has
emerged in late $%%&s, is an ideal solution for this purpose.
'ome automation involves introducing a degree of computerized or automatic control
to
(ertain electrical and electronic systems in a "uilding. These include lighting,
temperature
(ontrol etc.
This pro)ect demonstrates a simple home automation system hich contains a remote
mo"ile host controller and several client modules *home appliances+. The client
modules communicate ith the host controller through a ireless device such as a
#luetooth ena"led mo"ile phone, in this case, an android "ased mart phone.
Page 2
8/19/2019 Bluetooth Relay Control MAIN FULL Report
3/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Table of Content
ChapterNo.
Particulars Page No.
i De-#!"!tion iii Certificate ii
iii Acknowledgment iii
iv Abstract iv
vi Table of Contents v-vii
vi List of figures viii
viii Abbreviations ix
Chapter 1. O3e"3ie) o$ P"o4e-t 1-1.1 Introduction 1-2
1. B!oc" diagra# 3
1.$ Pro%ect Modu!e& 3
Chapter !. H!"d)!"e De(-"ition "-!!
.1 Mi-"o-ont"o##e" 4-12
50606 '()) 4
50605 B!oc" Diagra# 550607 *eature& 5
50608 Pin diagra# 6
50609 Pin de&cri+tion 7-10
5060: S+ecia! *unction Regi&ter& 11
5060; Me#or, Organi-ation 11
5060;06
Progra# Me#or, 11
5060;
05 Data Me#or, 12
5060< atc/dog Ti#er 12
505BLUETOOTH MODULE =HC>?9@1O3e"3ie)
1-1#
505060
S+eci0cation& 14
505050
Pin out con0guration 15
50507 T,+ica! A++!ication ircuit 15
505080 Pairing 16
Page 3
8/19/2019 Bluetooth Relay Control MAIN FULL Report
4/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
505090
Hc23) B!uetoot/ #odu!e 4or"ing5o!tage
16
5050:0
Seria! co##unication 16
507 D"i3e" IC 1$-!%
50706ULN'3$A Dar!ington Tran&i&torArra,&
17
50705 Si#+!i0ed Sc/e#atic& 17
507070
*unctiona! B!oc" Diagra# 18
50708 Pin diagra# 19
50709 Inducti5e Load Dri5e 19
5070: Re&i&ti5e Load Dri5e 20
508 S)it-&e(!%
50806 Re!a, 20
509 Conne-to" 21
50: VInt"odu-tion 28
806 Se!ection o7 8aud rate 28
805 SBU* regi&ter !&-!'
80506
on0guration o7 SON regi&ter 29
80505
SM39 SM1 29
807 REN ="e-ei3e en!b#e@ 30
808 TI =t"!n(mit inte""ut@ 30
809 RI ="e-ei3e inte""ut@ 30
80:Ste( $o" t"!n(mittin* !nd"e-ei3in* o$ -&!"!-te"
%-!
80:06 T/e &te+& t/at '3)1 goe& t/roug/in tranitting a c/aracter 5ia T:D
30
Page 4
8/19/2019 Bluetooth Relay Control MAIN FULL Report
5/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
80:050Progra##ing t/e '3)1 to tran&7erc/aracter 8,te& &eria!!,
31
80:07 I#+ortance o7 TI *!ag 32
80:08Progra##ing t/e '3)1 to recei5ec/aracter 8,te& &eria!!,
32
Chapter (. P"o*"!m -"
906 PROGRAM ODES 33-43
905 Progra# detai! 43
Chapter #. Ci"-uit di!*"!m / Comonent Li(t ""
:060 o#+onent !i&t 44
Chapter $. P"ob#em de(-"ition( "(-"#
Chapter &. Ad3!nt!*e( / Di(!d3!nt!*e( "$-"&
8/19/2019 Bluetooth Relay Control MAIN FULL Report
6/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Li(t o$ +i*u"e(
*igure
No*igure Name Page No.
1 Block diagram of Bluetooth baed home automatio! 3
2 Block diagram of 8051 micro co!troller 5
3 "i! #iagram of 89$52 6
4 "ull u% reitor 9
5 &'-05 Bluetooth 14
6 "i!-out of &'-05 15
7 $im%lified $chematic of ()*2803 17
8 +u!ctio!al block diagram of ()*2803 189 "i! diagram of ()*2803 19
10 ,ela 20
11 ."812 hex file bur!er 21
12 $amu!g charger 22
13 "roteu /i!do/ 23
14 micro viio! keil 24
15 i!do/ cree! of ."912."812 bur!er 25
16 !droid )ogo 26
17 $electio! of baud rate 28
18 $'* regiter 29
Page 6
8/19/2019 Bluetooth Relay Control MAIN FULL Report
7/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
19 $erial mode electio! 30
20 iri!g co!!ectio! to /itch 45
Gene"!# Abb"e3i!tion
")' "rogrammable logic co!troller
$'# $u%ervior co!trol a!d data acuiitio!
" !%ut
" ut%ut
:-! ! timer
:-ff ff timer
; ;emor Bit
8/19/2019 Bluetooth Relay Control MAIN FULL Report
8/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
&; &uma! machi!e i!terfere!ce
.+# .ariable +reue!c #rive
;# ;emor #ouble ord
;B ;emor Bte
=' >xami!e f 'loed
= >xami!e f %e!
C&!te" 6OVERVIE O+ PROJECT
Page 8
8/19/2019 Bluetooth Relay Control MAIN FULL Report
9/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 6OVERVIE O+ PROJECT
6060INTRODUCTION1
Page 9
8/19/2019 Bluetooth Relay Control MAIN FULL Report
10/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Auto#ation in5o!5e& introducing a degree o7 co#+uteri-ed or auto#atic
contro! to certain e!ectrica! and e!ectronic &,&te#& in a 8ui!ding. T/e&e
inc!ude !ig/ting9 te#+erature contro!9 etc. T/e +a&t decade /a& &een
&igni0cant ad5ance#ent in t/e 0e!d o7 con&u#er e!ectronic&. Variou&inte!!igent a++!iance& &uc/ a& ce!!u!ar +/one9 air conditioner&9 /o#e
&ecurit, de5ice&9 /o#e t/eater&9 etc.9 are &et to rea!i-e t/e conce+t o7 a
art /o#e. T/e, /a5e gi5en ri&e to a Per&ona! Area Net4or" in /o#e
en5iron#ent9 4/ere a!! t/e&e a++!iance& can 8e interconnected and
#onitored u&ing a &ing!e contro!!er.
T/i& +ro%ect de#on&trate& an auto#ation &,&te# 4/ic/ contain& a re#ote
#o8i!e /o&t contro!!er and &e5era! c!ient #odu!e& ;eg.Ouire a 8ig and e:+en&i5e
c/ange o7 in7ra&tructure. e /a5e +ro+o&ed an auto#ation &,&te# t/at
can contro! a++!iance& !i"e TV&9 *an9 Tu8e !ig/t& 7ro# an android #o8i!e
u&ing B!uetoot/. In t/i& a !o4 co&t &ecure ce!! +/one 8a&ed9 ?e:i8!e
auto#ation &,&te# i& introduced. De5ice& are connected to t/e
#icrocontro!!er 8a&ed &4itc/ing circuit.
T/e co##unication 8et4een t/e ce!! +/one and t/e #icrocontro!!er 8oard
i& 4ire!e&&. Additiona! de5ice& can 8e connected into t/e &,&te# 4it/ !itt!e
#odi0cation&. T/e +/one 4i!! 8e Android OS 8a&ed +/one. T/e &4itc/ing
circuit 4i!! 8e /a5ing #icrocontro!!er coding to contro! t/e e!ectronic&
de5ice& !i"e 7an& and !ig/t& etc. '28it #icrocontro!!er 8oard 8a&ed on t/e
at#e!'(&) and t/e H23) B!uetoot/ #odu!e i& u&ed. It &u++ort& 4ire!e&&
Page 10
8/19/2019 Bluetooth Relay Control MAIN FULL Report
11/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
&eria! co##unication o5er B!uetoot/. T/i& 8oard /a& $ digita! in+ut and
out+ut +ort&.
T/e '(&) can 8e +rogra##ed u&ing t/e #icrocontro!!er@& /ig/2!e5e!
interacti5e e#8edded !anguage. T/e B!uetoot/ antenna in our #odu!e
+ic"& u+ t/e +ac"et& &ent 7ro# t/e ce!! +/one. Su8&e>uent!,9 t/e&e
+ac"et& containing t/e de5ice &tatu& a& co##and& are +i+e!ined t/roug/
'(&) #icrocontro!!er and t/e de&igned ana!ogue circuitr, according to
t/e de0nition o7 eac/ out+ut.
Dierent /o#e or o
8/19/2019 Bluetooth Relay Control MAIN FULL Report
12/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
1.. B#o- di!*"!m1>
*igure 1+ ,lock diagram of ,luetooth based home automation
In t/i& 8!oc" diagra# co##unication i& in 8ot/ direction 8et4een android
#o8i!e and B!uetoot/ #odu!e. T/i& co##unication i& done one 8, one
on!, one at a ti#e. T/i& co##unication i& ca!!ed /a!7 du+!e:.
*eed8ac" i& done 8, getting 35.7eed8ac" circuitr, i& &o deigned t/at
#icrocontro!!er can ea&i!, &en&e.
1.$. P"o4e-t Modu#e( 1>
T/e +ro%ect can 8e 8etter de&cri8ed 8, di5iding it into t4o categorie&9na#e!,91. Hard4are
. So7t4are
Page 12
8/19/2019 Bluetooth Relay Control MAIN FULL Report
13/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 5H!"d)!"e De(-"ition
Page 13
8/19/2019 Bluetooth Relay Control MAIN FULL Report
14/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 5H!"d)!"e De(-"ition
506 Mi-"o-ont"o##e"1>Micro contro!!er i& %u&t !i"e a a!! co#+uter
8ut t/e 8a&ic dierence co#e& in &i-e and #e#or,. T/e&e /a5e PU9 RAM9
ROM9 ICO and ti#er& are a!! on a &ing!e c/i+. It #ean& ,ou don@t need an,e:tra de5ice to #a"e it 7unctiona! !i"e 4it/ a #icro2+roce&&or. Genera!!,
t/i& #icrocontro!!er i& u&ed 4/ere a &+eci0c ta&" i& needed to do. So 0:ed
a#ount o7 on2c/i+ ROM9 RAM9 and nu#8er o7 ICO +ort& #a"e& t/e# idea!
7or a #an, a++!ication& in 4/ic/ co&t and &+ace are critica! T/e
#icrocontro!!er i& u&ed 8, u& in o5er +ro%ect i& AT'(S).
506060 T/e AT'(S) i& a !o42+o4er9 /ig/2+er7or#ance MOS
'28it #icrocontro!!er 4it/ '6 8,te& o7 in2&,&te# +rogra##a8!e *!a&/
#e#or,. T/e de5ice i& #anu7actured u&ing At#e!@& /ig/2den&it,
non5o!ati!e #e#or, tec/no!og, and i& co#+ati8!e 4it/ t/e indu&tr,2
&tandard '3)1 in&truction &et and +in out. T/e on2c/i+ *!a&/ a!!o4& t/e
+rogra# #e#or, to 8e re+rogra##ed in2&,&te# or 8, a con5entiona!
non5o!ati!e #e#or, +rogra##er. B, co#8ining a 5er&ati!e '28it PU 4it/
in2&,&te# +rogra##a8!e *!a&/ on a #ono!it/ic c/i+9 t/e At#e! AT'(S) i&
a +o4er7u! #icrocontro!!er 4/ic/ +ro5ide& a /ig/!,2?e:i8!e and co&t2
eecti5e &o!ution to #an, e#8edded contro! a++!ication&. T/e AT'(S)
+ro5ide& t/e 7o!!o4ing &tandard 7eature& '6 8,te& o7 *!a&/9 ) 8,te& o7
RAM9 $ ICO !ine&9 atc/dog ti#er9 t4o data +ointer&9 t/ree 128it
ti#erCcounter&9 a &i:25ector t4o2!e5e! interru+t arc/itecture9 a 7u!! du+!e:
&eria! +ort9 on2c/i+ o&ci!!ator9 and c!oc" circuitr,. In addition9 t/e AT'(S)
i& de&igned 4it/ &tatic !ogic 7or o+eration do4n to -ero 7re>uenc, and
&u++ort& t4o &o7t4are &e!ecta8!e +o4er &a5ing #ode&. T/e Id!e Mode
Page 14
8/19/2019 Bluetooth Relay Control MAIN FULL Report
15/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
&to+& t/e PU 4/i!e a!!o4ing t/e RAM9 ti#erCcounter&9 &eria! +ort9 and
interru+t &,&te# to continue 7unctioning. T/e Po4er2do4n #ode &a5e& t/e
RAM con2tent& 8ut 7ree-e& t/e o&ci!!ator9 di&a8!ing a!! ot/er c/i+ 7unction&
unti! t/e ne:t interru+t or /ard4are re&et. T/e 8!oc" diagra# i& &/o4n8e!o4.
506050 B#o- Di!*"!m1>
*igure !+ ,lock diagram of &%(1 micro controller
506070 +e!tu"e(
i. o#+ati8!e 4it/ MSF2)1 Product&
ii. '6 B,te& o7 In2S,&te# Progra##a8!e ;ISP= *!a&/ Me#or,
Endurance 13 " riteCEra&e ,c!e&
iii. .3V to ).)V O+erating Range
i5. *u!!, Static O+eration 3 H- to $$ MH-
5. T/ree2!e5e! Progra# Me#or, Loc"
5i. ) : '28it Interna! RAM
5ii. $ Progra##a8!e ICO Line&
5iii. T/ree 128it Ti#erCounter&
Page 15
8/19/2019 Bluetooth Relay Control MAIN FULL Report
16/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
i:. Eig/t Interru+t Source&
:. *u!! Du+!e: UART Seria! /anne!
:i. Lo42+o4er Id!e and Po4er2do4n Mode&
:ii. Interru+t Reco5er, 7ro# Po4er2do4n Mode:iii. atc/dog Ti#er
:i5. Dua! Data Pointer
:5. Po4er2o *!ag
:5i. *a&t Progra##ing Ti#e
:5ii. *!e:i8!e ISP Progra##ing ;B,te and Page Mode=
:5iii. Green ;P8CHa!ide27ree= Pac"aging O+tion
50608 Pin di!*"!m1>
Page 16
8/19/2019 Bluetooth Relay Control MAIN FULL Report
17/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*ig. + Pin iagram of &'(!
506090 Pin de(-"ition+-
VCC1
Pin 3 +ro5ide& &u++!, 5o!tage to t/e c/i+. T/e 5o!tage &ource i& ) Vo!t&.
GND1
Pin 3 i& t/e ground.
TAL6 !nd TAL51
Page 17
8/19/2019 Bluetooth Relay Control MAIN FULL Report
18/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
T/e '3)1 /a& an on c/i+ o&ci!!ator 8ut re>uire& an e:terna! c!oc" to run it.
Mo&t o7ten a >uart- cr,&ta! o&ci!!ator i& connected to in+ut& TAL1 ;+in 1(=
and TAL ;+in 1'=. T/e >uart- cr,&ta! o&ci!!ator connected to TAL1 and
TAL a!&o need& t4o ca+acitor& o7 $3 +7 5a!ue. One &ide o7 eac/ ca+acitori& connected to t/e ground. S+eed re7er& to t/e #a:i#u# o&ci!!ator
7re>uenc, connected to TAL ./en t/e '3)1 i& connected to a cr,&ta!
o&ci!!ator i& +o4ered u+ 4e can o8&er5e t/e 7re>uenc, on t/e TAL +in
u&ing t/e o&ci!!o&co+e.
RST1
Pin ( i& t/e RESET +in. It i& an in+ut and i& acti5e /ig/. U+on a++!,ing a/ig/ +u!&e to t/i& +in t/e #icrocontro!!er 4e!! re&et and ter#inate a!!
acti5itie&. T/i& i& o7ten re7erred to a& a +o4er on re&et .Acti5ating a +o4er
on re&et 4i!! cau&e a!! 5a!ue& t/e regi&ter& to 8e !o&t. It 4i!! &et +rogra#
counter to a!! 3&.
In order 7or t/e RESET in+ut to 8e eecti5e it #u&t /a5e a #ini#u#
duration o7 t4o #ac/ine c,c!e&. In ot/er 4ord& t/e /ig/ +u!&e #u&t 8e
/ig/ 7or a #ini#u# o7 t4o #ac/ine c,c!e& 8e7ore it i& a!!o4ed to go !o4.
EA1
T/e '3)1 7a#i!, #e#8er& &uc/ a& t/e 'J)1C)9 '()1C) or DS'(K3 a!!
co#e 4it/ on c/i+ ROM to &tore +rogra#&. In &uc/ ca&e& t/e EA +in i&
connected to Vcc. *or 7a#i!, #e#8er& &uc/ a& t/e '3$1 and '3$ in 4/ic/
t/ere i& no on c/i+ ROM9 code i& &tored on an e:terna! ROM and i& 7etc/ed
8, '3$1C$. T/ere7ore 7or t/e '3$1 t/e EA +in #u&t 8e connected to GND
to indicate t/at t/e code i& &tored e:terna!!,. EA 4/ic/ &tand& 7or e:terna!
acce&& i& +in nu#8er $1 in t/e DIP +ac"age&. It i& an in+ut +in and #u&t
8e connected to eit/er Vcc or GND. In ot/er 4ord& it cannot 8e
unconnected.
PSEN1
T/i& i& an out+ut +in. PSEN &tand& 7or +rogra# &tore ena8!e. In an '3$1
Page 18
8/19/2019 Bluetooth Relay Control MAIN FULL Report
19/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
8a&ed &,&te# in 4/ic/ an e:terna! ROM /o!d& t/e +rogra# code9 t/i& +in i&
connected to t/e OE +in o7 t/e ROM.
ALE1ALE &tand& 7or addre&& !atc/ ena8!e. It i& an out+ut +in and i& acti5e /ig/.
/en connecting an '3$1 to e:terna! #e#or,9 +ort 3 +ro5ide& 8ot/
addre&& and data. In ot/er 4ord& t/e '3$1 #u!ti+!e:e& addre&& and data
t/roug/ +ort 3 to &a5e +in&. T/e ALE +in i& u&ed 7or de2#u!ti+!e:ing t/e
addre&& and data 8, connecting to G +in o7 t/e JLS$J$ c/i+.
PORTS ?6571
A!! t/e +ort& u+on RESET are con0gured a& in+ut9 &ince P32P$ /a5e 5a!ue
**H on t/e#. T/e 7o!!o4ing i& a &u##ar, o7 7eature& o7 P32P$.
PORT ?1
Port 3 i& a!&o de&ignated a& AD32ADJ a!!o4ing it to 8e u&ed 7or 8ot/
addre&& and data. /en connecting an '3)1C$1 to an e:terna! #e#or,9
+ort 3 +ro5ide& 8ot/ addre&& and data. T/e '3)1 #u!ti+!e:e& addre&& and
data t/roug/ +ort 3 to &a5e +in&. ALE indicate& i7 +3 /a& addre&& A32AJ.in
t/e '3)1 8a&ed &,&te#& 4/ere t/ere i& no e:terna! #e#or, connection
t/e +in& o7 P3 #u&t 8e connected e:terna!!, to 13"2o/# +u!!2u+ re&i&tor.
T/i& i& due to t/e 7act t/at P3 i& an o+en drain9 un!i"e P19 P and P$. O+en
drain i& a ter# u&ed 7or MOS c/i+& in t/e &a#e 4a, t/at o+en co!!ector i&
u&ed 7or TTL c/i+&. In #an, &,&te#& u&ing t/e 'J)19 '(c)1 or DS'(cK3c/i+& 4e nor#a!!, connect P3 to +u!! u+ re&i&tor&.
Port 3 a!&o recei5e& t/e code 8,te& during *!a&/ +rogra##ing and out+ut&
t/e code 8,te& during +rogra# 5eri0cation. E:terna! +u!!2u+& are re>uired
during +rogra# 5eri0cation.
Page 19
8/19/2019 Bluetooth Relay Control MAIN FULL Report
20/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*ig. ".pull up resistor
Po"t 61
Port 1 i& an '28it 8idirectiona! ICO +ort 4it/ interna! +u!!2u+&. T/e Port 1
out+ut 8uer& can &in"C&ource 7our TTL in+ut&. /en 1& are 4ritten to Port
1 +in&9 t/e, are +u!!ed /ig/ 8, t/e interna! +u!!2u+& and can 8e u&ed a&
in+ut&. A& in+ut&9 Port 1 +in& t/at are e:terna!!, 8eing +u!!ed !o4 4i!!
&ource current ;IIL= 8ecau&e o7 t/e interna! +u!!2u+&. In addition9 P1.3 and
P1.1 can 8e con0gured to 8e t/e ti#erCcounter e:terna! count in+ut
;P1.3CT= and t/e ti#erCcounter trigger in+ut ;P1.1CTE=9 re&+ecti5e!,9
a& &/o4n in t/e 7o!!o4ing ta8!e. Port 1 a!&o recei5e& t/e !o42order addre&&
8,te& during *!a&/ +rogra##ing and 5eri0cation.
Po"t 5
Page 20
8/19/2019 Bluetooth Relay Control MAIN FULL Report
21/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Port i& an '28it 8idirectiona! ICO +ort 4it/ interna! +u!!2u+&. T/e Port
out+ut 8uer& can &in"C&ource 7our TTL in+ut&. /en 1& are 4ritten to Port
+in&9 t/e, are +u!!ed /ig/ 8, t/e interna! +u!!2u+& and can 8e u&ed a&
in+ut&. A& in+ut&9 Port +in& t/at are e:terna!!, 8eing +u!!ed !o4 4i!!&ource current ;IIL= 8ecau&e o7 t/e interna! +u!!2u+&. Port e#it& t/e /ig/2
order addre&& 8,te during 7etc/e& 7ro# e:terna! +rogra# #e#or, and
during acce&&e& to e:terna! data #e#or, t/at u&e& 128it addre&&e&
;MOV DPTR=. In t/i& a++!ication9 Port u&e& &trong interna! +u!!2u+&
4/en e#itting 1&. During acce&&e& to e:terna! data #e#or, t/at u&e& '2
8it addre&&e& ;MOV RI=9 Port e#it& t/e content& o7 t/e P S+ecia!
*unction Regi&ter. Port a!&o recei5e& t/e /ig/2order addre&& 8it& and
&o#e contro! &igna!& during *!a&/ +rogra##ing and 5eri0cation.
Po"t 7
Port $ i& an '28it 8idirectiona! ICO +ort 4it/ interna! +u!!2u+&. T/e Port $
out+ut 8uer& can &in"C&ource 7our TTL in+ut&. /en 1& are 4ritten to Port
$ +in&9 t/e, are +u!!ed /ig/ 8, t/e interna! +u!!2u+& and can 8e u&ed a&
in+ut&. A& in+ut&9 Port $ +in& t/at are e:terna!!, 8eing +u!!ed !o4 4i!!&ource current ;IIL= 8ecau&e o7 t/e +u!!2u+&. Port $ recei5e& &o#e contro!
&igna!& 7or *!a&/ +rogra##ing and 5eri0cation. Port $ a!&o &er5e& t/e
7unction& o7 5ariou& &+ecia! 7eature& o7 t/e AT'(S)9 a& &/o4n in t/e
7o!!o4ing ta8!e.
Po"t 7 A#te"n!te $un-tion(1
Page 21
8/19/2019 Bluetooth Relay Control MAIN FULL Report
22/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
5060:0 Se-i!# +un-tion Re*i(te"(1
Timer 2 Registers: ontro! and &tatu& 8it& are contained in regi&ter& TON;&/o4n in Ta8!e )2 = and TMOD ;&/o4n in Ta8!e 132= 7or Ti#er . T/e
regi&ter +air ;RAPH9 RAPL= i& t/e a+tureCRe!oad regi&ter& 7or Ti#er
in 128it ca+ture #ode or 128it auto2re!oad #ode.
Interrupt Registers: T/e indi5idua! interru+t ena8!e 8it& are in t/e IE regi&ter. T4o +rioritie& can 8e &et 7or eac/ o7 t/e &i: interru+t &ource& in t/e IPregi&ter.
Dual Data Pointer Registers: To 7aci!itate acce&&ing 8ot/ interna! and e:terna!
data #e#or,9 t4o 8an"& o7 128it Data Pointer Regi&ter& are +ro5ided
DP3 at S*R addre&& !ocation& 'H2'$H and DP1 at 'H2')H. Bit DPS 3 in
S*R AUR1 &e!ect& DP3 and DPS 1 &e!ect& DP1. T/e u&er &/ou!d ALAS
initia!i-e t/e DPS 8it to t/e a++ro+riate 5a!ue 8e7ore acce&&ing t/e
re&+ecti5e Data Pointer Regi&ter.
Power off Flag: T/e Po4er O *!ag ;PO*= i& !ocated at 8it ;PON.= in t/ePON S*R. PO* i& &et to 1 during +o4er u+. It can 8e &et and re&t under&o7t4are contro! and i& not aected 8, re&et.
5060;0 Memo"2 O"*!niF!tion
MS2)1 de5ice& /a5e a &e+arate addre&& &+ace 7or Progra# and Data
Me#or,. U+ to 6 8,te& eac/ o7 e:terna! Progra# and Data Me#or, can
8e addre&&ed.
5060;060 P"o*"!m Memo"2
I7 t/e EA +in i& connected to GND9 a!! +rogra# 7etc/e& are directed to
e:terna! #e#or,. On t/e AT'(S)9 i7 EA i& connected to V9 +rogra#
7etc/e& to addre&&e& 3333H t/roug/ 1***H are directed to interna!
Page 22
8/19/2019 Bluetooth Relay Control MAIN FULL Report
23/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
#e#or, and 7etc/e& to addre&&e& 333H t/roug/ ****H are to e:terna!
#e#or,.
5060;050 D!t! Memo"2
T/e AT'(S) i#+!e#ent& ) 8,te& o7 on2c/i+ RAM. T/e u++er 1' 8,te&
occu+, a +ara!!e! addre&& &+ace to t/e S+ecia! *unction Regi&ter&. T/i&
#ean& t/at t/e u++er 1' 8,te& /a5e t/e &a#e addre&&e& a& t/e S*R
&+ace 8ut are +/,&ica!!, &e+arate 7ro# S*R &+ace.
/en an in&truction acce&&e& an interna! !ocation a8o5e addre&& J*H9 t/e
addre&& #ode u&ed in t/e in&truction &+eci0e& 4/et/er t/e PU acce&&e&
t/e u++er 1' 8,te& o7 RAM or t/e S*R &+ace. In&truction& 4/ic/ u&e direct
addre&&ing acce&& t/e S*R &+ace.
*or e:a#+!e9 t/e 7o!!o4ing direct addre&&ing in&truction acce&&e& t/e S*R
at !ocation 3A3H ;4/ic/ i& P=.
MOV ?A?H d!t!
In&truction& t/at u&e indirect addre&&ing acce&& t/e u++er 1' 8,te& o7
RAM. *or e:a#+!e9 t/e 7o!!o4ing indirect addre&&ing in&truction9 4/ere R3
contain& 3A3H9 acce&&e& t/e data 8,te at addre&& 3A3H9 rat/er t/an P
;4/o&e addre&& i& 3A3H=.
MOV @R0, #ata
Note t/at &tac" o+eration& are e:a#+!e& o7 indirect addre&&ing9 &o t/e
u++er 1' 8,te& o7 data RAM are a5ai!a8!e a& &tac" &+ace.
5060
8/19/2019 Bluetooth Relay Control MAIN FULL Report
24/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
di&a8!e 7ro# e:iting re&et. To ena8!e t/e DT9 a u&er #u&t 4rite 31EH and
3E1H in &e>uence to t/e DTRST regi&ter ;S*R !ocation 3AH=. /en t/e
DT i& ena8!ed9 it 4i!! incre#ent e5er, #ac/ine c,c!e 4/i!e t/e o&ci!!ator
i& running. T/e DT ti#eout +eriod i& de+endent on t/e e:terna! c!oc"7re>uenc,. T/ere i& no 4a, to di&a8!e t/e DT e:ce+t t/roug/ re&et ;eit/er
/ard4are re&et or DT o5er?o4 re&et=. /en DT o5er2?o4&9 it 4i!! dri5e
an out+ut RESET HIGH +u!&e at t/e RST +in.
505 BLUETOOTH MODULE =HC>?9@1
O3e"3ie)1 o##unication de5ice2o5er +ro%ect i& 8a&ed on 4ire!e&&
co##unication 8et4een #icro contro!!er and #o8i!e +/one. But a!one
#icro contro!!er i& not a8!e to co##unicate direct!, to t/e android #o8i!e
+/one. B!uetoot/ Seria! #odu!e@& o+eration doe&n@t need dri5e9 and can
co##unicate 4it/ t/e ot/er B!uetoot/ de5ice t/at /a& t/e &eria!. But
co##unication 8et4een t4o B!uetoot/ #odu!e& re>uire& at
Lea&t t4o condition&
;1= T/e co##unication #u&t 8e 8et4een #a&ter and &!a5e.
;= T/e +a&&4ord #u&t 8e correct.
H23) #odu!e i& an ea&, to u&e B!uetoot/ SPP ;Seria! Port Protoco!=
#odu!e9 de&igned 7or tran&+arent 4ire!e&& &eria! connection &etu+. Seria!
+ort B!uetoot/ #odu!e i& 7u!!, >ua!i0ed B!uetoot/ V.3EDR ;En/anced
Data Rate= $M8+& Modu!ation 4it/ co#+!ete .GH- radio tran&cei5er and
8a&e8and. It u&e& SR B!ue core 3QE:terna! &ing!e c/i+ B!uetoot/ &,&te#
4it/ MOS tec/no!og, and 4it/ A*H ;Ada+ti5e *re>uenc, Ho++ing
*eature=. It /a& t/e
*oot +rint a& a!! a& 1.J##:J##.
H23) #odu!e i& an ea&, to u&e B!uetoot/ SPP ;Seria! Port Protoco!=
#odu!e9 de&igned 7or tran&+arent 4ire!e&& &eria! connection &etu+. Seria!
+ort B!uetoot/ #odu!e i& 7u!!, >ua!i0ed B!uetoot/ V.3EDR ;En/anced
Data Rate= $M8+& Modu!ation 4it/ co#+!ete .GH- radio tran&cei5er and
8a&e8and
Page 24
8/19/2019 Bluetooth Relay Control MAIN FULL Report
25/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
B!uetoot/ ire!e&& net4or"& 7or &/ort range co##unication& /a5e a 4ide
&+read u&age o7 B!uetoot/ radio trani&&ion& 8et4een 33'3 MH-
Modern #o8i!e de5ice& e#8ed a!!9 !o42+o4ered and c/ea+ integrated
c/i+& 7unctioning a& &/ort2range radio tran&cei5er& 7or B!uetoot/ radioco##unication&. De5ice +airing9 aut/entication9 encr,+tion and
aut/ori-ation tec/ni>ue& /a5e gi5en recognition to B!uetoot/ tec/no!og,
due to it& 5ita! &ecurit, #ec/ani&.
Dierent t,+e& o7 B!uetoot/ a++!ication& can 8e de5e!o+ed u&ing Android
+!at7or# arc/itecture u&ing t/e B!uetoot/ +ro0!e&. T/e de5ice
#anu7acturer& +ro5ide t/e &er5ice& u&ing t/e &u++ort o7 t/e&e +ro0!e& in
t/eir de5ice& to #aintain co#+ati8i!it, 7or t/e B!uetoot/ tec/no!og,
Fig! "!$%0" &luetoot'
2!2!(! )pe*ifi*ations arware features
T,+ica! 2'3dB# &en&iti5it,.
U+ to dB# R* tranit& +o4er.
Lo4 Po4er 1.'V O+eration9 $.$ to ) V ICO.
PIO contro!.
UART inter7ace 4it/ +rogra##a8!e 8aud rate.
it/ integrated antenna.
it/ edge connector.
)oftware features
S!a5e de7au!t Baud rate (339 Data 8it&'9 Sto+ 8it19Parit,No +arit,.
Page 25
8/19/2019 Bluetooth Relay Control MAIN FULL Report
26/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
PIO( and PIO' can 8e connected to red and 8!ue !ed &e+arate!,. /en
#a&ter and &!a5e are +aired9 red and 8!ue !ed 8!in"& 1ti#eC& in
inter5a!9 4/i!e di&connected on!, 8!ue !ed 8!in"& ti#e&C&.
Auto connect& to t/e !a&t de5ice on +o4er a& de7au!t.
Per#it +airing de5ice to connect a& de7au!t.
Auto +airing PINODE1$ a& de7au!t.
Auto reconnect in $3 #in 4/en di&connected a& a re&u!t o7 8e,ond t/e
range o7 connection.
2!2!2! Pin out *onfiguration
Figure +: Pin%out of $%0"
2!2!! T-pi*al .ppli*ation $ir*uit:
Page 26
8/19/2019 Bluetooth Relay Control MAIN FULL Report
27/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
505080 P!i"in*1A7ter connect t/e B!uetoot/ #odu!e9 &can 7or ne4 de5ice& 7ro# t/eAndroid +/one and ,ou 4i!! 0nd t/e #odu!e 4it/ t/e de5ice na#e H23)9 a7ter t/at9 c!ic" to connect9 i7 &o#e #e&&age a++ear& a&"ing a8outPairing code %u&t +ut
“6578” a& de7au!t code.
BLUE LED ATIVE ;B!in"ing )33#& +eriod inacti5e connection9 c/ange1&eg 4it/ acti5e connection=
Ho) to *et to t&e (t!nd!"d -ommuni-!tion
mode
1. Lea5e 7ree 6E9 don@t connect it to VDD neit/er GND.
2 Su++!, +o4er to t/e #odu!e. T/en t/e #odu!e 4i!! enter to
co##unication #ode. It can 8e u&ed 7or +airing.
Page 27
8/19/2019 Bluetooth Relay Control MAIN FULL Report
28/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
505090 HC>?9 BLUETOOTH MODULE ORINGVOLTAGE1>
T/e B!uetoot/ #odu!e H23) i& u&ed to recei5e tranit data 8et4een
B!uetoot/ de5ice and MU. It re>uire& +o4er &u++!, 7ro# $.$V to )V.
5050:0 SERIAL COMMUNICATION1>
To tran&7er to a de5ice !ocated #an, #eter& a4a,9 t/e &eria! #et/od i&
u&ed. T/e data i& &ent one 8it at a ti#e. Here not '8it data i& &end e:tra
8it are &end a!ong 4it/ it .t/i& t4o 8it are ca!!ed &tart 8it and &to+ 8it.
T/e&e to4 8it are u&ed &o &,nc/roni-ation can 8e done 8et4een
tranitter and recei5er.
507 D"i3e" IC1
50706 ULN5
8/19/2019 Bluetooth Relay Control MAIN FULL Report
29/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*ig. $.implified chematics of /LN!&%
507070 +un-tion!# B#o- Di!*"!m1
Page 29
8/19/2019 Bluetooth Relay Control MAIN FULL Report
30/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*ig. &.*unctional block diagram of /LN!&%
Eac/ c/anne! o7 ULN'3$A con&i&t& o7 Dar!ington connected NPN
tran&i&tor&. T/i& connection create& t/e eect o7 a &ing!e tran&i&tor 4it/ a
5er, /ig/ current gain. T/i& can 8e a& /ig/ a& 139333 ACA at certain
current&. T/e 5er, /ig/ gain a!!o4& 7or /ig/ out+ut current dri5e 4it/ a
5er, !o4 in+ut current9 e&&entia!!, e>uating to o+eration 4it/ !o4 GPIO
5o!tage&. T/e GPIO 5o!tage i& con5erted to 8a&e current 5ia t/e .J "
re&i&tor connected 8et4een t/e in+ut and 8a&e o7 t/e +re2dri5er
Dar!ington NPN. T/e J. " $.3 " re&i&tor& connected 8et4een t/e
8a&e and e#itter o7 eac/ re&+ecti5e NPN act a& +u!!2do4n& and &u++re&&
t/e a#ount o7 !ea"age t/at #a, occur 7ro# t/e in+ut. T/e diode&
connected 8et4een t/e out+ut and OM +in i& u&ed to &u++re&& t/e "ic"2
8ac" 5o!tage 7ro# an inducti5e !oad t/at i& e:cited 4/en t/e NPN dri5er&
are turned o ;&to+ &in"ing= and t/e &tored energ, in t/e coi!& cau&e& a
re5er&e current to ?o4 into t/e coi! &u++!, 5ia t/e "ic"28ac" diode. In
nor#a! o+eration t/e diode& on 8a&e and co!!ector +in& to e#itter 4i!! 8e
re5er&ed 8ia&ed. I7 t/e&e diode are 7or4ard 8ia&ed9 interna! +ara&itic NPN
tran&i&tor& 4i!! dra4 ;a near!, e>ua!= current 7ro# ot/er ;near8,= de5ice
+in&.
50708 Pin di!*"!m1>
Page 30
8/19/2019 Bluetooth Relay Control MAIN FULL Report
31/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*ig. '.pin dia0gram of uln !&%
ULN'3$A Dar!ington Tran&i&tor Arra,& +in no 13 can 8e u&ed 7or inducti5e
or non2inducti5e !oad. T/e&e /ig/ out+ut current dri5er +in can &in"
)33#A.I7 re>uire#ent o7 #ore current t/en t4o +in can a!&o 8e connected
+ara!!e!. Para!!e! connection #u&t 8e done 8ot/ in+ut and out+ut. In+ut and
out+ut current 4i!! #u!ti+!, according to nu#8er o7 in+ut and out+ut
connected +ara!!e!.
50709 Indu-ti3e Lo!d D"i3e
/en t/e OM +in i& tied to t/e coi! &u++!, 5o!tage9 ULN'3$A i& a8!e to
dri5e inducti5e !oad& and &u++re&& t/e 6ic"28ac" 5o!tage 5ia t/e interna!
7ree4/ee!ing diode&.
5070: Re(i(ti3e Lo!d D"i3e
Page 31
8/19/2019 Bluetooth Relay Control MAIN FULL Report
32/76
8/19/2019 Bluetooth Relay Control MAIN FULL Report
33/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
onnector& are u&ed 7or %oining t4o 4ire& te#+ora!!, 8, u&ing connector
8ig circuit can 8e di5ided and a7ter co#+!etion t/e, can re%oin. No4 a
da,@& e5er, ti#e in5erter circuited can 8e re#o5ed out 4it/out u&ing de
&o!dering.
50: V
T/i& i& t/e 5+'1 8urner /ard4are. T/i& i& u&ed to 8urn /e: 0!e to t/e
ATMEL '(&) #icrocontro!!er. T/i& 8urner 4e can a!&o 8urn PI9 AVR
#icrocontro!!er&.
*igure 11+ P&1! he2 file burner
T/ere i& a #et/od gi5en 4/ic/ &/o4& /o4 to +!ace #icrocontro!!er on t/i&
8urner. I7 4rong #et/od i& u&ed t/en t/ere 4i!! 8e error di&+!a, id not
#atc/ed. T/i& 5+'1 8urner co#e& 4it/ &u++ort cd 4/ic/ /a& &o7t4are.
T/i& cd inc!ude& u&8 to &eria! &o7t4are.
T/i& &o7t4are &u++ort 4indo4 J9 5i&ta and P on!,.
Page 33
8/19/2019 Bluetooth Relay Control MAIN FULL Report
34/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
50; Po)e" (u#21>
Sa#&ung c/arger i& u&ed 7or gi5ing )5 +o4er &u++!, to t/e circuit. T/i&
c/arger /a5ing +o4er o7 J33 #A. So circuit can run +ro+er!,. T/i&
Sa#&ung c/arger i& #ade o7 &4itc/ #ode +o4er &u++!,.
*ig. 1!.amsung charger
In #an, +ro%ect t/i& can 8e 5er, u&e7u! 8ecau&e o7 co#+act +ac"age. I7 4e
#ade a nor#a!!, +o4er &u++!, 8, u&ing tran&7or#er t/en it ta"e& !arger
&+ace on 5o!tage regu!ation #u&t 8e done. But in t/i& c/arger a!! t/ing i&
done. A& t/i& c/arger i& u&ed 7or c/arging t/e 8atter, &o it can ga5e
continue& 0:ed 5o!tage 7or !ong ti#e o7 +eriod. T/i& c/arger circuitr, i&
#ade 8, &e#iconductor and a a!! tran&7or#er or 4e can &a, SMPS
&4itc/ #ode +o4er &u++!, a& a ca+acitor i& u&ed in t/i& c/arger &o
c/arger can ga5e out+ut 7or a &/ort duration i7 +o4er i& &4itc/ed2o.
Page 34
8/19/2019 Bluetooth Relay Control MAIN FULL Report
35/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 7So$t)!"e
Page 35
8/19/2019 Bluetooth Relay Control MAIN FULL Report
36/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 7
So$t)!"e
3NT)4/CT34N+ E!ectronic de&ign auto#ation ;EDA or EAD= i& acategor, o7 &o7t4are too!& 7or de&igning e!ectronic &,&te#& &uc/ a&+rinted circuit 8oard& and integrated circuit&. T/e too!& 4or" toget/er ina de&ign ?o4 t/at c/i+ de&igner& u&e to de&ign and ana!,-e entire&e#iconductor c/i+&. T/e 5ariou& &o7t4are@& u&ed are
706 PROTEUS1>
Proteu& i& &o7t4are in 4/ic/ 4e can de&ign t/e circuit 4it/ u&ing /ard 4are
co#+onent. In t/i& &o7t4are in+ut and out+ut re!ation i& &/o4& in t/i&
&o7t4are.
*ig. 1.Proteus window
Proteu& i& a /ig/2+er7or#ance &i#u!ator 7or MIMD #u!ti+roce&&or&. It i&
7a&t9 accurate9 and ?e:i8!e. It i& one to t4o order& o7 #agnitude 7a&ter t/an
co#+ara8!e &i#u!ator&9 it can re+roduce re&u!t& 7ro# rea! #u!ti+roce&&or&9
and it i& ea&i!, con0gured to &i#u!ate a 4ide range o7 arc/itecture&.
Proteu& +ro5ide& a #odu!ar &tructure t/at &i#+!i0e& cu&to#i-ation and
inde+endent re+!ace#ent o7 +art& o7 arc/itecture. Variou& t,+e o7 circuit
Page 36
8/19/2019 Bluetooth Relay Control MAIN FULL Report
37/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
can 8e #ade in t/i& circuit can 8e ana!ogie& or digita!. Hear #an, te&ting
de5ice are +re&ented in t/i& !i"e a##eter9 5o!t#eter9 o&ci!!o&co+e etc.
705EIL1>6ei! &o7t4are i& u&ed to con5ert c !anguage +rogra# to /e: 0!e 7or#at
4/ic/ can ea&i!, 8un in #icro contro!!er.
*ig. 1".micro vision 5keil6
Ste to m!e ! ne) "o*"!m1>
1. !ic" on +ro%ect on &tatu& 8ar and &e!ect ne4 +ro%ect.
. Gi5e a na#e to +ro%ect.
$. Se!ect ne4 0!e in 0!e on &tatu& 8ar.
. Pre&& contro! & and gi5e 0!e na#e 4it/ e:ten&ion na#e .c.
). Pre&& o+tion 7or target !oo" a& #agic &tic" +re&ent on target 1.
. rite cr,&ta! 7re>uenc, in MH-
J. Se!ect out+ut and c!ic" on create /e: 0!e.
T/e created /e: 0!e 4i!! 7ound in in&ta!!ation dri5e o7 "ei!.
Page 37
8/19/2019 Bluetooth Relay Control MAIN FULL Report
38/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
707 VP
+e!tu"e(1
Su++ort& ATMEL &erie& MU =
8/19/2019 Bluetooth Relay Control MAIN FULL Report
39/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
*igure 1(+ 7indow screen of P'1!8P&1! burnerSte( $o" bu"nin* &e %#e(1>
1. *ir&t &e!ect de5ice.
. /ec" /o4 to +!ace #icrocontro!!er.
$. Load /e: 0!e 7ro# 7o!der.
. Se!ect auto #ode in !e7t &ide.
I7 /e: 0!e 8urn t/en ta&" 4i!! 8e co#+!ete. I7 not de5ice id error co#e& t/en
c!ean #icro contro!!er +in and re+!ace& it and re&tart 7ro# &te+ 0r&t.
708 And"oid A1>
*igure 1#+ Android Logo
Android /a& a dictionar, #eaning o7 8eing a /u#an t/at re&e#8!e&
auto#ation. T/e true c/aracter o7 it& na#e i& it@& t/e Goog!e created&o7t4are &tac" 7or creating co#+re/en&i5e Mo8i!e A++!ication& and
Page 39
8/19/2019 Bluetooth Relay Control MAIN FULL Report
40/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
So7t4are to rea!i-e t/e 7u!! +otentia! o7 one@& Mo8i!e /and&et and it&
+o&&i8i!itie&.
Android i& a co#+re/en&i5e &o7t4are &tac" o7 #o8i!e de5ice& t/at inc!ude&
an o+erating &,&te#9 #idd!e4are and "e, a++!ication. T/i& ric/ &ource o7
&o7t4are 8unc/ i& u&ed in Mo8i!e Tec/no!og, t/roug/ it& inno5ation #odu!e
o7 T/e Android So7t4are De5e!o+#ent 6it ;SD6=.
.ppli*ations:
These are the basics of Android applications:
• Android a++!ication& are co#+o&ed o7 one or #ore a++!ication
co#+onent& ;acti5itie&9 &er5ice&9 content +ro5ider&9 and 8roadca&t
recei5er&=
• Eac/ co#+onent +er7or#& a dierent ro!e in t/e o5era!! a++!ication
8e/a5ior9 and eac/ one can 8e acti5ated indi5idua!!, ;e5en 8, ot/er
a++!ication&=
• T/e #ani7e&t 0!e #u&t dec!are a!! co#+onent& in t/e a++!ication and&/ou!d a!&o dec!are a!! a++!ication re>uire#ent&9 &uc/ a& t/e #ini#u#
5er&ion o7 Android re>uired and an, /ard4are con0guration& re>uired
• Non2code a++!ication re&ource& ;i#age&9 &tring&9 !a,out 0!e&9 etc.=
&/ou!d inc!ude a!ternati5e& 7or dierent de5ice con0guration& ;&uc/ a&
dierent &tring& 7or dierent !anguage&=
.ppli*ation use on anroi p'one:
A cu&to# #ade a++!ication i& u&ed on android +/one 7or contro!!ing t/e
de5ice&. T/e &creen &/ot& are a& 8e!o4
Page 40
8/19/2019 Bluetooth Relay Control MAIN FULL Report
41/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure (/: ome )*reen
Figure (: $onne*ting De1i*e
Page 41
8/19/2019 Bluetooth Relay Control MAIN FULL Report
42/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure (: De1i*e *onne*te 3 signal strengt'
Figure 20: )ele*t $ommuni*ation Moe
Page 42
8/19/2019 Bluetooth Relay Control MAIN FULL Report
43/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure 2(: De1i*es *ontrol swit*'es i*ons
Figure 22: De1i*es *ontrol swit*'es i*ons4Off )tate5
Page 43
8/19/2019 Bluetooth Relay Control MAIN FULL Report
44/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure 2: De1i*es *ontrol swit*'es i*ons 4Off )tate5
Page 44
8/19/2019 Bluetooth Relay Control MAIN FULL Report
45/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure 26: De1i*es )tatus (
Page 45
8/19/2019 Bluetooth Relay Control MAIN FULL Report
46/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Figure 2": De1i*es )tatus 2
Page 46
8/19/2019 Bluetooth Relay Control MAIN FULL Report
47/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te"8Se"i!# -ommuni-!tion in
8/19/2019 Bluetooth Relay Control MAIN FULL Report
48/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Se"i!# -ommuni-!tion in INTRODUCTION1 Seria! i& a
de5ice co##unication +rotoco! t/at i& &tandard on a!#o&t e5er, P. Do
not con7u&e it 4it/ uni5er&a! &eria! 8u& ;USB=. Mo&t co#+uter& inc!ude t4o
EIA2$ 8a&ed &eria! +ort&. Seria! i& a!&o a co##on co##unication
+rotoco! 7or in&tru#entation in #an, de5ice&9 and nu#erou& GPIB2
co#+ati8!e de5ice& co#e 4it/ an EIA2$ +ort. *urt/er#ore9 ,ou can u&e
&eria! co##unication 7or data ac>ui&ition in con%unction 4it/ a re#ote
&a#+!ing de5ice
806 Se#e-tion o$ b!ud "!te1>
*igure !$+ election of baud rate
805 SBU+ "e*i(te"1>
SBU* i& an '28it regi&ter u&ed 7or &eria! co##unication.*or a 8,te data to 8e tran&7erred 5ia t/e T:d !ine9 it #u&t 8e +!aced in t/e
SBU* regi&ter. T/e #o#ent a 8,te i& 4ritten into SBU*9 it i& 7ra#ed 4it/
t/e &tart and &to+ 8it& and tran&7erred &eria!!, 5ia t/e T:d !ine
SBU* /o!d& t/e 8,te o7 data 4/en it i& recei5ed 8, '3)1 R:D !ine ./en
t/e 8it& are recei5ed &eria!!, 5ia R:D9 t/e '3)1 de 7ra#e& it 8, e!i#inating
t/e &to+ and &tart 8it&9 #a"ing a 8,te out o7 t/e data recei5ed9 and t/en
+!acing it in SBU*.
Page 48
8/19/2019 Bluetooth Relay Control MAIN FULL Report
49/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
80506 Con%*u"!tion o$ SCON "e*i(te"1 -SON i& an '28it regi&ter
u&ed to +rogra# t/e &tart 8it9 &to+ 8it9 and data 8it& o7 data 7ra#ing9
a#ong ot/er t/ing&
*ig. !&.C4N register
80505 SM? SM6
T/e, deter#ine t/e 7ra#ing o7 data 8, &+eci7,ing t/e nu#8er o7 8it& +er
c/aracter9 and t/e &tart and &to+ 8it&.
*igure !'+ erial mode selection
Page 49
8/19/2019 Bluetooth Relay Control MAIN FULL Report
50/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
807 REN ="e-ei3e en!b#e@1>
It i& a 8it2addre&&a8!e regi&ter. /en it i& /ig/9 it a!!o4& '3)1 to recei5e
data on R:D +in .I7 !o49 t/e recei5er i& di&a8!e.
808 TI =t"!n(mit inte""ut@ 1>/en '3)1 0ni&/e& t/e tran&7er o7 '2
8it c/aracter .It rai&e& TI ?ag to indicate t/at it i& read, to tran&7er anot/er
8,te .TI 8it i& rai&ed at t/e 8eginning o7 t/e &to+ 8it.
809 RI ="e-ei3e inte""ut@ 1>/en '3)1 recei5e& data &eria!!, 5ia
R:D9 it get& rid o7 t/e &tart and &to+ 8it& and +!ace& t/e 8,te in SBU*
regi&ter .It rai&e& t/e RI ?ag 8it to indicate t/at a 8,te /a& 8een recei5edand &/ou!d 8e +ic"ed u+ 8e7ore it i& !o&t .RI i& rai&ed /a!74a, t/roug/ t/e
&to+ 8it.
80: Ste( $o" t"!n(mittin* !nd "e-ei3in* o$ -&!"!-te"
80:06 T&e (te( t&!t
8/19/2019 Bluetooth Relay Control MAIN FULL Report
51/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
B, c/ec"ing t/e TI ?ag 8it9 4e "no4 4/et/er or not t/e '3)1 i& read, to
tran&7er anot/er 8,te .It #u&t 8e noted t/at TI ?ag 8it i& rai&ed 8, '3)1
it&e!7 4/en it 0ni&/e& data tran&7er It #u&t 8e c!eared 8, t/e
+rogra##er 4it/ in&truction LR TI I7 4e 4rite a 8,te into SBU* 8e7oret/e TI ?ag 8it i& rai&ed9 4e ri&" t/e !o&& o7 a +ortion o7 t/e 8,te 8eing
tran&7erred .T/e TI 8it can 8e c/ec"ed 8, T/e in&truction NB TI9 ::
.U&ing an interru+t.
80:050 P"o*"!mmin* t&e
8/19/2019 Bluetooth Relay Control MAIN FULL Report
52/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
1$. T/e &to+ 8it i& tran&7erred .It i& during t/e tran&7er o7 t/e &to+
8it t/at '3)1 rai&e& t/e TI ?ag9 indicating t/at t/e !a&t c/aracter 4a&
tranitted
1. B, #onitoring t/e TI ?ag9 4e #a"e &ure t/at 4e are noto5er!oading t/e SBU* .I7 4e 4rite anot/er 8,te into t/e SBU* 8e7ore
TI i& rai&ed9 t/e tranitted +ortion o7 t/e +re5iou& 8,te 4i!! 8e !o&t
1). A7ter SBU* i& !oaded 4it/ a ne4 8,te9 t/e TI ?ag 8it #u&t 8e
7orced to 3 8, LR TI in order 7or t/i& ne4 8,te to 8e tran&7erred
80:07 Imo"t!n-e o$ TI +#!*
B, c/ec"ing t/e TI ?ag 8it9 4e "no4 4/et/er or not t/e '3)1 i& read, totran&7er anot/er 8,te It #u&t 8e noted t/at TI ?ag 8it i& rai&ed 8, '3)1
it&e!7 4/en it 0ni&/e& data tran&7er .It #u&t 8e c!eared 8, t/e +rogra##er
4it/ in&truction LR TI I7 4e 4rite a 8,te into SBU* 8e7ore t/e TI ?ag 8it
i& rai&ed9 4e ri&" t/e !o&& o7 a +ortion o7 t/e 8,te 8eing tran&7erred ./e TI
8it can 8e c/ec"ed 8, T/e in&truction NB TI9 :: .U&ing an interru+t
80:08 P"o*"!mmin* t&e
8/19/2019 Bluetooth Relay Control MAIN FULL Report
53/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" 9P"o*"!m
C&!te" 9
P"o*"!m
Page 53
8/19/2019 Bluetooth Relay Control MAIN FULL Report
54/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
906 PROGRAM CODES1
Winc!ude Xreg)./Y
Wde0ne OUTZPORT1 P
Wde0ne HIGH 1
&8it IN P[3
&8it IN P[1
&8it *L1 OUTZPORT1[)
&8it *L OUTZPORT1[
&8it *L$ OUTZPORT1[J
5oid co#$;=
5oid co#;=
5oid co#1;=
5oid de!a,;con&t un&igned int #&=
un&igned c/ar -
un&igned c/ar Me&&1\]^S O**9^
Page 54
8/19/2019 Bluetooth Relay Control MAIN FULL Report
55/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
un&igned c/ar Me&&\]^S ONN9^
un&igned c/ar Me&&$\]^Acce&& Denied9^_
5oid #ain;=
`
un&igned c/ar #,8,te
un&igned c/ar o!d
un&igned c/ar r:
TMOD3:3 CCu&e Ti#er 19 #ode
TH13:*D CC(33 8aud rate
SON3:)3
TR11 CC&tart ti#er
4/i!e ;1= ` CCre+eat 7ore5er
4/i!e ;RI3= CC4ait to recei5e CC&a5e 5a!ue
o!d SBU*
RI3
de!a,;$3=
r: SBU*
RI3
i7 ;o!d r:=
`
#,8,te o!d
Page 55
8/19/2019 Bluetooth Relay Control MAIN FULL Report
56/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
e!&e
`
#,8,te r:
i7;#,8,te3:31=
`
*L1*L1[HIGHCCtogg!e 8it
#,8,te3:
o!d 3:
i7;IN3=
` CCc/ec" &4itc/ on
co#;= CC&end &tatu&
e!&e
`
co#1;=
Page 56
8/19/2019 Bluetooth Relay Control MAIN FULL Report
57/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
e!&e i7;#,8,te3:3=
`
*L*L[HIGH
#,8,te3:
i7;IN3= `
co#;=
e!&e
`
co#1;=
e!&e i7;#,8,te3:3$=
`
*L$*L$[HIGH
#,8,te3:
i7;*L$3= `
co#1;=
Page 57
8/19/2019 Bluetooth Relay Control MAIN FULL Report
58/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
e!&e
`
co#;=
e!&e i7;#,8,te3:3= CC c/ec" +ort 1 5a!ue
`
SBU*P
4/i!e;TI3= CC4ait 7or tranit
TI3
e!&e i7;#,8,te3:3)= CC c/ec" +ort 1
5a!ue
`
i7;IN3=
` CCc/ec" &4itc/ on
co#;= CC&end &tatu&
e!&e
Page 58
8/19/2019 Bluetooth Relay Control MAIN FULL Report
59/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
`
co#1;=
e!&e i7;#,8,te3:3= CC c/ec" +ort
1 5a!ue
`
i7;IN3=
` CCc/ec" &4itc/ on
co#;= CC&end &tatu&
e!&e
`
co#1;=
e!&e
`
co#$;=
Page 59
8/19/2019 Bluetooth Relay Control MAIN FULL Report
60/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
5oid co#$;=
`
7or ;-3-X1)-= `
SBU*Me&&$\-] CC+!ace 5a!ue in 8uer
4/i!e;TI3= CC4ait 7or tranit
TI3
5oid co#;=
`
7or ;-3-X'-= `
SBU*Me&&\-] CC+!ace 5a!ue in 8uer
4/i!e;TI3= CC4ait 7or tranit
TI3
Page 60
8/19/2019 Bluetooth Relay Control MAIN FULL Report
61/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
5oid co#1;=
`
7or ;-3-X'-= `
SBU*Me&&1\-] CC+!ace 5a!ue in 8uer
4/i!e;TI3= CC4ait 7or tranit
TI3
5oid de!a,;con&t un&igned int #&=
`
un&igned int :9 ,
7or;: 3 :X#&:=
`
7or;,3,X1J),=
905 P"o*"!m det!i#
Page 61
8/19/2019 Bluetooth Relay Control MAIN FULL Report
62/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
1. Winc!ude Xreg)./Y2B, u&ing t/i& 4e de0ne t/e /eader 0!e o7 #icro
contro!!er '(&).. Wde0ne OUTZPORT P12t/i& !ine i& u&ed 7or de0ning a +ort 4it/
out+ut +ort.
$. SBU* i& an '28it regi&ter u&ed &o!e!, 7or &eria! co##unication *or
a 8,te data to 8e tran&7erred 5ia t/e T:d !ine9 it #u&t 8e +!aced in
t/e SBU* regi&ter .T/e #o#ent a 8,te i& 4ritten into SBU*9 it i&
7ra#ed 4it/ t/e &tart and &to+ 8it& and tran&7erred &eria!!, 5ia t/e
T:d !ine .SBU* /o!d& t/e 8,te o7 data 4/en it i& recei5ed 8, '3)1
R:D !ine ./en t/e 8it& are recei5ed &eria!!, 5ia R:D9 t/e '3)1
de7ra#e& it 8, e!i#inating t/e &to+ and &tart 8it&9 #a"ing a 8,te out
o7 t/e data recei5ed9 and t/en +!acing it in SBU*.. SON i& an '28it regi&ter u&ed to +rogra# t/e &tart 8it9 &to+ 8it9 and
data 8it& o7 data 7ra#ing9 a#ong ot/er t/ing&.). TI ;tranit interru+t= /en '3)1 0ni&/e& t/e tran&7er o7 '28it
c/aracter .It rai&e& TI ?ag to indicate t/at it i& read, to tran&7er
anot/er 8,te TI 8it i& rai&ed at t/e 8eginning o7 t/e &to+ 8it.. RI ;recei5e interru+t= /en '3)1 recei5e& data &eria!!, 5ia R:D9 it
get& rid o7 t/e &tart and &to+ 8it& and +!ace& t/e 8,te in SBU*
regi&ter It rai&e& t/e RI ?ag 8it to indicate t/at a 8,te /a& 8eenrecei5ed and &/ou!d 8e +ic"ed u+ 8e7ore it i& !o&t .RI i& rai&ed
/a!74a, t/roug/ t/e &to+ 8it.
Page 62
8/19/2019 Bluetooth Relay Control MAIN FULL Report
63/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" :Ci"-uit di!*"!m/
Comonent Li(t
C&!te" :
Page 63
8/19/2019 Bluetooth Relay Control MAIN FULL Report
64/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Ci"-uit di!*"!m / Comonent Li(t
:060 Comonent #i(t1>
)!7o $omponent 7ame 7os! Re8uire
1 HC-05 Bluetooth module 1
AT89S5 micro controller !C 1
$ "#$00% !C $
5& rela'
) Cr'stal ()H* or ((+059)H* 1
(, esistor 1
J .f or (0.f electrol'te capacitor
' %0pf or pf ceramic capacitor
( (0/ resistor netor/ $
13 1805 !C
11 9& batter'
1 02 to 32-0-32 step don transformer 1
1$ ($4001 diode $
:050Ci"-uit Di!*"!m1
Page 64
8/19/2019 Bluetooth Relay Control MAIN FULL Report
65/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
Page 65
8/19/2019 Bluetooth Relay Control MAIN FULL Report
66/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te" ;P"ob#em de(-"ition
C&!te" ;
P"ob#em de(-"ition
Page 66
8/19/2019 Bluetooth Relay Control MAIN FULL Report
67/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
T/e 5ariou& +ro8!e#& *Ab@& a&&ociated 4it/ t/e +ro%ect are
;060 No m!nu!# -ont"o# to ()it-& on !nd o o" in (2(tem
)&en $!i#ed1>In t/at ca&e 4e can u&e a t4o 4a, &4itc/ &o i7 auto#ation &,&te#
7ai!& t/an contro! gi5en to #anua!. A& t/e #anua! contro! +ro5ided
un&"i!!ed u&er can +er7or# /i& routine contro!. A& &/o4n 8e!o4.
In 0g a t4o 4a, connection 4it/ re!a, i& &/o4n. T/e contro! act a& a
OR o+eration #ine& t/at out+ut i& one 4/en 8ot/ in+ut are &a#e.
So out+ut i& a5ai!a8!e 4/en +o&ition& o7 8ot/ &4itc/e& are &a#e.
*ig. !'.7iring connection to switch
;050 No -on%"m!tion o$ -&!n*e o$ outut1> To o5erco#e t/i& +ro8!e# +rogra##ing can 8e do &o t/at
contro!!er can co#+are it& +re5iou& &tate. So i7 &tate o7 &4itc/ not
c/ange& t/an contro!!er &end an error co#e& or no c/ange.
;070 No debu**in* otion1>
T/i& can 8e a 5er, good 7eature o7 +ro%ect i.e. ,ou can c/ec" t/at
4/ere +ro8!e# co#e& at /ard4are or in &o7t4are. So contro!!er
ga5e a!! in7or#ation a8out co##unication.
Page 67
8/19/2019 Bluetooth Relay Control MAIN FULL Report
68/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
;080 Com#e u(e" inte"$!-e1>
U&er inter7ace #u&t 8e &i#+!e &o no need to teac/ t/e ot/er e5er,
ti#e. But in &i#i!ar +ro%ect inter7ace i& co#+!e:.
;090 Die"ent e2 to on !nd o1>
In &ur5e, it i& &een t/at t/ere are t4o dierent "e, to turn n and
o a++!iance&. But i7 in +rogra##ing togg!e o7 8it i& done t/en
#ore auto#ation can 8e done in t/i& +ro%ect.
;0:0 Re(t!"t o)e" !t e3e"2 ne) !i"in* o$ de3i-e1>
In HV23) B!uetoot/ #odu!e i7 a de5ice i& +arried t/en t/i&
con0guration i& &a5e. So at e5er, ne4 de5ice +airing need& re&tart
o7 circuit +o4er. T/i& +ro8!e# can 8e re#o5ed i7 4e u&e a 7eature
o7 H23) B!uetoot/ i.e. "e, t/i& a +in in B!uetoot/ t/at can
re#o5e a!! +aired detai! 4/en t/i& +in /ig/ +u!&e&. So connection
o7 t/i& +in 4it/ #icro contro!!er can re&t t/e +airing.
;0;0 L!"*e -&!n*e in &ou(e )i"in*1>
In &i#i!ar +ro%ect t/e auto#ation done 8, #o8i!e on!, &o a!!
connection need& to c/ange in 4iring and re#o5a! o7 8utton
connection i& needed .So to a5oid t/i& circuit i& &o de&ign a& &o4n
in +ro8!e# 1 &o!ution.
;0
T/e B!uetoot/ connection "e+t o+en &o ot/er con connect and ta"e
contro!. &o t/e #a&ter u&er #u&t connect to B!uetoot/ and re#o5a!
o7 +air in7o #u&t 8, #a&ter contro!!er 8, &o7t4are contro!.
Page 68
8/19/2019 Bluetooth Relay Control MAIN FULL Report
69/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te"
8/19/2019 Bluetooth Relay Control MAIN FULL Report
70/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
B, u&ing t/i& +ro%ect 4ire!e&& contro! can 8e 4it/in t/e /and& o7 u&er.
50 Monito"in*1> T/i& circuit a!!o4 #onitoring o7 a!! a++!iance 4it/in range o7
co##unication 4it/ B!uetoot/.
70 St!tu( -&e-in* 1>/en u&er doe&n@t "no4 a++!iance& i& on o t/en u&er can on!,
c/ec" t/e &tatu& on!,.
80 Con%"m!tion o$ -&!n*in* ()it-& (t!te1>/en &4itc/ i& +re&& ten t4o &tatu& 4i!! 8e &/o4n on #o8i!e +/one
i.e. o!d &tatu& and ne4 &tatu&
90 M!nu!# -ont"o#1>Manua! contro! i& gi5en &o an un&"i!!ed u&er can 8e c/ange t/e
current &tatu&.
60 B#uetoot& "!n*e1>It i& good to u&e B!uetoot/ 7or auto#ation 8ut auto#ation i& "e+t
4it/in a range 37 132$3 #etre&. So contro! can 8e ac/ie5ed 7ro#
out&ide range.
50 Conne-tion1>
Page 70
8/19/2019 Bluetooth Relay Control MAIN FULL Report
71/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
A++!ication #u&t 8e connected a7ter di&connection 7ro# B!uetoot/.
70 -on%*u"!tion o$ !#i-!tion (o$t)!"e1>I7 ne4 u&er 4ant to connect t/en 0r&t do4n!oad a++!ication &o7t4are
and t/en code #u&t 8e enter and #ore con0guration #u&t 8e done.
C&!te" +UTURE SCOPE
Page 71
8/19/2019 Bluetooth Relay Control MAIN FULL Report
72/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
C&!te"
+UTURE SCOPE
T/i& +ro%ect can 8e 7urt/er de5e!o+ed 8, integrating it 4it/ t/e internet to
#onitor ,our /o#e 4/i!e &itting in a re#ote area. B, doing t/i&9 one can
"ee+ an e,e on /i& or /er /o#e t/roug/ an internet connected to t/e
Page 72
8/19/2019 Bluetooth Relay Control MAIN FULL Report
73/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
u&er@& #o8i!e +/one or P or !a+to+. T/i& 4i!! not on!, i#+ro5e t/e &ecurit,
o7 ,our /o#e in t/i& #odern da, 4or!d 8ut 4i!! a!&o a&&i&t in con&er5ation
o7 energ, !i"e i7 ,ou !e7t an, /o#e a++!iance &4itc/ed on 8, #i&ta"e9 t/en
,ou can c/ec" t/e &tatu& o7 t/e a++!iance on t/e gra+/ica! inter7ace #ade
on ,our #o8i!e and can &4itc/ it o u&ing t/e internet connecti5it,.
CONCLUSIONPage 73
8/19/2019 Bluetooth Relay Control MAIN FULL Report
74/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
/RE+ERENCES
CONCLUSION
In conc!u&ion9 t/i& !o4 co&t &,&te# i& de&igned to i#+ro5e t/e &tandard
!i5ing in /o#e. T/e re#ote contro! 7unction 8, art +/one +ro5ide& /e!+
and a&&i&tance e&+ecia!!, to di&a8!ed and e!der!,. In order to +ro5ide &a7et,+rotection to t/e u&er9 a !o4 5o!tage acti5ating &4itc/e& i& re+!aced
Page 74
8/19/2019 Bluetooth Relay Control MAIN FULL Report
75/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
current e!ectrica! &4itc/e&. Moreo5er9 i#+!e#entation o7 4ire!e&&
B!uetoot/ connection in contro! 8oard a!!o4& t/e &,&te# in&ta!! in #ore
&i#+!e 4a,. T/e contro! 8oard i& direct!, in&ta!!ed 8e&ide t/e e!ectrica!
&4itc/e& 4/ere8, t/e &4itc/ing connection i& contro!!ed 8, re!a,.
*urt/er#ore9 ?e:i8!e t,+e& o7 connection& are de&igned a& 8ac"u+
connection& to t/e &,&te#. T/e connected GUI& are &,nc/roni-ed to t/e
contro! 8oard. T/e, indicate t/e rea!2ti#e &4itc/e& &tatu&. T/e &,&te# i&
de&igned in u&er27riend!, inter7ace. T/e ea&, to u&e inter7ace on indo4
and Android GUI +ro5ide& &i#+!e contro! 8, t/e e!der!, and di&a8!ed
+eo+!e.
*or 7uture 4or"9 t/e indo4 GUI 4i!! 8e i#+!e#ented 4it/ &+eec/
recognition 5oice contro!. T/e android GUI 4i!! 8e i#+!e#ented a& a
re#ote B!uetoot/ #icro+/one to t/e indo4 GUI. A!! t/e 5oice &igna!
in+ut& to t/e art +/one 4i!! 8e tranitted to t/e indo4 GUI 7or &igna!
+roce&&ing. A!&o9 t/e +u&/ 8utton& i#+!e#ented in !o4 5o!tage acti5ating
&4itc/e& 4i!! 8e re+!aced 8, ca+aciti5e &en&ing &4itc/e&. A!! t/e 7uture
4or" i& e:+ected 4it/out &+end e:tra co&t9 e5en one cent 7ro# t/e current
&,&te#.
RE+ERENCES
1. E!ectronic& 7or ,ou #agine une 31$
. 6ei! 5i&ion IDE9 /tt+CC444."ei!.co#Cu5i&ion.
Page 75
http://www.keil.com/uvisionhttp://www.keil.com/uvision
8/19/2019 Bluetooth Relay Control MAIN FULL Report
76/76
HOME AUTOMATION USING ANDROID PHONE OVER BLUETOOTH
$. 444.5+'1.co#
. Seria! B!uetoot/ Modu!e9 Tin, OS E!ectronic&9
/tt+CC444.tin,o&&/o+.co#
). AT'(&) ' 8it Microcontro!!er9 ATMEL or+oration&9
/tt+CC444.at#e!.co#$.
. T/e o