Interfacing GPS with 8051 Microcontroller July 14, 2014 By E !o"erator# tea! 1 $o!!ent % GPS !o"ule i# a "e&ice that u#e# Glo'al Po#itioning Sy#te! to "eter!ine the location of a &ehicle or (er#on) GPS recei&er# are u#e" to (ro&i"e relia'le na&igation, (o#itioning an" ti!ing #er&ice# to the u#er# at anyti!e an" anywhere on the earth) *hi# Glo'al (o#itioning #y#te! u#e# 24 to +2 #atellite# to (ro&i"e the "ata to the recei&er#) GPS ha# 'eco!e &ery i!(ortant for worl"wi"e na&igation an" it i# u#eful for lan" #ur&eying, way !aring, !a(-!aing, tracing an" #ur&eillance co!!erce an" #cientific u#e#) But, 'efore going to now a'out thi# circuit, get an i"ea a'out how to interface LCD with 8051 Microcontroller )
Interfacing GPS with 8051 Microcontroller Circuit Principle: GPS !o"ule calculate# the (o#ition 'y rea"ing the #ignal# that are tran#!itte" 'y the #atellite#) Each #atellite tran#!it# the !e##age# continuou#ly which contain# ti!e wa# #ent) GPS recei&er !ea#ure# the "i#tance to each #atellite 'a#e" on the arri&al ti!e of each !e##age) *hi# infor!ation i# u#e" to calculate the (o#ition of the GPS recei&er) *he recei&e" raw "ata i# con&erte" for the u#er a# .%*I*/E, .GI*/E, %.* %.*I*/E, I*/E, SPEE an" *IME)
Interfacing GPS with 8051 Microcontroller Circuit Diagram:
Circuit Diagram of Interfacing GPS to 8051 Microcontroller Circuit Components:
•
at83c51 controller
•
Progra!!ing 'oar"
•
(rogra!!ing ca'le
•
12 $ 'attery or a"a(tor
•
!a2+2 I$
•
1672 .$
•
GPS !o"ule
•
Pot 10
•
12 M cry#tal
•
Electrolytic ca(acitor# 9 1u: ;4<, 10u
•
$era!ic ca(acitor# 9 ++(: ;2<
•
=e#i#tor 9 10
Interfacing GPS with 8051 Circuit Design: In the a'o&e circuit, .$ ;.i>ui" cry#tal "i#(lay< "ata (in# are connecte" to P=*2 of the controller an" control (in# =S, =? an" E are connecte" to the P1)0, P1)1 an" P1)2 re#(ecti&ely) *he latitu"e an" longitu"e &alue# of the location are "i#(laye" on .$) ere (ot =1 i# u#e" to a"@u#t the contra#t of .$) *he recei&er (in of GPS !o"ule i# connecte" to the 1+th (in of !a2+2 I$ an" G (in i# connecte" to groun") $ontroller =A (in i# connecte" to the 12th (in of !a2+2) ere !a2+2 I$ i# u#e" for le&el con&er#ion) *he GPS recei&er continuou#ly tran#!it# the "ata a# (er the ME% #tan"ar"# u#ing =S2+2 (rotocol) In thi# ME% for!at, the .%*I*/E an" .GI*/E &alue# of location are a&aila'le in GP=M$ #entence) In thi# (ro@ect .%*I*/E an" .GI*/E &alue# are etracte" fro! ME% for!at an" "i#(laye" on .$) ?e ha&e to recei&e the "ata to the controller for! GPS !o"ule #erially u#ing /%=* (rotocol an" now etract the latitu"e an" longitu"e &alue# fro! the recei&e" !e##age# an" "i#(lay the! on .$) !traction of Latitu"e an" Longitu"e #alues from $M% &ormat:
*he fir#t recei&e" 6 character# fro! GPS !o"ule are co!(are" with #tring GP=M$, if !atche" then will go for further (roce## otherwi#e re(eat the #a!e (roce## again) If #tring i# !atche" then wait till you will get two 2 commas, net character in"icate# weather the GPS i# acti&ate" or not) If thi# character i# % then GPS i# acti&ate" otherwi#e GPS i# not acti&ate") ow again wait till you get co!!a ;,<) *he net 3 character# in"icate the .%*I*/E) ?ait till you get 2 !ore co!!a# ;,< the net 10 character# in"icate# the .GI*/E) If you want to chec the latitu"e an" longitu"e &alue# of the location without any co"ing, then u#e 'rim(le stu"io #oftware) *hi# #oftware "irectly (ro&i"e# latitu"e, longitu"e, altitu"e, #(ee", ti!e an" "ate when you interface GPS !o"ule) E&en it (ro&i"e# your location in Google !a(#) *he 'elow function i# u#e" to etract the .%*I*/E an" .GI*/E &alue# fro! the ME% for!at) &oi" g(# ;< C un#igne" int .%*D3, .D10F un#igne" char *e!(, iF if ;r"ata;< HH < C if; r"ata;< HH G< C if ;r"ata;< HH P< C
if ;r"ata;< HH =< C if ;r"ata;< HH M< C if ;r"ata;< HH $< C while ;r"ata;< KH ,
for ;iH0F i10F iQQ< C .Di H r"ata;