With the development of modern science and technology, people have higher and higher requirements for the monitoring of moving targets. For example, ground target tracking and alarm systems can assist parents in monitoring their children. If a child is lost or hijacked, the monitoring center will determine the child's location by analyzing the GPS data sent by the handheld terminal to take relevant safety measures.
1 Introduction
In addition, ground target tracking and alarm systems have broad application prospects in urban taxi dispatching, logistics and transportation monitoring and other fields.
Ground target tracking and alarm systems have developed with the maturity of GPS technology and GSM networks. In the early 1990s, GPS technology gradually emerged, and GPS-based mobile tracking and monitoring systems began to enter the market. In recent years, the GSM network has developed rapidly, its data transmission capabilities have been significantly enhanced, and GPS technology has become more mature. On May 1, 2000, the U.S. government announced the cancellation of the selective interference (SA) policy for ordinary GPS positioning. In this way, the positioning accuracy of general GPS receivers can reach 25 m. Based on the above, ground target tracking and alarm systems using GPS and GSM networks and designed with low-power ARM microcontrollers are bound to develop rapidly and have huge market potential.
2 Introduction to GPS and GSM
The Global Positioning System (GPS) was developed by the United States starting in the 1970s. It took 20 years and cost 20 billion US dollars. It was fully completed in 1994. It has all-round real-time three-dimensional navigation and positioning on sea, land and air. A new generation of satellite navigation and positioning systems with capabilities. The basic principle is to use the instantaneous position of the high-speed moving satellite as the known starting data, and use the spatial distance method to determine the position of the point to be measured. The GSM system is currently a relatively mature and widely used mobile communication system based on time division multiple access technology. It mainly provides voice, short message, data and other services. This system uses its short message service to transmit data.
With its remarkable features of all-weather, high precision, automation, and high efficiency, GPS is widely used in geodesy, geological exploration, vehicle navigation, etc. In recent years, with the continuous decline in the cost of GPS modules and the continuous development of ground communication systems, GSM and Systems integrating GPS technology are developing in full swing.
3 System structure
The ground target tracking and alarm system consists of two parts: a handheld terminal and a monitoring center, as shown in Figure 1. The handheld terminal uses an ARM microcontroller as the core and is connected to the GPS module and GSM module (sending) through UART0 and UART1 respectively; the monitoring center is composed of a PC and a GSM module (receiving), and the electronic map software installed in the PC is used for analysis The positioning information transmitted from the GSM module accurately displays the specific geographical location of the tracked target.
4 System hardware design
4.1 Handheld terminal part
The handheld terminal is composed of ARM microcontroller, GPS module, GSM module, buttons, and LCD. Its structure is shown in Figure 2.
The handheld terminal uses LPC2210 as the main controller. LPC2210 is a 16/32-bit ARM7TDMI-SCPU microcontroller based on real-time simulation and tracking, and has 256 KB of embedded high-speed Flash memory; 128-bit width memory interface and unique acceleration structure that enables 32-bit code to run at the maximum clock rate [1]. Due to the built-in wide range of serial communication interfaces, it brings great convenience to both hardware design and software transplantation. The GPS module uses GSU-36 from Nippon Optoelectronics Company, which is small in size, low in power consumption, resistant to electromagnetic interference, and can track 12 satellites at the same time. The GSM module uses BENQ's M22.
LPC2210 sends control commands such as GPS sampling cycle setting, GPS data type selection and communication baud rate and receives GPS positioning information through the serial port UART0. Send AT commands through the serial port UART1 to control the work of GSM and transmit SMS. The LCD displays the current longitude, latitude, time and other information, and the buttons are used to control whether to send signals.
4.2 Monitoring center part
The monitoring center consists of GSM module and PC. Using OziExplorer as the electronic map software of the monitoring center, after installing OZI on the PC and setting the relevant port parameters, the positioning information transmitted from the GSM module can be displayed on the electronic map in real time.
5 System software design
The relevant programs of the handheld terminal are written in C language, and the program flow is shown in Figure 3. The software design mainly includes three parts: system initialization, GPS data processing, and GSM data processing.
5.1 System initialization
System initialization is mainly the initialization of the serial port, including the setting of the transmission frame format and baud rate. According to the hardware characteristics of the GPS module and GSM module, set the UART0 baud rate to 4 800 b/s and the UART1 baud rate to 9 600 b/s. There is no parity bit in either case. 1-bit 5.2 GPS data processing GPS module receives GPS The satellite positioning signal is judged to be in GPRMC format. After analysis, the main information such as longitude, latitude, and UTC time is left for further processing, otherwise it will continue to receive GPS satellite positioning signals.
The GPS positioning information output by the GPS module complies with the NAME-0183 communication standard. The output data of the NAME-0183 communication standard uses ASCII code, and its content includes information such as latitude, longitude, altitude, speed, date, time, heading, and satellite status. There are 6 types of statements, including GGA, GLL, GSA, GSV, RMC and VGT. This system uses the RMC record statement, which contains all the information needed by the positioning system. Format example:
5.3 GSM data processing
When it is confirmed that a key is pressed (the keyboard anti-shake program is started), the stored data is extracted and converted into the corresponding Unicode code, which complies with the PDU format. The final valid positioning information is then sent to the monitoring center.
GSM's short message service SMS uses signaling channels for transmission. It does not require dialing to establish a connection. It sends the information to be sent plus the destination address and other control information to the short message service center. The short message service center completes the storage and then forwards it to the target machine. This This feature is suitable for remote transmission of data. Each text message has a capacity of 140 characters. There are three access protocols for GSM terminals to control SMS through the serial port, namely BlockMode, Text Mode based on AT commands, and PDU Mode based on AT commands. Among them, PDU Mode is the most widely used.
This system uses PDU Mode and uses AT commands to read and send short messages. The GSM module AT command sets produced by different manufacturers are slightly different. This system uses the M22 module of BENQ Company. For details, please refer to the data manual and "AT Command User Manual" provided by BENQ Company. For example, to send a message, you can use the AT+CMGS command with the following format:
AT+CMGS=+++++
After the system is powered on, the ARM microcontroller starts executing the main program. In the main program, first perform system initialization, which includes basic parameter settings of the GPS module and GSM module, and then enter the data processing part of the main program.
6 System implementation
6.1 Implementation steps and results
Start the debugging software ADS, compile and program the compiled source code into the ARM microcontroller through the JATG interface on the experimental board. Insert the SIM card on the GSM module of the monitoring center into the mobile phone to let the mobile phone act as a "temporary monitoring center". Power on the handheld terminal offline and run it. After 4 or 5 seconds, press the interrupt trigger button on the experiment board. After a short wait, the mobile phone will receive a message from the handheld terminal. The latitude and longitude are 3907.9579N and 11713.8762E. The actual accuracy is The latitude and longitude are 3907.8933N and 11713.8668E, there are slight errors.
Remove the SIM card of the mobile phone and place it on the GSM module of the monitoring center. Start the electronic map software OZI on the PC, and set the parameters of the COM1 port: baud rate 4 800 b/s, stop bit 1, and no parity to match it with the GSM module. Power on and run again and click the "Navigation" button on OZI. The positioning point happened to stop at Tianjin University of Technology in Hedong District, Tianjin. When you zoomed in on the map, the positioning point landed at the location of the laboratory building. The longitude and latitude values of the positioning point and the current time were also displayed in real time at the bottom of the map window (as shown in Figure 4 ).
6.2 Error analysis
After the system has initially passed debugging, its stability must be tested and errors analyzed. From the experimental results, it can be concluded that the error of positioning accuracy is basically controlled within 25 m. The reasons for the error mainly come from two aspects: first, the performance error of the GPS module hardware itself. GSU-36 requires an operating voltage of DC 3.1 V to 3.6 V (ripple ≤ 50 mV). And the module uses an active antenna. If the antenna is interfered by nearby electromagnetic fields or the position of the GPS satellite is not ideal, the positioning accuracy will be reduced to varying degrees. On the other hand, the resolution of the electronic map also greatly determines the accuracy of the positioning points. OZI is a software that supports independent surveying and editing of electronic maps. In order to achieve ideal positioning accuracy, you can map a more detailed electronic map yourself.
Previous article:Design of central air conditioning control system using μC/OS-II and LPC2210 processor
Next article:System testing and problem solving methods of μC/OS-II operating system transplanted on LPC2378
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- CRC16 algorithm code for UDMA
- MSP430 ADC conversion + mean filter
- The functions of handheld devices realize information management in various industries
- Installation of the digital multimeter + RL78G14 development environment based on the serial port
- Simple LM317 adjustable power supply
- AC servo motor based on STSPIN32F0
- EEWORLD University - Designing wide input DC/DC converters for smart lock applications
- VS1053 module
- What is the temperature rise of a wire? How do you know the temperature rise of a wire?
- 【RT-Thread Reading Notes】Summary