Automatic coding method of battery management system

By adopting the automatic coding method of inter-device communication and IO collaboration in the battery management system, the life problems of mechanical DIP switches and the limited number of devices are solved, automatic device numbering and multi-device connection are realized, and the difficulty of installation and maintenance is reduced. .

CN118740140APending Publication Date: 2024-10-01SHENZHEN UZ ENERGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310329921.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The address setting between devices in the existing battery management system relies on mechanical dial switches, which has life problems and high installation and maintenance requirements, and the number of supported devices is limited.

Method used

The automatic encoding method is implemented by using inter-device communication and IO collaboration in the battery management system, using optocouplers to enable IO port output and input, and automatically numbering devices through timing and timer management steps.

Benefits of technology

It realizes automatic numbering of equipment, supports the connection of multiple devices, is not limited by the number of DIP switches, and reduces the difficulty of installation and maintenance and the limit on the number of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740140A_ABST
    Figure CN118740140A_ABST
Patent Text Reader

Abstract

The invention provides an automatic coding method for a battery management system, and the method comprises the steps: the battery management system comprises a plurality of devices and a battery management controller, and the two devices are connected in a communication mode and an IO mode; the invention discloses a method for automatically numbering equipment through communication between the equipment and an IO cooperation mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery management, and in particular to an automatic coding method for a battery management system. Background Art

[0002] In the prior art, communication is achieved between devices, such as Figure 1 As shown, the device address is set by manually turning the DIP switch. The disadvantages are: the mechanical switch has a life problem, the requirements for installation and maintenance personnel are relatively high, the number of supported devices is limited to the number of DIP switch bits, and the limitations are relatively large. Summary of the invention

[0003] In view of the above problems, the present invention is proposed to provide a battery management system automatic coding method that overcomes the above problems or at least partially solves the above problems.

[0004] According to one aspect of the present invention, there is provided a battery management system automatic coding method, the automatic coding method comprising: the battery management system comprises a plurality of devices and a battery management controller, the two devices are respectively connected via a communication connection and an IO mode; Step 100: The battery management controller MCU is initialized, and the host enables multiple timings of starting up, including a first timing time, a second timing time, and a third timing time; Step 200: Determine whether the first timing time of power-on has expired, if yes, execute step 300; otherwise, return to step 200; Step 300: The optocoupler enables the IO port output to be pulled high; Step 400: Detect whether the optocoupler input port is high and lasts for a fixed time. If yes, execute step 500; otherwise, execute step 600; Step 500: The corresponding machine is a slave, and a flag is set; Step 600: Determine whether the second timing time of power-on has expired, if yes, execute step 700; otherwise, execute step 400; Step 700: Determine whether the machine is a slave, if yes, execute the encoding step; otherwise, execute step 800; Step 800: slave number X=0, enable the timer; Step 900: The machine is the host and issues a command numbered X; Step 1000: Wait for slave X to reply; Step 1100: Determine whether the timer has timed out. If so, execute the timeout step; otherwise, execute the non-timeout step.

[0005] Optionally, the timeout step specifically includes: Step 1101: After the numbering is completed, the timer is reset; Step 1102: renumbering detection, detecting whether the optical coupler input port is high and lasts for a second fixed time, if yes, executing step 1103; otherwise, executing step 900; Step 1103: Set the renumbering flag and return to execute step 500.

[0006] Optionally, the non-timeout step specifically includes: Step 1200: Determine whether the slave number is received and a response is returned. If yes, execute step 1300; otherwise, return to execute step 900; Step 1300: The optocoupler enables the IO port output to be pulled low; Step 1400: Send a slave number X-1 command, and the optocoupler enables the output IO to be pulled low; Step 1500 : Slave number X++, reset the timer, and return to step 900 .

[0007] Optionally, the encoding step specifically includes: Step 701: The optocoupler enables the output IO port to be pulled low; Step 702: The corresponding machine is a slave, waiting for the master number command; Step 703: Receive the host number command and determine whether the optocoupler input port is high; if yes, execute step 704; otherwise, execute step 702; Step 704: reply with a number completion response message; Step 705: The optocoupler enables the output IO port to be pulled high; Step 706: Numbering is completed.

[0008] Optionally, after the step 706: numbering is completed, the method further includes: step 707: receiving a host function command and closing the optocoupler to enable the output IO port.

[0009] Optionally, the first timing time is 3 seconds, the second timing time is 5 seconds, and the third timing time is 10 seconds.

[0010] Optionally, the fixed time in step 400 is 1 second.

[0011] Optionally, the timer in step 800 is a 1-second timer.

[0012] Optionally, the second fixed time in step 1102 is 2 seconds.

[0013] Optionally, the multiple devices are all connected to the battery management system to control the output positions of the optocoupler input ports of the devices.

[0014] The present invention provides an automatic coding method for a battery management system, which includes: the battery management system includes multiple devices and a battery management controller, and the two devices are connected through communication connection and IO mode respectively; a method for realizing automatic numbering of devices through communication between devices and IO collaboration mode.

[0015] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0017] Figure 1 A schematic diagram of the structure of setting the device address by manually turning a dial switch provided by the prior art; Figure 2 A schematic diagram of the structure of a battery management system provided by an embodiment of the present invention; Figure 3 A flowchart of an automatic encoding method for a battery management system provided by an embodiment of the present invention. Implementation

[0018] 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.

[0019] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0020] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0021] A battery management system automatic coding method, the automatic coding method comprising: Figure 2 As shown, the battery management system includes multiple devices and a battery management controller, and the two devices are connected via communication connection and IO mode respectively; like Figure 3 As shown, step 100: the battery management controller MCU is initialized, and the host enables multiple startup timings, including 3 seconds, 5 seconds, and 10 seconds; Step 200: Determine whether the 3-second power-on timer has expired. If so, execute step 300; otherwise, return to step 200; Step 300: The optocoupler enables the IO port output to be pulled high; Step 400: Detect whether the optocoupler input port is high and lasts for 1 second. If yes, execute step 500; otherwise, execute step 600; Step 500: The corresponding machine is a slave, and a flag is set; Step 600: Determine whether the 5-second power-on timer has expired. If so, execute step 700; otherwise, execute step 400; Step 700: Determine whether the machine is a slave, if yes, execute the encoding step; otherwise, execute step 800; Step 800: Slave number X=0, enable 1 second timer; Step 900: The machine is the host and issues a command numbered X; Step 1000: Wait for slave X to reply; Step 1100: Determine whether the 1-second timer has timed out. If so, execute the timeout step; otherwise, execute the non-timeout step.

[0022] The timeout steps include: Step 1101: Numbering is completed, and the 1-second timer is reset; Step 1102: renumbering detection, detect whether the optocoupler input port is high and lasts for 2 seconds, if yes, execute step 1103; otherwise, execute step 900; Step 1103: Set the renumbering flag and return to execute step 500.

[0023] The steps that did not time out specifically include: Step 1200: Determine whether the slave number is received and a response is returned. If yes, execute step 1300; otherwise, return to execute step 900; Step 1300: The optocoupler enables the IO port output to be pulled low; Step 1400: Send a slave number X-1 command, and the optocoupler enables the output IO to be pulled low; Step 1500 : Slave number X++, reset the timer, and return to step 900 .

[0024] The encoding steps specifically include: Step 701: The optocoupler enables the output IO port to be pulled low; Step 702: The corresponding machine is a slave, waiting for the master number command; Step 703: Receive the host number command and determine whether the optocoupler input port is high; if yes, execute step 704; otherwise, execute step 702; Step 704: reply with a number completion response message; Step 705: The optocoupler enables the output IO port to be pulled high; Step 706: Numbering is completed; Step 707: Receive a host function command and turn off the optocoupler to enable the output IO port.

[0025] Beneficial effect: The method of realizing automatic device numbering through inter-device communication and IO coordination can support multiple devices without being limited by the number of digits of the DIP switch.

[0026] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A battery management system automatic coding method, characterized in that: The automatic encoding method includes: the battery management system includes a plurality of devices and a battery management controller, and the two devices are connected via a communication connection and an IO mode respectively; Step 100: The battery management controller MCU is initialized, and the host enables multiple timings of starting up, including a first timing time, a second timing time, and a third timing time; Step 200: Determine whether the first timing time of power-on has expired, if yes, execute step 300; otherwise, return to step 200; Step 300: The optocoupler enables the IO port output to be pulled high; Step 400: Detect whether the optocoupler input port is high and lasts for a fixed time. If yes, execute step 500; otherwise, execute step 600; Step 500: The corresponding machine is a slave, and a flag is set; Step 600: Determine whether the second timing time of power-on has expired, if yes, execute step 700; otherwise, execute step 400; Step 700: Determine whether the machine is a slave, if yes, execute the encoding step; otherwise, execute step 800; Step 800: slave number X=0, enable the timer; Step 900: The machine is the host and issues a command numbered X; Step 1000: Wait for slave X to reply; Step 1100: Determine whether the timer has timed out. If so, execute the timeout step; otherwise, execute the non-timeout step.

2. A battery management system automatic coding method according to claim 1, characterized in that: The timeout step specifically includes: Step 1101: After the numbering is completed, the timer is reset; Step 1102: renumbering detection, detecting whether the optical coupler input port is high and lasts for a second fixed time, if yes, executing step 1103; otherwise, executing step 900; Step 1103: Set the renumbering flag and return to execute step 500.

3. The automatic coding method for a battery management system according to claim 1, characterized in that: The non-timeout step specifically includes: Step 1200: Determine whether the slave number is received and a response is returned. If yes, execute step 1300; otherwise, return to execute step 900; Step 1300: The optocoupler enables the IO port output to be pulled low; Step 1400: Send a slave number X-1 command, and the optocoupler enables the output IO to be pulled low; Step 1500 : Slave number X++, reset the timer, and return to step 900 .

4. The automatic coding method for a battery management system according to claim 1, characterized in that: The encoding step specifically includes: Step 701: The optocoupler enables the output IO port to be pulled low; Step 702: The corresponding machine is a slave, waiting for the master number command; Step 703: Receive the host number command and determine whether the optocoupler input port is high; if yes, execute step 704; otherwise, execute step 702; Step 704: reply with a number completion response message; Step 705: The optocoupler enables the output IO port to be pulled high; Step 706: Numbering is completed.

5. A battery management system automatic coding method according to claim 4, characterized in that: After the step 706: numbering is completed, the method further includes: step 707: receiving a host function command, and closing the optocoupler to enable the output IO port.

6. The automatic coding method for a battery management system according to claim 1, characterized in that: The first timing time is 3 seconds, the second timing time is 5 seconds, and the third timing time is 10 seconds.

7. The automatic coding method for a battery management system according to claim 1, characterized in that: The fixed time in step 400 is 1 second.

8. The automatic coding method for a battery management system according to claim 1, characterized in that: The timer in step 800 is a 1 second timer.

9. The automatic coding method for a battery management system according to claim 2, characterized in that: The second fixed time in step 1102 is 2 seconds.

10. The automatic coding method for a battery management system according to claim 1, characterized in that: The multiple devices are all connected to the battery management system to control the output positions of the optocoupler input ports of the devices.