VEHICLE ACCIDENT ALERT SYSTEM USING GSM AND GPS
A Project Report On “VEHICLE ACCIDENT ALERT SYSTEM USING GSM AND GPS”
Submitte To THE INSTITUTION OF ENGINEERS(INDIA)
FOR PARTIAL FULFILMENT OF THE REQUIREMENT OF THE AWARD OF DEGREE FOR A.M.I.E Done !" ARSHID SHYAMKUMAR Uner t#e $ui%nce o& Mr. B. KOTESWAR RAO FIE. THE INSTITUTION OF ENGINEERS(INDIA) 8, GOKHALE ROAD, KOLKATA- 700 020, INDIA
ESTABLISHED 1920 INCORPORATED !Y ROYAL CHARTER1935
THE INSTITUTUTION OF ENGINEERS(INDIA) 8,GOKHALE ROAD, KOLKATA- 700 020, INDIA. ESTABLISHED 1920 INCORPORATED BY ROYAL CHARTER1935
CERTIFICATE Date : T!" !" t# $ert!%& tat Mr. ARSHID SHYAMKUMAR' (ear!)* +e+(er"!, )-+(er ST - /000012 a" 3#)e te ,r#4e$t t!t5e3 “VEHICLE ACCIDENT ALERT SYSTEM USING GSM AND GPS” -)3er +& *-!3a)$e. T!" ,r#4e$t !" "-(+!tte3 t# Te I)"t!t-t!#) #% E)*!)eer" 6I)3!a7 %#r te a8ar3 #% 3e*ree #% AMIE ECE 3e,art+e)t !) W!)ter 9/:; "e""!#). Te re"-5t" e+(#3!e3 !) t!" te"!" a
Pr#4e$t G-!3e Mr. B.KOTESWAR RAO FIE
DECLARATION
I Ar"!3 S&a+=-+ar 6ST - /0000127 3# ere (& 3e$5are tat' t!" 8#r= !" a) #r!*!)a5 #)e a)3 a" )#t (ee) "-(+!tte3 ear5!er t# a)& #ter !)"t!t-t!#) %#r %-5%!55+e)t #% te re>-!re+e)t #% a $#-r"e #% "t-3&.
P5a$e ? H&3era(a3' Date?
ARSHID SHYAMKUAR
ACKNOWLEDGEMENT
I 8#-53 5!=e t# ta)= t# te (#ar3 #% I)"t!t-te #% E)*!)eer"' K#5=ata' %#r a55#8!)* +e t# 3# t!" ,r#4e$t !) #r3er t# (e$#+e A""#$!ate Me+(er #% te !)"t!t-te (& $#+,5et!)* te $#-r"e. I a+ !*5& !)3e(te3 t# ta=e te #,,#rt-)!t& t# e@,re"" 3ee, *rat!t-3e a)3 #(5!*at!#) t# Mr. B.KOTESWAR RAO.'FIE' Pr#4e$t *-!3e %#r !" $#)"ta)t "-,,#rt'
"-,er
ARSHID SHYAMKUMAR ST-607777-9
TABLE OF CONTENTS
SYNOPSIS …………………………………………………………………………………………………………… …………………….1-3 ACTIVITY REPORT …………………………………………………………………………………………………………… …………4-5 LIST OF FIGURES …………………………………………………………………………………………………………… ……………6
1.INTRODUCTION …………………………………………………………………………………………………………… …………7 2.BLOCK DIAGRAM …………………………………………………………………………………………………………… ………. 2.1 CONCEPT AND OVER!IE! …………………………………………………………………………………………………" 2.2 INTERNAL CIRCUIT DIAGRAM …………………………………………………………………………………………....1# 3.$ARD!ARE …………………………………………………………………………………………………………… ……………….11 3.1 MICROCONTROLLER …………………………………………………………………………………………………………… 12-1" 3.2 GPS …………………………………………………………………………………………………………… …………………………2# 3.3 GSM …………………………………………………………………………………………………………… …………………………21-26 3.4 MEMS ACCELEROMETER ………………………………………………………………………………………………………… 27 3.5 LI%UID CRYSTAL DISPLAY ……………………………………………………………………………………………………… 22" 4. S$ORT CIRCUIT ALERT SYSTEM !ORKING……………………………………………………………………………… 3# 4.1 VE$ICLE ACCIDENT ALERT SYSTEM !ORKING …………………………………………………………………………3# 4.2 FLO! C$ART OF T$E SYSTEM …………………………………………………………………………………………………31 5.CODE !RITTEN TO T$E PROCESSOR …………………………………………………………………………………………32-41 6. RESULTS ………………………………….. ………………………………………………………………………………………………..42 7.LIMITATIONS OF T$E PRO&ECT ……………………………………………………………………………………………………43
.SCOPE OF FUTURE STUDY ………………………………………………………………………………………………………… 44 ". BIBILOGRAP$Y …………………………………………………………………………………………………………… ………………45
SYNOPSIS Title of the Project: “VEHICLE ACCIDENT ALERT SYSTEM USING GSM AND GPS”
Objective of the study: The project titled as VEHICLE CCI!ENT LE"T SYSTE# $SIN% %S# N! %PS
is a& e'be dded based sy ste'( )y this adv a&ced tech&olo*y +e ca& *e t accurate
i&for'atio& about the collisio& a&d short circuit ta,e& place i& the vehicle( This
syste'
co'bi&es adva&ced hard+are desi*& a&d sophisticated electro&ic co&trol tech&olo*y i&to a co'pact- reliable pac,a*e( I& this project a vibratio& se&sor is used as a& accide&t detector( .he& the vehicle 'eets +ith a& accide&t- the vibrati&* se&sors *e&erate the si*&al- this si*&al is bei&* co'pared +ith the thresh old value s( If the value *e&erated e/ceeds the thresh old it is reco*&i0ed as accide&t a&d this i&for'atio& is i''ediately i&for'ed to their relative perso&s throu*h %S# as a 'essa*e to 'obile( I& this syste' vibratio& se&sors are used for detecti&* ra&*e of collisio&- Si'ilarly the short circuit se&sors +ill detect the short circuited co&ditio& a&d i&ti'ated throu*h the s's i& +hich disaster ca& be 'i&i'i0ed( Vibratio& Se&sors data +ill be i& a&alo* for' so it &eeds to be co&verted to di*ital- +hich is fulfilled throu*h 1! Co&verter- a&d this di*ital data is bei&* se&t to 'icroco&troller there it is co'pared +ith the threshold values- if it e/ceeds the threshold values the& o&ly data +ill be se&t to %S# 2*lobal syste' for 'obile co''u&icatio&3 4 locatio& data is captured +ith the help of %PS 2%lobal Positio&i&* Syste'3( Here +e are 'a,i&* use of the %PS +hich *ives e/act locatio& of the collide vehicle(
1
Importance of the study:
I& prese&t days as populatio& i&creases the &u'ber of vehicles also i&creases( This results i& 'ore accide&ts a&d deaths a&d also theft( The result of this syste' saves death or reduces the death rates- by providi&* i&for'atio& about the accide&t to the #o&itori&* syste' i''ediately( It i'proves the level of 'a&a*e'e&t i& buses of travel a*e&cies a&d car*o tra&sportatio& vehicles- such as truc,s(It also provides security to perso&al vehicles li,e car by loc,i&* the vehicle e&*i&e fro' re'ote locatio& usi&* %S# i& case of theft ( #o&itori&* syste' co&ti&uously +aits for i&for'atio& se&t fro' vehicle syste'( The i&for'atio& se&t by the vehicle syste' i&cludes positio& of a vehicle 2Lo&*itude a&d Latitude3- speed a&d te'perature( The i&for'atio& provided to the #o&itori&* syste' +he& accide&t happe&s or +he& user accesses the syste' to *et the i&for'atio& about the vehicle
Methodology to be used for carrying out the study: ◆ $&dersta&d the architecture of T 567S8 #icro co&troller a&d operatio&s of %S# a&d %PS #odules(
◆ $sa*e of co'piler for du'pi&* code i& co&troller( ◆ !esi*& the circuit for i&terfaci&* the #E#S-%S#-%PS-LC! a&d co&troller( ◆ $si&* #E#S- *e&erate differe&t values to test the behavior of the syste'( ◆ Observe the lert i&fo i& LC! #odules for differe&t values a&d fi&ali0e the correct #E#S values for +hich lert i&fo is re9uired(
◆ %et the lert i&for'atio& o& S#S o& Vehicle collisio& a&d Short circuit(
E9uip'e&t/Tools re9uired: ◆ T 567S8 #icro Co&troller ◆ %PS "eceiver ◆ Vibratio& Se&sor1#E#S ◆ LC! #odule ◆ %S# #ode' ◆ %PS #odule ◆ Serial Co''u&icatio& ' :eil Co'piler
S.
A$t!
Da&"
N#.
Date" Fr#+ T#
:
I)tera$t!#) 8!t te ,r#4e$t *-!3e %#r te %!r"t t!+e
9
Se5e$t!#) #% ,r#4e$t a)3 a,,r#
:
::09/:; //:9/: t#
9
;:9/:;
U)3er"ta)3!)* te M!$r# $#)tr#55er ar$!te$t-re a)3 3e"!*)
:
:9/:
Lear)!)* (a"!$" #% MEMS'GSM a)3 GPS
a)3 !t" a,,5!$at!#)"
:
0:9/:
;
U)3er"ta)3!)* te #,erat!#) #% $#+,!5er a)3 #8 t# 3-+, $#3e !) $#)tr#55er
/:9/: t# :/:9/:
0
2
U)3er"ta)3!)* te ,r#*ra++!)* re>-!re+e)t" t# !)ter%a$e MCU a)3 GSM'GPS a)3 LCD +#3-5e"
De(-**!)* a)3 te"t!)* #% te ,r#4e$t 8!t 3!%%ere)t te"t $a"e". Pre,arat!#) #% Ve!$5e A$$!3e)t a5ert "&"te+ ,r#4e$t re,#rt
De+#)"trat!#) #% ,r#4e$t
;
::/:9/: t# :;/:9/:
:/:9/: t# :2/:9/:
9
9//:9/: t# 9:/:9/:
9
99/:9/: t# 9/:9/:
:/
S-(+!""!#) #% ,r#4e$t re,#rt.
:
Activity Report
9;/:9/:
A,,r#
List of gures Figure 1 block diagram(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( Figure 2 overview of the system((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( " Figure 3 internal circuit diagram ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 1# Figure 4 pin diagram of microcontroller AT!"#2 ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 12
Figure # $%" modem ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 2#
Figure & $"' modem ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 21 F()*+, 7 MEMS A,,+/0,,+ ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 27
Figure ()* interfacing with AT!"#2((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 2
Figure ! ()* display((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 2!
Figure 1+ output displayed on lcd((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( 2!
1. INTRODUCTION There are 'ore a&d 'ore traffic ja's as vehicle;s de'a&ds are *etti&* hi*h day by day( Sotra&sportatio& &eeds 'ore i'prove'e&t as de'a&ds are i&creasi&* there +ill be 'ore possibility of vehicle accide&ts ( Vehicle accide&ts are o&e of the leadi&* causes of the fatalities( It +ill be a serious co&se9ue&ce if people ca&;t *et help o& ri*ht ti'e( Poor e'er*e&cy i&cide&t is a 'ajor cause of death rate i& our cou&try ( Eve& +ith a+are&ess ca'pai*&- this proble' is still risi&* due to riders dru&, drivi&* a&d speed drivi&*( #ajor auto'obile 'a&ufacturers have developed safety devices such as seat belt to protect riders fro' accide&tal i&juries ( Life savi&* 'easure electro&ic stability co&trol also reduces i&juries( Crash a&alysis studies have sho+&- traffic accide&ts could have bee& preve&ted +ith the use of this adva&ced life savi&* 'easure ( This desi*& focuses o& providi&* basic i&for'atio& o& the accide&t site to the hospital or police statio&( s s result of this sudde& help- public life 'ay *et save I& this +or,- !
s soo& as the accide&t occurs- a& alert 'essa*e i&cludi&* latitude- lo&*itude positio&- date a&d ti'e of accide&t occurre&ce a&d fi&ally li&,- i&dicati&* %oo*le 'ap is se&t auto'atically to the rescue tea' or to the police statio&( This 'essa*e is se&t +ith the help of the %S# 'odule a&d accide&t locatio& is detected throu*h %PS 'odule( The accide&t ca& be reco*&i0ed precisely +ith the help of !
2. BLOCK DIAGRAM This is the bloc, dia*ra' of vehicle accide&t alert syste'( This sho+s the overall vie+ of the vehicle accide&t alert syste' circuit( The bloc,s co&&ected here are LC! display- %PS- %S##E#S- Po+er supply - short circuit detector(
P/,+ *
Figure 1 ,lock *iagram
2.1 Concept n! O"er"ie# This vehicle accide&t alert syste' ta,es i&put fro' %PS a&d se&d it throu*h the %S# 'odule to desired 'obile usi&* 'obile co''u&icatio& +he& accide&t or short circuit occurs( s soo& as accide&t occurs- Co&troller ta,es the Lat a&d Lo&* values a&d se&ds the alert to the 'obile usi&* S#S( This alert +ill help others to trac, the vehicle a&d rescue people i& it(
Figure 2 overview of the system
2.2 Intern$ Circuit Digr%
Figure 3 -nternal circuit diagram
&. 'ARD(AR)
>or desi*&i&* this hard+are 'a&y types of devices are used to 'a,e it perfectly +or,i&*( ll the devices are purchased fro' differe&t 'a&ufacturers( These co'po&e&ts are soldered o& a solderi&* board( The follo+i&* list of hard+are are re9uired for this syste'( •
$"' '.*/(0
•
A* ).0T0
•
ΜΕΜ
•
$%" '.*/(0
•
A "5-T)6 F. "6.T )-)/-T "7"T0'
•
'-). ).T.((0 AT!"#2
•
'A8232
•
"232
•
()* *-"%(A7
•
%.50 "/%%(7
•
)7"TA( .")-((AT.
•
('9+#
•
,-*$0 0)T-F-0
•
(0*
•
0"0T ,/TT.
" A))0(0.'0T0
&.1 Microcontro$$er Here i& this syste' 'icro co&troller used is T56S78( #ai&ly 'icro co&troller co&sists of cpu'e'ory a&d various I1O pi&s- a&d the speed of this 'icro co&troller is e&ou*h to e/ecute the pro*ra' i& real ti'e( This particular 'icro co&troller is chose& because the e/peri'e&t re9uires 'i&i'u' of 5=bit 'icro co&troller( This 'icroco&troller co&tai&s ?:b flash 'e'ory i&built i& it- this 'e'ory is e&ou*h to du'p our code i& to the 'icroco&troller( This 'icro co&troller co&tai&s ?@ pi&s a&d circuit is desi*&ed accordi&* to fi* 8(A( The ?@ pi&s of 'icroco&troller has differe&t properties a&d usa*e they are sho+& i& the follo+i&* i'a*e(
Figure 4 pin diagram of microcontroller AT!"#2
AT89S52: Features: Co'patible +ith #CS=7B Products 5: )ytes of I&=Syste' Pro*ra''able 2ISP3 >lash #e'ory D E&dura&ce B@@@ .rite1Erase Cycles ?(@V to 7(7V Operati&* "a&*e >ully Static Operatio& @ H0 to AA #H0 Three=level Pro*ra' #e'ory Loc, 87F: I&ter&al "# A8 Pro*ra''able I1O Li&es A BF=bit Ti'er1Cou&ters Ei*ht I&terrupt Sources >ull !uple/ $"T Serial Cha&&el Lo+=po+er Idle a&d Po+er=do+& #odes
I&terrupt "ecovery fro' Po+er=do+& #ode .atchdo* Ti'er !ual !ata Poi&ter Po+er=off >la*
DESCRI!I"# "$ MICR"C"#!R"%%ER &'S():
T, AT"S52 ( 8 /-/,+9 ()-,+:/+08;, CMOS -<( 0(+/ /;+/,+ ( K<, /: (;-,0 +/)+8008<, F8 0,0/+. T, =,>(, ( 08;*:8*+,= U(;) A0,? ()-=,;( ;/;>/8(, 0,0/+ ,;//) 8;= ( /08(<, ( , (;=*+-8;=8+= #C51 0(+/ /;+/,+. T, /;( F8 8/ , +/)+80 0,0/+ / <, +,+/)+800,= (;-,0 /+ < 8 /;>,;(/;8 ;/;>/8(, 0,0/+ +/)+800,+. B /0<(;(;) 8 >,+8(, -<( CPU ( (;-,0 +/)+8008<, @8 /;, 0/;/(( ( , A0, AT"S52 ( 8 /,+:* 0(+/ /;+/,+9 ( +/>(=, 8 () @,(<, 8;= /-,,(>, /*(/; / 08; ,0<,==,= /;+/ 8(8(/;.
PIN DESCRIPTION OF MICROCONTROLLER 89S52 VCC S* >/8),.
GND G+/*;=.
Port 0 P/+ # ( 8; -<( /,; =+8(; <(-=(+,(/;8 IO /+. A 8; /** /+9 ,8 (; 8; (; ,() TTL (;*. !,; 18+, +(,; / /+ # (;9 , (; 8; <, *,= 8 () (0,=8;, (;*. P/+ # 8; 8/ <, /;)*+,= / <, , 0*(,,= / /+=,+ 8==+,=88 <* =*+(;) 8,, / ,,+;8 +/)+80 8;= =88 0,0/+. I; ( 0/=,9 P# 8 (;,+;8 *-*. P/+ # 8/ +,,(>, , /=, <, =*+(;) F8
+/)+800(;) 8;= /** , /=, <, =*+(;) +/)+80 >,+(8(/;. E,+;8 *-* 8+, +,*(+,= =*+(;) +/)+80 >,+(8(/;
Port 1 P/+ 1 ( 8; -<( <(-=(+,(/;8 IO /+ ( (;,+;8 *-*. T, P/+ 1 O** <*,+ 8; (;/*+, :/*+ TTL (;*. !,; 1 8+, +(,; / P/+ 1 (;9 , 8+, *,= () < , (;,+;8 *-* 8;= 8; <, *,= 8 (;*. I; 8==((/;9 P1.# 8;= P1.1 8; <, /;)*+,= / <, , (0,+/*;,+ 2 ,,+;8 /*; (;*
HP1.#T2 8;= , (0,+/*;,+ 2 +()),+ (;* P1.1T2EJ9 +,,(>,9 8 /; (; , ://(;) 8<,. P/+ 1 8/ +,,(>, , /-/+=,+ 8==+, <, =*+(;) F8 +/)+800(;) 8;= >,+(8(/;.
Port 2 P/+ 2 ( 8; -<( <(-=(+,(/;8 IO /+ ( (;,+;8 *-*. T, P/+ 2 /** <*,+ 8; (; /*+, :/*+ TTL (;*. !,; 1 8+, +(,; / P/+ 2 (;9 , 8+, *,= () < , (;,+;8 *-* 8;= 8; <, *,= 8 (;*. P/+ 2 ,0( , ()-/+=,+ 8==+, <, =*+(;) :,, :+/0 ,,+;8 +/)+80 0,0/+ 8;= =*+(;) 8,, / ,,+;8 =88 0,0/+ 8 *, 16-<( 8==+,, HMOVJ DPTR. I; (
8(8(/;9 P/+ 2 *, +/;) (;,+;8 *-* ,; ,0((;) 1. D*+(;) 8,, / ,,+;8 =88 0,0/+ 8 *, -<( 8==+,, HMOVJ RI9 P/+ 2,0( , /;,; /: , P2 S,(8 F*;(/; R,)(,+. P/+ 2 8/ +,,(>, , ()-/+=,+ 8==+, <( 8;= /0, /;+/ ();8 =*+(;) F8 +/)+800(;) 8;= >,+(8(/;.
Port P/+ 3 ( 8; -<( <(-=(+,(/;8 IO /+ ( (;,+;8 *-*. T, P/+ 3 /** <*,+ 8; (;/*+, :/*+ TTL(;*. !,; 1 8+, +(,; / P/+ 3 (;9 , 8+, *,= () < , (;,+;8 *-* 8;= 8; <, *,= 8 (;*. A (;*9 P/+ 3 (; 8 8+, ,,+;8 <,(;) *,= / ( /*+, *++,; HIIL <,8*, /: , *-*. P/+ 3 8/ ,+>, , :*;(/; /: >8+(/* ,(8 :,8*+, /: , AT"S529 8 /; (; , ://(;) 8<,. P/+ 3 8/ +,,(>, /0, /;+/ ();8 :/+ F8 +/)+800(;) A;= >,+(8(/;.
RST R,, (;*. A () /; ( (; :/+ / 08(;, , (, , /(8/+ ( +*;;(;) +,, , =,>(,.
ALE!PROG A==+, L8 E;8<, HALE ( 8; /** *, :/+ 8(;) , / <, /: , 8==+, =*+(;) 8,, / ,,+;8 0,0/+. T( (; ( 8/ , +/)+80 *, (;* HPROG =*+(;) F8 +/)+800(;). I; ;/+08 /,+8(/;9 ALE ( ,0(,= 8 8 /;8; +8, /:16 , /(8/+ :+,*,; 8;= 08 <, *,= :/+ ,,+;8 (0(;) /+ /(;) *+/,. N/,9 /,>,+9 8 /;, ALE *, ( (,= =*+(;) ,8 8, / ,,+;8 =88 M,0/+. I: =,(+,=9 ALE /,+8(/; 8; <, =(8<,= < ,(;) <( # /: SFR /8(/; E$. !( , <( ,9 ALE ( 8(>, /; =*+(;) 8 MOVJ /+ MOVC (;+*(/;. O,+(,9 , (; ( ,8 *,= (). S,(;) , ALE=(8<, <( 8 ;/ ,, (: , 0(+/ /;+/,+ ( (; ,,+;8 ,,*(/; 0/=,.
PSEN P+/)+80 S/+, E;8<, HPSEN ( , +,8= +/<, / ,,+;8 +/)+80 0,0/+. !,; , AT"S52 ( ,,*(;) /=, :+/0 ,,+;8 +/)+80 0,0/+9 PSEN ( 8(>8,= (, ,8 08(;, ,9 ,, 8 / PSEN 8(>8(/; 8+, (,= =*+(;) ,8 8, / ,,+;8 =88 0,0/+.
EA!VPP E,+;8 A, E;8<,. EA 0* <, +8,= / GND (; /+=,+ / ,;8<, , =,>(, / :, /=, :+/0 ,,+;8 +/)+80 0,0/+ /8(/; 8+(;) 8 ####$ * / FFFF$.N/,9 /,>,+9 8 (: / <( 1 ( +/)+800,=9 EA ( <, (;,+;8 8,= /; +,,. A /*= <, +8,= / VCC :/+ (;,+;8 +/)+80 ,,*(/;. T( (; 8/ +,,(>, ,
12->/P+/)+800(;)
+/)+800(;).
,;8<,
>/8),
HVPP
=*+(;)
F8
"TAL1 I;* / , (;>,+(;) /(8/+ 80(,+ 8;= (;* / , (;,+;8 / /,+8(;) (+*(.
"TAL2 O** :+/0 , (;>,+(;) /(8/+ 80(,+.
Os#$%%ator C&ara#ter$st$#s JTAL1 8;= JTAL2 8+, , (;* 8;= /**9 +,,(>,9 /: 8; (;>,+(;) 80(,+ 8 8; <, /;)*+,= :/+ *, 8 8; /;-( /(8/+9 8 /; (; F()*+, 1. E(,+ 8 *8+ +8 /+ ,+80( +,/;8/+ 08 <, *,=. T/ =+(>, , =,>(, :+/0 8; E,+;8 / /*+,9 JTAL2 /*= <, ,: *;/;;,,= (, JTAL1 ( =+(>,;9 8 /; (; F()*+, 2.
S'e#$a% Fu(#t$o( Re)$ster *SFR+ Me,or-: . S,(8 F*;(/; R,)(,+ HSFR 8+, 8+,8 /: 0,0/+ 8 /;+/ ,( :*;(/;8( /: , #51 +/,/+. F/+ ,80,9 :/*+ SFR ,+0( 8, / , #51? 32 (;*/** (;,. A;/,+ SFR 8/ , *,+ / , , ,+(8 <8*= +8,9 /;+/ 8;= 8, (0,+9 8;= /;)*+, , #51? (;,++* ,0.
T&e A##u,u%ator:
T, A*0*8/+9 8 ( ;80, *)), (
*,= 8 8 ),;,+8 +,)(,+ / 8*0*8, , +,* /: 8 8+), ;*0<,+ /: (;+*(/;. I 8; /= -<( H1-<, >8*, 8;= ( , 0/ >,+8(, +,)(,+.
T&e /R re)$sters: T, R +,)(,+ 8+, 8 , /: ,() +,)(,+ 8 8+, ;80,= R#9 R1. E * / R7. T,, +,)(,+ 8+, *,= 8 8*((8+ +,)(,+ (; 08; /,+8(/;.
T&e / re)$sters: T, B +,)(,+ ( >,+ (0(8+ / , 8*0*8/+ (; , ,;, 8 ( 08 /= 8; -<( H1-<, >8*,. T/ /; *, , B +,)(,+ #51 (;+*(/; MUL AB 8;= DIV AB.
T&e Data Po$(ter: T, D88 /(;,+ HDPTR ( , #51? /; *,+ 8,(<, 16-<( H2B, +,)(,+. T, 8*0*8/+9 R +,)(,+ 8+, 8 1-B, >8*,. DPTR9 8 , ;80, *)),9 ( *,= / /(; / =88. I ( *,= < 8 ;*0<,+ /: /008;=9 ( 8/ , #51 / 8, ,,+;8 0,0/+.
TE PROGRAM CO3NTER AND STAC4 POINTER: T, +/)+80 /*;,+ HPC ( 8 2-<, 8==+,9 ( , , #51 ,+, , ;, (;+*(/; / ,,*, ( :/*;= (; 0,0/+. T, 8 /(;,+ (, 8 +,)(,+ ,, DPTR 8;= PC 08 /= 8; -<( H1-B, >8*,
ADDRESSING MODES:
A; 8==+,(;) 0/=, +,:,+ 8 /* 8+, 8==+,(;) 8 )(>,; 0,0/+ /8(/;. I; *008+9 , 8==+,(;) 0/=, 8+, 8 ://9 ( 8; ,80, /: ,8 E8 /: ,, 8==+,(;) 0/=, +/>(=, (0/+8; @,(<((. I00,=(8, A==+,(;)
MOV A9 2# $
D(+,
A==+,(;)
MOV A9 3# $
I;=(+,
A==+,(;)
MOV A9 R#
I;=,,=
A==+,(;) 8. E,+;8 D(+,
<. C/=, I;=(+,
MOVJ A9 DPTR MOVC A9 AQDPTR
&.2 G*+ %PS abbreviates *lobal positio&i&* syste' a&d this is used to detect the latitude a&d lo&*itude of the particular positio& a&d it also sho+s the e/act ti'e( It detects these values a&y+here o& the earth( I& our project it plays 'ai& role a&d it is the 'ai& source of the latitude a&d lo&*itude of the vehicle to ,&o+ the accide&t occurred locatio&(This *ad*et *ets the coordi&ates fro' the satellite for each a&d every seco&d( This device is the 'ai& co'po&e&t of vehicle project(
Figure # $%" modem
&.& G+M %S# abbreviates *lobal syste' for 'obile co''u&icatio&- this is a seco&d *e&eratio& 28%3 'obile &et+or,( This is +idely used i& all over the +orld for 'obile co''u&icatio&( This %S# device co&sists of si' slot i& +hich a si' ca& be i&serted +hich has a u&i9ue &u'ber- this u&i9ue &u'ber is used for co&tact( This %S# device co&sists a u&i9ue &u'ber called i'ei &u'ber a&d this is differe&t for each a&d every hard+are ,it( I& our project the device is used for tra&s'itti&* data( The data fro' %PS is tra&s'itted to *ive& 'obile throu*h this %S# itself(
Figure & $"' modem
%S# 2%lobal Syste' for #obile co''u&icatio&s3 is a cellular &et+or,- +hich 'ea&s that 'obile pho&es co&&ect to it by searchi&* for cells i& the i''ediate vici&ity( %S# &et+or,s operate i& four differe&t fre9ue&cy ra&*es( #ost %S# &et+or,s operate i& the 6@@ #H0 or B5@@ #H0 ba&ds( So'e cou&tries i& the 'ericas use the 57@ #H0 a&d B6@@ #H0 ba&ds because the 6@@ a&d B5@@ #H0 fre9ue&cy ba&ds +ere already allocated( The rarer ?@@ a&d ?7@ #H0 fre9ue&cy ba&ds are assi*&ed i& so'e cou&tries- +here these fre9ue&cies +ere previously used for first=*e&eratio& syste's( %S#=6@@ uses 56@D6B7 #H0 to se&d i&for'atio& fro' the 'obile statio& to the base statio& 2upli&,3 a&d 6A7D6F@ #H0 for the other directio& 2do+&li&,3- providi&* B8? "> cha&&els 2cha&&el &u'bers B to B8?3 spaced at 8@@ ,H0( !uple/ spaci&* of ?7 #H0 is used( I& so'e cou&tries the %S#=6@@ ba&d has bee& e/te&ded to cover a lar*er fre9ue&cy ra&*e( This Ge/te&ded %S#G- E=%S#- uses 55@D6B7 #H0 2upli&,3 a&d 687D6F@ #H0 2do+&li&,3- addi&* 7@ cha&&els 2cha&&el &u'bers 67 to B@8A a&d @3 to the ori*i&al %S#=6@@ ba&d( Ti'e divisio& 'ultiple/i&* is used to allo+ ei*ht full=rate or si/tee& half=rate speech cha&&els per radio fre9ue&cy cha&&el( There are ei*ht radio ti'eslots 2*ivi&* ei*ht burst periods3 *rouped i&to +hat is called a T!# fra'e( Half rate cha&&els use alter&ate fra'es i& the sa'e ti'eslot( The cha&&el data rate is 8@(5AA ,bit1s- a&d the fra'e duratio& is ?(FB7 's(
*SM Advantages:
%S# also pio&eered a lo+=cost- to the &et+or, carrier- alter&ative to voice calls- the Short t 'essa*e service 2S#S- also called te/t 'essa*i&*3- +hich is &o+ supported o& other 'obile sta&dards as +ell( &other adva&ta*e is that the sta&dard i&cludes o&e +orld+ide E'er*e&cy telepho&e &u'ber- BB8( This 'a,es it easier for i&ter&atio&al travelers to co&&ect to e'er*e&cy services +ithout ,&o+i&* the local e'er*e&cy &u'ber( !he *SM #et+or,:
%S# provides reco''e&datio&s- &ot re9uire'e&ts( The %S# specificatio&s defi&e the fu&ctio&s a&d i&terface re9uire'e&ts i& detail but do &ot address the hard+are( The %S# &et+or, is divided i&to three 'ajor syste's the s+itchi&* syste' 2SS3- the base statio& syste' 2)SS3- a&d the operatio& a&d support syste' 2OSS3(
T, S((;) S,0 The s+itchi&* syste' 2SS3 is respo&sible for perfor'i&* call processi&* a&d subscriber=related fu&ctio&s( The s+itchi&* syste' i&cludes the follo+i&* fu&ctio&al u&its( •
-ome location register .-%R The HL" is a database used for stora*e a&d 'a&a*e'e&t of
subscriptio&s( The HL" is co&sidered the 'ost i'porta&t database- as it stores per'a&e&t data about subscrib ers- i&cludi&* a subscriberGs service profile- locatio& i&for'atio&- a&d activity status( .he& a& i&dividual buys a subscriptio& fro' o&e of the PCS operators- he or she is re*istered i& the HL" of that operator(
•
Mobile services s+itching center .MSC: The #SC perfor's the telepho&y s+itchi&* fu&ctio&s
of the syste'( It co&trols calls to a&d fro' other telepho&e a&d data syste's( It also perfor's such fu&ctio&s as toll tic,eti&*- &et+or, i&terfaci&*- co''o& cha&&el si*&ali&*- a&d others( •
0isitor location register .0%R The VL" is a database that co&tai&s te'porary i&for'atio&
about subscribers that is &eeded by the #SC i& order to service visiti&* subscribers( The VL" is al+ays i&te*rated +ith the #SC( .he& a 'obile statio& roa's i&to a &e+ #SC area- the VL" co&&ected to that #SC +ill re9uest data about the 'obile statio& fro' the HL"( Later- if the 'obile statio& 'a,es a call- the VL" +ill have the i&for'atio& &eeded for call setup +ithout havi&* to i&terro*ate the HL" each ti'e( •
Authentication center .A1C u&it called the $C provides authe&ticatio& a&d e&cryptio&
para'eters that verify the userGs ide&tity a&d e&sure the co&fide&tiality of each call( The $C protects &et+or, operators fro' differe&t types of fraud fou&d i& todayGs cellular +orld( •
E2uipment identity register .EIR The EI" is a database that co&tai&s i&for'atio& about the
ide&tity of 'obile e9uip'e&t that preve&ts calls fro' stole&- u&authori0ed- or defective 'obile statio&s( The $C a&d EI" are i'ple'e&ted as sta&d=alo&e &odes or as a co'bi&ed $C1EI" &ode(
T, B8, S8(/; S,0 HBSS ll radio=related fu&ctio&s are perfor'ed i& the )SS- +hich co&sists of base statio& co&trollers 2)SCs3 a&d the base tra&sceiver statio&s 2)TSs3( •
3SC The )SC provides all the co&trol fu&ctio&s a&d physical li&,s bet+ee& the #SC a&d )TS(
It is a hi*h=capacity s+itch that provides fu&ctio&s such as ha&dover- cell co&fi*uratio& data- a&d co&trol of radio fre9ue&cy 2">3 po+er levels i& base tra&sceiver statio&s( &u'ber of )SCs are served by a& #SC( •
3!S The )TS ha&dles the radio i&terface to the 'obile statio&( The )TS is the radio e9uip'e&t
2tra&sceivers a&d a&te&&as3 &eeded to service each cell i& the &et+or,( *roup of )TSs are co&trolled by a )SC(
GSM S'e#$#at$o(s: Specificatio&s for differe&t perso&al co''u&icatio& services 2PCS3 syste's vary a'o&* the differe&t PCS &et+or,s( Listed belo+ is a descriptio& of the specificatio&s a&d characteristics for %S#(
•
$re2uency band The fre9ue&cy ra&*e specified for %S# is B-57@ to B-66 @ #H0 2'obile
statio& to base statio&3( •
Duple4 distance The duple/ dista&ce is 5@ #H0( !uple/ dista&ce is the dista&ce bet+ee& the
upli&, a&d do+&li&, fre9ue&cies( cha&&el has t+o fre9ue&cies- 5@ #H0 apart( •
Channel separation The separatio& bet+ee& adjace&t carrier fre9ue&cies( I& %S#- this is 8@@
,H0( •
Modulation #odulatio& is the process of se&di&* a si*&al by cha&*i&* the characteristics of a
carrier fre9ue&cy( This is do&e i& %S# via %aussia& 'i&i'u' shift ,eyi&* 2%#S:3( •
!ransmission rate %S# is a di*ital syste' +ith a& over=the=air bit rate of 8@ ,bps(
•
Access method %S# utili0es the ti'e divisio& 'ultiple access 2T!#3 co&cept( T!# is a
tech&i9ue i& +hich several differe&t calls 'ay share the sa'e carrier( Each call is assi*&ed a particular ti'e slot( •
Speech coder %S# uses li&ear predictive codi&* 2LPC3( The purpose of LPC is to reduce the
bit rate( The LPC provides para'eters for a filter that 'i'ics the vocal tract( The si*&al passes throu*h this filter- leavi&* behi&d a residual si*&al( Speech is e&coded at BA ,bps(
Main AT commands: T co''a&d set for %S# #obile E9uip'e&tJ describes the #ai& T co''a&ds to co''u&icate via a serial i&terface +ith the %S# subsyste' of the pho&e( T co''a&ds are i&structio&s used to co&trol a 'ode'( T is the abbreviatio& of tte&tio&( Every co''a&d li&e starts +ith T or at( ThatGs +hy 'ode' co''a&ds are called T co''a&ds( #a&y of the co''a&ds that are used to co&trol +ired dial=up 'ode's- such as T! 2!ial3- T 2&s+er3- TH 2Hoo, co&trol3 a&d TO 2"etur& to o&li&e data state3- are also supported by %S#1%P"S 'ode's a&d 'obile pho&es( )esides this co''o& T co''a&d set- %S#1%P"S 'ode's a&d 'obile pho&es support a& T co''a&d set that is specific to the %S# tech&olo*y- +hich i&cludes S#S=related co''a&ds li,e TKC#%S 2Se&d S#S 'essa*e3- TKC#SS 2Se&d S#S 'essa*e fro' stora*e3- TKC#%L 2List S#S 'essa*es3 a&d TKC#%" 2"ead S#S 'essa*es3( Note that the starti&* T is the prefi/ that i&for's the 'ode' about the start of a co''a&d li&e( It is &ot part of the T co''a&d &a'e( >or e/a'ple- ! is the actual T co''a&d &a'e i& T! a&d KC#%S is the actual T co''a&d &a'e i& TKC#%S( Ho+ever- so'e boo,s a&d +eb sites use the' i&tercha&*eably as the &a'e of a& T co''a&d( Here are so'e of the tas,s that ca& be do&e usi&* T co''a&ds +ith a %S#1%P"S 'ode' or 'obile pho&e •
%et basic i&for'atio& about the 'obile pho&e or %S#1%P"S 'ode'( >or e/a'ple- &a'e of 'a&ufacturer 2TKC%#I3- 'odel &u'ber 2TKC%##3- I#EI &u'ber 2I&ter&atio&al #obile E9uip'e&t Ide&tity3 2TKC%SN3 a&d soft+are versio& 2TKC%#"3(
•
%et basic i&for'atio& about the subscriber( >or e/a'ple- #SIS!N 2TKCN$#3 a&d I#SI &u'ber 2I&ter&atio&al #obile Subscriber Ide&tity3 2TKCI#I3(
•
%et the curre&t status of the 'obile pho&e or %S#1%P"S 'ode'( >or e/a'ple- 'obile pho&e activity status 2TKCPS3- 'obile &et+or, re*istratio& status 2TKC"E%3- radio si*&al stre&*th 2TKCS3- battery char*e level a&d battery char*i&* status 2TKC)C3(
•
Establish a data co&&ectio& or voice co&&ectio& to a re'ote 'ode' 2T!- T- etc3(
•
Se&d a&d receive fa/ 2T!- T- TK>M3(
•
Se&d 2TKC#%S- TKC#SS3- read 2TKC#%"- TKC#%L3- +rite 2TKC#%.3 or delete 2TKC#%!3 S#S 'essa*es a&d obtai& &otificatio&s of &e+ly received S#S 'essa*es 2TKCN#I3(
•
"ead 2TKCP)"3- +rite 2TKCP).3 or search 2TKCP)>3 pho&eboo, e&tries(
•
Perfor' security=related tas,s- such as ope&i&* or closi&* facility loc,s 2TKCLC:3- chec,i&* +hether
a
facility
is
loc,ed
2TKCLC:3
a&d
cha&*i&*
pass+ords
2TKCP.!3(
2>acility loc, e/a'ples SI# loc, a pass+ord 'ust be *ive& to the SI# card every ti'e the 'obile pho&e is s+itched o& a&d PH=SI# loc, a certai& SI# card is associated +ith the 'obile pho&e( To use other SI# cards +ith the 'obile pho&e- a pass+ord 'ust be e&tered(3 •
Co&trol the prese&tatio& of result codes 1 error 'essa*es of T co''a&ds( >or e/a'ple- you ca& co&trol +hether to e&able certai& error 'essa*es 2TKC#EE3 a&d +hether error 'essa*es should be displayed i& &u'eric for'at or verbose for'at 2TKC#EEB or TKC#EE83(
•
%et or cha&*e the co&fi*uratio&s of the 'obile pho&e or %S#1%P"S 'ode'( >or e/a'plecha&*e the %S# &et+or, 2TKCOPS3- bearer service type 2TKC)ST3- radio li&, protocol para'eters 2TKC"LP3- S#S ce&ter address 2TKCSC3 a&d stora*e of S#S 'essa*es 2TKCP#S3(
•
Save a&d restore co&fi*uratio&s of the 'obile pho&e or %S#1%P"S 'ode'( >or e/a'ple- save 2TKCSS3 a&d restore 2TKC"ES3 setti&*s related to S#S 'essa*i&* such as the S#S ce&ter address(
&., M)M+ Acce$ero%eter sensor
Figure 9 '0'" Accelerometer
#E#S 2#icro=Electro #echa&ical Syste'3=based accelero'eters are devices that 'easure the proper acceleratio&( I& relativity theory- proper acceleratio& is the physical acceleratio& e/perie&ced by a& object( The psychical acceleratio& is 'easurable by se&sors( These se&sors are part of the se&si&* cluster of ubi9uitous tech&olo*ies( Se&si&* tech&olo*ies 'a,e use of physical para'eters fro' the e&viro&'e&t- such as te'perature- pressure- force a&d li*ht( & accelero'eter 'easures +ei*ht per u&it of 'ass- a 9ua&tity also ,&o+& as specific force- or *= force(
#E#S=based accelero'eters are o&e of the si'plest but also 'ost applicable 'icro= electro'echa&ical devices( They are +idely used i& cost se&sitive- lo+ po+er- 'otio&= a&d tilt= se&si&* applicatio&s li,e 'obile devices- *a'i&* syste's- dis, drive protectio&- i'a*e stabili0atio& a&d sports a&d health devices(
&.- Liui! cr/st$ !isp$/ LC! is the display device +hich is of BF/8 si0e a&d it has yello+ bac,*rou&d li*ht( This LC! is co&&ected to 'icroco&troller( The follo+i&* is the i&terfaci&* dia*ra' of LC! +ith 'icroco&troller T56S78(
li9uid crystal display 2LC!3 is a thi&- flat display device 'ade up of a&y &u'ber of color or 'o&ochro'e pi/els arrayed i& fro&t of a li*ht source or reflector( Each pi/el co&sists of a colu'& of li9uid crystal 'olecules suspe&ded bet+ee& t+o tra&spare&t electrodesa&d t+o polari0i&* filters- the a/es of polarity of +hich are perpe&dicular to each other( .ithout the li9uid crystals bet+ee& the'- li*ht passi&* throu*h o&e +ould be bloc,ed by the other( The li9uid crystal t+ists the polari0atio& of li*ht e&teri&* o&e filter to allo+ it to pass throu*h the other(
pro*ra' 'ust i&teract +ith the outside +orld usi&* i&put a&d output devices that co''u&icate directly +ith a hu'a& bei&*( O&e of the 'ost co''o& devices attached to a& co&troller is a& LC! display( So'e of the 'ost co''o& LC!s co&&ected to the co&tollers are BF
Figure ()* interfacing with AT!"#2 To e&able ter'i&al latch of LC! hi*h to lo+ pulse is se&t a&d "S bit is e&abled( O&ce the latch is e&abled the data is tra&sferred throu*h the i&terfaci&* pi&s parallel a&d the LC! sho+s the display o& it( These LC! are easy to pro*ra' a&d they are eco&o'ical too( LC! i&terfaci&* +ith 'icroco&troller is very easy( Here i& our vehicle trac,i&* project LC! displays the output i(e( latitude a&d lo&*itude of the vehicle( The follo+i&* fi*ure sho+s the LC! display of latitude a&d lo&*itude(
Figure ! ()* display
,. 0eic$e sort circuit s/ste% #oring >or Short circuit detectio&- +e are shorti&* t+o ter'i&als +hich is co&&ected to o&e of the pi&s i& the co&troller( O&ce short circuit is detected i& this port co&troller the& ta,es i&put fro' %PS a&d +hich *oes i&to rs8A8( This "s8A8 se&ds data i&to 'a/8A8 a&d it co&verts the data for'at a&d se&ds it to the "/ 2receiver pi&3 of 'icroco&troller a&d this 'icroco&troller stores this data i& $S"T buffer a&d the data stored is se&t a*ai& throu*h T/ pi& i&to 'a/8A8 this 'a/ 8A8 se&ds the data i&to %S# via rs8A8( This is ho+ vehicle short circuit alert +or,s usi&* %S# a&d %PS( The lcd i&terfaced to the 'icroco&troller also sho+s the display of the coordi&ates( This lcd display is o&ly used to ,&o+ the +or,i&* co&ditio& of the vehicle trac,i&* syste'(
,.1 0eic$e cci!ent $ert s/ste% #oring Co&troller co&ti&uously 'o&itors the ccelero'eter values( ccelero'eter is co&&ected to 1! co&verter +hich i& tur& is co&&ected to co&troller ports( .he&ever co&troller fi&ds the values of accelero'eter e/ceedi&* threshold values saved i& the co&troller( It the& captures the %PS co=ordi&ates a&d se&ds S#S to pre=co&fi*ured &u'ber +ith %PS Co=ordi&ates a&d severity of the accide&t(
,.2 3$o# crt of te s/ste%4
-.Co!e #ritten to te processor :include ;reg#2ne ,/FF?(0 #+ :de>ne lcd %2 sbit )(@ %3B&C sbit *./T %3B#C sbit *- %3B4C sbit )" %3B9C sbit mtr %1B2C sbit sw %1B+C sbit rl%1B1C void void init?lcdDvoidEC cmd?lcdDunsigned charEC void lcd?dataDunsigned charEC void display?lcdDunsigned char EC Goat adc?convert1 DvoidEC void integer?lcdDintEC void delay?msDunsigned intEC Goat adc?convert DvoidEC unsigned char byte?write?readDunsigned charEC void select?channelDvoidEC unsigned char channelHchannel1HAH)C void select?channel1 DvoidEC void $"'?--TDvoidEC void "0*?"'"?$%"Dunsigned char EC void 0)0-0?$%"DvoidEC void 0)0-0?$%$((Dunsigned longEC unsigned char 0)0-0?)6Dunsigned longEC void "0*?)6Dunsigned charEC void "0*?"TDunsigned char EC unsigned int i+HI+C unsigned char 0)?,/FFJ,/FF?(0KC void serial?sendDunsigned charEC void "0*?"TDunsigned char EC
int fHf1HLHyC void main DvoidE M T'.* +L2+C "). +L#+C T61 1C +LF*C T1 rl+C init?lcdDEC $"'?--TDEC cmd?lcdD+L+EC display?lcdDN).((-"-. A* NEC cmd?lcdD+Lc+EC display?lcdDN"6.T )-)/-T NEC delay?msD#++EC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDNA(0T -F.<<< NEC cmd?lcdD+Lc+EC display?lcdDN - 06-)(0" NEC delay?msD#++EC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDN/"-$ $%" O$"' NEC cmd?lcdD+Lc+EC display?lcdDNT0)6.(.$-0"<<
7PQ
NEC
fadc?convert1DEC yfC ff4C cmd?lcdD+L,EC integer?lcdDfEC delay?msD#++EC ifDsw+E M cmd?lcdD+L)+EC display?lcdDN"6.T )@T .))/0* NEC mtr1C rl1C 0)0-0?$%$((D1+++EC cmd?lcdD+L+1EC 0)0-0?$%"DEC rl+C delay?msD#++EC cmd?lcdD+L+1EC "0*?"TDNATNEC "0*?)6D+L+*EC delay?msD#++EC "0*?"TDNATR)'$F1NEC "0*?)6D+L+*EC delay?msD#++EC display?lcdDN"0*-$ "'"<<
"0*?)6D+L1AEC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDN8PQ delay?msD2+++EC
7PQ
NEC
W ifDL=1+E M
cmd?lcdD+L)+EC display?lcdDNA))-*0T .))/0*NEC mtr1C rl1C 0)0-0?$%$((D1+++EC cmd?lcdD+L+1EC 0)0-0?$%"DEC rl+C delay?msD#++EC cmd?lcdD+L+1EC "0*?"TDNATNEC "0*?)6D+L+*EC delay?msD#++EC "0*?"TDNATR)'$F1NEC "0*?)6D+L+*EC delay?msD#++EC display?lcdDN"0*-$ "'"<<
"0*?)6D+L1AEC delay?msD2+++EC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDN8PQ 7PQ
NEC
W ifDL;14+E M cmd?lcdD+L)+EC display?lcdDNA))-*0T .))/0*NEC mtr1C rl1C 0)0-0?$%$((D1+++EC cmd?lcdD+L+1EC 0)0-0?$%"DEC rl+C delay?msD#++EC cmd?lcdD+L+1EC "0*?"TDNATNEC "0*?)6D+L+*EC delay?msD#++EC "0*?"TDNATR)'$F1NEC "0*?)6D+L+*EC delay?msD#++EC display?lcdDN"0*-$ "'"<<
delay?msD2+++EC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDN8PQ
7PQ
NEC
W W W Goat adc?convert DvoidE M unsigned char byte+Hbyte1Hbyte2C int iC Goat valC )(@+C )"1C )"+C select?channelDEC byte+byte?write?readDAEC byte1byte?write?readD)EC byte2byte?write?readD+L++EC )"1C iDbyte1O+L+fEC iDDi;;EV byte2EC valDDi#<++E4+!&E1++C return valC W Goat adc?convert1 DvoidE M unsigned char byte3Hbyte4Hbyte#C int iC Goat valC )(@+C )"1C )"+C select?channel1DEC byte3byte?write?readDAEC byte4byte?write?readD)EC byte#byte?write?readD+L++EC )"1C iDbyte4O+L+fEC iDDi;;EV byte#EC valDDi#<++E4+!&E1++C return valC W unsigned char byte?write?read Dunsigned char aE
M unsigned char c+Hmask+L+C do M )(@1C ifDaOmaskE *-1C else *-+C )(@+C ifD*./T1E cVmaskC mask==1C W whileDmask=+EC return cC W void select?channel DvoidE M unsigned char LC LDchannel2ER+L&+C A L==4C ) L;;4C W void select?channel1 DvoidE M unsigned char LC LDchannel14ER+L&+C A L==4C ) L;;4C W void init?lcdDvoidE M cmd?lcdD+L2EC cmd?lcdD+L+0EC cmd?lcdD+L+&EC cmd?lcdD+L+1EC cmd?lcdD+L+EC display?lcdDN 50().'0 NEC delay?msD#++EC W void cmd?lcdDunsigned char cE M delay?msD#EC lcd DDcO+Lf+EV+L+2EC lcd +C
lcd DDc;;4EV+L+2EC lcd +C delay?msD2+EC W void lcd?dataDunsigned char cE M delay?msD#EC lcd DDcO+Lf+EV+L+3EC lcd lcd +C DDc;;4EV+L+3EC lcd +C delay?msD2+EC W void display?lcdDunsigned char sE M whileDsE lcd?dataDsRREC W void integer?lcdDint nE M unsigned cJ&KC unsigned char int i+C ifDn;+E M lcd?dataDSPSEC nPnC W ifDn+E lcd?dataDS+SEC whileDn=+E M cJiRRKDnY1+ER4C n1+C W whileDiPP=1E lcd?dataDcJiKEC W void delay?msDunsigned int itimeE M unsigned int iHIC forDi+Ci;itimeCiRRE forDI+CI;12+CIRREC W void 0)0-0?$%"DvoidE
M unsigned int i+HI+C i1C whileDD0)?,/FFJiRRKUSHSEVVDIRR;1EEC I+C cmd?lcdD+8+EC display?lcdDN(TQNEC whileDD0)?,/FFJiKUSHSEVVDIRR;1EE lcd?dataD0)?,/FFJiRRKEC input0)?,/FFJiRRKC cmd?lcdD+8)+EC display?lcdDN($QNEC iRRCI+C whileDD0)?,/FFJiKUSHSEVVDIRR;1EE lcd?dataD0)?,/FFJiRRKEC nput0)?,/FFJiRRKC W void 0)0-0?$%$((Dunsigned long timeoutE M unsigned int i+C char loop 1C whileDloopE M whileD0)0-0?)6DtimeoutE U SZSEC ifD0)0-0?)6DtimeoutE S$SE M ifD0)0-0?)6DtimeoutE S%SE M ifD0)0-0?)6DtimeoutE SSE M ifD0)0-0?)6DtimeoutE S'SE M ifD0)0-0?)6DtimeoutE S)SE M i +C do M 0)?,/FFJiK 0)0-0?)6DtimeoutEC ifDi = ,/FF?(0P1E breakC W whileDD0)?,/FFJiRRKU+L+*EOODi ; D,/FF?(0P2EEEC 0)?,/FFJiP1K +L++C loop +C
W else loop 1C W else loop 1C W else loop 1C W else loop 1C W W
else loop 1C
W unsigned char 0)0-0?)6Dunsigned long timeoutE M unsigned char temp+L++C whileDDU-EOODPPtimeout = +EEC ifDtimeoutE temp ",/FC - +C return tempC W void $"'?--TDvoidE M cmd?lcdD+L+EC display?lcdDN$"' --T-A(-[-$<
5. Resu$ts 5henever accident or short circuit occurs in the vehicle then the device sends message to given mobile device< Messge for M6or Acci!ent Q Q#RO" CCI!ENT OCC$""E! T LT 8?@(@@@@-N LN B8B(@@@@-EJ
Messge for Minor cci!ent Q Q#INO" CCI!ENT OCC$""E! T LT 8?@(@@@@-N LN B8B(@@@@-EJ
Messge for +ort circuit4 QSHO"T CI"C$IT OCC$""E! T LT 8?@(@@@@-N LN B8B(@@@@-EJ
This system shows the location of vehicle on the lcd connected to it also Iust to make sure the working condition of the microcontroller<
Figure 11 output displayed on lcd
6. L!+!tat!#)" #% te ,r#4e$t : fter po+er o& the board- +e &eed to +ait about B@ secs before to *et accurate accelero'eter data fro' the se&sor( fter +hich- the values +ill be*i& to stabili0e( +he& 'ovi&* a&d rotati&* the se&sor- a&d apply forces to it- +hich causes the 'easure'e&ts to fluctuate( The &et result is that accelero'eter data te&ds to be very &oisy+ith brief but si*&ifica&t disturba&ces( If these ca& be avera*ed out- the accelero'eter provides accurate results over ti'escales lo&*er tha& the &oise disturba&ces(
E/isti&* syste' do &ot +or, if the syste' itself da'a*ed i& the vehicle accide&t(
7. +cope of future stu!/ This Project provides the desi*& +hich has the adva&ta*es of lo+ cost- portability- s'all si0e( The platfor' of the syste' is T 56S78 alo&* +ith accelero'eter se&sor %PS a&d %S#i&terfaci&* +hich reduces the alar' ti'e to a lar*e e/te&t a&d locate the site of accide&t accurately( This syste' ca& overco'e the proble's of lac, of auto'ated syste' for accide&t locatio& detectio&( Co&se9ue&tly- the ti'e for searchi&* the locatio& is reduced a&d the perso& ca& be treated as soo& as possible +hich +ill save 'a&y lives( This syste' +ill have broad applicatio& prospects as it i&te*rates the positio&i&* syste's a&d the &et+or, of 'edical based services( There is a scope for i'prove'e&t a&d as a future i'ple'e&tatio& +e ca& add a +ireless +ebca' for capturi&* the i'a*es +hich +ill help i& providi&* drivers assista&ce(
8. Bi9$iogrp/ www<+#1proIects
J1KThe +#1 'icrocontroller P @enneth X