Vehicle automatic tracking system based on GPS and GSM

Abstract: STC12C2A60S2 single-chip microcomputer is used as the control core. In the case of stolen vehicles, the GPS satellite positioning system is used to determine the position of the vehicle, and then the vehicle king is sent to the designated mobile phone by the GSM network in a short-term manner. In the middle, the owner can remotely control the system to automatically cut off the ignition circuit in the car, thereby realizing the anti-theft function.
Keywords: single chip microcomputer; GSM; GPS module; vehicle security

0 Introduction With the improvement of people's living standards, cars have gradually entered the ordinary family. As the number of cars has increased year by year, the theft and robbing of cars has become a serious social problem. In solving the problem of automobile anti-theft, most of the car's alarm methods mainly use light flashing and horn sounding. There are three kinds of defects in this anti-theft method. First, the alarm is easily destroyed and loses the anti-theft function. Second, the horn sounds. The life of the surrounding residents was seriously disturbed. Third, after the car was stolen, the appearance was slightly changed and it was difficult to track. In order to solve these problems, the system uses the GPS positioning system to track the position of the car in real time. In the case of theft, the GSM short message module can be used to send the GPS positioning information of the car to the owner or the public security department at any time to speed up the detection of the case.

1 System working principle and block diagram When the owner leaves the vehicle, the anti-theft system can be activated. First, the owner needs to set the mobile phone number to receive the positioning information of the vehicle. At this time, the single-chip computer controls the GPS module, continuously acquires the GPS positioning data, and obtains the GPS positioning data. The GPS data is analyzed to obtain information including the latitude, longitude, and speed of the vehicle. The system judges whether the vehicle is moved by the change of the speed or the latitude and longitude of the vehicle. If the vehicle is illegally moved, the MCU will control the GSM module to send the positioning information of the vehicle through the short message to the designated mobile phone at intervals of ten minutes. At the same time, the MCU stores this information in the EEPROM for future use. After the owner knows the location of the vehicle for the first time, he can control the anti-theft system through the GSM remote network, cut off the ignition circuit of the vehicle, and turn off the vehicle. At the same time, the owner provides the vehicle location information to the police and retrieves his vehicle as soon as possible. The block diagram of the system working principle is shown in Figure 1.

This article refers to the address: http://

A.jpg



2 hardware system design
2.1 The core of the MCU control adopts the single-clock machine cycle single-chip STC12C5A60S2 of Hongjing Technology Co., Ltd. It is a new generation 51 series MCU with high speed, low power consumption and super anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is fast 8 ~12 times, with 60kB in the system programmable flash memory, it has two independent full-duplex serial communication interfaces using UART working mode, which can easily realize the data communication between the single chip and GPS and GSM at the same time.
2.2 GPS data acquisition part of the GPS module uses Ray-u-blox's NEO-5Q main chip, which uses u-blox's latest KickStart weak signal acquisition technology to ensure that any device using this module can be received at any The position of the signal and any antenna size can have the best initial positioning performance and fast positioning, and has the advantages of low cost, small size and strong function.

B.jpg


The connection between the MCU and the GPS module is shown in Figure 2. The serial communication mode is adopted. After power-on, the module will receive GPS data packets in real time. The types of data packets are: GPCSV: visible satellite information; GPGLL: geolocation information; GPRMC: Recommended minimum positioning information; GPVTG: Ground speed information; GPGGA: GPS positioning information; GPGSA: Current satellite information. In the design, only the GPPMC type data packet is parsed. The contents of the data packet are: $GPRMC, <1>, <2>, <3>, <4>, <5>, <6>, <7>, < 8>,<9>,<10>,<11>,<12>*hh
<1>UTC time, hhmmss (time, minute and second) format <2> positioning status, A=effective positioning, V=invalid positioning <3> latitude ddmm. Mmmm (degrees) format (the previous 0 will also be transmitted)
<4> Latitude hemisphere N (Northern Hemisphere) or S (Southern Hemisphere)
<5> longitude dddmm. Mmmm (degrees) format (the previous 0 will also be transmitted)
<6>Longitude hemisphere E (East) or W (Western)
<7> Ground rate (000.0~999.9, the previous 0 will also be transmitted)
<8> Ground heading (000.0~359.9 degrees, with the north as the reference, the front 0 will also be transmitted)
<9> UTC date, ddmmyy (day and month) format <10> magnetic declination (000.0 ~ 180.0 degrees, the front 0 will also be transmitted)
Magnetic declination direction, E (east) or W (west)
<12> Mode indication (only NMEA0183 3.00 version output, A= autonomous positioning, D=differential, E=estimate, N=invalid data)
2.3 GSM module part The GSM module adopts TC35I of Siemens AG of Germany, which can realize the functions of receiving and sending text messages by GSM module. The MCU controls the GSM operation by sending an AT command to the GSM module. The AT commands used to send short messages are:
AT: Handshake command AT+CMGF=1: Set the text message mode to text mode;
AT+CSCS=GSM: set to GSM character set;
AT+CSMP=17.67.0.0: Set the encoding type and character set;
AT+CMGS=1357133XXXX: Set the target phone number to 1357133XXXX;
The connection between the module and the MCU is shown in Figure 2. The serial communication mode is adopted. When a short message needs to be sent, the AT command and data are sent to the module in order, and the information is sent to the owner.
2.4 Human Machine Interface and Storage Section The human machine interface includes a matrix keyboard and a Liquid Crystal Display part, which is mainly used to realize the function of inputting, displaying and preventing the opening and closing of the preset mobile phone number. The memory uses the HC bus EEPROM AT24C08, which is a non-volatile memory. The stored data can be stored for more than 100 years and can be erased tens of thousands of times. After the MCU analyzes the data received on the GPS, the obtained information such as the latitude, longitude, and speed of the vehicle is stored in the memory, which serves as the evidence basis for the public security organ.

3 System software design The automatic tracking system software consists of three parts: interface program, signal processing program and control signal output program. The signal processing program realizes the acquisition, analysis and so on of the GPS signal by the single-chip computer and sends the vehicle positioning information to the user through the GSM network, which is the focus of the software program; the interface program mainly completes the mobile phone number setting, keyboard processing, liquid crystal display, etc. The user has good communication; the control signal program realizes the reception and analysis of the GSM signal, and completes the control of the ignition switch of the vehicle; the general software block diagram is shown in FIG.

C.jpg



4 Conclusion This system uses the single-chip microcomputer to control the GPS and GSM modules, and realizes the design of the vehicle anti-theft system. Experimental simulation, when the vehicle is stolen, the system can work without being affected by the harsh environment, and receive and send information accurately and in real time.

TFT LCD Monitor

TFT LCD Monitor,TFT LCD,TFT Display

ESEN Optoelectronics Technology Co., Ltd, , https://www.esenlcd.com