Research on Train Distance Measurement System Based on GSM, GPS and CAN Bus

Publisher:幸福的人生Latest update time:2011-09-14 Keywords:GSM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

As railway transportation develops towards high speed and high density, safety work will become more important. Once an accident occurs, it will not only interrupt the driving and disrupt the normal operation order, causing serious economic losses, but also have adverse effects on society. In order to ensure that the train runs quickly, safely, comfortably and efficiently on the high-speed line, it is very important to carry out timely maintenance of railway trains. The train maintenance cycle is mainly based on the mileage of the train, so timely and accurate recording of the train mileage is the key to ensure the safe operation of the train. In the past, the mileage of each carriage of the train was recorded manually and stored in the computer. Sometimes due to the negligence of the staff, the record sheet may be lost or missed, which will cause the actual mileage of the train to be inconsistent with the recorded mileage, so that the train cannot be repaired in time, which creates hidden dangers for the safe operation of the train. Therefore, it is crucial to develop a network system that can automatically record the mileage of the train.

This system is developed to meet the above requirements. It is a product of the American GPS (Global Positioning System) global positioning system, combined with CAN (Controller Area Network) bus technology and GSM (Global System for Mobile Communication) mobile communication technology. Its main functions are to rely on GPS to locate the position of the train, use the single-chip microcomputer to accumulate the train's mileage, use the CAN bus to establish a local area network between the train's carriages, and transmit the mileage data of each train carriage back to the monitoring center through the GSM network, and the monitoring center will conduct unified monitoring and management. This system uses GSM short messages for data transmission. It does not require a dial-up connection. It only needs to send the information to be sent with the destination address to the short message center, and then the short message center will forward it to the final destination. The short message is limited to 160 bytes each time, which is sufficient for transmitting the train's mileage data. This system uses GSM short message service for data transmission. The biggest advantage is that the connection is simple, the cost is low, the coverage is wide, and it is easy to implement.

System composition

The system consists of GPS satellites, vehicle-mounted terminals, GSM public network and monitoring center. The system schematic diagram is shown in Figure 1.

GPS satellites continuously send guidance messages, which are received by the GPS receiver on the vehicle terminal, decoded and processed, and then output positioning data. The vehicle terminal includes the main control vehicle terminal and the controlled vehicle terminal. The main control vehicle terminal is installed on the locomotive. It consists of a GPS receiving module, an information processing and control module, a GSM communication module, a keyboard input module, a display module and a CAN bus communication control module. It is responsible for receiving GPS information, processing data, controlling CAN bus communication, sending GSM information, etc. The controlled vehicle terminal is installed in each carriage. It consists of an information processing and control module, a CAN bus communication module, a keyboard input and display module. It is responsible for the accumulation of mileage in this carriage and communication with the main control vehicle terminal. The main control vehicle terminal and the controlled vehicle terminal are connected to form a local area network through the CAN bus. The vehicle terminal sends the train mileage data to the monitoring center in the form of short messages through the GSM network. The monitoring center is mainly composed of a GSM communication module, a monitoring host, a management database and a comprehensive data interface to complete the reception of GSM information and the statistics and management of the mileage of each train.

Hardware design of vehicle-mounted unit

The hardware of the vehicle-mounted unit is mainly composed of four modules: information processing and control module, GPS receiving module, GSM communication module and CAN bus communication control module.

Information processing and control module
The information processing and control module is the core control component of the vehicle terminal. It is a system composed of PIC microcontrollers. Its main function is to process information and control the various components of the vehicle terminal, and perform corresponding operations according to the requirements of the communication protocol. This system uses the PIC18F458 microcontroller produced by Microchip, which has the following advantages:

1) 2MB Flash program memory;
2) 4kB EEPROM data memory;
3) 10MIPS execution speed;
4) CAN bus module;
5) Low power consumption: no more than 2mA when working at 4MHz clock; power consumption can be less than 1μA in sleep mode.
6) Strong driving ability: the maximum value of each I/O pin's absorption and output current can reach 25mA and 20mA respectively, which can directly drive light-emitting diodes LED, optocouplers or micro relays, etc.

GPS receiving moduleGPS
receiving module is the GPS receiver, which is the user terminal of the GPS global positioning system and one of the three major components of the global positioning system. The vehicle terminal uses it to achieve the positioning function. This system uses GAERMIN's GPS-OEM product, which has 12 channels, that is, it can track up to 12 GPS satellites at the same time, so that it can quickly locate. GARMIN's GPS receiver has very low power consumption and a data update rate of once per second. Its excellent performance can fully meet the sensitivity requirements of land navigation.

Considering that the microcontroller input/output is TTL level, and the OEM board output is RS232 standard serial interface, which uses EIA level, it is necessary to add a TTL-EIA dual-level conversion circuit. This system uses a new RS232 conversion chip MAX232, which has a voltage multiplier circuit and a conversion circuit inside. It only needs a 5V power supply to work, so it is very convenient to use. The connection method is shown in Figure 2. Since the OEM board refreshes once a second, in order to improve the CPU utilization, UART (universal asynchronous receiver/transmitter) is used to realize serial-parallel data conversion in serial asynchronous communication, which will also greatly improve the CPU utilization.


GSM communication module
GSM communication module is an important part of the vehicle terminal, which is responsible for the communication between the vehicle terminal and the monitoring center. This system uses the GSM modem TC35 module produced by Siemens, which provides RS232 data interface, uses AT commands, and complies with ETSI's GSM0707 and GSM0705 standards. The module and the microcontroller system are connected through a 40-pin data cable. The data interface of the TC35 module is CMOS level, so the microcontroller needs to perform level conversion for the control and communication of the TC35 module. In this system, the microcontroller serial port completes the level conversion and connects to the TC35 module through the OC gate 7404 chip. The interface between the microcontroller and the TC35 module is shown in Figure 3. [page]



The TC35 module supports 8 data bits, 1 stop bit, and no parity bit. The transmission rate can be adaptive between 4.8kbit/s and 115kbit/s. For the control of the TC35 module, the IGT signal is very important. Only the correct IGT signal can make the TC35 module operate normally. The falling edge of IGT starts TC35, and the low level of IGT should be maintained for at least 100ms, and then TC35 works normally.

CAN bus communication control module
The CAN bus communication control module mainly completes the communication between the vehicle terminals. Since the CAN bus interface can communicate in a noisy environment, the reliability of data transmission is guaranteed. The PIC18F458 integrates a CAN bus communication controller, which executes the CAN210A/B protocol specified by Bosch. It contains a complete CAN system. The CAN bus module consists of protocol driver and information buffer and control. The CAN protocol drives all functions of receiving and sending information on the CAN bus. The information is first loaded into a corresponding data register and sent. The status and error information can be checked by reading the corresponding register. Any information detected on the CAN bus must be error checked and then compared with the filter to determine whether it should be accepted and stored in one of the two receiving registers. Figure 4 is a connection diagram between the CAN bus driver PCA82C250T and the microcontroller. The PCA82C250T is a CAN bus driver from PHILIPS. It converts the TTL level of the PIC18F458 CAN controller output pin into a differential signal on the CAN bus. There is a 120Ω matching resistor between the 2nd and 7th pins of the J12 plug. On the CAN bus, generally, a 120Ω matching resistor needs to be connected to the CAN connectors at both ends, but not in the middle.


Vehicle terminal controller software programming

The software of the vehicle terminal controller mainly completes three tasks: system initialization, cyclic processing of navigation messages received by GPS; communication between the microcontroller and TC35 and the transmission of GSM information; processing the transmission and reception of CAN bus data. These tasks are completed in two parts in the program, namely the main program and the interrupt program. The main program mainly completes the initialization of the system, the transmission of CAN bus data, the transmission of GSM information, the calculation of train mileage, etc.; the interrupt program mainly completes the reception of GPS information and the reception of CAN bus data. The keyboard detection adopts the query method. The software is programmed in C language. The main program flow chart is shown in Figure 5.


After the system is started, the corresponding variables and modules must be initialized first, the train mileage data stored in the EEPROM must be read out and displayed, and then it is detected whether any key is pressed. The keyboard mainly completes three tasks: display setting, starting CAN bus data transmission and GSM information transmission. The reception of GPS information adopts interrupt mode. The system receives one GPS message per second, reads the train speed from the GPS information, multiplies the train speed by the train travel time (1s), and obtains the train mileage within 1s and accumulates the journey. To ensure the security of the data, the train mileage data stored in the EEPROM is refreshed once every 1km the train travels.

In the main control vehicle terminal, the transmission of CAN bus data adopts the keyboard trigger mode. The information is automatically sent from the CAN controller to the CAN bus by the CAN controller. The sending program only needs to send the information to the CAN send buffer and then start the send command. The reception of CAN bus data adopts the interrupt mode. When the system generates a CAN interrupt, the information is automatically sent from the CAN bus to the CAN receive buffer by the CAN controller. The receiving program only needs to read the information to be received from the receive buffer.

Conclusion

In this system, the relative error of the travel measurement mainly depends on the speed of the train. Through a large number of experiments, it can be concluded that when the train speed is greater than 10km/h, the relative error of the travel measurement of this system is less than 2%. Generally speaking, the speed of the train is often higher than 10km/h. Therefore, the relative error of the travel measurement of this system will not be greater than 2%, which fully meets the design requirement that the relative error of measurement should be less than 3%.

The design of this system fully meets the accuracy and reliability requirements of train travel measurement, and not only realizes the automatic recording of train travel, but also realizes the unified monitoring and management of each train. It solves the drawbacks of the existing train travel recording method and provides a new method for measuring and managing train travel. By timely and accurate recording and monitoring of train mileage, it ensures that each train can be repaired in time, providing a guarantee for the safe operation of the train. This system utilizes the current relatively mature GSM cellular digital mobile communication system and GPS global positioning system, and has the advantages of low cost, simple structure, strong anti-interference ability and high reliability, so it has broad application prospects.

Keywords:GSM Reference address:Research on Train Distance Measurement System Based on GSM, GPS and CAN Bus

Previous article:Application of CAN bus in online detection system of high voltage switch cabinet in substation
Next article:Design and research of air conditioning measurement and control system based on fieldbus

Recommended ReadingLatest update time:2024-11-16 17:43

51 single chip GPS + sim800c GSM positioning SMS LCD1602 LCD display program
sim800c+GPS chip is a small design for practice, a little ugly. Attached is the program and the principle PCB diagram. It is   my first post, please forgive me if it is not good. Button function: one button alarms, buzzer sounds, another button sends a text message to the specified mobile phone, the mobile phone num
[Microcontroller]
51 single chip GPS + sim800c GSM positioning SMS LCD1602 LCD display program
Car anti-theft system based on GPS and GSM network
0 Introduction     With the advent of the new era, cars have developed rapidly as an important means of transportation. At the same time, the number of car thefts has also increased. However, most of the car anti-theft systems on the market have certain limitations. Therefore, network anti-theft systems with high rel
[Microcontroller]
Car anti-theft system based on GPS and GSM network
Narrow frequency shift digital discriminator circuit detects differential GPS correction signals
The differential correction signal is sent to the GPS signal (DGPS) through a low-frequency (285~325kHz) transmitter, and the transmission data rate is 100bps or 200bps. This modulation is minimum shift keying (MSK), which produces a pseudo frequency shift keying (FSK) with a carrier offset of half the bit rate. For
[Analog Electronics]
Vehicle GPS Positioning Information Collection System Based on ARM9 and WindowsCE
GPS can provide continuous, high-precision, real-time time reference, three-dimensional position, three-dimensional velocity, integer ambiguity and other data. It has the characteristics of good performance and high accuracy. Therefore, it is widely used in military and civilian fields such as GPS carrier phase atti
[Microcontroller]
Vehicle GPS Positioning Information Collection System Based on ARM9 and WindowsCE
A Brief Discussion on GSM ORFS Output Spectrum Test
    Recently, many customers have consulted MORLAB about GSM output spectrum testing. For most friends who are not familiar with this test, the output spectrum test has many items, the test method is relatively complicated, and the test results are not easy to understand. Combining many years of mobile phone testing ex
[Test Measurement]
A Brief Discussion on GSM ORFS Output Spectrum Test
GPS module (G28U7FTTL) (1) - communicating with the microcontroller
The reason why we designed this module is that we want to conduct a practical training for students, which originated from a practical project of a colleague: an automatic speed-controlled seeder. The principle is to install the GPS module on the seeder, and then adjust the sowing speed of the seeder according to the
[Microcontroller]
GPS module (G28U7FTTL) (1) - communicating with the microcontroller
Design of GPS Positioning System Based on 51 Single Chip Microcomputer
1. Hardware Solution This design is mainly to produce a GPS locator based on 51 single-chip microcomputer. According to the design requirements, the hardware part is mainly designed by 51 single-chip microcomputer + GPS positioning module + LCD12864 liquid crystal + LED indicator light + 3.3V voltage regulator circuit
[Microcontroller]
Design of GPS Positioning System Based on 51 Single Chip Microcomputer
Analysis of electromagnetic compatibility test for mobile communication terminal products
0 Introduction With the widespread use of electronic devices, equipment, and terminals, people are paying more and more attention to the surrounding electromagnetic environment. The safety issue of electromagnetic radiation has aroused vigilance around the world. Since the European Community Commission issued D
[Test Measurement]
Analysis of electromagnetic compatibility test for mobile communication terminal products
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号