1 Introduction
Formation charging and discharging is one of the key processes in the battery production process, and its control level is directly related to the quality of the product. The process requires that the formation charger can charge and discharge the battery multiple times according to conditions such as time, voltage or ampere-hours, and has multiple charging and discharging modes such as static electricity, constant current charging, constant voltage (current limiting) charging, and constant current discharging. It is also required to achieve a control accuracy of ≤1%, a detection accuracy of ≤0.5%, and a current and voltage limiting protection accuracy of ≤2%. Conventional production methods mainly use manual operation, which has low control accuracy, high labor intensity, and human factors have a great impact on product quality. Therefore, the introduction of microcomputer program control devices is of great significance for improving the operation process and improving product quality. [1]
With the development of new single-chip microcomputers with built-in large-capacity FlashROM, various serial ADCs, DACs, and high-density serial E2PROM technologies, it has become possible to develop high-performance, low-cost, and compact battery charge and discharge controllers. According to the needs of small-capacity multi-circuit charger equipment, this paper proposes a design scheme of a multi-circuit microcontroller composed of an embedded single-chip microcomputer and its peripheral serial devices, which can control the operation of 4 formation chargers at the same time and realize automatic static electricity, constant current charging and discharging, constant voltage current limiting charging and other control functions; it uses Chinese character LCD display, and can set control program parameters through the keyboard, with multi-stage automatic control according to time and conditions (voltage, current or ampere-hour); it can automatically memorize the state after power failure, and automatically continue the original process after resuming operation; it automatically monitors faults such as current failure, overcurrent, overvoltage, etc. and alarms; in addition, it can form a two-level centralized monitoring decentralized system through RS485 serial communication and upper computer networking. [2-4]
2 Hardware design of controller
The hardware of the multi-circuit formation charge and discharge controller mainly consists of two parts: the main control module and the process processing module. According to the design requirements, the main control module should have the following functions: (1) a good human-computer interaction interface, including a keyboard and display; (2) storage of process control parameters; (3) saving of operating status and data during power failure; (4) high reliability and anti-interference; (5) networking with the host computer to form a two-level centralized monitoring or printing record system. The process processing module completes the conditioning, isolation and conversion of the input/output signals of the 4-way formation charger. It includes the output of the system's given control quantity, the input of current and voltage sampling values, and the output of the switch quantity. According to the above functional requirements, the hardware structure of the designed controller is shown in Figure 1.
The main control module uses the low-power, high-performance single-chip AT89C55 as the main control CPU. Its internal flash memory capacity reaches 20KB and its internal RAM is 256 bytes, which can meet the needs of more complex control programs, LCD display Chinese character library and communication programs without expanding external program memory and data memory. The panel of the main control module provides a 2×7 membrane keyboard and a 192×64 dot matrix LCD display, making the on-site operation screen very friendly.
The large-capacity 24LCXX series serial E2PROM is used to save a large amount of set process control parameters and power-off status data. The interface between 24LCXX and the single-chip microcomputer adopts a two-wire serial bus, which is simple and reliable. The single-chip microcomputer is used as the master device and the 24LCXX is used as the slave device. The master device reads and writes data to the slave device.
The process equipment interface uses serial chips, which are simple to interface. There are at most four signal lines between the single-chip microcomputer, which greatly reduces the number of connections, and these signal lines are connected to the single-chip microcomputer after optical coupling isolation, which improves the reliability of the system.
In addition, considering the characteristics of the control system, it belongs to a multi-point communication mode, and the distance is long, and the data requires two-way transmission. Therefore, the RS-485 standard interface with convenient connection, good anti-interference performance, low distortion and low cost is adopted to realize data communication with the host computer.
The hardware design of the microcontroller fully reflects the characteristics of the embedded system with compact structure, simple peripherals, small size, easy to carry, and greatly reduced cost.
3 Data storage management
In the process of controlling the operation of 4 chargers, a large amount of non-volatile data, such as process control parameters and operation control data, needs to be saved. The preset 8 groups of model parameters are saved in the serial E2PROM, and each group contains 12 stages of process control parameters. In the process of controlling the operation of the charger, the system regularly saves the working parameter values of each circuit charger to the E2PROM. When the system suddenly loses power, it can automatically memorize the state and automatically continue the original process after resuming operation.
However, considering the randomness of power failure, in order to ensure the correctness and integrity of the data, a specific flag is set to ensure the integrity of the written data. That is, before each operation on 24LCXX, first judge this flag. If it is FFH, it indicates that the data in the basic data area is complete, and its content is written to the backup data area; if it is 00H, it indicates that the last operation on the basic data area was interrupted and the data is incomplete, then write the content of the backup data area to the basic data to restore the data state before power failure. After the data operation is completed, set the flag to FFH to indicate a complete operation on the data. This method of locking the data operation effectively ensures the stable operation of the system.
4 Controller software design
4.1 Real-time multi-task structure and task division
The controller software adopts a real-time multi-task structure, which is divided into two parts: startup management task and running task. The startup management tasks include power-on command processing (auxiliary self-test, clearing memory data, etc.), system initialization and process control parameter modification settings. At the same time, the serial communication interrupt task is a background task, receiving host computer commands and sending status information to the host computer; the running task is activated after executing the start charger command, including the main control scheduler (foreground task), system timer interrupt, serial communication interrupt task, etc., and is scheduled and run according to different priorities (foreground tasks are interrupted by background tasks). Figure 2 is a schematic diagram of system tasks and scheduling.
[page] Background task 1 generates an interrupt every 100ms by the system timer T0, forming a basic clock source and providing various software counters for control and communication tasks. The main control scheduler schedules each task according to the timer counting status to control the operation of the 4-way charger. These tasks include: scanning the keyboard every 1 second, activating the corresponding task according to the command input by the keyboard, such as starting or terminating the process, displaying the setting parameters, etc.; performing routine data acquisition and processing every 1 second, collecting the voltage and current of the 4-way charger respectively, and processing the conversion results accordingly; cyclically displaying the real-time working status parameters of the 4-way charger every 1 second, including the current working stage, working mode, running time, voltage and current values, ampere-hours, etc.; calculating the ampere-hours of the 4-way charger respectively every 2 seconds; performing closed-loop feedback control PI adjustment every 3 seconds; accumulating the ampere-hours of the 4-way charger respectively every 1 minute, and backing up the relevant data to the E2PROM. During the operation, the current and voltage signals are checked regularly. In case of abnormality, interruption, overcurrent, overvoltage and other faults, the fault type and the corresponding charger number are displayed in time.
Background task 2 is a serial communication interrupt task. Due to the master-slave asynchronous serial communication, the priority of the communication interrupt task is higher than that of the timer interrupt. Communication interrupts include two situations: receiving interrupts and sending interrupts, and switching control and processing are required. Usually, it is in the receiving interruption allowed state. When receiving the polling message from the host computer, it organizes the sending of the message, sends the message frame to the message buffer, starts the sending interrupt and the sending counter, and sends a byte according to the counter in the subsequent sending interrupt tasks until the frame is sent and the sending interrupt is prohibited. If the host computer data/command message header is received, the receiving buffer is cleared and the next receiving interrupt byte is waited.
4.2 Modular software design
The software design of this controller adopts a modular structure to make the program clear and concise. At the same time, each module is relatively independent and can be debugged separately. When the program is expanded, do not change the original structure, just modify the corresponding module. According to the division of system tasks in Figure 2, the program module is mainly composed of the main control program and timer interrupt program module, communication program module, display and keyboard processing module, input and output and control quantity calculation module. The connection between the modules is to use the logic processing function of the single-chip microcomputer, set the flag bit, and control and call it by querying the flag bit.
Due to the length of the article, the working process of each module will not be introduced in detail.
5 Design of communication system
The application object of this article is the plate or closed battery charging and discharging control device of the battery factory. In order to reduce costs, facilitate management and improve system reliability, the control system design can adopt a small distributed control system, that is, a two-layer structure: a distributed multi-loop controller is equipped with an operation station (commonly known as the host computer and the slave computer). Through the low-cost, highly reliable RS-485 real-time communication network, dozens of multi-loop controllers are connected to the PC to realize centralized monitoring and operation of the production process. The communication between the host computer and the slave computer includes data downloading, data uploading, command issuing, etc. The communication system design is as follows:
(1) The system physical layer protocol adopts the RS-485 standard. In order to maximize the communication rate within the allowable range, the baud rate is selected as a non-standard 3125bps. When the host computer uses software polling to communicate with 20 field controllers one by one, through appropriate software design, the real-time requirements of the charging and discharging process can be basically met.
(2) According to the link layer protocol reference HDLC, short frame fixed length transmission is adopted, and each frame has 7 valid bytes. The application layer requires the realization of functions such as real-time data upload, historical data upload, control parameter data download and command issuance.
(3) This system adopts the master-slave mode of master station polling. The master station initiates communication without network conflict; the master station selects the secondary station it requires communication, and each secondary station can have different priorities. Compared with the bus control network, this method is easy to understand and implement.
6 Conclusion
Experiments and actual operation on site show that the multi-loop chemical charging and discharging controller has a good human-computer dialogue window, simple structure, easy operation, flexible parameter setting, and strong adaptability. The system hardware and software equipment works normally, has complete functions, is stable and reliable, and has perfect system self-diagnosis and fault location functions. It also has the characteristics of low cost and small size (80×160×100).
References
[1] Jia Yingjiang, Jia Xiangying, A Brief Discussion on Battery Charging, 1998, (4): 22-24.
[2] He Limin, MCS-51 Series Single Chip Microcomputer Application System Design, Beijing University of Aeronautics and Astronautics Press, 1990.
[3] Li Weizhen, Guo Qiang, Liquid Crystal Display Application Manual, Electronic Industry Press, 2002.
[4] Ran Quan, Zhang Difeng, Implementation of Multi-tasking and Multi-threading Mechanism in Single Chip Microcomputer System, Single Chip Microcomputer and Embedded System Application, 2003, (6)
Formation charging and discharging is one of the key processes in the battery production process, and its control level is directly related to the quality of the product. The process requires that the formation charger can charge and discharge the battery multiple times according to conditions such as time, voltage or ampere-hours, and has multiple charging and discharging modes such as static electricity, constant current charging, constant voltage (current limiting) charging, and constant current discharging. It is also required to achieve a control accuracy of ≤1%, a detection accuracy of ≤0.5%, and a current and voltage limiting protection accuracy of ≤2%. Conventional production methods mainly use manual operation, which has low control accuracy, high labor intensity, and human factors have a great impact on product quality. Therefore, the introduction of microcomputer program control devices is of great significance for improving the operation process and improving product quality. [1]
With the development of new single-chip microcomputers with built-in large-capacity FlashROM, various serial ADCs, DACs, and high-density serial E2PROM technologies, it has become possible to develop high-performance, low-cost, and compact battery charge and discharge controllers. According to the needs of small-capacity multi-circuit charger equipment, this paper proposes a design scheme of a multi-circuit microcontroller composed of an embedded single-chip microcomputer and its peripheral serial devices, which can control the operation of 4 formation chargers at the same time and realize automatic static electricity, constant current charging and discharging, constant voltage current limiting charging and other control functions; it uses Chinese character LCD display, and can set control program parameters through the keyboard, with multi-stage automatic control according to time and conditions (voltage, current or ampere-hour); it can automatically memorize the state after power failure, and automatically continue the original process after resuming operation; it automatically monitors faults such as current failure, overcurrent, overvoltage, etc. and alarms; in addition, it can form a two-level centralized monitoring decentralized system through RS485 serial communication and upper computer networking. [2-4]
2 Hardware design of controller
The hardware of the multi-circuit formation charge and discharge controller mainly consists of two parts: the main control module and the process processing module. According to the design requirements, the main control module should have the following functions: (1) a good human-computer interaction interface, including a keyboard and display; (2) storage of process control parameters; (3) saving of operating status and data during power failure; (4) high reliability and anti-interference; (5) networking with the host computer to form a two-level centralized monitoring or printing record system. The process processing module completes the conditioning, isolation and conversion of the input/output signals of the 4-way formation charger. It includes the output of the system's given control quantity, the input of current and voltage sampling values, and the output of the switch quantity. According to the above functional requirements, the hardware structure of the designed controller is shown in Figure 1.
The main control module uses the low-power, high-performance single-chip AT89C55 as the main control CPU. Its internal flash memory capacity reaches 20KB and its internal RAM is 256 bytes, which can meet the needs of more complex control programs, LCD display Chinese character library and communication programs without expanding external program memory and data memory. The panel of the main control module provides a 2×7 membrane keyboard and a 192×64 dot matrix LCD display, making the on-site operation screen very friendly.
The large-capacity 24LCXX series serial E2PROM is used to save a large amount of set process control parameters and power-off status data. The interface between 24LCXX and the single-chip microcomputer adopts a two-wire serial bus, which is simple and reliable. The single-chip microcomputer is used as the master device and the 24LCXX is used as the slave device. The master device reads and writes data to the slave device.
The process equipment interface uses serial chips, which are simple to interface. There are at most four signal lines between the single-chip microcomputer, which greatly reduces the number of connections, and these signal lines are connected to the single-chip microcomputer after optical coupling isolation, which improves the reliability of the system.
In addition, considering the characteristics of the control system, it belongs to a multi-point communication mode, and the distance is long, and the data requires two-way transmission. Therefore, the RS-485 standard interface with convenient connection, good anti-interference performance, low distortion and low cost is adopted to realize data communication with the host computer.
The hardware design of the microcontroller fully reflects the characteristics of the embedded system with compact structure, simple peripherals, small size, easy to carry, and greatly reduced cost.
3 Data storage management
In the process of controlling the operation of 4 chargers, a large amount of non-volatile data, such as process control parameters and operation control data, needs to be saved. The preset 8 groups of model parameters are saved in the serial E2PROM, and each group contains 12 stages of process control parameters. In the process of controlling the operation of the charger, the system regularly saves the working parameter values of each circuit charger to the E2PROM. When the system suddenly loses power, it can automatically memorize the state and automatically continue the original process after resuming operation.
However, considering the randomness of power failure, in order to ensure the correctness and integrity of the data, a specific flag is set to ensure the integrity of the written data. That is, before each operation on 24LCXX, first judge this flag. If it is FFH, it indicates that the data in the basic data area is complete, and its content is written to the backup data area; if it is 00H, it indicates that the last operation on the basic data area was interrupted and the data is incomplete, then write the content of the backup data area to the basic data to restore the data state before power failure. After the data operation is completed, set the flag to FFH to indicate a complete operation on the data. This method of locking the data operation effectively ensures the stable operation of the system.
4 Controller software design
4.1 Real-time multi-task structure and task division
The controller software adopts a real-time multi-task structure, which is divided into two parts: startup management task and running task. The startup management tasks include power-on command processing (auxiliary self-test, clearing memory data, etc.), system initialization and process control parameter modification settings. At the same time, the serial communication interrupt task is a background task, receiving host computer commands and sending status information to the host computer; the running task is activated after executing the start charger command, including the main control scheduler (foreground task), system timer interrupt, serial communication interrupt task, etc., and is scheduled and run according to different priorities (foreground tasks are interrupted by background tasks). Figure 2 is a schematic diagram of system tasks and scheduling.
[page] Background task 1 generates an interrupt every 100ms by the system timer T0, forming a basic clock source and providing various software counters for control and communication tasks. The main control scheduler schedules each task according to the timer counting status to control the operation of the 4-way charger. These tasks include: scanning the keyboard every 1 second, activating the corresponding task according to the command input by the keyboard, such as starting or terminating the process, displaying the setting parameters, etc.; performing routine data acquisition and processing every 1 second, collecting the voltage and current of the 4-way charger respectively, and processing the conversion results accordingly; cyclically displaying the real-time working status parameters of the 4-way charger every 1 second, including the current working stage, working mode, running time, voltage and current values, ampere-hours, etc.; calculating the ampere-hours of the 4-way charger respectively every 2 seconds; performing closed-loop feedback control PI adjustment every 3 seconds; accumulating the ampere-hours of the 4-way charger respectively every 1 minute, and backing up the relevant data to the E2PROM. During the operation, the current and voltage signals are checked regularly. In case of abnormality, interruption, overcurrent, overvoltage and other faults, the fault type and the corresponding charger number are displayed in time.
Background task 2 is a serial communication interrupt task. Due to the master-slave asynchronous serial communication, the priority of the communication interrupt task is higher than that of the timer interrupt. Communication interrupts include two situations: receiving interrupts and sending interrupts, and switching control and processing are required. Usually, it is in the receiving interruption allowed state. When receiving the polling message from the host computer, it organizes the sending of the message, sends the message frame to the message buffer, starts the sending interrupt and the sending counter, and sends a byte according to the counter in the subsequent sending interrupt tasks until the frame is sent and the sending interrupt is prohibited. If the host computer data/command message header is received, the receiving buffer is cleared and the next receiving interrupt byte is waited.
4.2 Modular software design
The software design of this controller adopts a modular structure to make the program clear and concise. At the same time, each module is relatively independent and can be debugged separately. When the program is expanded, do not change the original structure, just modify the corresponding module. According to the division of system tasks in Figure 2, the program module is mainly composed of the main control program and timer interrupt program module, communication program module, display and keyboard processing module, input and output and control quantity calculation module. The connection between the modules is to use the logic processing function of the single-chip microcomputer, set the flag bit, and control and call it by querying the flag bit.
Due to the length of the article, the working process of each module will not be introduced in detail.
5 Design of communication system
The application object of this article is the plate or closed battery charging and discharging control device of the battery factory. In order to reduce costs, facilitate management and improve system reliability, the control system design can adopt a small distributed control system, that is, a two-layer structure: a distributed multi-loop controller is equipped with an operation station (commonly known as the host computer and the slave computer). Through the low-cost, highly reliable RS-485 real-time communication network, dozens of multi-loop controllers are connected to the PC to realize centralized monitoring and operation of the production process. The communication between the host computer and the slave computer includes data downloading, data uploading, command issuing, etc. The communication system design is as follows:
(1) The system physical layer protocol adopts the RS-485 standard. In order to maximize the communication rate within the allowable range, the baud rate is selected as a non-standard 3125bps. When the host computer uses software polling to communicate with 20 field controllers one by one, through appropriate software design, the real-time requirements of the charging and discharging process can be basically met.
(2) According to the link layer protocol reference HDLC, short frame fixed length transmission is adopted, and each frame has 7 valid bytes. The application layer requires the realization of functions such as real-time data upload, historical data upload, control parameter data download and command issuance.
(3) This system adopts the master-slave mode of master station polling. The master station initiates communication without network conflict; the master station selects the secondary station it requires communication, and each secondary station can have different priorities. Compared with the bus control network, this method is easy to understand and implement.
6 Conclusion
Experiments and actual operation on site show that the multi-loop chemical charging and discharging controller has a good human-computer dialogue window, simple structure, easy operation, flexible parameter setting, and strong adaptability. The system hardware and software equipment works normally, has complete functions, is stable and reliable, and has perfect system self-diagnosis and fault location functions. It also has the characteristics of low cost and small size (80×160×100).
References
[1] Jia Yingjiang, Jia Xiangying, A Brief Discussion on Battery Charging, 1998, (4): 22-24.
[2] He Limin, MCS-51 Series Single Chip Microcomputer Application System Design, Beijing University of Aeronautics and Astronautics Press, 1990.
[3] Li Weizhen, Guo Qiang, Liquid Crystal Display Application Manual, Electronic Industry Press, 2002.
[4] Ran Quan, Zhang Difeng, Implementation of Multi-tasking and Multi-threading Mechanism in Single Chip Microcomputer System, Single Chip Microcomputer and Embedded System Application, 2003, (6)
Previous article:Design and implementation of a remote monitoring platform for substation batteries based on embedded systems
Next article:Research progress of cathode materials for 5V high voltage lithium-ion batteries
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Power Management Articles
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- Regarding "Circuit Design Based on Operational Amplifiers and Analog Integrated Circuits", there is a concept of "Pole" that is not clear
- RISC-V IDE MRS usage notes (Part 3): Improving floating-point calculation efficiency
- Pan it STM32H750 3 (lan8720 Ethernet test --iperf)
- Another question about the matrix keyboard
- Understanding of MSP430 interrupt mechanism
- Understand some misunderstandings about FPGA learning
- Transmit power measurement method
- My Journey of MCU Development (VI)
- [RVB2601 Creative Application Development] 4 Long press and short press to eliminate the letter A
- CC2520 BasicRF Study Notes