Abstract: This paper introduces the design of a remote monitoring system for engineering vehicles based on GPS/GPRS technology and CAN bus. The system consists of a CAN bus module, a GPS module, and a GPRS module. Using a C8051F040 microcontroller as the main controller, the system monitors, displays, records, and alarms the working status of engineering vehicles through GPS positioning and CAN bus data acquisition. Data is uploaded to the network in real time via the GPRS module, enabling monitoring and dispatch management at the monitoring center.
Keywords: GPRS technology; CAN bus; engineering vehicles; monitoring system
CAN bus of engineering vehicles monitoring system
based on GPS/GPRS technology
Abstract: A CAN bus engineering vehicles monitoring system based on GPRS technology was introduced. It is composed of CAN bus module, GPS module and GPRS module. The system takes C8051F040 as master controller, it gets position by GPS module and achieves data acquisition through CAN bus. Then, it achieves engineering vehicles working condition monitoring, display, recording and alarm. And uploads real-time data to network through the GPRS module, and achieves the monitoring and dispatch purposes in the control center.
Key words: GPRS technology; CAN bus; Engineering vehicle; Monitoring system
0 Introduction
With the rapid development of industrial modernization, the types of engineering vehicles are increasing, and their functions are becoming more powerful. Engineering vehicles play a crucial role in engineering construction, but their operating conditions and circumstances are complex and varied, and the harsh working environment greatly increases the failure rate. How to remotely monitor the operating parameters of engineering vehicles and scientifically command and dispatch them through various advanced technologies is an important research topic in the engineering vehicle industry, and it has significant practical implications.
1. System Overall Structure
The CAN bus remote monitoring system for engineering vehicles proposed in this paper acquires vehicle operation information through the CAN bus of the on-board electronic control unit (ECU) and uses GPRS wireless network communication to remotely monitor and manage the vehicle.
The architecture of the remote monitoring system for engineering vehicles mainly consists of a control center and vehicle-mounted mobile terminals. The vehicle-mounted terminal equipment acquires real-time vehicle operating parameters via a CAN bus interface module, merges this with GPS positioning information, and then transmits this data to the monitoring center via GPRS. The control center parses the received data and displays the specific location and other parameter information of each vehicle on the screen in real time. Simultaneously, the control center transmits corresponding control commands based on the specific conditions of each vehicle, enabling remote real-time control of the vehicles. Figure 1 shows a physical diagram of the overall system.
2 Hardware Design
The system uses C8051F040 as the core module, combined with GPS module, GPRS communication module, CAN bus module, storage module and power supply module to monitor, display, record and alarm the operating status of engineering vehicles. The system structure diagram is shown in Figure 2.
2.1 Microcontroller Module
This system uses the C8051F040 microcontroller from Xinhualong Technology Co., Ltd. as its core control unit. This chip has an instruction core fully compatible with the MCS-51 , employs pipelined processing technology to improve instruction execution efficiency, integrates JTAG for in-system programming, and uses a low-voltage power supply ( 2.7–3.6 V) . Since the onboard power supply of the engineering vehicle is 24V , a power conversion module is necessary to convert it to the voltage required by the various modules of the system. It features multiple bus interfaces, including two UART ports that enable full-duplex communication with separately configurable baud rates, which can be used for GPS signal reception and GPRS communication respectively.
Furthermore, its integrated CAN controller conforms to the CAN 2.0B protocol, features 32 message objects, each with an independent address, configurable for sending or receiving data, and operates at a bit rate of up to 1 Mbps . The CAN bus controller is used to communicate with the ECU of the engineering vehicle to obtain real-time operating and fault data. Therefore, selecting this chip allows for full utilization of existing functionalities and significantly simplifies the design of the system's peripheral circuitry.
2.2 GPS Positioning Module
The remote monitoring system for engineering vehicles uses the GS-87 as its GPS module, a high-efficiency, low-power intelligent satellite receiver module. The GS-87 operates at 3.3V and can be directly connected to a microcontroller for serial communication. Compliant with the NMEA_0183 standard, the GS-87 achieves a positioning accuracy within 10 meters, meeting the vehicle positioning requirements. The microcontroller connects to the GS-87 via a serial port and processes the information received from the GPS through programming, extracting the necessary information for communication with the monitoring center and storing it in an external memory module.
2.3 GPRS Communication Module
The engineering vehicle remote monitoring system uses MC55I as the GPRS module, which is an important part of establishing communication between the vehicle mobile terminal and the monitoring center [2] . Its advantages are permanent online and fast data storage. Its GPRS is billed by traffic and the working voltage is 3.3 to 4.8V. The module has an embedded TCP/IP protocol stack and is connected to the microcontroller through a serial port. The microcontroller uses AT commands to control the GPRS module to communicate with the monitoring center server. The vehicle mobile terminal's GPRS module sends real-time vehicle information to the monitoring center and receives instruction information from the monitoring center.
2.4 CAN Bus Module
2.4.1 CAN Controller
The C8051F040 microcontroller used in this system has integrated a CAN2.0B controller. It is only necessary to perform corresponding programming operations on its registers to set its working mode, control its working state, and send and receive data [3] .
2.4.2 CAN Transceiver
The C8051F040 integrates a CAN controller. To enable the CAN bus to run, a CAN transceiver needs to be connected to the microcontroller for electrical conversion, converting the logic level into a balanced differential code. The commonly used CAN transceiver is the TJA1050 produced by PHILIPS. To prevent external strong electrical signals from affecting the system, the microcontroller and the TJA1050 are connected after isolation by an opto-isolator 6N137. Capacitors and resistors must be added to the two ends of the CAN bus to absorb the signal and avoid signal reflection [4] .
2.4.3 Data transmission line
Currently, there are two CANs on the vehicle. One is a high-speed CAN for the drive system with a speed of 500kb/s; the other is a low-speed CAN for the body system with a speed of 100kb/s. They are bidirectional and transmit the same data, and are called CAN high line and CAN low line respectively. The drive system CAN mainly connects to: engine controller (ECU), automatic transmission controller, anti-lock braking controller (ABS), brake slip controller (ASR), airbag controller (SRS), active suspension controller, cruise control controller, electric steering system controller and instrument cluster signal acquisition system, etc., which are all systems directly related to controlling the driving of the vehicle. They have strong real-time, continuous and high-speed requirements for signal transmission. The body system CAN mainly connects to: front and rear light control switches, electric seat control switches, central door lock and anti-theft control switches, electric rearview mirror control switches, electric window lift switches, air conditioning control switches, etc. They do not have high real-time requirements for information transmission, but there are many of them [5] . Figure 3 shows the schematic diagram of the CAN bus communication module.
3 Software Design
3.1 CAN bus interrupt transceiver task
According to the configuration of most automotive CAN buses, the terminal's CAN bus is also configured with a rate of 250K and works in the basic CAN mode. The CAN bus receives data using an interrupt method. The interrupt program puts the received data into a receiving data buffer that can hold 10 frames. The CAN bus task scans the buffer and retrieves all the data in the buffer for processing. The CAN bus generally transmits short frames of fixed length of 8 bytes. Each frame of data is accompanied by an ID number, and different data frames are distinguished according to different ID numbers. Generally speaking, the ECU will send several data frames with different ID numbers at one time. According to the manufacturer's data frame protocol, real-time vehicle operating data and fault alarm data can be obtained from them, including: water temperature, oil temperature, oil level, oil pressure, engine speed, vehicle tilt, alarm value, etc. At the same time, messages are sent to each node [6] . The flowchart of the CAN bus interrupt transmission and reception task is shown in Figure 4.
3.2 Main Program Tasks
After powering on the vehicle terminal, the initialization of each module and interrupt activation begin. The GPS starts acquiring positioning information, and the microcontroller processes the received data and merges it with the real-time vehicle operation information acquired by the CAN bus task to form a data frame. Once the system is running, the GPRS communication task starts logging into the network via AT commands and remains online. It then prepares to receive data transmission requests from other tasks and sends data to the remote server. The remote server parses the data according to the communication protocol and sends it to the database. Remote users can browse the database content through a web page, thereby monitoring and managing the engineering vehicles. The main program flowchart is shown in Figure 5.
4. Conclusion
The system employs a modular hardware design, significantly improving hardware reliability. Its software also utilizes modular programming, facilitating system maintenance and upgrades. By integrating GPS positioning and GPRS wireless network communication technologies with the vehicle's CAN bus, the system effectively and in real-time displays the location and operational status of engineering vehicles on remote Internet terminals, ensuring the effectiveness, timeliness, and security of synchronous monitoring. Practical application testing has demonstrated excellent operational performance, indicating significant potential for widespread adoption and application.
References
[1] Miao Binbin, Yin Chenbo, Wang Renqun, Zhang Song. Safety monitoring system for tower cranes using CAN bus with GPRS technology [J]. Modern Manufacturing Engineering, 2011(8).
[2] Fu Qiangsong. Design of a remote data acquisition system based on wireless mobile network [J]. Information and Electronic Engineering, 2007(10).
[3] Rao Yuntao. Fieldbus CAN Principles and Application Technology [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2007.
[4] Chen Gang. Design and implementation of remote real-time monitoring and positioning scheduling system for engineering vehicle operating parameters based on ARM [J]. Information Technology and Informatization, 2008(1).
[5] Tong Changfei. Development of C8051F Series Microcontrollers and C Language Programming [M]. Beijing University of Aeronautics and Astronautics Press, 2005: 252-253.
[6] Zhu Jianliang, Wang Xingquan. Terminal design of remote management and diagnostic system for engineering vehicles [J]. Journal of Chinese Inertial Technology, 2007, 15(3).
Author Information: Xiao Wei, male, born in 1987, is a master's student specializing in intelligent detection and fault diagnosis.
Phone: 15135153298 Email: [email protected]
Address and Postal Code: P.O. Box 474, School of Electronic and Information Engineering, Taiyuan University of Science and Technology, Walu Road, Wanbailin District, Taiyuan City, Shanxi Province, 030024