POSITION TRACKING SYSTEM USING GPS CAR VIA SMS


This system is used for
Track position and view tracking vehicles on a region map. System
designed is a software that can make requests to the position
particular vehicle and processing the response data into the vehicle's position in a
area map., as well as hardware which connect with a GPS receiver to
receive requests and respond position via SMS.


The materials needed to manufacture this tool are:
• GPS that has a serial port (1 fruit)
• AVR family microcontroller (1 fruit)
PCB Matrix (1 fruit)
ATMEGA 162 + socket 40-pin (1 pc)
Max RS 232 + IC socket 16 pin (1 pc)
IC AN 7805 (1 fruit)
TIP TR 3055 (1 fruit)
11.0529 MHz crystal / clock (1 fruit)
Capacitor: - 33 pF (2 pieces)
- 100 nF (2 pieces)
- 1 μF/50V (6 pieces)
- 10 μF/25V (1 fruit)
- 1000 μF/25V (2 pieces)



Resistor 560 (2 pieces)
Diode 1N4002 (10 pieces)
LPT1: - DB15 male (1 fruit)
- DB9 male (1 fruit)
- Cover DB9 (2 pieces)
Fuse + Holder (small) (1 fruit)
Green LED lights small (10 pieces)
8 Line Data cable (1 meters)
Phone Connector (1 piece)
Connector cable: - Fill 6 (1 fruit)
- Fill 8 (2 pieces)
- Fill 10 (2 pieces)
Push button (1 fruit)
• GSM Modem Sony Ericcson (1 fruit)
How it Works GPS Receiver Aircraft
GPS satellites are generally emit two kinds of micro wave signal
namely:
L1 1575.42 MHz with a frequency that carries the navigation message and code signals
SPS (Standard Positioning Service). L2 with a frequency of 1227.60 Mhz
used to measure the delay in the ionosphere layer using
receiver PPS (Precise Positioning Service). Three binary codes used for
phase shift the L1 and L2 signals transmitted by a GPS satellite. Third
kind of binary code that is as berkut:
1) modulation code C / A (Coarse Acquisition) in phase L1. Code C / A is
sent repeatedly every 1 MHz PRN (Pseudo Random Noise).
2) The code C / A PRN is different for each GPS satellite is
identification to the satellite.
3) modulation code C / A is used as the basis for the use of
GPS in civil society.
NMEA Output
Output from the GPS receiver has a certain structure
called NMEA output. Example output structure along the way
reading is as follows:
$ GPGGA Output:
$ GPGGA, 180432.00,4027.027912, N, 08704.857070, W, 2,07,1.0,212.15,
M, -33.81, M, 4.2,0555 * 73

Introduction to Global System for Mobile Phone Communication (GSM)
GSM (Global System for Mobile Communication) is a system
open telecommunications, there are no ownership (non-proprietary) that developed
rapidly and constantly. Its main advantages is its ability to
internasinal roaming. This provides a standard system with no limits
relationship in more than 159 countries. With GSM satellite roaming, services also
can reach remote areas. SMS was created as part of
GSM standard. All GSM network operators have the Message Centre, which
responsible for the operation or management of news
there.

GSM Modem (Sony Ericcson GT47)
Sony Ericsson GT47 is a dual band (EGSM 900/1800MHz) GSM / GPRS
serial modem with integrators an instant and cost-effective M2M, as a solution to
get a faster application. GT47 is a plug-and-play modem with
Integral SIM card reader and standard connector interfaces. By installing RS232
connector directly on the application or the computer, ready to be used as GM29
wireless modem. Modem can send and receive data by GPRS, HSCSD,

CSD, SMS and fax. GT47 has a feature to send and receive SMS
with text mode and PDU. Figure 6 shows the mechanical design module GT47
which tebuat of plastic.
Module

At Protocol Command to read the SMS with the text mode on the GT47
AT + CMGR = 2
+ CMGR: "RECUNREAD", "+6285645046302",, "06/06/19, 12:40:17
+28 ", 145,4,0,0," +62855000000 ", 145.11
mintaposisi
OK
�� GT47 supports the SMS service as below:
• Sending; MO (mobile-originated) with a PDU (protocol data units) and modes
text.
• Receiving; MT (mobile-terminated) with PDU and text mode.
• CBM (cell broadcast message) service in which a message is sent to
all subscribers are located in one or more specific cells in the GSM
Modem network (for example, traffic reports). This feature is network
dependent
• SMS STATUS REPORT according to GSM MODEM 03:40.
• SMS based on GSM MODEM COMMAND 03:40.
In addition �� GT47 also supports the following data:
• GT47 is the installation and activation of GPRS and GSM Modem. GT47
is a GPRS class 8 (4 +1). a Class B terminal, which provides
• GT47 capable of supporting a CSD communication at 9.6 kbps
• GT47 supports communications HSCSD class 2 (2 +1)

�� (Short Message Service)
Short Message Service is one of the company's service operator
GSM mobile phone. By these means the mobile phone can receive and
send short messages with the form of text with maximum length
as many as 160 characters for the Latin alphabet and 70 characters for non-Latin alphabet,
such as Arabic or Chinese alphabet. There is one thing that is very interesting from this service,
which offer relatively cheap rates for each time sending a message.


HARDWARE DESIGN subsystem (HARDWARE)
The hardware used in this system is the hardware
support the process of receiving SMS, sending SMS, SMS messages and processing
hardware is the source of GPS data. Tools required are:
- The aircraft GPS receiver as a source of position data.
- ATMEGA 162 Microcontroller with IC
- GSM device with a working mobile phone number
to receive and send SMS from PC to a GSM system hardware and
vice versa. In this last project used
Sony Ericsson GSM Modem GM29 type.
The device Computer with operation system (Windows XP Service Pack 1).


GPS PLANNING
GPS Output Data Format as many as five types of NMEA 0180, NMEA
0182, NMEA 0183, AVIATION, and plotting. The format of the data set
by the NMEA (National Maritime Electronics Association) and can be connected to
computer via serial communication port using RS-232 cable. Data
output used is NMEA 0183 data format in the form of a sentence (string)
which is an 8-bit ASCII character sets. Every sentence begins with a single
character '$', two characters Talker ID, three-character Sentence ID, and followed by data
fields, each separated by a comma and terminated by an optional cheksum
and character cariage return / line feed (CR / LF



MINIMUM DESIGN SYSTEM (MICRO CONTROLLER)
ATMEGA162 microcontroller is used which is
microcontroller with RISC architecture. The advantages of this microcontroller is
have an internal system memory 16 Kb Flash EEPROM, 35 bit Input / Output and
2 port serial communication. Minimum system microcontroller to function as a medium
interface and processing of data between GPS, GSM Modem and unit Input / Output.
The circuit is equipped with an ISP that works for Flash Programming
write the desired program to the microcontroller. Minimum circuit system
microcontroller.

POWER SUPPLY PLANNING
This device must remain in operation (not dead), so that the required resources
energy taken from the car battery. To adjust the car battery voltage
at 12 V with a voltage microcontroller, GPS and GSM Modem that is equal to
5 V, it takes a power supply. Circuit power supply.


PLANNING RS 232
RS-232 voltage levels from the GPS or GSM modem to be converted into
minimum TTL voltage levels on the system microcontroller, and therefore used
serial communication circuit:




PLANNING SMS
For media use GSM modem for data communications, with consideration
easily in serial connection with the SMS Gateway and microcontroller. GSM
Modem using a serial communications port for communication with
microcontroller. SMS format.


PLANNING PROGRAM The program contained in the SMS Gateway is: 1. Courses in module As String Public KirimPesan Public Connection As New ADODB.Connection As New ADODB.Recordset Public simpanSQL As New ADODB.Recordset Public LihatSQL As New ADODB.Recordset Public HapusSQL As New ADODB.Recordset Public SQL1 As New ADODB.Recordset Public SQL2 As New ADODB.Recordset Public SQL3 2. Program on forms Below are some parts of the program on forms SMS Gateway by using Visual Basic 6.0 • Function SetModeText () Dim a As Double As String Dim BUFFER MSComm1.Output = "AT + CMGF = 1" & vbCrLf a = Timer While Timer - a <2 BUFFER = BUFFER + MSComm1.Input DoEvents Wend If InStr (BUFFER, "OK") Then Shape1.FillColor = vbGreen 'MsgBox "GSM Modem ins Text Mode " Label8.Caption = "GSM Modem In Text Mode" End If End Function • Function cek_update () If count = Int (Text4.Text) Then check = False Else check = True count = Int (Text4.Text) End If End Function • Function kirim_posisi_db () BukaKoneksi Set SQL1 = Koneksi.Execute ("insert into position values ('""','" & Text7.Text & "','" & Text6.Text & "','" & Text3.Text & "')") TutupKoneksi End Function • Function terima1 () ReadyGSMModem1 time End Function • Function DELETE_SMS () Dim a As Double As String Dim BUFFER MSComm1.Output = "AT + CMGD = 1" & vbCr a = Timer While Timer - a <1 BUFFER = BUFFER + MSComm1.Input DoEvents Wend If InStr (BUFFER, "OK") Then Shape2.BackColor = vbYellow 'MsgBox "DELETE" Label9.Caption = "New SMS Deleted" End If 3.3.3. Programme - Main program The programs will be made on the microcontroller using CodeVisionAVR the basic application programs such as programming language C programming Program listing as follows. 1. Program to check the GPS {GPS = 0; while (getchar1 ()!='$'); if (getchar1 ()==' G ') if (getchar1 ()==' P ') if (getchar1 ()==' G ') if (getchar1 ()==' G ') if (getchar1 ()==' A ') { getchar1 (); while (getchar1 ()!=','); A1 = getchar1 (); A2 = getchar1 (); A3 = getchar1 (); A4 = getchar1 (); getchar1 ();//. A5 = getchar1 (); A6 = getchar1 (); A7 = getchar1 (); A8 = getchar1 (); getchar1 ();//, getchar1 (); / / N getchar1 (); / /, B1 = getchar1 (); B2 = getchar1 (); B3 = getchar1 (); B4 = getchar1 (); B5 = getchar1 (); getchar1 (); / /. B6 = getchar1 (); B7 = getchar1 (); B8 = getchar1 (); B9 = getchar1 (); detect_lcd { lcd_gotoxy (0.0); lcd_putsf ("Lint ");// lcd_gotoxy (6.0); lcd_putchar ('-'); lcd_putchar (A1); lcd_putchar (A2); lcd_putchar ('.'); lcd_putchar (A3); lcd_putchar (A4); lcd_putchar (A5); lcd_putchar (A6); lcd_putchar (A7); lcd_putchar (A8); delay_ms (1000); lcd_gotoxy (0.0); lcd_putsf ("Bujr ");// lcd_gotoxy (6.1); lcd_putchar (B1); lcd_putchar (B2); lcd_putchar (B3); lcd_putchar ('.'); lcd_putchar (B4); lcd_putchar (B5); lcd_putchar (B6); lcd_putchar (B7); lcd_putchar (B8); lcd_putchar (B9); delay_ms (1000); } GPS = 1; } } 2. Program to check the GSM { printf ("at"); putchar (13); while (getchar ()!=' O ') {printf ("at"); enter;}; } 3. Program to check SMS {Unsigned char dat, x_psn, cnt_psn; ready_gsm (); / / be sure That GSM is ready read_sms = 0; printf ("at + cmgr = 1"); enter; dat = getchar (); while (dat! ='+'){ printf ("at + cmgr = 1"); enter; dat = getchar ();} ; if (getchar ()!=' R ') / / + CMGR: "REC READ", "+6285645046302", / / ERROR {While (getchar ()!=' 8');// 8 as the header identification number of of GSM for (i = 0; i <= 9; i + +) rx_no [i] = getchar (); / / Insert no while (getchar ()! = 13); / / 13 as tail of SMS coding char getchar ();// 10 if (getchar ()==' X ') / / X as the header of the SMS for (i = 0, cnt_psn = 1; i <cnt_psn; i + +) {X_psn = getchar (); / / enter x_psn if (x_psn! = 13) {Rx_psn [i] = x_psn; cnt_psn = cnt_psn +1;} / / Insert msg else break; } delete (); / / DELETE SMS if (cnt_psn == 7) compare_sms (); / / compare SMS with reference data else {detect_lcd {lcd_clear (); lcd_putsf ("New SMS Invalid "); delay_ms (500);}} for (i = 0; i <10; i + +) {rx_no [i] = 0;} / / CLEAR NO for (i = 0; i <= 5; i + +) {rx_psn [i] = 0;} / / CLEAR PSN } else Detect_lcd {{lcd_clear (); lcd_putsf ("New SMS = No .!");}} detect_lcd delay_ms (1000); read_sms = 1; } 4. Program to compare SMS {Detect_lcd {Lcd_clear (); lcd_putsf ("08"); for (i = 0; i <10; i + +) / / VIEW / print no & msg {Lcd_putchar (rx_no [i]);} delay_ms (1000); lcd_clear (); for (i = 0; i <6; i + +) / / VIEW / print no & msg {Lcd_putchar (rx_psn [i]);} } for (i = 0; i <11; i + +) / / check no { result = rx_no [i]-no [i]; if (i == 10 & & result == 0) { flag_no = 1; detect_lcd {lcd_gotoxy (12.0); lcd_putsf ("same ");}} if (hasil! = 0) Detect_lcd {{lcd_gotoxy (12.0); lcd_putsf ("| =");} break;} } if (flag_no) / / Command bellows will from be accesed if SMS from number ................ {Xpsn = 0; for (i = 0; i <= 5; i + +) {Result = rx_psn [i], msg [i]; if (i == 5 & & result == 0) {send_pss (); detect_lcd {lcd_gotoxy (6.1); lcd_putsf ("p1");}} if (hasil! = 0) break; } result = 0; } flag_no = 0; } 5. Program to delete SMS { printf ("at + cmgd = 1"); enter; while (getchar ()!=' O ') {printf ("at + cmgd = 1"); enter;}; } send_pss void () {Send_sms = 0; printf ("at + cmgs1 ="); putchar (34); printf ("085645046302"); putchar (34); putchar (13); while (getchar ()!='>'); printf ("-% c% c% c% c% c% c% c% c", A1, A2, A3, A4, A5, A6, A7, A8); / / enter; printf ("% c% c% c% c% c% c% c% c% c", B1, B2, B3, B4, B5, B6, B7, B8, B9); putchar (26); send_sms = 1; } Examples