Bidirectional IO circuit for CAN address allocation of BMS slave control module and control method thereof

By designing bidirectional IO circuits and MCU programs in the slave control module to realize CAN address allocation, the problem of complex and error of address allocation in the energy storage system is solved, ensuring the uniqueness of slave control CAN ID on each PACK. Improves production and commissioning efficiency and simplifies storage and transport processes.

CN119182757APending Publication Date: 2024-12-24XINFENGGUANG ELECTRONICS TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411298056.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

In the prior art, the CAN address allocation of slave control modules in the energy storage system is complicated and errors are prone to occur, resulting in inconvenient storage and transportation of modules and large workloads.

Method used

Designed for BMS slave control module bidirectional IO circuits. Each slave control module contains two bidirectional IO circuits with the same circuit topology. The slave control MCU program realizes CAN address allocation to ensure that the slave control CAN ID is unique on each PACK. sex.

Benefits of technology

The production and assembly process of slave control modules is simplified, production efficiency and debugging efficiency are improved, module storage and transportation are facilitated, and cluster exceptions are avoided due to the same CAN address.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182757A_ABST
    Figure CN119182757A_ABST
Patent Text Reader

Abstract

The invention relates to the field of new energy storage battery management system communication, in particular to a bidirectional IO circuit for CAN address allocation of a BMS slave control module and a control method of the bidirectional IO circuit. Each slave control module comprises two bidirectional IO circuits with the same circuit topology structure; each bidirectional IO circuit comprises an external port and two internal ports; an external port of each bidirectional IO circuit is used for receiving a CAN address allocation instruction sent by a high-voltage box of the battery management system or an upper-level slave controller or is used for sending the CAN address allocation instruction to a lower-level slave controller of the battery management system; two internal ports of each bidirectional IO circuit are respectively an input interface and an output interface, and four internal ports of the first bidirectional IO circuit and the second bidirectional IO circuit of each slave control module are respectively connected to external input and output pins of two serial ports of the slave control MCU; according to the invention, CAN address allocation can be conveniently and quickly realized for the slave control modules on all battery PACKs in the clusters, and the CAN ID uniqueness of the slave control module on each PACK in all clusters can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication of new energy storage battery management system, and in particular to a bidirectional IO circuit and a control method thereof for allocating CAN addresses of BMS slave control modules. Background Art

[0002] The energy storage system includes a battery management system. In the energy storage system, the battery management system usually adopts a three-level architecture, from top to bottom, namely general control, master control, and slave control, so as to realize hierarchical control and management of battery modules.

[0003] Usually, a cluster of battery modules includes a high-voltage box and multiple battery PACKs. The high-voltage box contains a master controller, and a battery PACK contains a slave controller. CAN communication is generally used between the master controller in the high-voltage box and the slave controllers in multiple PACKs. The master controller obtains data such as the voltage, temperature, and balance status of all battery cells in the cluster through CAN communication. The master controller analyzes and processes all battery cell data and performs balance management on all battery cells through CAN communication.

[0004] Those skilled in the art are well aware that each node in a CAN communication network requires a unique CAN ID address, that is, the master control and all slave controls require a unique CAN ID, otherwise the master control cannot obtain the battery cell voltage, temperature, equilibrium status and other data collected by all slave controls; generally, three methods are used to assign CAN ID addresses to slave controls. The first is to use hardware design, such as designing a dip switch on the slave control circuit board, and the slave control MCU software program obtains the dip switch status to determine the CAN ID address of the slave control; the second is to burn a firmware containing a fixed CAN ID for each slave control MCU, and each slave control burns a firmware containing a fixed CAN ID according to its position in the cluster; the third is to set it through CAN communication, and use the host computer to set the slave control CAN ID through CAN communication according to the position of each slave control in the cluster. However, all three solutions bring problems to the production debugging of slave controls and the assembly of PACK clusters. The first hardware design solution requires the design of additional hardware such as dip switches. The dip switches need to be manually operated before the PACK clusters are installed. There is a possibility that the dip switches are not in place or are dialed incorrectly, resulting in the slave controls on multiple PACKs in the cluster having the same CAN ID. If the slave control circuit board is fixed inside the slave control housing, the CAN ID needs to be set before the slave control is assembled, and each slave control needs to be identified, which makes the storage and transportation of slave control modules inconvenient; the second method of burning the MCU firmware with a fixed CAN ID is cumbersome and needs to be burned before the slave control is assembled. Each slave control also needs to be identified, which makes the storage and transportation of slave control modules inconvenient; the third method of using the host computer to configure the slave control CAN ID through CAN communication requires the allocation of a CAN ID to each slave control in the cluster, which is a lot of work. Summary of the invention

[0005] In order to solve the problems of complex slave CAN address allocation, CAN address allocation errors, difficulty in slave module storage and transportation, and large workload of CAN address allocation, a bidirectional IO circuit for CAN address allocation is designed on the slave circuit board, and the two bidirectional IO circuits have no directionality to the external ports, that is, they can be used as CAN address allocation input ports or CAN address allocation output ports. Through the bidirectional IO CAN address allocation method in the slave MCU program, CAN address allocation can be easily and quickly implemented for all slaves in the cluster, and the uniqueness of the slave CAN ID on each PACK in all clusters can be guaranteed.

[0006] In view of the above problems, the present invention provides a bidirectional IO circuit for CAN address allocation of BMS slave control modules, each slave control module includes two bidirectional IO circuits with the same circuit topology, namely, a first and a second bidirectional IO circuit; each bidirectional IO circuit includes an external port and two internal ports; the external port of each bidirectional IO circuit is used to receive a CAN address allocation instruction sent by a high-voltage box of a battery management system or an upper-level slave control, or to send a CAN address allocation instruction to a lower-level slave control of the battery management system; the two internal ports of each bidirectional IO circuit are an input interface and an output interface, respectively, and the four internal ports of the first and second bidirectional IO circuits of each slave control module are respectively connected to the input and output pins of two serial port peripherals of the slave control MCU; the input interface of a bidirectional IO circuit of each slave control module sends the CAN address allocation instruction received by its external port to the slave control MCU, and the output interface of another bidirectional IO circuit of the slave control module sends the CAN address allocation instruction processed by the slave control MCU to the lower-level slave control of the battery management system through its external port.

[0007] Furthermore, the four internal ports of the first and second bidirectional IO circuits of each slave control module are respectively connected to the input and output pins of the two serial port peripherals of the slave control MCU, specifically: The input interface of the first bidirectional IO circuit is connected to the input pin of the first serial port peripheral of the slave MCU; The output interface of the first bidirectional IO circuit is connected to the output pin of the second serial port peripheral of the slave MCU; The input interface of the second bidirectional IO circuit is connected to the input pin of the second serial port peripheral of the slave MCU; The output interface of the second bidirectional IO circuit is connected to the output pin of the first serial port peripheral of the slave MCU.

[0008] Furthermore, the circuit topology structure of the first bidirectional IO circuit and the second bidirectional IO circuit is the same. Taking the first bidirectional IO circuit as an example, its topology structure is specifically as follows: the output interface of the first bidirectional IO circuit is connected to one end of the second resistor R2 and the base of the PNP transistor Q1 via the first resistor R1. The first resistor R1 limits the current of the base of the PNP transistor Q1, controls the collector output current of the PNP transistor Q1 not to be too large, and the PNP transistor Q1 reversely outputs the level of the output interface of the first bidirectional IO circuit. When the output interface of the first bidirectional IO circuit outputs a high level, that is, the second serial port peripheral output pin of the slave MCU outputs a high level, the collector of the PNP transistor Q1 outputs a low level. When the output interface of the first bidirectional IO circuit outputs a low level, that is, the second serial port peripheral output pin of the slave MCU outputs a low level, the collector of the PNP transistor Q1 outputs a high level. The other end of the second resistor R2 is connected to the power supply and the emitter of the PNP transistor Q1. When the first resistor R1 is poorly soldered, the second resistor R2 turns off the output of the PNP transistor Q1 to prevent the unknown base-emitter level of the PNP transistor Q1 from causing the PNP transistor Q1 to be misconnected and output an unexpected signal instruction to the external port IO1. The collector of the PNP transistor Q1 is grounded through the third resistor R3 and connected to the external port IO1 of the first bidirectional IO circuit through the fourth resistor R4. The fourth resistor R4 prevents the collector of the PNP transistor Q1 from being directly connected to the external port IO1, and prevents static electricity from directly entering the PNP transistor Q1 when a person touches the external port IO1. 1. The fourth resistor R4 limits the electrostatic current. When the circuit board is powered off, the third resistor R3 discharges the collector charge of the PNP transistor Q1. The external port IO1 of the first bidirectional IO circuit is connected to one end of the sixth resistor R6 and the base of the NPN transistor Q2 through the seventh resistor R7. The other end of the sixth resistor R6 is grounded. The seventh resistor R7 limits the base current of the NPN transistor Q2, so that the base current of the NPN transistor Q2 is not too large, protecting the NPN transistor Q2. When the seventh resistor R7 is poorly soldered, the sixth resistor R6 keeps the base emitter of the NPN transistor Q2 at a low level to prevent the first serial port peripheral of the slave MCU from receiving an erroneous signal instruction when the NPN transistor Q2 is mis-connected. The collector of the NPN transistor Q2 is connected to the input interface of the first bidirectional IO circuit and to the power supply through the fifth resistor R5. The fifth resistor R5 limits the emitter current of the NPN transistor Q2. The high and low level signals received by the external port IO1 are reversed by the NPN transistor Q2 and input to the input pin of the first serial port peripheral of the slave MCU. The emitter of the NPN transistor Q2 is grounded.

[0009] A control method for a bidirectional IO circuit for CAN address allocation of a BMS slave control module comprises the following steps: Step 1: Enable the input and output of the two serial port peripherals of the slave MCU and configure the communication parameters; Step 2: Receive the CAN address allocation instruction of the serial port peripheral of the slave control MCU, add 1 to the CAN address and send the CAN address allocation instruction to the next level slave control.

[0010] Furthermore, the specific process of performing step 2 from the first serial port peripheral of the MCU is as follows: When the first serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the first bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; the slave MCU prohibits the second serial port peripheral; The transmission pin of the first serial port peripheral of the slave MCU sends the CAN address assignment instruction after the CAN address + 1 operation through the external port of the second bidirectional IO circuit. After sending the CAN address assignment instruction, the slave MCU enables the second serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address assignment instruction.

[0011] Furthermore, the specific process of performing step 2 from the second serial port peripheral of the MCU is as follows: When the second serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the second bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; the slave MCU disables the first serial port peripheral; The second serial port peripheral transmitting pin of the slave MCU sends the CAN address allocation instruction after the CAN address + 1 operation through the external port of the first bidirectional IO circuit. After sending the CAN address allocation instruction, the slave MCU enables the first serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address allocation instruction.

[0012] Furthermore, the CAN address allocation instruction is based on the serial communication protocol, and the communication instruction based on the serial communication protocol can be specified by oneself.

[0013] The present invention can conveniently and quickly implement CAN address allocation for slave control modules on all battery PACKs in a cluster by designing a slave control module bidirectional IO CAN address allocation circuit and a bidirectional IO CAN address allocation method in a slave control module MCU program, and can ensure the uniqueness of the CAN ID of the slave control module on each PACK in all clusters. By means of this technical means, the slave control module does not need to be designed with a circuit for distinguishing the CAN address of the slave control module through a hardware circuit, which simplifies the design of the CAN address circuit of the slave control module and eliminates the step of distinguishing the CAN address of each slave control through hardware or burning a program in the production stage of the slave control module. By means of this invention, the hardware and program firmware of all slave control modules can be consistent in the production stage of the slave control module, which improves the production efficiency of the slave control module and brings convenience to the storage and transportation of the slave control module, that is, there is no need to make special marks on each slave control module due to the different CAN addresses of the slave control modules in the production stage, which facilitates storage and transportation. It also solves the problem that after the slave control modules are assembled on the PACK in the cluster, the cluster battery management system is abnormal due to the wrong assembly sequence or the same CAN address of the slave control modules, which improves the debugging efficiency of the cluster management system. Since the CAN address allocation function of the slave control module is bidirectional, the two IO ports do not distinguish the direction by default, so that the cluster communication harness containing the CAN address allocation line can select the wiring path according to the layout structure of the battery compartment when wiring the front panel of the battery PACK in the battery compartment, making the cluster communication harness more convenient and beautiful when wiring the whole machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a schematic diagram of the slave control MCU of the present invention; Figure 2 is the first bidirectional IO circuit diagram of the present invention; Figure 3 is a second bidirectional IO circuit diagram of the present invention; Figure 4 It is a schematic diagram of cable connection of a bidirectional IO allocation circuit for CAN address allocation of the present invention; Figure 5 It is a flow chart of a bidirectional IO circuit control method for CAN address allocation of the present invention; Figure 6 It is a schematic diagram of the CAN address allocation instruction sending process of the present invention. DETAILED DESCRIPTION

[0015] In order to make the hardware circuit technical solution and control method of the present invention more understandable, the present invention is explained below with reference to the accompanying drawings and embodiments, using a practical bidirectional IO circuit for CAN address allocation and a control method flow chart. It should be understood that the specific embodiments described herein are only used to explain the present invention and do not limit the present invention.

[0016] The following figure shows the bidirectional IO circuit of the actual battery management system slave control module CAN address allocation. Figure 1-3 As shown, each slave control module includes two bidirectional IO circuits with the same circuit topology, namely the first and second bidirectional IO circuits; each bidirectional IO circuit includes an external port and two internal ports; the external port of each bidirectional IO circuit is used to receive the CAN address allocation instruction sent by the high-voltage box of the battery management system or the upper-level slave control or to send the CAN address allocation instruction to the next-level slave control of the battery management system; the two internal ports of each bidirectional IO circuit are respectively an input interface and an output interface, and the four internal ports of the first and second bidirectional IO circuits of each electric slave control module are respectively connected to the input and output pins of the two serial port peripherals of the slave control MCU; the input interface of a bidirectional IO circuit of each slave control module sends the CAN address allocation instruction received by its external port to the slave control MCU, and the output interface of another bidirectional IO circuit of the slave control module sends the CAN address allocation instruction processed by the slave control MCU to the next-level slave control of the battery management system through its external port.

[0017] The input interface of the first bidirectional IO circuit is connected to the input pin of the first serial port peripheral of the slave MCU; The output interface of the first bidirectional IO circuit is connected to the output pin of the second serial port peripheral of the slave MCU; The input interface of the second bidirectional IO circuit is connected to the input pin of the second serial port peripheral of the slave MCU; The output interface of the second bidirectional IO circuit is connected to the output pin of the first serial port peripheral of the slave MCU.

[0018] The components and parameters of these two bidirectional IO circuits are the same. The +3.3V power supply in the figure is also the power supply for the single-chip slave MCU, which is not marked in the figure. The specific connection method of the circuit is: the output interface of the first bidirectional IO circuit is connected to one end of the second resistor R2 and the base of the PNP transistor Q1 through the first resistor R1; the other end of the second resistor R2 is connected to the power supply and the emitter of the PNP transistor Q1; the collector of the PNP transistor Q1 is grounded through the third resistor R3 and connected to the external port IO1 of the first bidirectional IO circuit through the fourth resistor R4; the external port IO1 of the first bidirectional IO circuit is connected to one end of the sixth resistor R6 and the base of the NPN transistor Q2 through the seventh resistor R7, and the other end of the sixth resistor R6 is grounded; the collector of the NPN transistor Q2 is connected to the input interface of the first bidirectional IO circuit and to the power supply through the fifth resistor R5, and the emitter of the NPN transistor Q2 is grounded.

[0019] Down Figure 4 The diagram shows an arrangement diagram of 1 high-voltage box and 7 battery PACKs on two battery racks in 1 cluster. 1 cluster contains two battery racks 1 and two battery racks 2. Battery rack 1 and two battery racks 2 are arranged left and right respectively. The left battery rack 1 arranges the high-voltage box, PACK1, PACK2, and PACK3 in sequence from bottom to top. The right battery rack 2 arranges PACK4, PACK5, PACK6, and PACK7 in sequence from top to bottom. The connection method of the CAN address distribution line in the cluster is that the high-voltage box address distribution IO is connected to the bidirectional IO CAN address distribution port IO1 of the battery PACK1 slave control, the bidirectional IO CAN address distribution port IO2 of the battery PACK1 slave control is connected to the bidirectional IO CAN address distribution port IO1 of the battery PACK2 slave control, the bidirectional IO CAN address distribution port IO2 of the battery PACK2 slave control is connected to the bidirectional IO CAN address distribution port IO1 of the battery PACK3 slave control, the bidirectional IO CAN address distribution port IO2 of the battery PACK3 slave control is connected to the bidirectional IO CAN address distribution port IO2 of the battery PACK4 slave control, and the bidirectional IO CAN address allocation port IO1 is connected to the bidirectional IO CAN address allocation port IO2 of the battery PACK5 slave control, and the bidirectional IO CAN address allocation port IO1 of the battery PACK5 slave control is connected to the bidirectional IO CAN address allocation port IO2 of the battery PACK6 slave control. The bidirectional IO CAN address allocation port IO1 of the battery PACK6 slave control is connected to the bidirectional IO CAN address allocation port IO2 of the battery PACK7 slave control. Figure 4As can be seen, the address distribution cable connection method on the PACK slaves on the left and right battery racks is different. The slave address distribution cable connection method between the PACKs on the left battery rack is that the bidirectional IO CAN address distribution port IO2 of the current PACK slave is connected to the bidirectional IO CAN address distribution port IO1 of the next PACK slave. The slave address distribution cable connection method between the PACKs on the right battery rack is that the bidirectional IO CAN address distribution port IO1 of the current PACK slave is connected to the bidirectional IO CAN address distribution port IO2 of the next PACK slave. Figure 2 , Figure 3 The circuit realizes the conversion of input and output functions of two bidirectional IO CAN address allocation ports IO1 and IO2.

[0020] Figure 2 , 3 The model parameters of MCU, transistor, resistor and capacitor in the example circuit can be changed, and the device model and parameters can be changed according to the actual application.

[0021] Down Figure 5 The flowchart of the bidirectional IO circuit control method for the battery management system slave control CAN address allocation is as follows: Step 1: Enable the input and output of the two serial port peripherals of the slave MCU and configure the communication parameters; Step 2: Receive the CAN address allocation instruction of the serial port peripheral of the slave control MCU, add 1 to the CAN address and send the CAN address allocation instruction to the next level slave control.

[0022] Furthermore, the specific process of performing step 2 from the first serial port peripheral of the MCU is as follows: When the first serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the first bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; the slave MCU prohibits the second serial port peripheral; The transmission pin of the first serial port peripheral of the slave MCU sends the CAN address assignment instruction after the CAN address + 1 operation through the external port of the second bidirectional IO circuit. After sending the CAN address assignment instruction, the slave MCU enables the second serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address assignment instruction.

[0023] Furthermore, the specific process of performing step 2 from the second serial port peripheral of the MCU is as follows: When the second serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the second bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; the slave MCU disables the first serial port peripheral; The second serial port peripheral transmitting pin of the slave MCU sends the CAN address allocation instruction after the CAN address + 1 operation through the external port of the first bidirectional IO circuit. After sending the CAN address allocation instruction, the slave MCU enables the first serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address allocation instruction.

[0024] The CAN address assignment instructions are based on the serial communication protocol. The communication instructions based on the serial communication protocol can be specified by yourself, such as configuring Figure 1 The baud rate of USART1 and USART2 serial ports of GD32FCESRBT6 microcontroller is 9600, 1 stop bit, 8 data bits, no checksum, and the CAN address assignment communication protocol format is: 0x55 0xAD XX 0xAA, where XX is the CAN address. When the CAN address is assigned within the cluster, the high-voltage box sends the CAN address assignment instruction 0x55 0xAD 0x010xAA through the IO port. Figures 1 to 5 The CAN address assignment instruction sending process from 1 high voltage box to 7 PACK slaves in the example is shown below. Figure 6 As shown, from Figure 6It can be seen that the first three PACK slave controls are bidirectional IO CAN address allocation IO1 port receiving CAN address allocation instructions, and bidirectional IO CAN address allocation IO2 port sending CAN address allocation instructions. The last four PACK slave controls are bidirectional IO CAN address allocation IO2 port receiving CAN address allocation instructions, and bidirectional IO CAN address allocation IO1 port sending CAN address allocation instructions. It can be seen that the two bidirectional IO circuits of each slave control can be the input port to receive the CAN address allocation instruction, or the output port to output the CAN address allocation instruction according to the different connection methods of the CAN address allocation cables in the cluster. After the CAN address allocation of the PAKC slave control in the cluster, the slave control CAN ID on each PACK in the cluster is unique.

Claims

1. A bidirectional IO circuit for CAN address allocation of BMS slave control module, characterized by: Each slave control module includes two bidirectional IO circuits with the same circuit topology, namely the first and second bidirectional IO circuits; each bidirectional IO circuit includes an external port and two internal ports; the external port of each bidirectional IO circuit is used to receive the CAN address allocation instruction sent by the high-voltage box of the battery management system or the upper-level slave control, or to send the CAN address allocation instruction to the next-level slave control of the battery management system; the two internal ports of each bidirectional IO circuit are an input interface and an output interface, respectively, and the four internal ports of the first and second bidirectional IO circuits of each slave control module are respectively connected to the input and output pins of the two serial port peripherals of the slave control MCU; the input interface of a bidirectional IO circuit of each slave control module sends the CAN address allocation instruction received by its external port to the slave control MCU, and the output interface of another bidirectional IO circuit of the slave control module sends the CAN address allocation instruction processed by the slave control MCU to the next-level slave control of the battery management system through its external port.

2. The bidirectional IO circuit for CAN address allocation of BMS slave control module according to claim 1, characterized in that: The input interface of the first bidirectional IO circuit is connected to the input pin of the first serial port peripheral of the slave MCU; The output interface of the first bidirectional IO circuit is connected to the output pin of the second serial port peripheral of the slave MCU; The input interface of the second bidirectional IO circuit is connected to the input pin of the second serial port peripheral of the slave MCU; The output interface of the second bidirectional IO circuit is connected to the output pin of the first serial port peripheral of the slave MCU.

3. The bidirectional IO circuit for CAN address allocation of BMS slave control module according to claim 2, characterized in that: The first bidirectional IO circuit is specifically as follows: the output interface of the first bidirectional IO circuit is connected to one end of the second resistor R2 and the base of the PNP transistor Q1 via the first resistor R1; the other end of the second resistor R2 is connected to the power supply and the emitter of the PNP transistor Q1; the collector of the PNP transistor Q1 is grounded via the third resistor R3 and connected to the external port IO1 of the first bidirectional IO circuit via the fourth resistor R4; the external port IO1 of the first bidirectional IO circuit is connected to one end of the sixth resistor R6 and the base of the NPN transistor Q2 via the seventh resistor R7, and the other end of the sixth resistor R6 is grounded; the collector of the NPN transistor Q2 is connected to the input interface of the first bidirectional IO circuit and to the power supply via the fifth resistor R5, and the emitter of the NPN transistor Q2 is grounded.

4. The control method of the bidirectional IO circuit for CAN address allocation of the BMS slave control module according to claim 2 is characterized in that: The steps include: Step 1: Enable the input and output of the two serial port peripherals of the slave MCU and configure the communication parameters; Step 2: Receive the CAN address allocation instruction of the serial port peripheral of the slave control MCU, add 1 to the CAN address and send the CAN address allocation instruction to the next level slave control.

5. The control method according to claim 4, characterized in that: The specific process of performing step 2 from the first serial port peripheral of the MCU is as follows: When the first serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the first bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; The slave MCU disables the second serial port peripheral; The transmission pin of the first serial port peripheral of the slave MCU sends the CAN address assignment instruction after the CAN address + 1 operation through the external port of the second bidirectional IO circuit. After sending the CAN address assignment instruction, the slave MCU enables the second serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address assignment instruction.

6. The control method according to claim 4, characterized in that: The specific process of performing step 2 from the second serial port peripheral of the MCU is as follows: When the second serial port peripheral receiving pin of the slave MCU receives the CAN address allocation instruction sent by the high-voltage box address allocation port or the upper-level slave bidirectional IO address allocation port through the external port of the second bidirectional IO circuit, the slave MCU determines the validity of the CAN address allocation instruction: if it is invalid, the slave MCU discards the instruction and does not perform any operation, and continues to wait for the CAN address allocation instruction; if it is valid, the slave MCU extracts the CAN address from the CAN address allocation instruction, uses the CAN address as the CAN address of the slave control and stores the CAN address in the Flash, then performs an operation on the CAN address +1, and loads the CAN address after the operation into the CAN address allocation instruction for the next slave control; The slave MCU disables the first serial port peripheral; The second serial port peripheral transmitting pin of the slave MCU sends the CAN address allocation instruction after the CAN address + 1 operation through the external port of the first bidirectional IO circuit. After sending the CAN address allocation instruction, the slave MCU enables the first serial port peripheral, and both serial port peripherals enter the state of waiting to receive the CAN address allocation instruction.

Citation Information

Cited By

  • Address line input and output high-low configurable circuit and working method

    CN120949620A