Design of a distributed control system for battery charging and discharging based on CAN bus

Publisher:colcheryLatest update time:2011-06-08 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction

With the rapid development of high technology and its industry, large storage capacity battery pack energy systems have been increasingly valued by people and have been widely used in many fields such as electric vehicles, high-power UPS, power plant and substation DC systems, and communication systems. The battery pack is composed of a certain number of single cells connected in series, and may be charged and discharged hundreds to thousands of times during use. Overcharging, over-discharging or under-discharging of each single cell can easily cause battery failure, and the failure of a single cell can also cause failure and damage to the entire battery pack. Therefore, online real-time detection of the charging and discharging voltage of each single cell of the battery pack charging and discharging, the temperature rise during charging and discharging, and the charging and discharging current, voltage and other parameters of the entire battery pack, and timely identification of damaged or significantly reduced performance batteries are crucial to extending the service life of the battery, reducing costs, and especially improving the reliability of the DC power supply system. In view of the above situation, we have developed a battery charging and discharging distributed control system , which overcomes the shortcomings of the early centralized collection and detection methods, such as multiple wiring, long lines, waste of manpower and material resources, and easy introduction of interference. At the same time, the CAN bus has multiple master nodes, high reliability and good scalability, which makes the system have better control performance and broad application prospects. System composition and working principle CAN bus introduction





The Controller Area Network (CAN) bus belongs to the category of fieldbus. It is a serial communication network designed by the German company BOSH for distributed systems to operate reliably in strong electromagnetic interference environments. It has the following significant features: (1) It works in multi-master mode. Each node can actively send information to other nodes on the network at any time without distinguishing between master and slave nodes, and no node information such as station address is required. This feature can be used to easily form a multi-machine backup system; (2) It uses a unique non-destructive bus arbitration technology. Nodes with high priority transmit data first, which can meet different real-time requirements; (3) Broadcast data communication, using the CSMA/CD protocol for bus control and data communication. When a node sends data to the Internet, other nodes receive the data at the same time. It has the functions of point-to-point, point-to-multipoint and global broadcast data transmission; (4) High transmission reliability. The number of valid bytes per frame on the bus is up to 8, and there are CRC and other verification measures. The data error rate is extremely low, and when a serious error occurs in a certain node, it can automatically disconnect from the bus so that other operations on the bus are not affected; (5) It is particularly suitable for networked intelligent devices. The maximum speed can reach 1Mbps. At this time, the communication distance is 40m. When the communication rate is 5kbps, the communication distance can be up to 10km. It can be used according to actual needs. The CAN bus has only two wires. When the system is expanded, the new node can be directly connected to the bus. The system is easy to implement redundant design. Therefore, from the perspective of applicability, reliability and low cost, we chose the CAN bus to form the underlying communication network in this system.

The basic structure and working principle of distributed control system

The system consists of a host computer (a general-purpose PC with a CAN interface adapter card), n intelligent voltage, temperature and other data acquisition node units (the specific number depends on the number of single batteries, but not more than 110-2 = 108), 1 on-site intelligent voltage, current monitoring display and alarm node unit and a CAN bus network. The system structure is shown in Figure 1.

Figure 1: Block diagram of distributed control system

Each node in the system is based on the INTEL80C196KC single-chip microcomputer, equipped with the SJA1000 independent CAN controller and PCA82C250 CAN transceiver of PH IL IPS Semiconductor. The dual-port RAMIDT7132 is used as a bidirectional data transmission channel between the PC and the CAN controller. The on-site intelligent voltage and current monitoring display alarm node unit also uses the LCD display module LCM320240ZK and simple keyboard of Beijing Qingyun Innovation Technology Development Co., Ltd. to display the on-site data sent by each intelligent detection node unit and send short PID adjustment and other control commands to each intelligent detection node unit. The intelligent voltage and temperature detection node unit is equipped with corresponding voltage, current, temperature sensors and corresponding processing circuits to complete the collection of voltage, current and temperature signals.

The intelligent voltage and temperature detection node units in Figure 1 are installed and fixed next to each single battery and have the same hardware structure. Its main function is to collect the charging and discharging voltage of each single battery, the temperature rise of the battery during the charging and discharging process and other field data, and send them to the host computer and the field monitoring display alarm node unit through the CAN bus network after filtering and corresponding transformation; the field intelligent voltage and current monitoring display alarm node unit is responsible for detecting the charging and discharging voltage and current of the battery pack, receiving the field data sent by each intelligent detection node unit after filtering, transformation and other processing, displaying and storing the main parameters, completing the digital PID adjustment and control of the charging and discharging voltage and current of the battery pack, and performing fault diagnosis, locking and alarming on each single battery. Its data exchange is also sent to the host computer through the CAN bus network. The CAN bus network part is mainly composed of the CAN bus communication medium and the corresponding communication software. The communication medium of this system adopts twisted pair cable, the load is connected between CANH and CANL, and the terminal matching impedance value is the characteristic impedance value of the signal, which is about 120Ω.

Node unit hardware design

Node unit working principle

In this system, there are different types of nodes, such as on-site intelligent voltage and current monitoring, display and alarm node units and intelligent voltage and temperature detection node units, but their core circuits are basically similar, except for the peripheral interface circuits and sensor and other acquisition circuits. Taking the node unit with monitoring, display and alarm as an example, its structural block diagram is shown in Figure 2.

Figure 2: Node unit structure block diagram

The analog quantities of the on-site battery charging and discharging AC and DC voltage, current, temperature, etc. are filtered and shaped, and then enter the A/D conversion port of 80C196KC through the multi-way conversion switch, and the single-chip microcomputer samples and completes the A/D conversion at regular intervals; the switch input enters the I/O port of the single-chip microcomputer through the optocoupler and buffer, and the single-chip microcomputer generates corresponding actions such as sound and light alarm, closing the charging and discharging power supply module, and relay action through the detection and numerical processing of the I/O port; the single-chip microcomputer compares the data after A/D conversion with the set parameters and performs digital calculations, and completes the PWM output through the high-speed output port HSO, and sends out the PID adjustment signal after isolation, shaping, and filtering, which can control the charging and discharging voltage and current; due to the large number of peripheral interface circuits, the single-chip microcomputer I/O port is expanded with 8155, and the monitoring information (charging and discharging power supply status, battery status, charging and discharging curve, etc.) can be viewed up, down, forward, and backward through the keyboard and LCD, and the system parameter settings (voltage, current threshold, temperature compensation coefficient, etc.) can be changed. ; In order to carry out CAN bus communication and exchange data with the host computer, the node unit is also equipped with CAN communication interface circuit and RS232 serial communication interface circuit.

CAN bus interface circuit

The schematic diagram of the hardware circuit of the node unit CAN bus is shown in Figure 3. The node unit CAN bus interface consists of an independent controller SJA1000 and a CAN controller interface chip 82C250. SJA1000 is an off-chip expansion chip of the microcontroller, and its chip select pin CS is connected to the address decoder of the microcontroller, thereby determining the address of each register in the CAN controller in the microcontroller. SJA1000 is connected to the physical bus through the CAN controller interface chip 82C250. The transceiver device 82C250 can provide differential transmission capability for the bus and differential reception capability for the CAN controller, which is fully compatible with the "ISO11898" standard, with high speed, anti-interference, automatic output shutdown when power is off, and support for up to 110 node connections.

System software design

The software of this system consists of two parts: host PC software and node unit software. The PC software uses the configuration software under the Windows environment to generate a friendly human-machine interface, read the data transmitted by each node unit in real time, and display it on the screen after assembly. Through the screen, the working characteristics and working status of each battery can be timely understood, and an alarm signal can be issued for batteries that do not meet the requirements, so as to deal with them in time, find the best working point of the battery, ensure the normal operation of the battery charging and discharging system, and improve the working efficiency of the battery pack charging and discharging. The node unit software includes modules such as self-test program, multi-channel A/D conversion filter processing program, digital PID adjustment program, LCD display program and communication program. It is written in assembly language and solidified in EPROM after simulation debugging and offline simulation.


Figure 3: Node unit CAN bus communication interface circuit diagram

Node unit main program
The node unit main program flow chart is shown in Figure 4, which completes the data analysis of the A/D conversion results, the processing of the digital switch quantity of the I/O port, calling the battery charging and discharging parameter adjustment program, CAN bus communication program and keyboard, LCD display program, etc. The data analysis includes the battery pack's charge and discharge voltage, current comparison, floating charge voltage judgment, low voltage cut-off voltage threshold adjustment, etc.; I/O digital switch quantity processing includes switch quantity judgment, alarm, etc.



Figure 4: Node unit main program flow chart


Communication Program

The CAN bus communication program mainly consists of three parts, namely the initialization program, the sending program and the receiving program. The initialization program mainly completes the selection of the working mode of the CAN controller, that is, writing the control word to the register in the control segment of the CAN controller. This system uses SJA1000, that is, the initialization process shown in Figure 5 is completed in the system reset mode. The information sent from the CAN controller to the CAN bus or from the CAN bus to the CAN receiving buffer is automatically completed by the CAN bus controller SJA1000. The sending and receiving interrupt processing flow charts are shown in Figures 6 and 7 respectively.


Figure 6: CAN bus communication sending program flow chart


Figure 7: CAN bus communication receiving program flow chart

LCD display program

The LCD display program framework is shown in Figure 8. The large dot matrix graphic LCD display module LCM320240ZK with Chinese character library can display 300 characters per screen, and can clearly display the battery pack charging and discharging voltage, current, V/I characteristics and other curves. The first screen monitoring submenu content includes current time, AC voltage, current, load voltage, current, ambient temperature, single battery temperature, floating charge status and other parameters. Press the function selection key on the first screen to start or reset to enter the main menu screen, including battery status monitoring, charging and discharging parameter control and fault alarm submenus. Use the cursor to move to select the submenu to view. The conversion of information between screens, the movement of the cursor within the screen and the increase and decrease of parameters are realized by the combination of up, down, left, right and confirm keys.

Figure 8: LCD display program flow chart

Conclusion

The battery pack charging and discharging distributed control system based on CAN bus has good real-time performance, strong anti-interference and easy upgrade for charging and discharging parameter detection and control. It has important reference value for improving the reliability of DC power supply system, reducing the labor intensity of staff and reducing the blindness of maintenance work.

Reference address:Design of a distributed control system for battery charging and discharging based on CAN bus

Previous article:Information integrated control system for city buses based on CAN bus
Next article:Plastic window welding and cleaning production line control system based on CAN bus

Latest Industrial Control 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号