Design of vehicle monitoring system based on CAN_GSM

Publisher:SereneMeadow7Latest update time:2016-12-28 Source: eechinaKeywords:CAN Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

In recent years, with the rapid development of China's economy and the rapid growth of the number of cars and drivers, the number of road traffic accidents has remained high, and the road traffic situation has become increasingly complex and worse. Mass deaths and injuries occur frequently, which has a great impact on people's life safety and family happiness. Therefore, it is particularly important to strengthen vehicle management. Traffic safety is mainly guaranteed by two aspects: one is that the vehicle has a good condition, and the other is the driver's standardized operation. Therefore, how to monitor and manage vehicles and standardize driver operations is an urgent problem that needs to be solved.

The car driving recorder, also known as the "car black box", is a digital electronic recording device that records and stores the vehicle's driving speed, time, mileage and other status information related to the vehicle's driving, and can output data through an interface. However, the driving recorder cannot transmit the vehicle's operating status to the monitoring center in real time, which belongs to post-event supervision, so it plays a limited role in preventing traffic safety accidents. The vehicle monitoring system based on GPS /GSM can obtain the vehicle's location, speed and other information in real time, providing an effective way for real-time monitoring of vehicles. However, GPS cannot obtain important vehicle condition information such as air pressure, water temperature, and speed, so the monitoring of the vehicle lacks comprehensiveness.

The vehicle monitoring management system based on CAN/GSM is developed for cars with CAN bus . The vehicle monitoring equipment of this system first obtains detailed vehicle condition information from the vehicle's CAN interface, and then communicates with the monitoring center based on China's most mature and widely used GSM mobile communication system to achieve comprehensive, dynamic, and real-time monitoring of the vehicle. Using the CAN bus , not only can comprehensive and detailed vehicle condition information be obtained, but also the system has strong scalability. For example, the GPS module can be connected to the bus as an intelligent node of CAN, so that the system has the ability to monitor the vehicle's location.

1 CAN bus technology

In order to realize the communication between the huge electronic control devices in modern cars and reduce the increasing signal lines, the bus must be used for information transmission. The CAN (Controller Area Network) bus is a relatively advanced and excellent field bus technology that is popular today. It is a serial data communication protocol developed by Bosch in Germany in the early 1980s to solve the data exchange between numerous control and test instruments in modern automobiles. It is a multi-master bus. The communication interface integrates the physical layer and data link layer functions of the CAN protocol and can perform frame processing on the communication data. CAN ensures the dynamic number of nodes in the network by encoding the communication data block, and enables different nodes to receive the same data at the same time. The data segment length is up to 8 bytes, which ensures the real-time nature of the communication; and the protocol uses CRC check to provide corresponding error handling functions to ensure the reliability of data communication. Since the CAN technical specification only includes the description of the physical layer and data link layer, and does not define the functions and implementation of the application layer, users can either use the open high-level protocol developed by the International CAN Bus User and Manufacturer Association or some other organizations, or flexibly implement their own application layer in the project. In more than ten years of application, CAN has been widely used in the interconnection of industrial process monitoring equipment with its extremely high reliability, real-time and flexibility. It has been supported by more than 100 internationally renowned companies such as Intel, Motorola, Philips, and Siemens, and is recognized as one of the most promising field buses. This system uses the above characteristics of the CAN bus to reduce the wiring harness in the car and solve the communication problem between many nodes.

2 Design of vehicle monitoring and management system

2.1 System design

This vehicle intelligent monitoring system uses CAN bus technology to collect various information of the vehicle, such as the start time, mileage, driving time, maximum speed and duration of each maximum speed of the vehicle, and stores the vehicle information 20 seconds before parking. Then use the existing GSM network to transmit the information to the monitoring center in the form of short messages to achieve real-time monitoring of the vehicle.

1.gif 

2.2 Hardware design

The main control chip of the vehicle monitoring equipment uses the 16-bit single-chip microcomputer MC9S12HZ developed by Freescale for automotive electronic applications . The main resources related to the vehicle monitoring equipment include: 32~256K Flash, 2~12K RAM and 1~2K EEPROM; 2 CAN controllers compatible with CAN2.0A and B with a rate of up to 1Mb/s; 2 full-duplex asynchronous serial communication interfaces; 32×4 segment LCD driver. The hardware connection diagram of the vehicle monitoring equipment composed of MC9S12HZ is shown in Figure 2. In terms of the interface with the CAN bus, we use the high-speed CAN transceiver  TJAl050 of NXP. In order to improve the electrical EMC and ESD performance, the common mode choke L40 and ESD protection diode D39 are also added to the circuit . The GSM module uses a two-door TC35i, which is connected to the external controller through a 40-pin ZIF (Zero Insertion Force) interface. The monitoring system only uses the SMS service of the GSM network, so the main control chip and TC35i only need two pins, TXD and RXD. The main controller MC9S12HZ controls TC35i through AT commands. The microcontroller and TC35i communicate through the serial port. The automatic baud rate range supported by TC35i is 1200~230400B/s. We choose a baud rate of 9600B/s. According to the TC35i manual, its serial interface requires CMOS level, while MC9S12HZ is TTL level, so a level conversion circuit is required, as shown in Figure 2. The monitoring center consists of a PC and a TC35i module, and the level conversion between them is completed by the level conversion chip MAX232. 2.3 Software Design There are many vehicle operating parameters transmitted on the CAN bus, and the amount of data is large. However, the transmission speed of the SMS service of the GSM network is limited, so it is impossible to transmit all the information on the CAN bus back to the monitoring center. In fact, it is not necessary to monitor all vehicle operating parameters. It is enough to monitor some parameters that we are most concerned about and are most closely related to driving safety. For different parameters, the monitoring form is different. Some information needs to be monitored regularly, such as vehicle location information, while some information only needs to be sent when it exceeds the normal range, such as vehicle speed or rotation speed information. In addition, for different models, the parameters that need to be monitored are also different; or for the same parameter, under different circumstances, its monitoring form and monitoring range will also change. Therefore, it is required that the vehicle-mounted monitoring equipment can dynamically change the monitoring parameters and monitoring form.



2.gif 











In order to realize dynamic monitoring of the vehicle, a monitoring list is established in the controller of the vehicle monitoring device. Each item in the list contains the parameter group number PGN, the position of the monitoring parameter in the PGN, the monitoring form, the monitoring time interval and the monitoring parameter range. The items in this parameter list can be dynamically added or deleted according to the command sent by the monitoring center, so as to realize dynamic monitoring of the vehicle. The

main program flow of the vehicle monitoring device software is shown in Figure 3. The serial communication transceiver program and the CAN bus listening program are placed in the interrupt program. When the corresponding command or data is received, the data is placed in the buffer and the corresponding flag bit is set. The main program performs the corresponding action by querying these flag bits. The main program first reads the default temporary control list stored in the on-chip EEPROM, and sets the CAN ID message identifier filter and mask register of MC9S12HZ according to the PGN in the monitoring list. The program can modify the monitoring parameter list according to the command, and decide whether to change the default temporary control list in the EEPROM according to the command. When the PGN to be monitored has new data, it is necessary to determine whether the data meets the sending conditions, including whether the timing interval has arrived, whether the monitoring variable value exceeds the normal range, etc. If the sending conditions are met, the PGN and its corresponding data are added to the sending list.

3.gif 

3 Conclusion

This system uses CAN bus technology to obtain various detailed information of the vehicle, and uses the GSM network to communicate with the monitoring system. It not only realizes the dynamic setting of vehicle monitoring parameters, but also makes it easy to expand the monitoring object by adding CAN intelligent nodes due to the adoption of CAN bus technology. This greatly improves the flexibility and comprehensiveness of the monitoring system. At the same time, the GSM short message service is used for data transmission, which is simple to connect, low cost and wide coverage.

Keywords:CAN Reference address:Design of vehicle monitoring system based on CAN_GSM

Previous article:Briefly describe the design and implementation of wireless vehicle terminal player
Next article:Design of vehicle fault diagnosis instrument based on CAN bus

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

Design and implementation of embedded network control node based on CAN bus
introduction     In recent years, networked control systems based on various bus standards have been widely used in the field of industrial control. Networked control systems use a completely decentralized control node structure, which gives a large part of the control power to the intelligent nodes at the control sit
[Microcontroller]
Design and implementation of embedded network control node based on CAN bus
STM32F103xx bxCAN (Basic Extended CAN) filtering mechanism
1. Background         A recent project requires the use of STM32F103xx to implement CAN communication, and the message filtering of the CAN bus has different mechanisms on each MCU.     For example, SJA1000 is an identifier bit mask filtering mechanism, NXP's LPC17xx series is an identifier list query mechanism, etc.
[Microcontroller]
STM32F103xx bxCAN (Basic Extended CAN) filtering mechanism
STM32 CAN communication filter configuration summary
First of all, I would like to state that the stm32 manual is too painful to read. I didn't understand it after reading it for a long time. Later, I read it again based on my practice and finally understood it a little. I would also like to thank the blog posted by netizens. The following content is reproduced: 1. In
[Microcontroller]
STM32 CAN communication filter configuration summary
dsPIC30F6014 controls DS18B20 temperature + CAN bus sending program
dsPIC30F6014 controls DS18B20 temperature + CAN bus sending program // 1. DS18B20 collects temperature regularly // 2. The temperature collection time interval is controlled by T1 timer // 3. The collected temperature is sent to another host for processing via the CAN bus   #include p30f6014.h //dsPIC30F6014 standar
[Microcontroller]
New Energy Vehicle CAN Bus and Power Analysis Synchronous Test Solution
CAN bus is a very important communication bus in new energy vehicles . Engineers often use CAN bus to read vehicle speed, rotation speed, torque and other signals. But do you know that CAN bus can also be used to read the power signal actually tested by the power analyzer? For engineers, the future test metho
[Automotive Electronics]
New Energy Vehicle CAN Bus and Power Analysis Synchronous Test Solution
Design of an integrated two-phase stepper motor driver based on CAN bus
0 Introduction At present, stepper motors have been widely used in industrial applications, such as automatic wire stripping machines, industrial robots, engraving machines, and hair transplanting machine workbenches, which involve precise positioning. The commonly used stepper motor control system consists of a
[Microcontroller]
Design of an integrated two-phase stepper motor driver based on CAN bus
A detailed introduction to the automotive CAN bus anomaly detection method based on machine learning
At present, machine learning is a hot research direction in vehicle network intrusion detection technology. By introducing machine learning algorithms to identify network messages on the vehicle bus, intrusion detection of known/unknown threats to the vehicle can be achieved. This anomaly detection technology based
[Embedded]
A detailed introduction to the automotive CAN bus anomaly detection method based on machine learning
Research on communication monitoring system of parallel inverter power supply based on CAN bus
The modular parallel operation of inverter power supplies can greatly improve the flexibility of the system and break the limitation of inverter power levels. Users can combine the power of the system according to their needs. At the same time, it is easy to realize redundant design, so it has the advantages of high
[Embedded]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号