Method for processing communication based on one-wire interface and battery management system

By configuring the one-line communication interface as a bidirectional communication interface, the problem of difficulty in monitoring battery parameters caused by the lack of external communication lines for the battery pack is solved, achieving efficient transmission and reception of battery parameter data and reducing costs.

CN116224067BActive Publication Date: 2026-03-03SHENZHEN TOPBAND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310007465.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2026-03-03
Estimated Expiration
2043-01-04

Smart Images

  • Figure CN116224067B_ABST
    Figure CN116224067B_ABST
Patent Text Reader

Abstract

The application relates to a communication processing method and device based on a one-wire interface, computer equipment, a storage medium and a computer program product. The method comprises the following steps: after the battery is powered on, the one-wire interface is configured as a bidirectional communication interface; if a first message sent by an upper computer based on a first communication protocol is received through the one-wire interface within a first preset time, the first message is checked; the checked first message is analyzed to determine target battery parameters requested by the upper computer; the target battery parameters are processed based on the first communication protocol to obtain a second message; and the second message is sent to the upper computer through the one-wire interface, and the target battery parameters are obtained by the upper computer by analyzing the second message. The data transmission and reception are completed through the one-wire interface, the material cost of the monitoring circuit is saved, and the line maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery testing technology, and in particular to a communication processing method and battery management system based on a one-wire interface. Background Technology

[0002] With the development of lithium-ion batteries, there is a need to display specific battery parameter information, such as capacity, voltage, and temperature, or to obtain the real-time status of the battery so as to use the most suitable current to charge the battery.

[0003] In existing technologies, communication between the battery and external devices is achieved through a single-line communication cable and an external communication line connected to the battery pack. This allows for the acquisition of various parameter information from the battery and the transmission of calibration commands. However, for reasons such as battery safety, battery manufacturers have removed the external communication line from the battery pack. Consequently, relying solely on the single-line communication cable is insufficient to monitor various battery parameters, hindering the testing process. Summary of the Invention

[0004] Therefore, it is necessary to provide a communication processing method and battery management system based on a one-line communication interface that can improve the communication efficiency of the tester, addressing the aforementioned technical problems.

[0005] Firstly, this application provides a communication processing method based on a one-line communication interface, the method comprising:

[0006] After the battery is powered on, configure the one-line communication interface as a bidirectional communication interface;

[0007] If a first message sent by the host computer based on the first communication protocol is received through the first preset time via the one-line communication interface, then the first message is verified.

[0008] The first message after verification is parsed to determine the target battery parameters requested by the host computer;

[0009] The target battery parameters are processed based on the first communication protocol to obtain the second message;

[0010] The second message is sent to the host computer through the one-line communication interface, and the host computer obtains the target battery parameters by parsing the second message.

[0011] In one embodiment, the method further includes:

[0012] If the first message sent by the host computer based on the first communication protocol is not received within the first preset time, the one-line communication interface will be configured as a one-way communication interface.

[0013] The preset battery parameters are processed based on the second communication protocol to obtain the third message;

[0014] The third message is sent to the host computer through the one-line communication interface, and the host computer obtains the preset battery parameters by parsing the third message.

[0015] In one embodiment, after the step of sending the third message to the host computer via the one-line communication interface, the method further includes:

[0016] Configure the one-line interface as a bidirectional communication interface.

[0017] In one embodiment, the one-line interface includes a first end connected to a host computer, an input end connected to the battery management controller, and an output end connected to the battery management controller;

[0018] The step of configuring the one-line interface as a bidirectional communication interface includes: configuring the input terminal and the output terminal based on the UART communication protocol;

[0019] The first terminal is used to receive a first message from the host computer, and the first message is sent to the battery management controller through the output terminal; the input terminal is used to receive a second message sent by the battery management controller, and the second message is sent to the host computer through the first terminal.

[0020] In one embodiment, configuring the one-line communication interface as a unidirectional communication interface includes:

[0021] Disable the output terminal;

[0022] The input terminal is used to receive a third message sent by the battery management controller, and the third message is sent to the host computer through the first terminal.

[0023] In one embodiment, if the first end does not receive a pull-up signal, the one-line communication interface is switched to sleep mode.

[0024] Secondly, this application provides a battery management system, including:

[0025] A battery management controller, and a one-wire interface connected to the battery management controller;

[0026] The battery management controller stores a computer program, and when the battery management controller executes the computer program, it implements the steps of the method described above.

[0027] In one embodiment, the one-line interface includes a first end connected to a host computer, an input end connected to the battery management controller, and an output end connected to the battery management controller.

[0028] In one embodiment, the one-line communication interface further includes an external interrupt circuit, a transmitting circuit, a receiving circuit, and an isolation protection circuit connected to the output terminal. The isolation protection circuit is disposed between the transmitting circuit, the external interrupt circuit, the receiving circuit and the first terminal. When the first terminal is enabled, the receiving circuit is turned on.

[0029] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0030] After the battery is powered on, configure the one-line communication interface as a bidirectional communication interface;

[0031] If a first message sent by the host computer based on the first communication protocol is received through the first preset time via the one-line communication interface, then the first message is verified.

[0032] The first message after verification is parsed to determine the target battery parameters requested by the host computer; the target battery parameters are processed based on the first communication protocol to obtain the second message;

[0033] The second message is sent to the host computer through the one-line communication interface, and the host computer obtains the target battery parameters by parsing the second message.

[0034] Fourthly, this application provides a computer program that, when executed by a processor, performs the following steps:

[0035] 5. After the battery is powered on, configure the one-line communication interface as a bidirectional communication interface;

[0036] If a first message sent by the host computer based on the first communication protocol is received through the first preset time via the one-line communication interface, then the first message is verified.

[0037] The first message after verification is parsed to determine the target battery parameters requested by the host computer;

[0038] The target battery parameters are processed based on the first communication protocol to obtain the second message;

[0039] 0 sends the second message to the host computer through the one-line communication interface, and the host computer obtains the target battery parameters by parsing the second message.

[0040] The aforementioned communication processing method and battery management system based on the One-Wire interface utilize the existing One-Wire interface by configuring it as a bidirectional communication interface, thereby avoiding external communication with the battery pack.

[0041] A communication line is established, and the first message is received at the one-line interface. Based on the verification and parsing of the first message, the target battery parameters requested by the host computer are obtained. These target battery parameters are then processed to obtain the second message.

[0042] The second message is sent to the host computer via the One-Line Communication interface. The host computer obtains the target battery parameters by parsing the second message. This method completes data transmission and reception via the One-Line Communication interface, saving material costs for monitoring circuits, reducing line maintenance costs, and enabling the tester to successfully complete the test. Attached Figure Description

[0043] Figure 1 This is an application environment diagram of a communication processing method based on a one-line communication interface in one embodiment;

[0044] Figure 2 This is a flowchart illustrating a communication processing method based on a One-Line Communication interface in one embodiment.

[0045] Figure 3 This is a schematic diagram of the communication format of the first message in one embodiment;

[0046] Figure 4 This is a schematic diagram of the frame format of the first message in one embodiment;

[0047] Figure 5 This is a schematic diagram of the message waveform sent by the battery management controller to the host computer in one embodiment;

[0048] Figure 6 This is a block diagram of the battery management controller, the one-wire interface, and the host computer in one embodiment;

[0049] Figure 7 This is a block diagram of the battery management controller, the one-wire interface, and the host computer in another embodiment;

[0050] Figure 8 This is a schematic diagram of the first type of battery terminal circuit in one embodiment;

[0051] Figure 9 This is a schematic diagram of the second type of battery terminal circuit in one embodiment;

[0052] Figure 10 This is a schematic diagram of the load-side circuit corresponding to the host computer interface in one embodiment;

[0053] Figure 11This is a method for ensuring compatibility between the vehicle communication protocol and the host computer protocol in one embodiment;

[0054] Figure 12 This is a structural block diagram of a communication processing device based on a one-line communication interface in one embodiment;

[0055] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0057] The triangular plug is one of the most commonly used power plugs in daily life. Custom-made triangular plugs can handle a maximum current of over 20A, and are therefore widely used in battery connection cables for electric bicycles, etc. Since the positive (P+) and negative (P-) terminals of the battery connection cable occupy the N and L terminals of the triangular plug respectively, and because a ground wire is not required, the other terminal of the triangular plug is usually left floating.

[0058] With the development of smart lithium-ion batteries, in many applications, to display information such as remaining battery power, voltage, and temperature, or to obtain the battery's real-time status so as to use the most suitable current for charging, the battery application's dashboard and charger need to communicate with the battery. To ensure compatibility with the widely used T-type connectors, a single-wire interface using a single communication line needs to be developed for communication with the battery.

[0059] In view of this, the communication processing method based on the One-Line Communicator interface provided in the embodiments of this application can be applied to, for example... Figure 1 In the application environment shown, the battery power supply 102 supplies power to the battery management controller 104 and the host computer 110. The battery management controller 104 and the host computer 110 share a common negative terminal B-. The battery power supply 102 can be a lithium battery pack or a rechargeable battery pack of other materials.

[0060] After the battery power supply 102 is powered on, the battery management controller 104 configures the one-line communication interface 106 as a bidirectional communication interface. If the battery management controller 104 receives a first message sent by the host computer 110 based on the first communication protocol through the one-line communication interface 106 within a first preset time, the first message is verified. The battery management controller 104 parses the verified first message to determine the target battery parameters requested by the host computer 110. The battery management controller 104 processes the target battery parameters based on the first communication protocol to obtain a second message. The battery management controller 104 sends the second message to the host computer 110 through the one-line communication interface 106, and the host computer 110 obtains the target battery parameters by parsing the second message.

[0061] The battery management controller 104 can be a microcontroller within the battery management system (BMS), capable of receiving, verifying, parsing, and sending messages. The BMS also includes a battery charging module and a battery discharging module; the battery charging module contains a charging MOSFET, and the battery discharging module contains a discharging MOSFET.

[0062] Both the one-line communication interface 106 and the host computer interface 108 can contain circuits, through which the communication current or high / low level signal transmission between the battery management controller 104 and the host computer 110 can be carried out.

[0063] The host computer 110 can be directly connected to the one-line communication interface 106, or it can be connected to the one-line communication interface 106 through the host computer interface 108. The host computer 110 can be a microprocessor with computing capabilities, which has the ability to receive, process, and send messages.

[0064] In one embodiment, such as Figure 2 As shown, a communication processing method based on a single-line communication interface is provided, which is then applied to... Figure 1 Taking the battery management controller in the example, the following steps are included:

[0065] S202, after the battery is powered on, configure the one-line communication interface as a bidirectional communication interface.

[0066] In this process, battery power-on can be achieved by physically connecting one end of the battery management controller to the other end of the host computer. For example, the battery terminal of the battery management controller can be connected to the charger or load terminal of the host computer.

[0067] The one-line interface can be a battery-side circuit connected to the battery management controller. The input and output terminals of the battery-side circuit are connected to the battery management controller. Specifically, the input terminal of the battery-side circuit is connected to the output interface of the battery management controller, and the output terminal of the battery-side circuit is connected to the input interface of the battery management controller.

[0068] The battery-side circuit also has an input / output port that connects to the host computer.

[0069] Specifically, the electrical signal flow at the input end of the battery terminal is from the battery terminal circuit to the battery management controller, and the electrical signal flow at the output end of the battery terminal is from the battery management controller to the battery terminal circuit. The signal flow at the input and output ports of the battery terminal circuit is bidirectional between the battery terminal circuit and the host computer.

[0070] Configuring the one-line interface as a bidirectional communication interface means that the battery management controller uses the battery-side circuitry to achieve half-duplex communication between the battery management controller and the host computer.

[0071] It should be noted that the power supply VCC of the battery terminal circuit can be provided by the battery management controller or directly by the battery. The ordinary ground terminal GND and the protective ground terminal PGND of the battery terminal circuit can be shared with the ground terminal of the battery management controller. The protective ground terminal PGND can function as the P- terminal of the battery terminal output in the circuit loop.

[0072] S204. If a first message sent by the host computer based on the first communication protocol is received through the One-Line Communication interface within a first preset time, the first message is verified.

[0073] The first preset time refers to the preset time of the battery management controller after it starts communicating with the host computer via the One-Line Communication interface. The first preset time can be the preset start time of the One-Line Communication protocol T cycle. For example, T equals 10s. If the duration of communication between the battery management controller and the host computer is less than 10s after the communication starts, the communication protocol between the battery management controller and the host computer will not be changed, and the first message sent by the host computer based on the first communication protocol will continue to be received through the One-Line Communication interface.

[0074] If the communication between the battery management controller and the host computer lasts for more than 10 seconds after it begins, the communication protocol between the battery management controller and the host computer will be switched to the SIF protocol.

[0075] The first communication protocol could be the MODBUS protocol, a common language used in electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via a network (such as Ethernet). It has become a common industry standard.

[0076] The prerequisite for the battery management controller to receive messages from the host computer is that its output and input terminals are configured for UART functionality. UART is a universal serial data bus used for asynchronous communication. This bus can communicate bidirectionally and can achieve half-duplex transmission and reception.

[0077] The first message is a message with actual signal content that is not empty. Specifically, the communication format of the first message is as follows: Figure 3 As shown, it includes a synchronization signal, signal "0", signal "1" and a stop signal.

[0078] The frame format of the first message is as follows: Figure 4 As shown, it includes a synchronization signal, a stop signal, and several bytes of actual signal content. This actual signal content is the signal "0" and signal "1" in the communication format. One byte of actual signal content contains 8 bits, that is, 8 signal "0" or signal "1".

[0079] Each frame's first message contains only one synchronization signal and one stop signal, and the actual signal content to be sent is contained within the synchronization signal and the stop signal.

[0080] The verification of the first message can be performed using CRC checksum or other verification methods capable of error detection and correction. CRC checksum, also known as Cyclic Redundancy Check, is a commonly used checksum with error detection and correction capabilities, widely used in early communications. Cyclic Redundancy Check is often used for data verification in synchronous communication between external storage devices and computers. CRC establishes a pre-defined relationship between data bits and check bits through certain mathematical operations.

[0081] S206, parse the first message after verification to determine the target battery parameters requested by the host computer.

[0082] Parsing the first message after verification can determine the target battery parameters requested by the host computer and the operation instructions for the battery management controller.

[0083] The requested target battery parameters can be real-time battery status information such as remaining battery capacity, real-time battery voltage, real-time battery current, and battery charging type. Operation commands to the battery management controller can be commands to modify various battery parameters, such as charging high temperature alarm delay, charging low temperature alarm delay, charging overcurrent alarm delay, discharging overcurrent alarm delay, discharging high temperature alarm delay, and discharging low temperature alarm delay.

[0084] S208, based on the first communication protocol, processes the target battery parameters to obtain the second message.

[0085] After receiving the first message from the host computer, the battery management controller processes the target battery parameters based on the first communication protocol to obtain the second message.

[0086] The communication format and frame format of the second message are similar to those of the first message, and will not be described in detail here.

[0087] S210 sends a second message to the host computer via the One-Line Communication interface. The host computer obtains the target battery parameters by parsing the second message.

[0088] Before parsing the second message, the host computer can first verify the battery management controller by sending the second message through the One-Line Communication interface. The verification method is similar to that of the first message verification method, and will not be elaborated here.

[0089] The target battery parameters correspond to the requested target battery parameters.

[0090] Specifically, if the requested target battery parameter is the battery's real-time status information, then the target battery parameter can be the battery's status information at the moment the first message completes verification and parsing. If the requested target battery parameter is a modification instruction for various battery parameters, then the target battery parameter can be the result of the modification of various battery parameters. For example, if the modification instruction is to increase the charging high temperature alarm delay by 10ms, the modification result includes the charging high temperature alarm delay having increased by 10ms and the current charging high temperature alarm delay time.

[0091] In the aforementioned communication processing method based on the One-Line Communication Interface, the existing One-Line Communication Interface is configured as a bidirectional communication interface, thereby avoiding the need for a communication line outside the battery pack. The first message is received on the One-Line Communication Interface, and the target battery parameters requested by the host computer are obtained by verifying and parsing the first message. The target battery parameters are then processed to obtain a second message, which is sent to the host computer through the One-Line Communication Interface. The host computer obtains the target battery parameters by parsing the second message. This method completes data transmission and reception through the One-Line Communication Interface, saving material costs for the monitoring circuit and reducing line maintenance costs.

[0092] In one embodiment, if a first message sent by the host computer based on the first communication protocol is not received within a first preset time, the one-line communication interface is configured as a one-way communication interface; the preset battery parameters are processed based on the second communication protocol to obtain a third message; the third message is sent to the host computer through the one-line communication interface, and the host computer obtains the preset battery parameters by parsing the third message.

[0093] Specifically, if the battery management controller does not receive the first message sent by the host computer based on the first communication protocol within a first preset time after the battery is powered on, the one-line communication interface will be configured as a one-way communication interface. The first preset time can be the preset start time of the T cycle of the one-line communication protocol, for example, T equals 10s. If the first message sent by the host computer based on the first communication protocol is not received within 10s, the one-line communication interface will be configured as a one-way communication interface.

[0094] In this process, battery power-on can be achieved by physically connecting one end of the battery management controller to the other end of the host computer. For example, the battery terminal of the battery management controller can be connected to the charger or load terminal of the host computer.

[0095] Specifically, the output of the battery-side circuit corresponding to the one-line communication interface that sends information to the battery management controller can be disabled, and the input of the battery management controller that receives information from the battery-side circuit can be disabled. This achieves the purpose of configuring the one-line communication interface as a unidirectional communication interface.

[0096] It should be noted that a single-line communication interface can refer to the host computer receiving signals sent by the battery management controller in one direction only.

[0097] The second communication protocol can be the SIF protocol, a one-line communication protocol used in scenarios such as the instrument panel of an electric vehicle controller. The one-line communication message format generally consists of four parts: message ID, protocol version, data content, and checksum. Message ID includes initial messages and periodic messages; protocol version includes secondary communication protocol version and primary communication protocol version; checksum is the sum of the message ID, protocol version, and data content (B0~B47) plus a checksum (unused bytes in the data are filled with 0xFF).

[0098] Specifically, the data content of the third message includes one or more of the following: data sequence number, time, protection reason, battery pack voltage, current, highest single cell, lowest single cell, temperature information, capacity information, and cycle count.

[0099] The protection reasons include: no protection, single cell protection, overvoltage protection, undervoltage protection, high temperature protection, low temperature protection, charging MOS failure protection, discharging MOS failure protection, cell failure protection, NTC failure protection, etc.

[0100] The preset battery parameters can be the data content of the parsed third message.

[0101] Specifically, the battery management controller sends a third message to the host computer at preset intervals, according to a pre-defined data content format. The host computer then parses the third message to obtain preset battery parameters. The preset interval can be flexibly selected based on actual conditions and is not limited here. For example, when testing the battery management controller in various usage scenarios, it is necessary to monitor the remaining battery capacity; therefore, the interval between sending the third message needs to be reduced to ensure that the capacity information is obtained by the host computer in a timely manner. By improving the existing one-line interface and configuring it with a bidirectional or unidirectional communication protocol, the switching between the two communication modes is realized based on the existing one-line interface.

[0102] In one embodiment, if the first message sent by the host computer based on the first communication protocol is not received within a first preset time, the input and output terminals of the one-line communication interface are configured as ordinary I / O functions, i.e., open-drain output, running the SIF protocol. Immediately after the SIF protocol message is sent, the input and output terminals of the one-line communication interface are configured as UART functions to wait for message reception. The SIF protocol implementation has strict time specifications for the start bit (synchronization signal), stop bit, and each bit, so a timer is used to achieve precise timing. The SIF message period T is 3 seconds. Timing is performed in the main program, setting the gu8TimeToYXT flag every 3 seconds. Then, in the systick interrupt routine, if gu8TimeToYXT is not detected as set, the I / O is toggled according to the timing sequence. After data transmission is completed, gu8TimeToYXT is immediately cleared.

[0103] In this embodiment, by determining that no first message is received from the host computer within a preset time, the battery management controller actively sends a third message to the host computer, thus realizing the active transmission of data.

[0104] In one embodiment, after the step of sending a third message to the host computer via the One-Line Interface, the method further includes: configuring the One-Line Interface as a bidirectional communication interface.

[0105] Specifically, after sending a third message to the host computer via the One-Line Communication interface, the output terminal of the battery terminal circuit corresponding to the One-Line Communication interface that sends information to the battery management controller can be disabled or undisabled; that is, the input terminal of the battery management controller receiving information from the battery terminal circuit can be disabled or undisabled. This transforms the One-Line Communication interface from unidirectional communication to bidirectional communication.

[0106] Specifically, such as Figure 5 The diagram shows the waveform of the message sent by the battery management controller to the host computer.

[0107] Where T is 3s, t1 is 438ms, and t2 is 2562ms. At the beginning and end of t1, the input and output of the one-line communication interface are configured for normal I / O function. t1 is the period of one SIF message frame. After a complete SIF message frame is sent, at the end of t1 (the beginning of t2), the input and output of the one-line communication interface are configured for UART function. If the input of the one-line communication interface receives data within t2, it remains unset for 10s (preset value, adjustable) (g_comcnt = 20, decreasing by one every 500ms) without setting gu8TimeToYXT. If the input of the one-line communication interface does not receive a message for 10 consecutive seconds, gu8TimeToYXT is set, and the SIF protocol continues to run. During t1, the input of the one-line communication interface is configured in open-drain output mode and will not receive data, thus not interfering with data reception during t2. If the One-Line Connect interface is not connected to a pull-up switch, the input of the One-Line Connect interface will not be able to receive messages. Therefore, it will run the SIF protocol until it enters a static sleep mode (generally, the battery management controller will be set to enter a static sleep mode within 1-5 minutes if the One-Line Connect interface is not connected to a pull-up switch, and there is no charging or discharging, and there is no charging or discharging protection, in order to reduce power consumption).

[0108] In this embodiment, after the third message is sent, the configuration mode of the One-Line Communication interface is switched from one-way communication mode to two-way communication mode to achieve switching between different communication protocols and improve the data exchange rate.

[0109] In one embodiment, the one-line communication interface includes a first end connected to a host computer, an input end connected to a battery management controller, and an output end connected to the battery management controller. Configuring the one-line communication interface as a bidirectional communication interface includes: configuring the input end and the output end based on the UART communication protocol; the first end is used to receive a first message from the host computer, and the first message is sent to the battery management controller through the output end; the input end is used to receive a second message sent by the battery management controller, and the second message is sent to the host computer through the first end.

[0110] Specifically, such as Figure 6 The diagram shows a structural block diagram of a battery management controller, a one-line communication interface, and a host computer. Configuring the one-line communication interface as a bidirectional communication interface includes: connecting the output terminal of the battery management controller to the input terminal of the one-line communication interface; connecting the input terminal of the battery management controller to the output terminal of the one-line communication interface; and connecting the first end of the one-line communication interface to the host computer. The signal flow is as follows: from the output terminal of the battery management controller to the input terminal of the one-line communication interface, and from the output terminal of the one-line communication interface to the input terminal of the battery management controller. Furthermore, the signal flow between the first end of the one-line communication interface and the host computer is mutual.

[0111] In this embodiment, by configuring the one-line communication interface as a bidirectional communication interface, the battery management controller and the host computer can form a half-duplex communication, realizing the polling and answering function between the battery management controller and the host computer.

[0112] In one embodiment, configuring the one-line interface as a one-way communication interface includes: disabling the output end; the input end is used to receive a third message sent by the battery management controller, and the third message is sent to the host computer through the first end.

[0113] Specifically, such as Figure 7 The diagram shows another structural block diagram of a battery management controller, a one-line communication interface, and a host computer. Configuring the one-line communication interface as a unidirectional communication interface includes disabling both the output of the one-line communication interface and the input of the battery management controller. The output of the battery management controller is connected to the input of the one-line communication interface, and the first segment of the one-line communication interface is connected to the host computer. The signal flow is from the output of the battery management system to the input of the one-line communication interface, and then the signal is sent to the host computer through the first segment of the one-line communication interface.

[0114] In this embodiment, the one-line interface is configured as a one-way communication interface, which enables the battery management controller and the host computer to form simplex communication, realizing the function of the battery management controller actively reporting signals.

[0115] In one embodiment, if the first end does not receive a pull-up signal, the one-line communication interface is switched to sleep mode.

[0116] Among them, the pull-up signal refers to the scheduling signal of the host computer. If the first end does not receive the pull-up signal, it means that the host computer is not sending a scheduling signal to the one-line communication interface and the battery management controller at the current moment.

[0117] If the first end does not receive a pull-up signal, the battery management controller does not perform charge / discharge control and protection, and the preset time exceeds the specified time, the one-line communication interface will be switched to sleep mode to reduce power consumption. The preset time can be 1 to 5 minutes.

[0118] If the first end receives a pull-up signal, the one-line communication interface will be configured as a bidirectional communication interface to realize half-duplex communication between the battery management controller and the host computer.

[0119] In this embodiment, by setting a pull-up signal, when the first end of the one-line communication interface does not receive the pull-up signal, the one-line communication interface is switched to sleep mode to reduce power consumption.

[0120] To enable signal transmission between the battery management controller and the host computer, in one embodiment, a battery management system is also provided, including: a battery management controller and a one-wire interface connected to the battery management controller; the battery management controller stores a computer program and executes the above-described method steps.

[0121] The one-line interface includes the battery-side circuitry. Specifically, as shown... Figure 8 The diagram shows the first type of battery terminal circuit.

[0122] The first type of battery terminal circuit includes an external interrupt circuit, a transmitting circuit, a receiving circuit, and an isolation protection circuit.

[0123] The external interrupt circuit includes resistor R1, capacitor C1, and diode D2. The first terminal of resistor R1 is connected to the power supply VCC. The second terminal of resistor R1 is connected to the external interrupt interface of the battery management controller, the first terminal of capacitor C1, and the anode of diode D2. The second terminal of capacitor C2 is connected to ground GND. The external interrupt circuit operates as follows: when a high-level signal is received from the external interrupt interface of the battery management controller, diode D2 conducts.

[0124] The receiving circuit includes transistor Q2, resistors R9, R10, and R17, and diode D4. The emitter of transistor Q2 is connected to the first terminal of resistor R9 and the power supply MCP POWER2 provided by the battery management controller. MCP POWER2 is typically 3.3V. When the battery management controller is in sleep mode, MCP POWER2 must be turned off. The base of transistor Q2 is connected to the second terminal of resistor R9 and the first terminal of resistor R10. The second terminal of resistor R10 is connected to the anode of diode D4. The collector of transistor Q2 is connected to the first terminal of resistor R17 and the input terminal of the battery management controller. The second terminal of resistor R17 is connected to ground (GND). The receiving circuit works as follows: If diode D4 is conducting, the base current supplied by MCP POWER2 to the base of transistor Q2 is amplified by transistor Q2, resulting in the collector current. Therefore, based on the conduction state of diode D4, the high / low level signal at the input terminal of the battery management controller is obtained.

[0125] The transmitting circuit includes: resistor R3, resistor R5, and optocoupler U2. The first terminal of resistor R5 and the second terminal of optocoupler U2 are connected to the output terminal of the battery management controller. The second terminals of resistor R5 and R3 are connected to the first terminal of optocoupler U2. The first terminal of resistor R3 is connected to the power supply VCC. The third terminal of optocoupler U2 is connected to protective ground PGND. The transmitting circuit works as follows: if the drive current received at the fourth terminal of optocoupler U2 is greater than the minimum drive current of optocoupler U2 but less than the current limit of optocoupler U2, then optocoupler U2 is driven, thereby causing the first and second terminals of optocoupler U2 to conduct, thus obtaining the high and low level signals at the output terminal of the battery management controller.

[0126] The isolation protection circuit includes: optocoupler U3, resistors R6 and R14, transient voltage suppressor diode (TVS2), and fuse F2. The first terminal of optocoupler U3 is connected to the first terminals of resistors R6 and R14; the second terminal of optocoupler U3 is connected to the second terminal of resistor R14 and protective ground PGND; and the third terminal of optocoupler U3 is connected to general ground GND. Resistor R6 is connected to the first terminal of fuse F2 and the cathode of transient voltage suppressor diode TVS2; the anode of transient voltage suppressor diode TVS2 is connected to protective ground PGND; and the second terminal of fuse F2 is connected to the first terminal TXRX of the host computer interface. The working principle of the isolation protection circuit is as follows: When an electrical signal is input to the first terminal TXRX of the host computer interface, the first and second terminals of optocoupler U3 are driven, thereby conducting the third and fourth terminals of optocoupler U3. When the input signal has an excessively large current, it may trigger the transient voltage suppressor diode TVS2 and fuse F2, preventing optocoupler U3 or other circuit components from burning out.

[0127] like Figure 9 The diagram shows the second type of battery terminal circuit.

[0128] The second type of battery-side circuit includes: an external interrupt circuit, a receiving circuit, and a transmitting circuit.

[0129] The external interrupt circuit includes: capacitor C2, resistor R7, field-effect transistor Q4, resistors R11, R15, and R18. The first terminal of capacitor C2 is connected to the external interrupt interface of the battery management controller, the first terminal of resistor R7, and the drain of field-effect transistor Q4. The source of field-effect transistor Q4 is connected to the first terminals of resistors R18 and R15. The gate of field-effect transistor Q4 is connected to the first terminal of resistor R11 and the second terminal of resistor R18. The external interrupt circuit operates as follows: when the gate current of field-effect transistor Q4 reaches a threshold, the source and drain of field-effect transistor Q4 conduct. At this time, the external interrupt interface of the battery management controller can send an interrupt signal.

[0130] The receiving circuit includes: transistor Q1, resistors R8 and R12, diode D3, transistor Q3, resistors R16 and R13, diode D1, and fuse F1. The base of transistor Q1 is connected to the first terminals of resistors R8 and R12; the collector of transistor Q1 is connected to the second terminal of resistor R8 and the power supply VCC; the emitter of transistor Q1 is connected to the input terminal of the battery management controller; the base of transistor Q3 is connected to the first terminal of resistor R13 and the first terminal of resistor R16; the emitter of transistor Q3 is connected to the cathode of diode D3; the second terminal of resistor R13 is connected to the cathode of diode D1; the anode of diode D1 is connected to the first terminal of fuse F1; and the second terminal of fuse F1 is connected to the first terminal TXRX of the host computer interface. The working principle of the receiving circuit: The current signal sent by the first terminal TXRX of the host computer interface is amplified by the transistor Q3 and transmitted to the resistor R12, which increases the combined current of resistors R8 and R12. The combined current is amplified by the transistor Q1, so that the input terminal of the battery management controller can recognize the high-level signal.

[0131] The transmitting circuit includes: resistors R2 and R4, optocoupler U1, and transient voltage suppressor diode (TVS1). The first terminal of optocoupler U1 is connected to the first terminals of resistors R2 and R4. The third terminal of optocoupler U1 is connected to the anode of TVS1, and the fourth terminal of optocoupler U1 is connected to the cathode of TVS1. The transmitting circuit operates as follows: When the output of the battery management controller is high, the first and second terminals of optocoupler U1 reach the drive current threshold. At this point, the third and fourth terminals of optocoupler U1 conduct, thus transmitting the electrical signal to the first terminal (TXRX) of the host computer interface.

[0132] It should be noted that the host computer connected to the one-line communication interface transmits signals through its own interface. Specifically, for example... Figure 10 The diagram shows the load-side circuit corresponding to the host computer interface.

[0133] The load-side circuit includes a transmitting circuit and a receiving circuit.

[0134] The transmitting circuit includes: resistor R19, resistor R21, optocoupler U4, resistor R20, and fuse F3. The first terminal of optocoupler U4 is connected to the first terminals of resistors R19 and R21, and the second terminal of optocoupler U4 is connected to the output terminal of the host computer.

[0135] The receiving circuit includes: transistor Q5, resistors R22, R23, R24, R25, and R26, optocoupler U5, and transient voltage suppressor diode TVS3. The receiver operates as follows: When the first terminal TXRX of the host computer interface receives an electrical signal from the battery management controller, this signal causes the first and second terminals of optocoupler U5 to conduct. This increases the combined current between resistors R23 and R24. This combined current, amplified by transistor Q5, keeps the electrical signal at the host computer's receiving port at a high level. By changing the potential of the electrical signal sent by the battery management controller, the electrical signal at the host computer's receiving port changes accordingly.

[0136] It is understandable that communication between the load-side circuit and the battery-side circuit is conducted through the first terminal TXRX of the host computer interface.

[0137] In this implementation, the original one-wire circuit is improved by adding a signal receiving circuit for the battery management controller to realize the data transmission and reception function of the battery management controller.

[0138] In one embodiment, the One-Line Interface includes a first end connected to a host computer, an input end connected to a battery management controller, and an output end connected to the battery management controller.

[0139] Specifically, such as Figure 8 , Figure 9 and Figure 10 As shown, the first end of the one-line interface that connects to the host computer is TXRX, the input end that connects to the battery management controller is TX, and the output end that connects to the battery management controller is RX.

[0140] In this implementation, by setting up a first end for the one-line communication interface to connect to the host computer, and an input end and an output end to connect to the battery management controller, a carrier for signal transmission is provided for configuring the communication mode of the one-line communication interface.

[0141] In one embodiment, the one-line communication interface further includes an external interrupt circuit, a transmitting circuit, a receiving circuit, and an isolation protection circuit connected to the output terminal. The isolation protection circuit is disposed between the transmitting circuit, the external interrupt circuit, the receiving circuit and the first terminal. When the first terminal is enabled, the receiving circuit is turned on.

[0142] Among them, such as Figure 8 As shown, the isolation protection circuit includes an optocoupler U3, a transient voltage suppressor diode (TVS2), and a fuse F2. The optocoupler achieves opto-isolation between the first terminal and the battery management controller, preventing communication distortion. The TVS2 and fuse are used to prevent excessive loop current from burning out components when the first terminal is short-circuited.

[0143] In one embodiment, such as Figure 11 As shown, a compatibility method between the vehicle communication protocol and the host computer protocol is provided, including:

[0144] S1102, after the battery is powered on, configure the one-line communication interface as a bidirectional communication interface.

[0145] S1104, whether the first message was received within the first preset time.

[0146] If yes, then execute S1106; otherwise, execute S1114.

[0147] The first preset time can be set using the TM timer of the battery management controller.

[0148] S1106 If a first message sent by the host computer based on the first communication protocol is received through the One-Line Communication interface within a first preset time, the first message is verified.

[0149] S1108: Parse the first message after verification to determine the target battery parameters requested by the host computer.

[0150] S1110 processes the target battery parameters based on the first communication protocol to obtain the second message.

[0151] S1112 sends a second message to the host computer via the One-Line Communication interface. The host computer obtains the target battery parameters by parsing the second message.

[0152] S1114 If the first message sent by the host computer based on the first communication protocol is not received within the first preset time, the one-line communication interface is configured as a one-way communication interface.

[0153] S1116, based on the second communication protocol, the preset battery parameters are processed to obtain the third message.

[0154] S1118 sends a third message to the host computer via the One-Line Communication interface. The host computer obtains the preset battery parameters by parsing the third message.

[0155] S1120 configures input and output terminals based on the UART communication protocol.

[0156] S1122, the first terminal is used to receive the first message from the host computer, and the first message is sent to the battery management controller through the output terminal; the input terminal is used to receive the second message sent by the battery management controller, and the second message is sent to the host computer through the first terminal.

[0157] The configuration of the one-line communication interface as a one-way communication interface includes: disabling the output end; the input end is used to receive the third message sent by the battery management controller, and the third message is sent to the host computer through the first end.

[0158] If the first end does not receive a pull-up signal, the one-line communication interface will be switched to sleep mode.

[0159] In this embodiment, an existing one-wire interface is used. By configuring the one-wire interface as a bidirectional communication interface, the need for an external communication line to the battery pack is avoided. The first message is received on the one-wire interface, and the target battery parameters requested by the host computer are obtained by verifying and parsing the first message. These target battery parameters are then processed to obtain a second message, which is sent to the host computer through the one-wire interface. The host computer parses the second message to obtain the target battery parameters. This method completes data transmission and reception through a one-wire interface, saving material costs for the monitoring circuit and reducing line maintenance costs. Active reporting and polling responses are achieved through single-wire communication compatibility.

[0160] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0161] Based on the same inventive concept, this application also provides a communication processing apparatus based on a one-line interface for implementing the communication processing method based on the one-line interface described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method. Therefore, the specific limitations in one or more embodiments of the communication processing apparatus based on a one-line interface provided below can be found in the limitations of the communication processing method based on the one-line interface described above, and will not be repeated here.

[0162] In one embodiment, such as Figure 12 As shown, a communication processing device based on a one-line communication interface is provided, including: a configuration module 1202, a judgment module 1204, a parsing module 1206, a processing module 1208, and an output module 1210, wherein:

[0163] The configuration module 1202 is used to configure the one-line communication interface as a bidirectional communication interface after the battery is powered on; the judgment module 1204 is used to verify the first message if a first message sent by the host computer based on the first communication protocol is received through the one-line communication interface within a first preset time; the parsing module 1206 is used to parse the verified first message to determine the target battery parameters requested by the host computer; the processing module 1208 is used to process the target battery parameters based on the first communication protocol to obtain a second message; and the output module 1210 is used to send the second message to the host computer through the one-line communication interface, and the host computer obtains the target battery parameters by parsing the second message.

[0164] In one embodiment, the judgment module 1204 is further configured to configure the one-line communication interface as a one-way communication interface if it does not receive the first message sent by the host computer based on the first communication protocol within a first preset time; the processing module 1208 is further configured to process the preset battery parameters based on the second communication protocol to obtain the third message; the output module 1210 is further configured to send the third message to the host computer through the one-line communication interface, and the host computer obtains the preset battery parameters by parsing the third message.

[0165] In one embodiment, the output module 1210 is further configured to configure the one-line communication interface as a bidirectional communication interface.

[0166] In one embodiment, the one-line interface includes a first end connected to a host computer, an input end connected to a battery management controller, and an output end connected to the battery management controller; the judgment module 1204 is further configured to configure the input end and the output end based on the UART communication protocol; the first end is used to receive a first message from the host computer, and the first message is sent to the battery management controller through the output end; the input end is used to receive a second message sent by the battery management controller, and the second message is sent to the host computer through the first end.

[0167] In one embodiment, the judgment module 1204 is further configured to disable the output terminal; the input terminal is configured to receive a third message sent by the battery management controller, and the third message is sent to the host computer through the first terminal.

[0168] In one embodiment, the judgment module 1204 is further configured to switch the one-line communication interface to sleep mode if the first end does not receive a pull-up signal.

[0169] The modules in the aforementioned communication processing device based on the One-Line Interface can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0170] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores target battery parameter data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a communication processing method based on a one-wire interface.

[0171] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0172] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0173] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0178] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A communication processing method based on a one-line communication interface, characterized in that, The method includes: After the battery is powered on, configure the one-line communication interface as a bidirectional communication interface; If a first message sent by the host computer based on the first communication protocol is received through the first preset time via the one-line communication interface, then the first message is verified. The first message after verification is parsed to determine the target battery parameters requested by the host computer; The target battery parameters are processed based on the first communication protocol to obtain the second message; The second message is sent to the host computer through the one-line communication interface, and the host computer obtains the target battery parameters by parsing the second message; If the first message sent by the host computer based on the first communication protocol is not received within the first preset time, the one-line communication interface will be configured as a one-way communication interface. The preset battery parameters are processed based on the second communication protocol to obtain the third message; The third message is sent to the host computer through the one-line communication interface, and the host computer obtains the preset battery parameters by parsing the third message; After sending the third message to the host computer through the one-line communication interface, the one-line communication interface is reconfigured as a bidirectional communication interface. If no communication request is received from the host computer within a preset time window, the bidirectional communication mode is maintained and no new third message is sent.

2. The method according to claim 1, characterized in that, The one-line communication interface includes a first end connected to the host computer, an input end connected to the battery management controller, and an output end connected to the battery management controller. The step of configuring the one-line interface as a bidirectional communication interface includes: configuring the input terminal and the output terminal based on the UART communication protocol; The first terminal is used to receive a first message from the host computer, and the first message is sent to the battery management controller through the output terminal; the input terminal is used to receive a second message sent by the battery management controller, and the second message is sent to the host computer through the first terminal.

3. The method according to claim 2, characterized in that, The step of configuring the one-line communication interface as a unidirectional communication interface includes: Disable the output terminal; The input terminal is used to receive a third message sent by the battery management controller, and the third message is sent to the host computer through the first terminal.

4. The method according to claim 2 or 3, characterized in that, If the first end does not receive a pull-up signal, the one-line communication interface will be switched to sleep mode.

5. A battery management system, characterized in that, include: A battery management controller, and a one-wire interface connected to the battery management controller; The battery management controller stores a computer program, and when the battery management controller executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

6. The battery management system according to claim 5, characterized in that, The one-line interface includes a first end connected to the host computer, an input end connected to the battery management controller, and an output end connected to the battery management controller.

7. The battery management system according to claim 6, characterized in that, The one-line interface also includes an external interrupt circuit, a transmitting circuit, a receiving circuit, and an isolation protection circuit connected to the output terminal. The isolation protection circuit is located between the transmitting circuit, the external interrupt circuit, the receiving circuit, and the first terminal. When the first terminal is enabled, the receiving circuit is turned on.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Battery parameter acquisition method and device, battery and storage medium

    CN113022373A

  • Integrated service digital network intelligent battery management system

    CN216133897U