With the widespread application of battery energy, the depletion of oil resources and environmental pollution, electric vehicles have attracted more and more attention for their advantages of energy saving and environmental protection. In the research and development of electric vehicles, the research and manufacture of on-board batteries and their management systems occupy an important position. The main problems of electric vehicle power batteries in application are: in the production process, the battery process, technology and grouping technology cannot guarantee the good consistency of its initial performance; in the use process, it is very sensitive to overcharging, over-discharging, over-temperature, over-current, etc., and the occurrence of such situations will significantly shorten the battery life and even cause the battery to be scrapped. The battery pack is dozens or even hundreds of single cells in series. There are inconsistencies between single cells. With continuous charge and discharge cycles, the inconsistency between batteries increases, and the available capacity of the battery pack is restricted by the single cell with the smallest capacity. For these situations, the initial performance of the battery must rely on the optimization of the enterprise's production process and the control of key parameters of the production process to improve, while the problems that arise during use need to be solved by the battery management system. This design is based on the main controller with STM32F107 as the core to control the battery pack information collection and basic control module with C8051F500 as the core through the CAN communication network and obtain data. It mainly realizes the overvoltage discharge balance of single cells, overcurrent protection, overtemperature protection, over-discharge protection, and reports and stores the working status of the entire battery pack through the upper controller.
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 monitoring terminal for electric vehicle fast charger
Next article:Digital Temperature Measurement System Based on ARM and DS18B20
Recommended ReadingLatest update time:2024-11-16 04:22
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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 LIS2MDL array board welding of the magnetic nail navigation AGV car is completed
- The new evaluation information is here~~
- Use idle STM32 development boards and Freescale development boards
- Can I still install XP on my new desktop computer? I checked some information and it said that BIOS doesn't support it. Is this true?
- Analysis of the working principle of anti-interference filter
- Mountain climbing test of Bluetooth ECG recording module
- My Journey of MCU Development (Part 4)
- A comprehensive collection of power supply EMC & EMI information, including basic knowledge, rectification plans, and precautions.
- Requires ssh or telnet service
- Lenovo M410 desktop solves VMware "This host supports Intel VT-x, but Intel VT-x is disabled"