System and method for graphically configuring and automatically generating BMS (Battery Management System) upgrading firmware
Through graphical configuration and online compilation, the system for generating BMS upgraded firmware is solved, and the problem of frequent code writing in BMS product applications is realized. Users need to complete customized functions by themselves, and development efficiency and adaptation efficiency are improved.
Patent Information
- Application Number
- CN202510288548.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-12
AI Technical Summary
In BMS product applications, users need to communicate frequently with BMS manufacturers and write codes to meet the needs of parameter and protocol changes, resulting in inefficient development.
Provides a system that configures graphically and automatically generates BMS upgrade firmware, uses graphical interface to convert user needs into program code, and generates BMS software upgrade firmware through online compilation.
Users can complete custom function requirements without learning programming knowledge, save time and cost, and improve the adaptability of BMS products to different application scenarios.
Smart Images

Figure CN119806601A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management systems, and more particularly to a system and method for graphically configuring and automatically generating BMS upgrade firmware. Background Art
[0002] In the application of BMS (battery management system) products, there are different degrees of program customization requirements. Parameter and protocol changes and function additions and deletions of BMS products often require developers to rewrite the code to meet the requirements. However, in actual application scenarios, users are often not BMS developers, so they need to communicate with BMS manufacturers repeatedly for modifications, which is time-consuming and greatly reduces the project development efficiency. Summary of the invention
[0003] In view of this, the present invention provides a system and method for graphically configuring and automatically generating BMS upgrade firmware, which uses a graphical interface to convert user requirements into program code through parameter configuration, and then generates BMS software upgrade firmware for users through online compilation. Users do not need to learn programming knowledge and skills to complete customized functional requirements, and can complete customized functional requirements of BMS products by themselves, saving time and cost, and greatly improving the adaptation efficiency of BMS products to different application scenarios.
[0004] To achieve the above object, the technical solution adopted by the present invention is:
[0005] In a first aspect, the present invention provides a system for graphically configuring and automatically generating BMS upgrade firmware, the system comprising: a graphical interface, a custom parameter module, a firmware configuration module and an online compilation module, wherein:
[0006] The graphical interface is used to display visual graphics of the custom parameter module, firmware configuration module and online compilation module;
[0007] The custom parameter module is used to customize the parameter names that need to be obtained and perform related operations on firmware custom parameters;
[0008] The firmware configuration module is used to select and modify the functional configuration of the firmware, as well as customize the protocol;
[0009] The online compiling module is used to automatically convert the parameter configurations of the custom parameter module and the firmware configuration module into program codes, and compile and generate firmware files for BMS software upgrades.
[0010] In an optional implementation, the custom parameter module performs operations related to firmware custom parameters, including: searching, adding, modifying, and exporting firmware custom parameters; the firmware custom parameters include Bit type parameters.
[0011] In an optional implementation, the firmware configuration module includes: a basic configuration unit, a custom CAN message unit, a custom Modbus message unit, and a custom UART message unit, wherein:
[0012] The basic configuration unit is used to provide optional functions and configurable parameters;
[0013] The custom CAN message unit is used to customize the CAN message. The items that need to be configured include: the ID of the configuration frame, the type of the frame, and the big-endian and small-endian modes; N bytes of the CAN message constitute a frame, and the content includes fixed values and optional data items;
[0014] The custom Modbus message unit is used to customize the Modbus message. The items that need to be configured include: protocol ID and start address; the message content includes fixed values and optional data items;
[0015] The custom UART message unit is used to customize the UART message. The UART message allows customizing multiple frames, and each frame configures the receiving message and the response message at the same time; the items that need to be configured include: big-endian and small-endian modes, verification methods and verification start bytes; the receiving message content includes a fixed value, and the response message content includes a fixed value, optional data items, and a verification code.
[0016] In an optional embodiment, in the basic configuration unit, the optional functions include: a heating function, a current limiting function and a CAN communication parallel function; the configurable parameters include: basic parameters, protection parameters, calibrated voltage and switch parameters.
[0017] In an optional implementation, in the custom CAN message unit, the frame types include: standard frames and extended frames.
[0018] In an optional implementation, in the custom UART message unit, the verification method includes: CRC verification, XOR verification, and cumulative verification.
[0019] In an optional embodiment, the system further includes: a firmware management module, configured to manage firmware files of the compiled BMS software.
[0020] In a second aspect, the present invention further provides a method for graphically configuring and automatically generating BMS upgrade firmware, which is applied to the above-mentioned system for graphically configuring and automatically generating BMS upgrade firmware to generate a firmware file for BMS software upgrade, and the method includes:
[0021] S1. Configure the parameters, functions and protocol contents of the BMS software through the graphical interface;
[0022] S2. After the configuration is completed, a structured program code is generated according to the configuration;
[0023] S3. Compile and generate a firmware file for BMS software upgrade based on the generated program code.
[0024] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0025] The present invention uses a graphical interface to convert user requirements into program code through parameter configuration, and then generates BMS software upgrade firmware for users through online compilation. Users do not need to learn programming knowledge and skills to complete customized functional requirements, and can complete customized functional requirements of BMS products by themselves, saving time and cost, and greatly improving the adaptation efficiency of BMS products to different application scenarios.
[0026] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0027] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0030] Figure 1 A schematic diagram of the structure of a system for graphically configuring and automatically generating BMS upgrade firmware provided by an embodiment of the present invention.
[0031] Figure 2 A schematic diagram of the working principle of the method for graphically configuring and automatically generating BMS upgrade firmware provided in an embodiment of the present invention.
[0032] Figure 3 A schematic diagram of newly created firmware provided by an embodiment of the present invention.
[0033] Figure 4A schematic diagram of adding firmware custom parameters provided by an embodiment of the present invention.
[0034] Figure 5 A schematic diagram of adding a custom Bit type parameter provided in an embodiment of the present invention.
[0035] Figure 6 A schematic diagram of code generated based on basic configuration provided in an embodiment of the present invention.
[0036] Figure 7 A schematic diagram of code generated based on a custom CAN message provided in an embodiment of the present invention.
[0037] Figure 8 A schematic diagram of code generated based on a custom Modbus message provided in an embodiment of the present invention.
[0038] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0040] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0041] Combination Figure 1 and Figure 2 As shown, an embodiment of the present invention provides a system for graphically configuring and automatically generating BMS upgrade firmware, the system comprising: a graphical interface, a custom parameter module, a firmware configuration module, an online compilation module and a firmware management module; wherein:
[0042] Graphical interface for displaying visualization of custom parameter modules, firmware configuration modules, and online compilation modules;
[0043] The custom parameter module is used to customize the parameter names that need to be obtained and perform related operations on firmware custom parameters;
[0044] The firmware configuration module is used to select and modify the firmware's functional configuration and custom protocol; specifically includes: basic configuration unit, custom CAN message unit, custom Modbus message unit and custom UART message unit.
[0045] The online compilation module is used to automatically convert user-defined configurations (parameter configurations of custom parameter modules and firmware configuration modules) into program codes. Specifically, a standardized program code template is first defined, and the configurable parameters in the template are extracted as software configurable parameters. Automatic conversion into code means replacing the parameters in the standard program template with the user-configured parameters in the software interface. Furthermore, the firmware file (bin file) for BMS software upgrade is compiled and generated. Specifically, the open source compilation tool chain is called to compile the generated code and generate a bin format file that can be burned to the BMS board.
[0046] The firmware management module is used to manage the firmware files of the compiled BMS software.
[0047] By using the present invention, users can configure the basic parameters, functions and protocol contents of BMS products through a graphical interface. After the configuration is completed, the system automatically generates structured C code according to the configuration, and the generated C code can be directly used to compile and generate firmware files for BMS product upgrades.
[0048] The following is a detailed description of a system for graphically configuring and automatically generating BMS upgrade firmware of the present invention:
[0049] 1. System workflow:
[0050] In the embodiment of the present invention, the BMS program is modularly designed to form a standardized engineering template, and optional functions and parameters are extracted and provided to users, and converted into customizable parameters. Users can freely modify the function configuration and customize the protocol (UART, MODBUS and CAN protocols) to meet the personalized customization requirements of the BMS. The specific workflow is as follows Figure 2 shown.
[0051] 2. Functions and parameters:
[0052] Different standard projects contain different basic functions. These functions are determined by the standard project and are mandatory functions. These functions only provide configurable parameters. Different standard projects have matching default parameters, and users only need to modify a few parameters that need to be modified.
[0053] 2.1 Optional features:
[0054] In the embodiment of the present invention, the optional functions include: a heating function, a current limiting function and CAN communication parallel operation.
[0055] 2.2 Parameters:
[0056] In the embodiment of the present invention, the configurable parameters include: basic parameters, protection parameters, calibrated voltage and switch parameters; the detailed parameters are respectively shown in Tables 1 to 4 below.
[0057] Table 1 Basic parameters
[0058]
[0059] Table 2 Protection parameters
[0060]
[0061] Table 3 Calibration voltage
[0062]
[0063] Table 4 Other parameters
[0064]
[0065] 3. Customized message:
[0066] In the embodiment of the present invention, the message is a data format for the BMS protection board to communicate with other devices. When the fixed message provided by the standard project cannot meet the needs, the user can generate the message format required by the user by customizing the message.
[0067] 3.1CAN message:
[0068] In the embodiment of the present invention, multiple CAN messages can be customized, and the items that need to be configured for each message are as follows:
[0069] ①Configure the frame ID (multiple messages cannot be repeated);
[0070] ②Frame type (standard frame, extended frame);
[0071] ③ Big-endian mode (big-endian mode, little-endian mode);
[0072] ④A CAN message consists of 8 bytes in one frame, and the content can be a fixed value or optional data item.
[0073] 3.2Modbus message:
[0074] The Modbus message has only one frame, and the items that need to be configured are as follows:
[0075] ①Protocol ID;
[0076] ②Starting address;
[0077] ③The message content can be a fixed value or optional data item, and the byte length cannot exceed the maximum length limit of Modbus protocol communication.
[0078] 3.3UART message:
[0079] In the embodiment of the present invention, the UART message can be customized into multiple frames, and each frame needs to configure both the receiving message and the response message. The items that need to be configured are as follows:
[0080] ① Big-endian mode and little-endian mode;
[0081] ② Verification method (CRC check, XOR check, cumulative check);
[0082] ③ Check the start byte;
[0083] ④The content of the received message is a fixed value;
[0084] ⑤The content of the response message can be a fixed value, optional data item, or a check code.
[0085] The following is an introduction to the specific working process of the system in conjunction with the accompanying drawings;
[0086] 1. New firmware: Figure 3 As shown, fill in the project model, firmware name and firmware version in sequence, and then click the OK button to add the firmware.
[0087] 2. Add custom parameters (optional): See Figure 4 As shown, the operation process includes: a. Select the original parameter; b. Enter the parameter alias; c. Modify the number of bytes, the coefficient (the multiple relationship with the original parameter), and the offset (the position offset value with the original parameter); d. Add the custom parameter by clicking the OK button.
[0088] 3. Add custom Bit type parameters: see Figure 5 As shown in the figure, the operation process includes: a. Enter the parameter name; b. Enter the number of bytes; c. Select the parameter item represented by each bit; d. Click the OK button to add the Bit type parameter.
[0089] 4. Basic function configuration: The operation process includes: a. Enter the firmware version; b. Select the type of battery cell according to the type of battery pack cell; c. Select whether to need heating, current limiting, and CAN parallel function; d. Set the basic parameters according to the battery pack parameters. The generated code can be found in Figure 6 shown.
[0090] 5. Custom CAN message (optional configuration): The operation process includes: a. Enter the message ID; b. Select the frame type (standard frame / extended frame); c. Select the big-endian mode (big-endian mode / little-endian mode); d. Select the message content. The generated code can be found in Figure 7 shown.
[0091] 6. Custom Modbus message (optional configuration): The operation process includes: a. Enter the communication protocol ID; b. Enter the starting address; c. Select the message content. The generated code can be found in Figure 8 shown.
[0092] 7. Custom UART message: The operation process includes: a. Select the big-endian mode (big-endian mode / little-endian mode); b. Check method (CRC check, XOR check, cumulative check); c. Enter the check start byte; d. Enter the receive message; e. Select the response message content.
[0093] 8. Submit generation: Submit the configuration file to the server.
[0094] 9. Wait for the server to compile and generate firmware files: convert the user's custom configuration into structured C language code according to certain rules, and then compile the code files generated by the standard project and configuration to generate bin files. The compilation process is completed by the background and does not require user participation. The rules for generating structured C code refer to: converting basic parameters and functions into macros, or converting custom messages into code functions, etc. For example, if a value is entered for the undervoltage protection value, the generated C code is "#define SC_CUV_Threshold 2700" (reference Figure 6 After the CAN protocol message is configured, the corresponding generated C code is as follows Figure 7 After these C codes are generated, they are compiled by a compiler to generate upgrade firmware that can be burned into the BMS board.
[0095] 10. After successful compilation, download the firmware file.
[0096] From the description of the above embodiments, those skilled in the art can know that the present invention provides a system for graphically configuring and automatically generating BMS upgrade firmware, which converts user requirements into program code through parameter configuration through a graphical interface, and then generates BMS software upgrade firmware for users through online compilation. Users do not need to learn programming knowledge and skills to complete customized functional requirements, and can complete customized functional requirements of BMS products by themselves, thereby greatly improving the adaptation efficiency of BMS products to different application scenarios.
[0097] In an optional embodiment, the embodiment of the present invention also provides a method for graphically configuring and automatically generating BMS upgrade firmware, which is applied to a system for graphically configuring and automatically generating BMS upgrade firmware in the above embodiment to generate a firmware file for BMS software upgrade. Please refer to the general flow of its work. Figure 2 As shown, the method mainly includes:
[0098] S1. Configure the parameters, functions and protocol contents of the BMS software through the graphical interface;
[0099] S2. After the configuration is completed, a structured program code is generated according to the configuration;
[0100] S3. Compile and generate a firmware file for BMS software upgrade based on the generated program code.
[0101] An embodiment of the present invention provides a method for graphically configuring and automatically generating BMS upgrade firmware. Its implementation principle and technical effects are the same as those of the aforementioned system embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the aforementioned system embodiment, which will not be repeated here.
[0102] Further, refer to Fig. 9 As shown, an embodiment of the present invention further provides an electronic device for graphically configuring and automatically generating BMS upgrade firmware. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10.
[0103] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (computer-readable storage medium), and calls data stored in the memory 11, so as to execute various functions of the electronic device and process data.
[0104] Examples of computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, DVD-ROM, Blu-ray or optical disk memory, hard disk drive (HDD), solid state drive (SSD), card memory (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any of which is configured to store computer programs and any associated data, data files and data structures in a non-temporary manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer programs. The computer programs in the above-mentioned computer-readable storage media can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc.
[0105] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as products such as software systems, methods or electronic devices. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] It should be noted that the word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several distinct components, and by means of a suitably programmed computer.
[0107] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0108] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A system for graphically configuring and automatically generating BMS upgrade firmware, characterized in that: The system includes: a graphical interface, a custom parameter module, a firmware configuration module and an online compilation module, among which: The graphical interface is used to display visual graphics of the custom parameter module, firmware configuration module and online compilation module; The custom parameter module is used to customize the parameter names that need to be obtained and perform related operations on the firmware custom parameters; the related operations include: searching, adding, modifying and exporting the firmware custom parameters; The firmware configuration module is used to select and modify the functional configuration of the firmware, as well as customize the protocol; The online compiling module is used to convert the parameter configurations of the custom parameter module and the firmware configuration module into program codes, and compile and generate firmware files for BMS software upgrades.
2. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: The firmware custom parameters include Bit type parameters.
3. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: The firmware configuration module includes: a basic configuration unit, a custom CAN message unit, a custom Modbus message unit and a custom UART message unit, wherein: The basic configuration unit is used to provide optional functions and configurable parameters; The custom CAN message unit is used to customize the CAN message. The items that need to be configured include: the ID of the configuration frame, the type of the frame, and the big-endian and small-endian modes; N bytes of the CAN message constitute a frame, and the content includes fixed values and optional data items; The custom Modbus message unit is used to customize the Modbus message. The items that need to be configured include: protocol ID and start address; the message content includes fixed values and optional data items; The custom UART message unit is used to customize the UART message. The UART message allows customizing multiple frames, and each frame configures the receiving message and the response message at the same time; the items that need to be configured include: big-endian and small-endian modes, verification methods and verification start bytes; the receiving message content includes a fixed value, and the response message content includes a fixed value, optional data items, and a verification code.
4. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 3, characterized in that: In the basic configuration unit, the optional functions include: heating function, current limiting function and CAN communication parallel function; the configurable parameters include: basic parameters, protection parameters, calibrated voltage and switch parameters.
5. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 3, characterized in that: In the custom CAN message unit, the frame types include: standard frame and extended frame.
6. A system for graphically configuring and automatically generating BMS upgrade firmware according to claim 3, characterized in that: In the custom UART message unit, the verification methods include: CRC verification, XOR verification, and cumulative verification.
7. The system for graphically configuring and automatically generating BMS upgrade firmware according to claim 1, characterized in that: The system also includes: a firmware management module, which is used to manage the firmware files of the compiled BMS software.
8. A method for graphically configuring and automatically generating BMS upgrade firmware, characterized in that: A system for graphically configuring and automatically generating BMS upgrade firmware according to any one of claims 1 to 7, generating a firmware file for BMS software upgrade, the method comprising: S1. Configure the parameters, functions and protocol contents of the BMS software through the graphical interface; S2. After the configuration is completed, a structured program code is generated according to the configuration; S3. Compile and generate a firmware file for BMS software upgrade based on the generated program code.
Citation Information
Patent Citations
BMS parameter expansion and display system
CN106909331A
Method for enabling household energy storage battery to be compatible with various inverters
CN111564858A
Configurable AUTOSAR CDD system integrated with calibration function
CN117055863A
Parameter configuration method and device of battery management system and medium
CN118890407A
PLC module configuration management method and system, electronic equipment and storage medium
CN119292651A