1 Hardware Design
1.1 System overall architecture
The battery pack structure monitored and managed by the system is as follows: first connect a certain number of lithium-ion batteries in series, connect several battery strings in parallel to form a battery pack, and finally connect several battery packs in series to form an overall battery pack. This series-parallel reuse organizational form is conducive to the start-stop operation of charging and discharging of a single battery string, reducing the inconsistency of battery capacity generated during use. The structure of the management system is shown in the figure. Each battery string is equipped with a secondary controller for monitoring and management, collecting and uploading data such as current, voltage, and temperature, and controlling the start-stop and balancing operations of the battery string. The primary controller is a dual CAN controller structure. The CAN1 controller and the secondary controller form the CAN network of the battery pack. The CAN2 controller and the main control board battery pack form an internal primary CAN bus network, which is responsible for reporting the working status of the battery pack to the main control board and conveying instructions to the subordinate secondary controller. The CAN2 controller of the main control board is connected to the vehicle CAN bus. Since each battery pack is in a series structure, the increasing relationship of the voltage affects the secondary controller, so DC/DC conversion is required when supplying power.
1.2 Main controller and primary controller architecture
The core control of the main controller and the first-level controller is completed by STMicroelectronics' STFM32F107. STM32F107 is a high-performance, low-cost, low-power 32-bit RISC microprocessor. It uses the ARMCortex-M3 core, contains 256 kB of Flash and 64 kB of SRAM, has sufficient programming space, and has a main frequency of 72 MHz, which is enough to undertake real-time management of the lower-level controller. The peripherals included are: basic power supply circuit, reset circuit, standard JTAG debug port, dual CAN physical layer circuit, EEPROM memory, which is the best solution for this system design.
1.3 Two-level controller architecture
Since the voltage of a lithium-ion battery cell is relatively small, generally about 4 V, while the voltage of the entire battery pack is as high as hundreds of volts, and the length of a single string of batteries is more than 15, and the commonly used battery measurement chips are relatively expensive and can only monitor the voltages of 6 or 12 batteries, after comprehensive consideration, it was decided to design a secondary controller with C8051F500 as the core. Compared with a dedicated battery measurement chip, this design has the disadvantage of lower accuracy, but the advantage is that the measured data can be calculated and processed first, and does not completely rely on the instructions of the upper controller.
The C8051FS00 processor is designed according to the AEC-Q100 test standard. It has a wide operating voltage, a wide operating temperature range, strong anti-interference ability, and built-in CAN and LIN bus controllers, which are suitable for applications in automotive electronics and industrial control. The chip has 32 I/O ports, and the number of interfaces meets the needs of monitoring the operation of battery strings. It has a 12-bit ADC, and the minimum setup time of each channel is <50μs, that is, the total time of a patrol cycle is <1 ms, which is enough to support real-time monitoring of battery strings. The controller architecture is shown in Figure 2.
The CAN bus physical layer circuit with isolated driver is shown in Figure 3. In addition, there are external devices such as DC/DC power supply and C2 online debugging interface.
2 Software Design
2.1 Secondary controller software flow
(1) Coefficient correction program. Because the total number of batteries is extremely large, in order to reduce the production cost and space occupied by the system, the voltage measurement uses a relatively simple resistor voltage division method, and the current measurement uses a resistor sampling method. In order to compensate for the error caused by the resistor, a correction coefficient program is preset. Before each circuit board is put into use, a 5 V standard voltage can be connected to all voltage measurement ports, and a 10 A standard current can be passed through both ends of the sampling resistor. The program can automatically modify the coefficient according to the measured value to improve the working accuracy.
(2) Software flow. As shown in Figure 4, when the program starts running, it first initializes the system clock and some variables inside C8051FS00, then initializes each I/O port, timer, interrupt, ADC working mode and CAN bus working mode, and then determines whether the battery pack is currently charging or discharging based on the two I/O data of the measured current to select different control schemes, and then detects whether there is an instruction issued by the first-level controller. If so, the instruction is executed. Otherwise, the ADC will inspect the input voltage of each I/O, and the program will restore it to the terminal voltage of each battery, the current and temperature of the battery string through the pre-stored coefficients. Finally, the SOC of each battery is calculated. Considering the computing power of C8051F500, the ampere-hour integration method with relatively medium accuracy and computing complexity is adopted, and it is corrected according to temperature, voltage, voltage-time gradient and other quantities. At the same time, the total voltage, current, temperature and total SOC, a total of 4 parameters, are reported to the first-level controller in real time. If the voltage of a single battery is too high during charging, the corresponding MOS tube is turned on to balance the charging. When over-temperature, over-current or discharge end point occurs, the battery string is disconnected and all data at the time of disconnection are reported to the primary controller. Otherwise, the main program continues to determine whether there is an instruction and loops the above process.
2.2 Primary controller software flow
(1) Receive data uploaded by the secondary controller. There are two main types of data: one is the current, voltage, temperature, and remaining power of each battery string uploaded at all times; the other is the complete data and the reason for the stop when a battery string stops working for some reason.
(2) SOC calculation. The SOC calculated here is the remaining power of the entire battery string based on the current, voltage and temperature uploaded in real time. Because the computing power of the STM32F107 chip is stronger than that of the C8051F500, the calculation model here adopts the fuzzy neural network method.
(3) Issue instructions to the secondary controller. There are two types of instructions: one is to require it to upload complete data on the current working status, mainly to save historical data before parking or manually request to view; the other is to suspend the battery string for a period of time when its SOC is significantly higher/lower than other battery strings during charging and discharging, which is conducive to smoothing out the inconsistency between batteries as much as possible during use. When there is a large difference between the uploaded SOC and the calculated SOC, upload this situation to facilitate the inspection and correction of the model coefficients.
(4) Upload data to the main controller. In addition to the data uploaded actively or at the request of the main controller, including a series of working conditions such as the overall voltage, current and SOC of the battery pack, the voltage, current, temperature and SOC of the corresponding battery string and even the corresponding battery, there are also reports on various unexpected situations.
2.3 Main Controller Software Flow
The task of the main controller is to report the working status of the battery pack to the vehicle controller and convey instructions to the first-level controller as required. It is similar to the first-level controller, but because each battery pack may cut off a battery string, causing a sudden change in SOC, there is no operation to calculate the SOC of each battery pack.
3 Conclusion
This paper proposes a battery pack monitoring and management system with STM32F107 as the core controller and interconnected with C8051F500 as the core sub-controller through CAN bus. It can efficiently manage the battery, provide the driver with remaining power information, and extend the battery life. The article describes the implementation process and various functions of the system in detail from both hardware and software aspects. When the system is detected with voltage source and current source, the measured voltage error does not exceed 0.01 V, and the current error does not exceed 0.05 A. For simulated overvoltage, overcurrent, overtemperature, discharge termination and other conditions, the control board can respond quickly, verifying the system's measurement accuracy, real-time control and good CAN communication network. When using lithium batteries for charge and discharge experiments, the estimated SOC is basically consistent with the actual situation. When charging, when a battery is close to full, the balancing operation can be started in time, and the effect of protecting overcharge is also ideal.
Previous article:Design of safe life prediction software for smart electric energy meters based on Labview
Next article:Detailed explanation of how to eliminate the impact of UPS power supply on the power grid
- Popular Resources
- Popular amplifiers
- 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
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Tutorial on generating negative voltage using MCU's PWM
- Reading Notes on the Good Book "Electronic Engineer Self-study Handbook" 04--LED Dot Matrix and LCD
- Arteli AT32WB415 series Bluetooth BLE 5.0 MCU, free first-hand experience!
- program
- About the submission instructions of Pingtouge RVB2601
- MSP430F5529 Getting Started Example 1
- Is this also considered a second order low pass filter?
- Latest document "ST Bluetooth Mesh Sensor model"
- [Erha Image Recognition Artificial Intelligence Vision Sensor] 3. Color Recognition and Serial Communication Initial Test
- Six Tips for Selecting PCB Components