Company News

Industry News

602030 lipo battery.Ni-MH battery management system based on CAN bus


The battery pack is composed of a certain number of single cells connected in series. It can be charged and discharged hundreds to thousands of times. During use, you must pay attention to the various characteristics of each single cell, battery temperature, remaining battery capacity and total battery life. Current and other parameters, because these parameters directly affect the service life of the battery, must be optimized operation and effective monitoring to prevent the battery from problems such as overcharge, over-discharge, and excessive temperature, thereby extending the service life of the battery and reducing costs, especially improving Battery reliability. The electronic, control and digital technologies supporting the battery pack can be called digital "battery electronics technology". Similarly, in the electronic and digital technology of automobiles, multiple CPUs have been used to complete the control of various parameters and functions. Considering the safety of the automobile, the operation must be very reliable, so the parallel battery pack is developed, which is composed of a certain number of single cells. Composed in series, it can be charged and discharged hundreds to thousands of times; during use, you must pay attention to the various characteristics of each single cell, battery temperature, remaining battery capacity and total current parameters, because these parameters directly affect the battery The service life of the battery must be optimized and effectively monitored to prevent problems such as overcharging, over-discharging and excessive temperature of the battery, thereby extending the service life of the battery and reducing costs, especially improving the reliability of the battery. The electronic, control and digital technologies supporting the battery pack can be called digital "battery electronics technology". Similarly, in the electronic and digital technology of automobiles, multiple CPUs have been used to complete the control of various parameters and functions. Considering the safety of the automobile, the operation must be very reliable, so parallel connection was developed.

1 Introduction

With the rapid development of high technology and its industry, battery pack energy systems with large storage capacity have attracted more and more attention and have been widely used in many fields, such as in the new direction and hot spot of the development of the automobile industry - —In the research and industrialization of electric vehicles and hybrid vehicles, they will serve as the main supplier of on-board energy.

The battery pack is composed of a certain number of single cells connected in series. It can be charged and discharged hundreds to thousands of times. During use, you must pay attention to the various characteristics of each single cell, battery temperature, remaining battery capacity and total battery life. Current and other parameters, because these parameters directly affect the service life of the battery, must be optimized operation and effective monitoring to prevent the battery from problems such as overcharge, over-discharge, and excessive temperature, thereby extending the service life of the battery and reducing costs, especially improving Battery reliability. The electronic, control and digital technologies supporting the battery pack can be called digital "battery electronics technology". Similarly, in the electronic and digital technology of automobiles, multiple CPUs have been used to complete the control of various parameters and functions. Considering the safety of the automobile, the operation must be very reliable, so a parallel independent multiple system structure has been developed, and then the on-site Bus connections form a unified large system.

2 Distributed structure management system

2.1 System structure

The system needs to realize multiple functions of different types. The centralized or central processing method cannot meet the security requirements, so it is natural to adopt a distributed structure. The working environment of the system is harsh, and it is often under the interference of strong electromagnetic interference and pulse current. In order to ensure reliability Therefore, the high-performance CAN fieldbus was considered to be adopted and developed as the communication system; and the CAN bus has been used in automobiles for a long time and has strong anti-interference properties. At the same time, the technology is relatively mature and has become the standard for automobile communication. Therefore, the CAN bus is used to realize the internal communication of the system and the external communication.

This distribution system is designed using CPU80C552 as a common module platform. Due to the limited storage space and operation of the CPU, multiple CPUs must be used to implement various functions required by the management system. The completed basic system is composed of four modules in parallel: data collection, balanced charging, power estimation and communication display; each module realizes its function respectively, and communicates data through the CAN bus, which can realize single battery voltage, total voltage, charge and discharge current, Temperature collection and measurement, power estimation. At the same time, the system is also highly scalable and can conduct research and development on specific battery diagnosis and battery safety performance protection functions. In the lithium battery management system, 108 batteries use 9 measurement main boards, plus 4 basic boards, for a total of 13 boards.
Figure 1 Overall structure diagram of battery management system

2.2 Design of the main module of the management system

The main functions of the system include data collection, power estimation and display diagnosis. Since the 80C552 has an 8-channel 10-bit A/D conversion function, the acquisition module first uses the linear optocoupler method to measure the voltage of the single cell, and converts the analog quantity into a digital quantity through its 4 A/D ports and stores it in the memory. The measurement uses single bus technology and uses a Dallas digital chip to measure the temperature. The chip has a 12-bit accuracy level and can measure the temperature of the system very accurately. The total voltage and current signals are converted into 0~10V signals through special sensors, and then converted into digital quantities through a 14-bit A/D conversion device and stored in the system.

The communication and display module provides dual CAN communication interfaces, which can transmit data with each module in the system and the external vehicle system through CAN; at the same time, the system provides an RS232 interface, which can communicate with a PC; the module also provides a 5-inch semi-LCD display Drive function, and buttons for human-machine-friendly operation; the module also has upper and lower limit alarms and self-test functions for voltage, power, current, and temperature to ensure the safety of the system.

The basic structural block diagram of each system module is shown in Figure 2.
Figure 2 Module structure diagram

2.3 Electricity estimation

The power estimation uses the ampere-hour method of real-time current integration for basic estimation, and then corrects various parameters such as temperature, self-discharge, and aging that affect the battery power, and takes into account the inconsistency between individual cells to obtain an accurate battery pack. power.
Figure 3 Battery power estimation block diagram

3 CAN bus system

3.1 Introduction to CAN

CAN bus is a type of field bus. It is a serial high-speed data communication bus developed by the German Bosch Company in 1986 to solve the data exchange between numerous control and test instruments in modern automobiles. It adopts the physical layer and data link layer in the seven-layer structure of the ISO/OSI model, and has high reliability, real-time performance and flexibility.

CAN bus has the following unique advantages:

1) CAN can work in a multi-master mode. Any node on the network can send information to other nodes on the network at any time, regardless of master and slave, and the communication method is flexible;

2) CAN can transmit and receive data in point-to-point, point-to-multipoint and global broadcast modes. The communication medium adopts twisted pair, coaxial cable or optical fiber. The choice is flexible. The communication distance can be up to 10km/5kb/s. Communication The speed can reach up to 1Mb/s/40m. The number of nodes on CAN depends on the bus driver circuit, and can actually reach 110;

3) In the case of serious errors, the CAN node has the function of automatically turning off the output and cutting off its connection with the bus so that other operations on the bus are not affected. Adopt NRZ encoding/decoding method and use bit filling technology. The user interface is simple, programming is convenient, and it is easy to configure a user system;

4) CAN uses non-destructive arbitration technology. When two nodes transmit information to the network at the same time, the node with lower priority actively stops sending data, while the node with higher priority can continue to transmit data without being affected, effectively avoiding the bus conflict.

5) CAN adopts a short frame structure, each frame is 8 bits, the transmission time is short, and the probability of interference is low. Each frame of information has CRC check and other error detection measures to ensure that the data error rate is extremely low.

3.2 CAN bus design

The overall structure of the CAN bus is shown in Figure 4. Two 120Ω resistors are configured at both ends of the bus. Their function is to match the bus impedance, which can increase the stability and anti-interference ability of the bus transmission and reduce the error rate in data transmission. The CAN bus node structure is generally divided into two categories: one type uses a CAN adapter card to connect to the PC to realize communication between the host computer and the CAN bus; the other type is composed of a single-chip microcomputer, a CAN controller and a CAN driver. The node performs data transmission with the CAN bus. In this system, the CAN controller uses SJA1000 and 82C200 produced by Philips Company, which serves as a sending and receiving buffer to realize data transmission between the main controller and the bus; the CAN transceiver uses the PCA82C250 chip, which is the CAN controller The interface with the physical bus mainly provides differential sending capabilities to the bus and differential receiving capabilities to the CAN controller.
Figure 4 CAN bus system structure diagram

4 Software design of CAN bus

The three-layer structure model of the CAN bus is: physical layer, data link layer and application layer. The functions of the physical layer and data link layer are completed by SJA1000. The development of the system mainly focuses on the design of the application layer software. It mainly consists of three subroutines: initialization subroutine, sending data and receiving data program. At the same time, it also includes some data overflow interrupts and frame error processing.

After the SJA1000 is powered on and the hardware is reset, it must be software initialized before data communication can be carried out. The initialization process mainly includes configuring the clock frequency division register CDR, bus timing registers BTR0 and BTR1, acceptance code register ACR, and acceptance in reset mode. The mask register AMR and the output control register OCR are used to define the bus rate, acceptance mask code, output pin drive mode, bus mode and clock division. The specific process is shown in Figure 5. The following is the process of SJA1000 sending and receiving data. The basic process is that the main controller saves the data to the SJA1000 sending buffer, and then sets the send request TR flag of the command register to start sending; the receiving process is that SJA1000 will receive from the bus. The received data is stored in the receiving buffer, and the main controller is notified through its interrupt flag bit to process the received information. After the reception is completed, the buffer is cleared and waits for the next reception. The specific process is shown in Figure 6 and Figure 7.
Figure 5 CAN bus initialization Figure 6 CAN sending data flow Figure 7 CAN receiving data flow


For example: the format of the battery management system sending the total voltage to the vehicle system is listed in Table 1.

Table 1 BCU_VCU_VOLTAGE(0x08) returns the current voltage of the battery pack to VCU
x08) Send back the current voltage of the battery pack to VCU" alt="BCU_VCU_VOLTAGE(0x08) Send back the current voltage of the battery pack to VCU" />

Among them, ID is the address of the receiving node bus, and the voltage value is first multiplied by 10 and rounded before sending. 0x08 means that the content of the sent frame is the voltage of the battery pack.

5 CAN bus application issues

In terms of hardware, reasonable power supply must be considered, and attention must be paid to filtering between the power supply and ground of each CAN device, as well as the design of the reset circuit; at the same time, when actually designing the printed circuit board, reasonable wiring, strengthening the ground wire, and enhancing the system anti-interference property.

In software design, the settings of the CAN bus timer are very critical. BTR0 determines the propagation time period, phase buffer segment 1 and phase buffer segment 2; BTR1 determines the synchronization jump width and frequency division value. In the bit timing register, the values set by TSEG1, TSEG2, SJW and BRP are 1 smaller than their function values, so the setting range is [0...N-1] instead of [1... N]. Therefore, the bit time can be obtained by [TSEG1+TSEG2+3]tq or [synchronization segment+propagation segment+phase buffer segment 1+phase buffer segment 2]tq, where tq is determined by the system clock tSCL and the baud rate prescaler value BRP: tq=BRP /tSCL. At the same time, it should also be noted that since the CAN system clocks of different nodes are provided by different oscillators, there is a tolerance between the actual CAN system clock frequency of each node and the actual bit time. Changes in ambient temperature and oscillator aging affect the starting tolerance. , in order to ensure accurate data transmission, it is necessary to ensure that the CAN system clock frequency of each node is within a specific frequency tolerance limit. Therefore, when selecting an oscillator, the node with the highest requirements for the oscillator tolerance range should be selected. allow. Moreover, in a scalable bus structure, the maximum node delay and the maximum bus length must be considered. In general, the delay is 5.5ns/m.

In actual operation, it is often encountered that the CAN bus is blocked or the bus is suddenly closed. The main reason is that frame loss occurs during the data transmission process, which causes errors. When the error counter reaches a certain level, the bus will be automatically closed. Therefore, During the software design process, the error status ES bit must be judged in time. When an error occurs, the SJA1000 needs to be software reset to restore communication.

6 Conclusion

In the development of the battery management module of electric vehicles under the "863 Major Project", a distributed structure of CAN bus communication is used. The bench test results of nickel-metal hydride battery packs and lithium battery packs show the advancement of the system structure, realizing the independent functions of each module, working normally and reliably, and the number of nodes of the CAN bus of the lithium battery pack system has increased to 12. It can still work normally under strong electromagnetic interference, and the line connection is very simple and practical.

The parameters, measurement methods, number of cells, and safety requirements of the two battery packs are different, and the grouping is also different. However, the systems can effectively adapt, reflecting their good adaptability and greater flexibility.