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 to 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 for a multi-circuit microcontroller consisting of an embedded single-chip microcomputer and its peripheral serial devices, which can simultaneously control the operation of four formation chargers and realize automatic static electricity, constant current charging and discharging, constant voltage current limiting charging and other control functions; it uses a Chinese character LCD display, and can set control program parameters through the keyboard. It has the function of 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, and overvoltage and gives alarms; in addition, through RS485 serial communication and upper computer networking, it can form a two-level centralized monitoring decentralized system. [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 a 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 and recording 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, with an internal flash memory capacity of 20KB and an internal RAM of 256 bytes, which can meet the needs of more complex control programs, LCD display Chinese character libraries and communication programs without the need to expand 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 store a large amount of set process control parameters and power-off status data. The interface between 24LCXX and the microcontroller adopts a two-wire serial bus, which is simple and reliable. The microcontroller is the master device and the 24LCXX is the slave device. The master device reads and writes data to the slave device.
The process equipment interfaces all use serial chips with simple interfaces. There are a maximum of four signal lines between the process equipment and the single-chip microcomputer, which greatly reduces the number of connections. 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 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, which is compact in structure, simple in peripherals, small in size, easy to carry, and the cost is also greatly reduced.
3. Data storage management
In the process of controlling the operation of the four chargers, a large amount of non-volatile data needs to be saved, such as process control parameters and operation control data. The preset parameters of 8 groups of models 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 means 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 means that the last operation on the basic data area was interrupted and the data is incomplete, then the content of the backup data area is written to the basic data to restore the data state before power failure. After the data operation is completed, the flag is set 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 operation task. The startup management task includes 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 operation task is activated after executing the charger start 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.
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 once 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 chargers every 2 seconds; performing closed-loop feedback control PI adjustment every 3 seconds; accumulating the ampere-hours of the 4-way chargers 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 the 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 receiving interrupts and sending interrupts, and need to be switched and controlled and processed as needed. Usually, it is in the receiving interrupt 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 space constraints, 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 a host computer and a slave computer). Through a 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 issuance, 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 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, and there is no network conflict. The master station selects the slave station it requires to communicate with, and each slave station can have different priorities. Compared with the bus-type control network, this method is easy to understand and implement.
6 Conclusion
The experiment and actual operation on site show that the multi-circuit formation charge and discharge controller has a good human-machine 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 Handbook, Publishing House of Electronics Industry, 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:Functional implementation of ARM program jumping to interrupt service routine
Next article:Application of In-Circuit Emulator in Embedded System Design
Recommended ReadingLatest update time:2024-11-16 22:54
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- The diameter of the four holes on the EK140 base plate
- This circuit is called a "lawn mower"
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- How to monitor battery voltage with Arduino
- Image Algorithm Transplantation to DSP and Its Optimization Steps
- To advance in technology to a certain level, you just need to read more datasheets!
- Prize-winning live broadcast: Keysight’s Metaverse Test Series Seminar: Challenges in VR/AR Digital Interface Testing in Progress!
- 51 STM32 reference study manuals, one-click download without points!
- Microwave and RF Applications
- With the advent of 5G, what should we pay attention to when designing mobile phone antennas?