Address allocation and program upgrade method, system and medium for parallel operation of multiple battery modules
By allocating addresses in the connection order in the multi-battery module and using the address identification code to perform program matching and upgrading, the production process difficulties and complex program upgrades caused by the stand-alone fixed address method are solved, and efficiency is improved.
Patent Information
- Application Number
- CN202310186555.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-03-01
AI Technical Summary
In the existing multi-battery parallel technology, the single-machine fixed address method leads to difficulties in production process and dialing difficulties caused by installation location, and the program upgrade method is complicated and cumbersome.
Each battery module is used as the main or auxiliary module in the order of connection. Through the address allocation program of the main module and the address interaction between the auxiliary module, the address is automatically allocated, and the address identification code is used to match the upgrade when the program is upgraded.
It solves the problems of production process difficulties and complex program upgrades, realizes automatic address allocation and upgrades, and improves production and operation efficiency.
Smart Images

Figure CN116170412B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery parallel control, and in particular to an address allocation and program upgrade method, system and medium for parallel operation of multiple battery modules. Background Art
[0002] The existing multi-battery parallel technology uses a single fixed address method for communication, and most program upgrade methods still use a single unit upgrade method.
[0003] The existing single-machine fixed address method for communication generally adopts the following two methods. The first is to write the machine address into the internal control program of the battery, but it will cause the control program of each machine to be different, resulting in difficulties in the production process; the second is to use the internal control program of the battery to read the external dial switch to determine the different machine addresses, but when the battery is installed in place, it is sometimes difficult to dial the code due to the installation position, resulting in inconvenience in paralleling.
[0004] Moreover, the existing program upgrade method still adopts a method of upgrading a single machine, and the program will be upgraded one by one during the program upgrade, which makes the operation complicated. Summary of the invention
[0005] In order to overcome the existing single-machine fixed address method for communication in the above background technology, the following two methods are generally used. The first is to write the machine address in the internal control program of the battery, but it will cause the control program of each machine to be different, resulting in difficulties in the production process; the second is to use the internal control program of the battery to read the external dial switch to determine the different machine addresses, but when the battery is installed in the right position, it is sometimes difficult to dial the code due to the installation position, resulting in inconvenience in parallel. Moreover, the existing program upgrade method still adopts the method of upgrading for a single unit, and the program will be upgraded one by one during the program upgrade, resulting in the disadvantage of complex operation. The purpose of the present invention is to provide an address allocation and program upgrade method for paralleling multiple battery modules.
[0006] In order to achieve the above purpose, the present invention adopts the following technical solution:
[0007] In a first aspect of the present invention, a method for address allocation and program upgrade of a multi-battery module parallel system is provided, wherein each battery module in the multi-battery module is connected in sequence, the multi-battery module comprises a plurality of battery modules, the first battery module is connected as a main battery module and a control switch in a connection sequence, and the remaining battery modules are connected as auxiliary battery modules: the address allocation is performed according to the connection sequence of each battery module, specifically comprising: an address allocation stage and a program upgrade stage:
[0008] The address allocation stage includes the following:
[0009] The address of the main battery module is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation program of the main battery module: sets the main battery module address, and the main battery module sends a shutdown and restart instruction to all auxiliary battery modules. When all auxiliary battery modules are shut down and restarted, the main battery module sends an address setting instruction and the main battery module address to all auxiliary battery modules; after all auxiliary battery modules receive the address setting instruction and the main battery module address, they enter their respective address allocation programs: set their respective addresses to (main battery module address - address interval), and send instructions to the main battery module that the local address has been set; after the main battery module receives the instruction that the local address has been set, it no longer sends the main battery module address, and exits the address allocation program of the main battery module, completing the address allocation;
[0010] The address of the current auxiliary battery module is allocated as follows: the current auxiliary battery module sends a shutdown and restart instruction to the remaining auxiliary battery modules. When the remaining auxiliary battery modules are shut down and restarted, the current auxiliary battery module sends an address setting instruction and the current auxiliary battery module address to the remaining auxiliary battery modules; after receiving the address setting instruction and the current auxiliary battery module address, the remaining auxiliary battery modules enter their respective address allocation procedures: set their respective addresses to (current auxiliary battery module address - address interval), and send instructions to the current auxiliary battery module that the local address has been set; after receiving the instruction that the local address has been set, the current auxiliary battery module no longer sends the current auxiliary battery module address, and exits the address allocation procedure of the current auxiliary battery module, completing the address allocation;
[0011] The program upgrade phase includes the following:
[0012] The assigned address of each battery module is read through the upgrade program code package to complete the program upgrade of the battery module itself, wherein each upgrade program code in the upgrade program code package is respectively configured with an address identification code, and the address identification code is used to identify the assigned address of each battery module, and they correspond one to one.
[0013] The beneficial effects of the present invention are as follows: without changing the battery performance, an address allocation program is added to the internal control program of the battery, the address allocation program of the main battery module is entered first, and through the instructions and address interactions between the main battery module and the auxiliary battery module, the respective address allocation programs are entered, and the respective address allocations are completed in sequence according to the connection sequence. The address allocation program of each battery module is the same, which solves the problem of difficult production processes; when the program is upgraded, it will automatically match and upgrade according to the addresses of different battery modules, without the need to upgrade the program one by one, which greatly increases the efficiency of producers and operators.
[0014] In some possible implementations, after each battery module sets its local address, it sets a flag indicating that its local address has been set. The flag indicating that its local address has been set is used to inform the respective address allocation programs that the local address of the current battery module has been set, thereby preventing the address allocation programs from continuing to allocate addresses, resulting in missed addresses and inaccurate address allocation.
[0015] In some possible implementations, each battery module clears the last local address setting flag before setting the local address, to prevent the last local address setting flag from interfering with the current address allocation, causing address omission and inaccurate address allocation.
[0016] In some possible implementations, each battery module maintains the already set local address when it does not receive the address setting instruction, so as to prevent each battery module from continuing to participate in the allocation after the address is allocated, resulting in confusion in the address allocation. At the same time, the address setting instruction is received as a sign that the local address allocation is completed, so as to facilitate the subsequent address allocation of other unallocated battery modules.
[0017] In a second aspect of the present invention, an address allocation and program upgrade system for parallel operation of multiple battery modules is provided, wherein each battery module in the multiple battery modules is connected in sequence, the multiple battery modules include a plurality of battery modules, the first battery module is connected as a main battery module and a control switch in a connection sequence, and the remaining battery modules are connected as auxiliary battery modules: the address allocation is allocated according to the connection sequence of each battery module, and the system includes: an address allocation module and a program upgrade module,
[0018] The working process of the address allocation module is as follows:
[0019] The address of the main battery module is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation program of the main battery module: sets the main battery module address, and the main battery module sends a shutdown and restart instruction to all auxiliary battery modules. When all auxiliary battery modules are shut down and restarted, the main battery module sends an address setting instruction and the main battery module address to all auxiliary battery modules; after all auxiliary battery modules receive the address setting instruction and the main battery module address, they enter their respective address allocation programs: set their respective addresses to (main battery module address - address interval), and send instructions to the main battery module that the local address has been set; after the main battery module receives the instruction that the local address has been set, it no longer sends the main battery module address, and exits the address allocation program of the main battery module, completing the address allocation;
[0020] The address of the current auxiliary battery module is allocated as follows: the current auxiliary battery module sends a shutdown and restart instruction to the remaining auxiliary battery modules. When the remaining auxiliary battery modules are shut down and restarted, the current auxiliary battery module sends an address setting instruction and the current auxiliary battery module address to the remaining auxiliary battery modules; after receiving the address setting instruction and the current auxiliary battery module address, the remaining auxiliary battery modules enter their respective address allocation procedures: set their respective addresses to (current auxiliary battery module address - address interval), and send instructions to the current auxiliary battery module that the local address has been set; after receiving the instruction that the local address has been set, the current auxiliary battery module no longer sends the current auxiliary battery module address, and exits the address allocation procedure of the current auxiliary battery module, completing the address allocation;
[0021] The working process of the program upgrade module is as follows:
[0022] The assigned address of each battery module is read through the upgrade program code package to complete the program upgrade of the battery module itself, wherein each upgrade program code in the upgrade program code package is respectively configured with an address identification code, and the address identification code is used to identify the assigned address of each battery module, and they correspond one to one.
[0023] In some possible implementations, after each battery module sets its local address, it sets a flag indicating that its local address has been set.
[0024] In some possible implementations, before setting the local address of each battery module, the flag indicating that the local address has been set last time is cleared.
[0025] In some possible implementations, when no address setting instruction is received, each battery module maintains the set local address unchanged.
[0026] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the address allocation and program upgrade method for parallel operation of multiple battery modules as described in any one of claims 1 to 4 are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of the structure of two battery modules in parallel in Embodiment 1 of the present invention;
[0028] Figure 2 This is a flowchart of the address allocation steps for parallel connection of two battery modules in Embodiment 1 of the present invention;
[0029] Figure 3 This is a flowchart of the program upgrade steps for parallel operation of two battery modules in Embodiment 1 of the present invention;
[0030] Figure 4This is a schematic diagram of the structure of three battery modules in parallel in the second embodiment of the present invention;
[0031] Figure 5 This is a flowchart of the address allocation steps for parallel connection of three battery modules in the second embodiment of the present invention;
[0032] Figure 6 This is a flowchart of the program upgrade steps for parallel operation of three battery modules in Embodiment 2 of the present invention;
[0033] Figure 7 This is a schematic diagram of the structure of four battery modules in parallel in Embodiment 3 of the present invention;
[0034] Figure 8 This is a flowchart of the address allocation steps for parallel connection of four battery modules in Embodiment 3 of the present invention;
[0035] Fig. 9 This is a flowchart of the program upgrade steps for parallel operation of four battery modules in Embodiment 3 of the present invention;
[0036] Fig.10 It is a structural diagram of the address allocation and program upgrade system for parallel operation of multiple battery modules in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.
[0038] Embodiment 1
[0039] Provides the address allocation and program upgrade method for parallel operation of multiple battery modules. Figure 1 As shown, each battery module in the multi-battery module is connected in sequence through a connecting line, and the multi-battery module includes two battery modules. The first battery module is connected as a main battery module and a control switch in a connection sequence, and the other battery module is used as an auxiliary battery module: The address allocation is allocated according to the connection sequence of each battery module, specifically including: an address allocation stage and a program upgrade stage:
[0040] See attached Figure 2 As shown, the address allocation stage includes the following:
[0041] S1: The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation procedure of the main battery module: clears the local address of the main battery module to set the flag, sets the main battery module address, and sets the local address of the main battery module to set the flag.
[0042] S2: the main battery module sends a shutdown and restart instruction to the auxiliary battery module. When the auxiliary battery module is shut down and restarted, the local address of the auxiliary battery module is cleared, and the main battery module sends an address setting instruction and the main battery module address to the auxiliary battery module; after the auxiliary battery module receives the address setting instruction and the main battery module address, it enters the address allocation program of the auxiliary battery module: the auxiliary battery module address is set to (main battery module address-2), the local address of the auxiliary battery module is set, and the local address is set instruction is sent to the main battery module; after the main battery module receives the local address is set instruction, it no longer sends the main battery module address, and exits the address allocation program of the main battery module, completing the address allocation;
[0043] S3: The address of the auxiliary battery module is allocated as follows: the auxiliary battery module sends a shutdown and restart command downward through the port, and then the auxiliary battery module sends an address setting command and the auxiliary battery module address downward; the auxiliary battery module does not receive the local address setting command due to timeout, exits the battery machine address automatic allocation program, completes the address allocation, and maintains the set auxiliary battery module address unchanged.
[0044] See attached Figure 3 As shown, the program upgrade stage includes the following: the upgrade program code package includes a main battery module upgrade program code and an auxiliary battery module upgrade program code.
[0045] S4: The main battery module receives the upgrade program code package. Since the main battery module upgrade program code includes the main battery module address identification code, the main battery module address identification code identifies the main battery module address, discards the auxiliary battery module upgrade program code, and completes the main battery module's own program upgrade.
[0046] S5: The auxiliary battery module receives the upgrade program code package. Since the auxiliary battery module upgrade program code includes the auxiliary battery module address identification code, the auxiliary battery module address identification code is used to identify the auxiliary battery module address, and the main battery module upgrade program code is discarded to complete the auxiliary battery module's own program upgrade.
[0047] Embodiment 2
[0048] Provides the address allocation and program upgrade method for parallel operation of multiple battery modules. Figure 4 As shown, each battery module in the multi-battery module is connected in sequence through a connecting line. The multi-battery module includes three battery modules. The first battery module is connected as a main battery module and a control switch in a connection sequence, and the remaining battery modules are auxiliary battery modules, which are the first auxiliary battery module and the second auxiliary battery module in sequence: The address allocation is allocated according to the connection sequence of each battery module, specifically including: address allocation stage and program upgrade stage:
[0049] See attached Figure 5 As shown, the address allocation stage includes the following:
[0050] S1: The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation procedure of the main battery module: clears the local address of the main battery module to set the flag, sets the main battery module address, and sets the local address of the main battery module to set the flag.
[0051] S2: the main battery module sends a shutdown and restart instruction to the first auxiliary battery module and the second auxiliary battery module. After the first auxiliary battery module and the second auxiliary battery module are shut down and restarted, the respective local address has been set flags are cleared, and the main battery module sends an address setting instruction and the main battery module address to the first auxiliary battery module and the second auxiliary battery module; after receiving the address setting instruction and the main battery module address, the first auxiliary battery module and the second auxiliary battery module enter their respective address allocation procedures: the addresses of the first auxiliary battery module and the second auxiliary battery module are both set to (main battery module address-2), the respective local address has been set flags are set, and the local address has been set instruction is sent to the main battery module; after receiving the local address has been set instruction, the main battery module no longer sends the main battery module address, and exits the address allocation procedure of the main battery module, completing the address allocation;
[0052] S3: The address of the first auxiliary battery module is allocated as follows: the first auxiliary battery module sends a shutdown and restart instruction to the second auxiliary battery module. After the second auxiliary battery module is shut down and restarted, the flag that the local address of the second auxiliary battery module has been set is cleared, and then the first auxiliary battery module sends an address setting instruction and the first auxiliary battery module address to the second auxiliary battery module; after the second auxiliary battery module receives the address setting instruction and the first auxiliary battery module address, it sets the second auxiliary battery module address to (the first auxiliary battery module address-2), sets the flag that the local address of the second auxiliary battery module has been set, and sends the local address setting instruction to the first auxiliary battery module; after the first auxiliary battery module receives the local address setting instruction, it no longer sends the first auxiliary battery module address, and exits the address allocation program of the first auxiliary battery module, completing the address allocation;
[0053] S4: The address of the second auxiliary battery module is allocated as follows: the second auxiliary battery module sends a shutdown and restart command downward through the port, and then the second auxiliary battery module sends an address setting command and the second auxiliary battery module address downward; the second auxiliary battery module does not receive the local address setting command due to timeout, exits the battery machine address automatic allocation program, completes the address allocation, and maintains the set second auxiliary battery module address unchanged.
[0054] See attached Figure 6As shown, the program upgrade stage includes the following: the upgrade program code package includes a main battery module upgrade program code, a first auxiliary battery module upgrade program code and a second auxiliary battery module upgrade program code.
[0055] S5: The main battery module receives the upgrade program code package. Since the main battery module upgrade program code includes the main battery module address identification code, the main battery module address identification code identifies the main battery module address, discards the first auxiliary battery module upgrade program code and the second auxiliary battery module upgrade program code, and completes the main battery module's own program upgrade.
[0056] S6: The first auxiliary battery module receives the upgrade program code package. Since the first auxiliary battery module upgrade program code includes the first auxiliary battery module address identification code, the first auxiliary battery module address identification code identifies the first auxiliary battery module address, discards the main battery module upgrade program code and the second auxiliary battery module upgrade program code, and completes the first auxiliary battery module's own program upgrade.
[0057] S7: The second auxiliary battery module receives the upgrade program code package. Since the second auxiliary battery module upgrade program code includes the second auxiliary battery module address identification code, the second auxiliary battery module address identification code identifies the second auxiliary battery module address, discards the main battery module upgrade program code and the first auxiliary battery module upgrade program code, and completes the second auxiliary battery module's own program upgrade.
[0058] Embodiment 3
[0059] Provides the address allocation and program upgrade method for parallel operation of multiple battery modules. Figure 7 As shown, each battery module in the multi-battery module is connected in sequence through a connecting line. The multi-battery module includes four battery modules. The first battery module is connected as a main battery module and a control switch in a connection order, and the remaining battery modules are auxiliary battery modules, which are the first auxiliary battery module, the second auxiliary battery module and the third auxiliary battery module in sequence: The address allocation is allocated according to the connection order of each battery module, specifically including: address allocation stage and program upgrade stage:
[0060] See attached Figure 8 As shown, the address allocation stage includes the following:
[0061] S1: The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation procedure of the main battery module: clears the local address of the main battery module to set the flag, sets the main battery module address, and sets the local address of the main battery module to set the flag.
[0062] S2: the main battery module sends a shutdown and restart instruction to the first auxiliary battery module, the second auxiliary battery module and the third auxiliary battery module. After the first auxiliary battery module, the second auxiliary battery module and the third auxiliary battery module are shut down and restarted, the respective local address has been set flags are cleared, and the main battery module sends an address setting instruction and the main battery module address to the first auxiliary battery module, the second auxiliary battery module and the third auxiliary battery module; after receiving the address setting instruction and the main battery module address, the first auxiliary battery module, the second auxiliary battery module and the third auxiliary battery module enter their respective address allocation procedures: set their respective addresses to (main battery module address-2), set their respective local address has been set flags, and send a local address has been set instruction to the main battery module; after receiving the local address has been set instruction, the main battery module no longer sends the main battery module address, and exits the address allocation procedure of the main battery module, completing the address allocation;
[0063] S3: The address of the first auxiliary battery module is allocated as follows: the first auxiliary battery module sends a shutdown and restart instruction to the second and third auxiliary battery modules. After the second and third auxiliary battery modules are shut down and restarted, the local address of the second and third auxiliary battery modules is cleared, and then the first auxiliary battery module sends an address setting instruction and the first auxiliary battery module address to the second and third auxiliary battery modules; after receiving the address setting instruction and the first auxiliary battery module address, the second and third auxiliary battery modules set their respective addresses to (the first auxiliary battery module address - 2), set their respective local address setting flags, and send a local address setting instruction to the first auxiliary battery module; after receiving the local address setting instruction, the first auxiliary battery module no longer sends the first auxiliary battery module address, and exits the address allocation program of the first auxiliary battery module, completing the address allocation;
[0064] S4: The address of the second auxiliary battery module is allocated as follows: the second auxiliary battery module sends a shutdown and restart instruction to the third auxiliary battery module. After the third auxiliary battery module is shut down and restarted, the local address of the third auxiliary battery module is cleared, and then the second auxiliary battery module sends an address setting instruction and the second auxiliary battery module address to the third auxiliary battery module; after the third auxiliary battery module receives the address setting instruction and the second auxiliary battery module address, the third auxiliary battery module address is set to (the second auxiliary battery module address-2), the local address of the third auxiliary battery module is set, and the local address instruction is sent to the second auxiliary battery module; after the second auxiliary battery module receives the local address instruction, it no longer sends the second auxiliary battery module address, and exits the address allocation program of the second auxiliary battery module, completing the address allocation;
[0065] S5: The address of the third auxiliary battery module is allocated as follows: the third auxiliary battery module sends a shutdown and restart command downward, and then the third auxiliary battery module sends an address setting command and the third auxiliary battery module address downward through the port; the second auxiliary battery module does not receive the local address setting command due to timeout, exits the battery machine address automatic allocation program, completes the address allocation, and maintains the set third auxiliary battery module address unchanged.
[0066] See attached Fig. 9 As shown, the program upgrade stage includes the following: the upgrade program code package includes a main battery module upgrade program code, a first auxiliary battery module upgrade program code, a second auxiliary battery module upgrade program code and a third auxiliary battery module upgrade program code.
[0067] S6: The main battery module receives the upgrade program code package. Since the main battery module upgrade program code includes the main battery module address identification code, the main battery module address identification code identifies the main battery module address, discards the first auxiliary battery module upgrade program code, the second auxiliary battery module upgrade program code and the third auxiliary battery module upgrade program code, and completes the main battery module's own program upgrade.
[0068] S7: The first auxiliary battery module receives the upgrade program code package. Since the first auxiliary battery module upgrade program code includes the first auxiliary battery module address identification code, the first auxiliary battery module address identification code identifies the first auxiliary battery module address, discards the main battery module upgrade program code, the second auxiliary battery module upgrade program code and the third auxiliary battery module upgrade program code, and completes the first auxiliary battery module's own program upgrade.
[0069] S8: The second auxiliary battery module receives the upgrade program code package. Since the second auxiliary battery module upgrade program code includes the second auxiliary battery module address identification code, the second auxiliary battery module address identification code identifies the second auxiliary battery module address, discards the main battery module upgrade program code, the first auxiliary battery module upgrade program code and the third auxiliary battery module upgrade program code, and completes the second auxiliary battery module's own program upgrade.
[0070] S9: The third auxiliary battery module receives the upgrade program code package. Since the third auxiliary battery module upgrade program code includes the third auxiliary battery module address identification code, the third auxiliary battery module address identification code identifies the third auxiliary battery module address, discards the main battery module upgrade program code, the first auxiliary battery module upgrade program code and the second auxiliary battery module upgrade program code, and completes the third auxiliary battery module's own program upgrade.
[0071] The beneficial effects of the present invention are as follows: without changing the battery performance, an address allocation program is added to the internal control program of the battery, the address allocation program of the main battery module is entered first, and through the instructions and address interactions between the main battery module and the auxiliary battery module, the respective address allocation programs are entered, and the respective address allocations are completed in sequence according to the connection sequence. The address allocation program of each battery module is the same, which solves the problem of difficult production processes; when the program is upgraded, it will automatically match and upgrade according to the addresses of different battery modules, without the need to upgrade the program one by one, which greatly increases the efficiency of producers and operators.
[0072] In some implementations, after each battery module sets its local address, it sets a flag indicating that its local address has been set. The purpose of setting the flag is to let the respective address allocation programs know that the local address of the current battery module has been set, so as to prevent the address allocation programs from continuing to allocate addresses, resulting in missed addresses and inaccurate address allocation.
[0073] In some implementations, each battery module clears the last local address setting flag before setting the local address, to prevent the last local address setting flag from interfering with the current address allocation, causing address omission and inaccurate address allocation.
[0074] In some embodiments, each battery module maintains the already set local address when it does not receive the address setting instruction, so as to prevent each battery module from continuing to participate in the allocation after the address is allocated, resulting in confusion in the address allocation. At the same time, the address setting instruction is received as a sign that the local address allocation is completed, so as to facilitate the subsequent address allocation of other unallocated battery modules.
[0075] The embodiment of the present invention also provides an address allocation and program upgrade system for parallel operation of multiple battery modules, and performs the steps of the above method. Each battery module in the multiple battery modules is connected in sequence through a connecting line. The multiple battery modules include a plurality of battery modules. The first battery module is connected to the control switch as the main battery module in the connection sequence, and the remaining battery modules are connected as auxiliary battery modules. The address allocation is allocated according to the connection sequence of each battery module. See the attached Fig.10 As shown, the system includes: an address allocation module and a program upgrade module,
[0076] The working process of the address allocation module is as follows:
[0077] The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation program of the main battery module: sets the main battery module address, sets the local address has been set flag, and the main battery module sends a shutdown and restart command to all auxiliary battery modules. When all auxiliary battery modules are shut down and restarted, the main battery module sends an address setting instruction and the main battery module address to all auxiliary battery modules; after all auxiliary battery modules receive the address setting instruction and the main battery module address, they enter their respective address allocation programs: set their respective addresses to (main battery module address - address interval), and send local address set instructions to the main battery module respectively;
[0078] The address of the current auxiliary battery module is allocated as follows: the current auxiliary battery module sends a shutdown and restart instruction to the remaining auxiliary battery modules. When the remaining auxiliary battery modules are shut down and restarted, the current auxiliary battery module sends an address setting instruction and the current auxiliary battery module address to the remaining auxiliary battery modules; after receiving the address setting instruction and the current auxiliary battery module address, the remaining auxiliary battery modules enter their respective address allocation procedures: set their respective addresses to (current auxiliary battery module address - address interval), and send instructions to the current auxiliary battery module that their local addresses have been set;
[0079] After each battery module receives the instruction that the local address has been set, it no longer sends the local address and exits the local address allocation program to complete the address allocation;
[0080] The working process of the program upgrade module is as follows:
[0081] The assigned address of each battery module is read through the upgrade program code package to complete the program upgrade of the battery module itself, wherein each upgrade program code in the upgrade program code package is respectively configured with an address identification code, and the address identification code is used to identify the assigned address of each battery module, and they correspond one to one.
[0082] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the address allocation and program upgrade method for parallel operation of multiple battery modules as described in any one of claims 1 to 4 are implemented.
[0083] The storage medium stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, or a tablet.
[0084] The processor may also be referred to as a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor may also be:
[0085] DSP (Digital Signal Processor, digital signal processor, digital signal processor is a processor composed of large-scale or ultra-large-scale integrated circuit chips to complete certain signal processing tasks. It has gradually developed to meet the needs of high-speed real-time signal processing tasks. With the development of integrated circuit technology and digital signal processing algorithms, the implementation methods of digital signal processors are constantly changing, and the processing functions are constantly improving and expanding.)
[0086] ASIC (Application Specific Integrated Circuit) is an integrated circuit designed and manufactured to meet the needs of specific users and specific electronic systems.
[0087] FPGA (Field Programmable Gate Array) is a product further developed on the basis of programmable devices such as PAL (Programmable Array Logic) and GAL (generic array logic). It emerged as a semi-custom circuit in the field of application-specific integrated circuits (ASICs), which not only solves the shortcomings of custom circuits, but also overcomes the shortcomings of the limited number of gate circuits of the original programmable devices.
[0088] A general-purpose processor may be a microprocessor or any conventional processor.
[0089] The above implementation modes are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. The address allocation and program upgrade method for parallel connection of multiple battery modules is characterized in that: Each battery module in the multi-battery module is connected in sequence, and the multi-battery module includes several battery modules. The first battery module is connected as a main battery module and a control switch in a connection sequence, and the remaining battery modules are used as auxiliary battery modules: the address allocation is allocated according to the connection sequence of each battery module, specifically including: address allocation stage and program upgrade stage: The address allocation stage includes: The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation program of the main battery module: sets the main battery module address, and the main battery module sends a shutdown and restart instruction to all auxiliary battery modules. When all auxiliary battery modules are shut down and restarted, the main battery module sends an address setting instruction and the main battery module address to all auxiliary battery modules; after all auxiliary battery modules receive the address setting instruction and the main battery module address, they enter their respective address allocation programs: set their respective addresses to (main battery module address - address interval), and send a local address setting instruction to the main battery module respectively; after the main battery module receives the local address setting instruction, it no longer sends the main battery module address, and exits the address allocation program of the main battery module, completing the address allocation; The address of the current auxiliary battery module is allocated as follows: the current auxiliary battery module sends a shutdown and restart instruction to the remaining auxiliary battery modules. When the remaining auxiliary battery modules are shut down and restarted, the current auxiliary battery module sends an address setting instruction and the current auxiliary battery module address to the remaining auxiliary battery modules; after receiving the address setting instruction and the current auxiliary battery module address, the remaining auxiliary battery modules enter their respective address allocation procedures: set their respective addresses to (current auxiliary battery module address - address interval), and send instructions to the current auxiliary battery module that the local address has been set; after receiving the instruction that the local address has been set, the current auxiliary battery module no longer sends the current auxiliary battery module address, and exits the address allocation procedure of the current auxiliary battery module, completing the address allocation; The program upgrade phase includes: The assigned address of each battery module is read through the upgrade program code package to complete the program upgrade of the battery module itself, wherein each upgrade program code in the upgrade program code package is respectively configured with an address identification code, and the address identification code is used to identify the assigned address of each battery module, and correspond one to one, wherein when the program is upgraded, it will automatically match and upgrade according to the addresses of different battery modules.
2. The method for address allocation and program upgrade of multiple battery modules in parallel according to claim 1, characterized in that: After each battery module sets its local address, it sets a flag indicating that its local address has been set.
3. The method for address allocation and program upgrade of multiple battery modules in parallel according to claim 1, characterized in that: Before setting the local address of each battery module, the flag indicating that the local address has been set last time is cleared.
4. The method for address allocation and program upgrade of multiple battery modules in parallel according to claim 1, characterized in that: When no address setting instruction is received, each battery module maintains the set local address unchanged.
5. The address allocation and program upgrade system for multiple battery modules in parallel is characterized by: Each battery module in the multi-battery module is connected in sequence, and the multi-battery module includes several battery modules. The first battery module is connected as a main battery module and a control switch in a connection sequence, and the remaining battery modules are used as auxiliary battery modules: the address allocation is allocated according to the connection sequence of each battery module, and the system includes: an address allocation module and a program upgrade module: The working process of the address allocation module is as follows: The main battery module address is allocated as follows: the main battery module identifies the pressing time threshold of the control switch, and after exceeding the time threshold, enters the address allocation program of the main battery module: sets the main battery module address, and the main battery module sends a shutdown and restart instruction to all auxiliary battery modules. When all auxiliary battery modules are shut down and restarted, the main battery module sends an address setting instruction and the main battery module address to all auxiliary battery modules; after all auxiliary battery modules receive the address setting instruction and the main battery module address, they enter their respective address allocation programs: set their respective addresses to (main battery module address - address interval), and send a local address setting instruction to the main battery module respectively; after the main battery module receives the local address setting instruction, it no longer sends the main battery module address, and exits the address allocation program of the main battery module, completing the address allocation; The address of the current auxiliary battery module is allocated as follows: the current auxiliary battery module sends a shutdown and restart instruction to the remaining auxiliary battery modules. When the remaining auxiliary battery modules are shut down and restarted, the current auxiliary battery module sends an address setting instruction and the current auxiliary battery module address to the remaining auxiliary battery modules; after receiving the address setting instruction and the current auxiliary battery module address, the remaining auxiliary battery modules enter their respective address allocation procedures: set their respective addresses to (current auxiliary battery module address - address interval), and send instructions to the current auxiliary battery module that the local address has been set; after receiving the instruction that the local address has been set, the current auxiliary battery module no longer sends the current auxiliary battery module address, and exits the address allocation procedure of the current auxiliary battery module, completing the address allocation; The working process of the program upgrade module is as follows: The address assigned to each battery module is read through the upgrade program code package to complete the battery module program upgrade, wherein each upgrade program code in the upgrade program code package is respectively configured with an address identification code, and the address identification code is used to identify the address assigned to each battery module, and the address identification code corresponds to each other. When the program is upgraded, it will automatically match and upgrade according to the addresses of different battery modules.
6. The address allocation and program upgrade system for parallel connection of multiple battery modules according to claim 5, characterized in that: After each battery module sets its local address, it sets a flag indicating that its local address has been set.
7. The address allocation and program upgrade system for parallel connection of multiple battery modules according to claim 5, characterized in that: Before setting the local address of each battery module, the flag indicating that the local address has been set last time is cleared.
8. The address allocation and program upgrade system for parallel connection of multiple battery modules according to claim 5, characterized in that: When no address setting instruction is received, each battery module maintains the set local address unchanged.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for address allocation and program upgrade for parallel operation of multiple battery modules according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and device for automatically setting equipment communication address
CN112055096A
Control method for plurality of battery modules connected in parallel and power supply system
CN114976319A