Household energy storage BMS system and program upgrading method thereof
By designing a program upgrade method that supports the RS485 communication protocol in the home energy storage BMS system and having automatic rollback function, it solves the problem that traditional systems are prone to failure during the upgrade process, and improves the stability and user experience of the system.
Patent Information
- Application Number
- CN202411521978.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
Traditional household energy storage BMS systems are prone to failure during program upgrades, resulting in system instability, increasing maintenance costs, and affecting user experience.
Design a home energy storage BMS system, including the main controller, battery monitoring module, energy management module, communication module and user interface module, supports RS485 communication protocol for program upgrades, and has automatic rollback function.
Flexible program upgrades are carried out through the RS485 communication protocol to ensure the scalability and adaptability of the system, avoid system instability caused by upgrade failure, and improve system security and user experience.
Smart Images

Figure CN119396435A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of energy storage management, and in particular, relates to a household energy storage BMS system and a program upgrade method thereof. Background Art
[0002] With the rapid development of renewable energy technology and the increasing demand for home energy storage, energy storage battery management systems (BMS) play an increasingly critical role in home energy storage systems. Traditional BMS systems are usually upgraded through dedicated interfaces or software, but this approach is often not flexible enough and may lead to upgrade failures or system instability. In the field of energy storage, communication protocols play a vital role, which determines how the system exchanges data and controls with external devices or networks. At present, the RS485 communication protocol has become a widely used communication protocol in home energy storage systems due to its high reliability, long-distance transmission and strong anti-interference ability. However, there are still some challenges in upgrading the BMS program for the RS485 communication protocol. For example, traditional upgrade methods may cause upgrade failures due to various reasons, which not only affects system performance, but may also cause damage to batteries and other equipment. In addition, once the upgrade fails, manual intervention is usually required to restore the system, which not only increases maintenance costs but also may affect the user experience. Summary of the invention
[0003] The purpose of the present disclosure is to provide a household energy storage BMS system and a program upgrade method thereof in order to solve the above problems.
[0004] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0005] A household energy storage BMS system comprises a main controller, a battery monitoring module, an energy management module, a communication module and a user interface module, wherein the battery monitoring module, the energy management module, the communication module and the user interface module are all connected to the main controller;
[0006] The battery monitoring unit is used to monitor the parameters of the household energy storage battery pack;
[0007] The communication module supports RS485 communication protocol and is used for system program upgrade and data exchange;
[0008] The energy management module is used to achieve balance between battery cells and adjust current, voltage and charge and discharge cycle in real time;
[0009] The main controller is used to perform data processing, charge and discharge management, system protection measures and communication tasks.
[0010] As a further optimization solution of the present disclosure, the battery monitoring module includes a voltage sensor, a current sensor and a temperature sensor, which are used to monitor the voltage, current and temperature of the household energy storage battery pack.
[0011] As a further optimization solution of the present disclosure, the energy management module includes an active balancing module and a charge and discharge strategy optimization module;
[0012] The active balancing module adopts a distributed balancing algorithm and a current control strategy to transfer charge from a high SOC cell to a low SOC cell through a PWM control circuit to achieve balancing between battery cells;
[0013] The charge and discharge strategy optimization module adjusts the current, voltage and charge and discharge cycle in real time by combining the PID control algorithm and the SOC prediction model.
[0014] As a further optimization solution of the present disclosure, the communication module adopts Modbus RTU communication protocol to realize data exchange with external devices; and supports firmware upgrade through RS485 protocol communication.
[0015] As a further optimization solution of the present disclosure, the communication module establishes a long connection with the energy management system EMS to achieve real-time synchronization of data and command interaction, and support the scheduling and control of the EMS.
[0016] As a further optimization solution of the present disclosure, the communication module adjusts the power supply voltage and working cycle of the heating film through the communication protocol to control the temperature of the heating film.
[0017] As a further optimization scheme of the present disclosure, the user interface module includes a mobile application, a display screen and a Web control panel; the mobile application is used to allow users to monitor the system status and perform remote control anytime and anywhere; the display screen is used to provide real-time system status and alarm information; the Web control panel is used to allow users to remotely access and control the system through the network.
[0018] A method for upgrading a program of a household energy storage BMS system comprises the following steps:
[0019] The host computer transmits the upgrade package data to the home energy storage BMS system through the communication module based on the RS485 communication protocol;
[0020] The household energy storage BMS system upgrades the system program based on the upgrade package data, and feeds back the upgrade result to the host computer. If the upgrade fails, it will automatically roll back.
[0021] The beneficial effects of the present disclosure are:
[0022] The BMS system disclosed in the present invention supports program upgrades through the RS485 communication protocol, ensuring the scalability and adaptability of the system. If a failure occurs during the upgrade process, the system also has an automatic rollback function to ensure system stability and security. The system can monitor the battery status in real time, optimize performance, extend battery life, and allow users to view and operate real-time data through remote control, greatly improving the safety, intelligence level and user experience of the home energy storage system. The present invention has extremely high application value and practicality in the market. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a block diagram of the overall structure of the system disclosed in the present invention;
[0024] Figure 2 It is a flow chart of the upper computer in the embodiment of the present disclosure cooperating with the BMS system to perform program upgrade;
[0025] Figure 3 4 is a flowchart of a BMS system performing a program upgrade in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content.
[0027] like Figure 1 As shown, a household energy storage BMS system includes:
[0028] Battery monitoring module, used to monitor the voltage, current, temperature and health of household energy storage battery packs;
[0029] A main controller, connected to the battery monitoring unit, for performing data processing, charge and discharge management, system protection measures, and communication tasks;
[0030] Communication module, supporting RS485 protocol, used for system program upgrade and data exchange;
[0031] User interface modules, including display screens, mobile applications, and web control panels;
[0032] The energy management module is used to achieve balance between battery cells and adjust current, voltage and charge and discharge cycles in real time.
[0033] 1. Battery monitoring module:
[0034] Voltage sensor: A high-precision analog-to-digital converter (ADC) combined with a sampling resistor network is used to monitor the total voltage of the battery pack in real time. The tiny voltage signal is amplified by a differential amplifier and sent to the ADC for conversion to obtain a digital voltage value.
[0035] Current sensor: Using the Hall effect or resistor voltage divider principle, the sensor is installed between the positive and negative electrodes of the battery pack. It reads the magnetic field strength or voltage of the path through which the current flows, and after amplification and filtering, it is converted into a digital current value through the ADC.
[0036] Temperature sensor: Using NTC thermistor or PTC thermistor, the sensor is directly attached to the surface or inside of the battery, connected to the microcontroller through an analog signal processor, and the temperature is periodically read and converted into digital data.
[0037] 2. Energy management module:
[0038] Active balancing technology: Using a distributed balancing algorithm and current control strategy, the charge is transferred from the high SOC cell to the low SOC cell through the PWM control circuit to achieve balance between battery cells.
[0039] Charge and discharge strategy optimization: Combined with PID control algorithm and SOC prediction model, the current, voltage and charge and discharge cycle are adjusted in real time to ensure that the battery operates within a safe and efficient working range.
[0040] 3. User interface module:
[0041] Mobile application: Developed using Flutter or React Native framework, using RESTful API to interact with the server, providing functions such as user registration, login, real-time data viewing and control.
[0042] Display screen: It uses a 3.5-inch TFT LCD screen, with a graphics processing chip, connected to the microcontroller through the SPI interface to display the real-time status, parameters and alarm information of the battery pack.
[0043] Web control panel: Developed based on Node.js and Vue.js, it communicates with the server in real time through WebSocket, providing real-time data monitoring, historical data query, alarm setting and other functions.
[0044] 4. Communication module:
[0045] RS485 communication: The main controller is designed with a dedicated RS485 communication interface, combined with a built-in RS485 converter and hardware flow control circuit to ensure the stability and reliability of the communication signal. The Modbus RTU communication protocol is used to realize data exchange with external devices. Through the Modbus protocol, simple and efficient data transmission is achieved, which is suitable for data communication over long distances and in noisy environments. The upgrade mechanism is especially optimized to support firmware upgrades through RS485 communication. During the upgrade process, the system will first check the integrity and version information of the upgrade file to ensure safety and reliability. If the upgrade fails or is interrupted, the system has an automatic rollback function to restore to the previous stable version to ensure the stability and security of the system. The program upgrade and upgrade failure rollback process is as follows Figure 2 .
[0046] EMS interface: Establish a long connection with the EMS server through the TCP / IP protocol to achieve real-time data synchronization and command interaction, and support the scheduling and control of EMS.
[0047] Heating film control: Drive MOSFET or IGBT through PWM control to adjust the supply voltage and working cycle of the heating film to control the temperature of the heating film.
[0048] 5. Main controller implementation method:
[0049] 1. Processor selection:
[0050] It uses ARM Cortex-M series microcontrollers and STM32 series, which have high-performance processing capabilities and rich peripheral resources to meet data processing and control needs.
[0051] 2. Data collection and processing:
[0052] Data receiving module: Integrates UART, SPI and I2C interfaces to interact with the battery monitoring module, energy management module and communication module respectively.
[0053] Data processing module: Use internal RAM and FLASH memory, combined with DMA (direct memory access) technology, to cache and process data to improve data processing efficiency.
[0054] 3. Charge and discharge control:
[0055] PWM output module: uses a high-precision PWM output engine, combined with a timer and a comparator, to achieve constant current, constant voltage charging and constant power discharge control.
[0056] Current and voltage measurement module: Integrated ADC module, real-time measurement of the current and voltage of the battery pack, and judgment of the protection threshold through the comparator.
[0057] 4. Protection function:
[0058] Abnormal detection module: monitors the voltage, current and temperature of the battery in real time and sets abnormal thresholds.
[0059] Protection trigger module: When an abnormal situation is detected, protection measures are triggered through hardware interruption or software logic, such as disconnecting the charging and discharging circuit, triggering an alarm, or closing a relay.
[0060] 5. Communication interface:
[0061] RS485 communication module: Integrates hardware RS485 converter and UART interface to communicate with external devices or systems using Modbus RTU or custom protocols.
[0062] Network communication module: integrated Ethernet controller, supports TCP / IP protocol, establishes communication connection with energy management system or cloud server to realize remote monitoring and control.
[0063] 6. Software Development:
[0064] Firmware development: Use C / C++ language and develop based on RTOS (real-time operating system) such as FreeRTOS to implement data processing, control algorithms and protection logic.
[0065] User interface development: Develop a simple and intuitive graphical user interface that provides real-time data display, parameter setting, and system status query functions.
[0066] A method for upgrading a program of a household energy storage BMS system comprises the following steps:
[0067] The host computer transmits the upgrade package data to the home energy storage BMS system through the communication module based on the RS485 communication protocol;
[0068] The household energy storage BMS system upgrades the system program based on the upgrade package data, and feeds back the upgrade result to the host computer. If the upgrade fails, it will automatically roll back.
[0069] Specifically, Figure 2 As shown, the upper computer part of the flow chart:
[0070] S101, the host computer sends a handshake request;
[0071] S102, the host computer queries whether the handshake result is successful, if so, enter S103; if not, determine whether the handshake timed out and end;
[0072] S103, the host computer writes the programming address and enters S104;
[0073] S104, the host computer writes programming data and enters S105;
[0074] S105, the host computer queries whether the programming result is successful, if so, it goes to S106; if not, it goes to S109;
[0075] S106, determine whether the program is downloaded, if yes, go to S107; if no, return to S103;
[0076] S107, the host computer writes the programming completion instruction and enters S108;
[0077] S108, the host computer queries whether the CCU upgrade is successful, if yes, then the process ends; if no, then the process goes to S113;
[0078] S109, determine whether it has timed out, if so, proceed to S110; if not, proceed to S112;
[0079] S110, query the current write address and enter S111;
[0080] S111, check whether the current address is written successfully, if yes, return to S103; if no, go to S112;
[0081] S112, issue an APP rollback instruction and end;
[0082] S113, determine whether it has timed out, if so, return to S112; if not, return to S108.
[0083] like Figure 3 As shown in the figure, the program upgrade process of the home energy storage BMS system is as follows:
[0084] S201, receiving a handshake request and entering S202;
[0085] S202, enter serial port upgrade mode and enter S203;
[0086] S203, determine whether it has timed out, if so, the upgrade fails and the APP program automatically rolls back; if not, proceed to S204;
[0087] S204, check whether the handshake result is received, if yes, proceed to S205; if not, return to S203;
[0088] S205, send the handshake result and proceed to S206;
[0089] S206, determine whether it has timed out, if so, the upgrade fails and the APP program automatically rolls back; if not, enter S207;
[0090] S207, determine whether the address write instruction is received, if so, proceed to S208; if not, return to S206;
[0091] S208, determine whether it has timed out, if so, the upgrade fails and the APP program automatically rolls back; if not, enter S209;
[0092] S209, determine whether a data write instruction is received, if yes, proceed to S210; if no, return to S208;
[0093] S210, store the data into the corresponding address and enter S211;
[0094] S211, determine whether it has timed out, if so, the upgrade fails and the APP program automatically rolls back; if not, enter S212;
[0095] S212, determine whether a write result query instruction is received, if so, proceed to S213; if not, return to S211;
[0096] S213, send the writing result and enter S214;
[0097] S214, determine whether it has timed out, if so, the upgrade fails and the APP program automatically rolls back; if not, enter S215;
[0098] S215, determine whether the programming completion instruction is received, if so, proceed to S216, if not, return to S214;
[0099] S216, sending the programming completion result, the upgrade is successful and ends.
[0100] The above-mentioned embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present disclosure. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure.
Claims
1. A household energy storage BMS system, characterized in that: It includes a main controller, a battery monitoring module, an energy management module, a communication module and a user interface module, wherein the battery monitoring module, the energy management module, the communication module and the user interface module are all connected to the main controller; The battery monitoring unit is used to monitor the parameters of the household energy storage battery pack; The communication module supports RS485 communication protocol and is used for system program upgrade and data exchange; The energy management module is used to achieve balance between battery cells and adjust current, voltage and charge and discharge cycle in real time; The main controller is used to perform data processing, charge and discharge management, system protection measures and communication tasks.
2. A household energy storage BMS system according to claim 1, characterized in that: The battery monitoring module includes a voltage sensor, a current sensor and a temperature sensor, which are used to monitor the voltage, current and temperature of a household energy storage battery pack.
3. A household energy storage BMS system according to claim 1, characterized in that: The energy management module includes an active balancing module and a charge and discharge strategy optimization module; The active balancing module adopts a distributed balancing algorithm and a current control strategy to transfer charge from a high SOC cell to a low SOC cell through a PWM control circuit to achieve balancing between battery cells; The charge and discharge strategy optimization module adjusts the current, voltage and charge and discharge cycle in real time by combining the PID control algorithm and the SOC prediction model.
4. A household energy storage BMS system according to claim 1, characterized in that: The communication module adopts Modbus RTU communication protocol to realize data exchange with external devices; and supports firmware upgrade through RS485 protocol communication.
5. A household energy storage BMS system according to claim 1, characterized in that: The communication module establishes a long connection with the energy management system EMS to achieve real-time synchronization of data and command interaction, and supports the scheduling and control of the EMS.
6. A household energy storage BMS system according to claim 1, characterized in that: The communication module adjusts the power supply voltage and working cycle of the heating film through the communication protocol to control the temperature of the heating film.
7. A household energy storage BMS system according to claim 1, characterized in that: The user interface module includes a mobile application, a display screen and a Web control panel; the mobile application is used to allow users to monitor system status and perform remote control anytime and anywhere; the display screen is used to provide real-time system status and alarm information; the Web control panel is used to allow users to remotely access and control the system through the network.
8. A method for upgrading a home energy storage BMS system according to any one of claims 1 to 7, characterized in that: The following steps are involved: The host computer transmits the upgrade package data to the home energy storage BMS system through the communication module based on the RS485 communication protocol; The household energy storage BMS system upgrades the system program based on the upgrade package data, and feeds back the upgrade result to the host computer. If the upgrade fails, it will automatically roll back.