Electronic lock circuit, diagnostic control method and storage medium for battery management system

By introducing a combination of control module and diagnostic module in the battery management system, and using voltage and current sampling modules for fault detection, the safety accident problem caused by electronic lock driving control failure is solved and charging safety is improved.

CN116311615BActive Publication Date: 2025-08-19HOZON NEW ENERGY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310216960.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2025-08-19
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

The battery management system fails when driving the electronic lock, which may lead to a safety accident when the electronic lock is locked or unlocked.

Method used

Using a combination of a control module, an H-bridge driving module and a diagnostic module, fault detection is performed through the first voltage sampling module, the second voltage sampling module, the first current sampling module and the second current sampling module to determine whether the driving output control pin of the H-bridge driving module is abnormal, and to avoid locking or unlocking in abnormal situations.

Benefits of technology

The fault detection of the electronic lock circuit is realized, safety accidents during locking and unlocking of the electronic lock, and the safety of charging is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116311615B_ABST
    Figure CN116311615B_ABST
Patent Text Reader

Abstract

The present invention relates to an electronic lock circuit, diagnostic control method, and storage medium for a battery management system. The electronic lock circuit of the battery management system includes a control module, an H-bridge driver module, and a diagnostic module. The diagnostic module includes a first voltage sampling module, a second voltage sampling module, a first current sampling module, and a second current sampling module. The first voltage sampling module is respectively connected to the first drive output control pin of the H-bridge driver module and the control module; the second voltage sampling module is respectively connected to the second drive output control pin of the H-bridge driver module and the control module; the first current sampling module is respectively connected to the first drive output control pin of the H-bridge driver module and the control module, and the second current sampling module is respectively connected to the second drive output control pin of the H-bridge driver module and the control module. All current sampling modules are activated only when the battery management system performs a self-test before locking. The present invention can prevent safety accidents when locking or unlocking an electronic lock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric vehicles, and in particular to an electronic lock circuit, a diagnostic control method and a storage medium of a battery management system. Background Art

[0002] With the increasing popularity of new energy vehicles, product reliability and safety design are becoming increasingly important. Charging is a crucial technical design element in the development of a battery management system (BMS). The battery management system receives high-voltage DC current during charging. Whether designing a 400V or 800V vehicle high-voltage architecture, an electronic lock is required to secure the charging gun to the charging socket. When the electronic lock is locked, it secures the charging gun plug to the socket, ensuring a secure connection. When the electronic lock is unlocked, the charging gun plug can be removed from the charging socket.

[0003] However, if a malfunction occurs in the battery management system driving and controlling the electronic lock, a safety accident may occur when the electronic lock is locked or unlocked.

[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention

[0005] In response to the above technical problems, the present application provides an electronic lock circuit, a diagnostic control method and a storage medium for a battery management system, which can be used for fault detection of the electronic lock circuit, avoiding safety accidents when locking and unlocking the electronic lock, thereby improving charging safety.

[0006] To achieve the above-mentioned purpose, an embodiment of the present invention provides an electronic lock circuit of a battery management system, comprising a control module, an H-bridge driving module and a diagnostic module: the control module is connected to the first enable pin and the second enable pin of the H-bridge driving module; the first drive output control pin of the H-bridge driving module is connected to the first end of the motor inside the electronic lock, and the second drive output control pin of the H-bridge driving module is connected to the second end of the motor inside the electronic lock; the diagnostic module comprises a first voltage sampling module, a second voltage sampling module, a first current sampling module and a second current sampling module; the first voltage sampling module is connected to the first drive output control pin of the H-bridge driving module The first current sampling module is connected to the first drive output control pin of the H-bridge drive module and outputs a first feedback digital signal to the control module; the second voltage sampling module is connected to the second drive output control pin of the H-bridge drive module and outputs a second feedback digital signal to the control module; the first current sampling module is connected to the first drive output control pin of the H-bridge drive module and is enabled and outputs a first current sampling feedback signal to the control module only when the battery management system performs a self-test before locking; the second current sampling module is connected to the second drive output control pin of the H-bridge drive module and is enabled and outputs a second current sampling feedback signal to the control module only when the battery management system performs a self-test before locking.

[0007] As one embodiment, the first current sampling module includes a first current sampling resistor and a first switching element; the second current sampling module includes a second current sampling resistor and a third switching element; the first end of the first current sampling resistor is connected to the first drive output control pin of the H-bridge driving module, the second end of the first current sampling resistor is connected to the first end of the first switching element, and the first and second ends of the first current sampling resistor are also connected to the control module; the second end of the first switching element is grounded; the first switching element is only controlled to be in a closed state when the battery management system performs a self-test before locking; the first end of the second current sampling resistor is connected to the second drive output control pin of the H-bridge driving module, the second end of the second current sampling resistor is connected to the first end of the third switching element, and the first and second ends of the second current sampling resistor are also connected to the control module; the second end of the third switching element is grounded; the third switching element is only controlled to be in a closed state when the battery management system performs a self-test before locking.

[0008] As one embodiment, the first current sampling module further includes a second switching element, a first protection resistor and a first power supply voltage; the first end of the second switching element is grounded, the second end of the second switching element is connected to the control end of the first switching element, and is also connected to the first end of the first protection resistor, and the control end of the second switching element is connected to the control module; the second end of the first protection resistor receives the first power supply voltage; the second current sampling module further includes a fourth switching element, a second protection resistor and a second power supply voltage; the first end of the fourth switching element is grounded, the second end of the fourth switching element is connected to the control end of the first switching element, and is also connected to the first end of the second protection resistor, and the control end of the fourth switching element is connected to the control module; the second end of the second protection resistor receives the second power supply voltage.

[0009] As one embodiment, the first voltage sampling module includes a first resistor and a second resistor; the first end of the first resistor is connected to the first drive output control pin of the H-bridge drive module; the first end of the second resistor is connected to the second end of the first resistor and is also connected to the control module, and the second end of the second resistor is grounded; the second voltage sampling module includes a third resistor and a fourth resistor; the first end of the third resistor is connected to the second drive output control pin of the H-bridge drive module; the first end of the fourth resistor is connected to the second end of the third resistor and is also connected to the control module, and the second end of the fourth resistor is grounded.

[0010] As one implementation manner, the diagnosis module further includes a third voltage sampling module, which is connected to a normally open switch inside the electronic lock and outputs a third feedback digital signal to the control module.

[0011] As one embodiment, the third voltage sampling module includes a fifth resistor, a sixth resistor and a seventh resistor; the first end of the fifth resistor is connected to the normally open switch of the electronic lock, and the second end of the fifth resistor is grounded; the first end of the sixth resistor is connected to the first end of the fifth resistor; the first end of the seventh resistor is connected to the second end of the sixth resistor and is also connected to the control module 100, and the second end of the seventh resistor is grounded.

[0012] The embodiment of the present invention also provides a diagnostic control method for the electronic lock circuit of the battery management system mentioned above, comprising: during self-test, the control module controls the first current sampling module and the second current sampling module to be in an enabled state, and determines whether an abnormality occurs in the drive output control pin of the H-bridge drive module based on the first current sampling feedback signal of the first current sampling module and the second current sampling feedback signal of the second current sampling module; if it is determined that an abnormality occurs in the drive output control pin of the H-bridge drive module, locking is not performed and a fault is reported; if it is determined that no abnormality occurs in the drive output control pin of the H-bridge drive module, when locking is performed, the first current sampling module and the second current sampling module are controlled to be in a disabled state; when locking, the control module controls the first enable pin of the H-bridge drive module to be high and the second enable pin to be low, and based on the Based on the first feedback digital signal output by the first voltage sampling module and the second feedback digital signal output by the second voltage sampling module, the first current sampling feedback signal of the first current sampling module and the second current sampling feedback signal of the second current sampling module, it is determined whether the channel driving output of the H-bridge driving module is abnormal; if it is determined that the channel driving output of the H-bridge driving module is abnormal, locking is stopped and a fault is reported; when unlocking, the control module controls the first enable pin of the H-bridge driving module to be low and the second enable pin to be high, and based on the first feedback digital signal output by the first voltage sampling module and the second feedback digital signal output by the second voltage sampling module, it is determined whether the channel driving output of the H-bridge driving module is abnormal; if it is determined that the channel driving output of the H-bridge driving module is abnormal, unlocking is stopped and a fault is reported.

[0013] As one of the implementation modes, the diagnostic control method of the electronic lock circuit of the above-mentioned battery management system further includes: judging whether the first feedback digital signal output by the first voltage sampling module is at a low level when locked; if so, judging that the first drive output control pin of the H-bridge drive module is at a low level, judging that the channel high-side drive output of the first drive output control pin of the H-bridge drive module is abnormal, stopping locking, and reporting a fault; judging whether the second feedback digital signal output by the second voltage sampling module is at a high level when locked; if so, judging that the second drive output control pin of the H-bridge drive module is at a high level, judging that the channel low-side drive output of the second drive output control pin of the H-bridge drive module is abnormal. If the low-side drive output of the channel of the first drive output control pin of the H-bridge drive module is abnormal, the locking is stopped and a fault is reported; when unlocking, it is determined that the first feedback digital signal output by the first voltage sampling module is a high level; if so, it is determined that the first drive output control pin of the H-bridge drive module is a high level, then it is determined that the channel low-side drive output of the first drive output control pin of the H-bridge drive module is abnormal, then the unlocking is stopped and a fault is reported; when unlocking, it is determined that the second feedback digital signal output by the second voltage sampling module is a low level; if so, it is determined that the second drive output control pin of the H-bridge drive module is a low level, then it is determined that the channel high-side drive output of the second drive output control pin of the H-bridge drive module is abnormal, then the unlocking is stopped and a fault is reported.

[0014] As one of the implementation methods, the diagnostic control method of the electronic lock circuit of the above-mentioned battery management system also includes: the H-bridge drive module determines whether a power supply pin undervoltage, overcurrent, or thermal shutdown fault occurs through an internal diagnostic protection unit. If a fault is determined to have occurred, the corresponding digital input fault detection signal is output to the control module, and the control module stops driving the H-bridge drive module and reports the fault.

[0015] Based on the same inventive concept, the present invention further provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the diagnostic control method for the electronic lock circuit of the battery management system.

[0016] In summary, the electronic lock current, diagnostic control method and storage medium of the battery management system provided by the embodiment of the present invention, the electronic lock circuit includes a control module, an H-bridge driver module and a diagnostic module, the diagnostic module includes a first voltage sampling module, a second voltage sampling module, a first current sampling module and a second current sampling module; during self-test, the control module can perform current sampling by enabling the first current sampling module and the second current sampling module to determine whether the drive output control pin of the H-bridge driver module is abnormal; when locking and unlocking, the control module can determine whether the channel drive output of the H-bridge driver module is abnormal based on the first feedback digital signal output by the first voltage sampling module and the second feedback digital signal output by the second voltage sampling module; thereby, fault detection of the electronic lock circuit is realized, safety accidents are avoided when the electronic lock is locked and unlocked, and charging safety is improved. Among them, the first voltage sampling module and the second voltage sampling module provided by the embodiment of the present invention can diagnose the high and low side drive output of the electronic lock without relying on the internal circuit of the H-bridge driver chip; the first voltage sampling module and the second voltage sampling module use a digital circuit acquisition port at the control end of the control module. Compared with the analog circuit sampling scheme, the digital circuit sampling scheme has a more sensitive diagnostic signal response. At the same time, this design allows for the inclusion of a third voltage sampling module, which combines the level output status of the first enable pin of the H-bridge driver module, the level output status of the second enable pin of the H-bridge driver module, the first feedback digital signal output by the first voltage sampling module, and the second feedback digital signal output by the second voltage sampling module to use a redundant diagnostic combination to determine whether the electronic lock has a locking or unlocking drive fault. Furthermore, through the first and second current sampling modules, this solution can be used during self-test to determine whether the H-bridge driver module's drive output control pin has been interfered with, the drive instruction control is abnormal, or the drive port is short-circuited to ground, causing overcurrent. This prevents locking when the H-bridge driver module's drive output control pin is abnormal, avoiding safety accidents when the electronic lock is locked, thereby improving charging safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for describing the embodiments. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without inventive work.

[0018] Figure 1 A schematic diagram of the connection of an electronic lock circuit of a battery management system provided by one embodiment of the present invention.

[0019] Figure 2This is a schematic diagram of the specific connection of the electronic lock circuit of the battery management system provided by one embodiment of the present invention.

[0020] Figure 3 This is a flow chart of a diagnostic control method for an electronic lock circuit of a battery management system provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first", "second", etc. in the specification, claims, and drawings of the present invention are used to distinguish similar objects, but are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or apparatus.

[0023] In the subsequent description, the use of suffixes such as "module", "component" or "unit" to represent elements is only for the purpose of facilitating the description of the present application and has no specific meaning. Therefore, "module", "component" or "unit" can be used interchangeably.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0025] Figure 1 This is a schematic diagram of the connection of the electronic lock circuit of the battery management system provided by one embodiment of the present invention. Figure 1As shown, an embodiment of the present invention provides an electronic lock circuit for a battery management system. The electronic lock circuit includes a control module 100, an H-bridge driver module 200, and a diagnostic module. The control module 100 is connected to the first enable pin and the second enable pin of the H-bridge driver module 200. The first drive output control pin of the H-bridge driver module 200 is connected to the first end of the motor 310 within the electronic lock 300, and the second drive output control pin of the H-bridge driver module 200 is connected to the second end of the motor 310 within the electronic lock 300.

[0026] The diagnostic module includes a first voltage sampling module 410, a second voltage sampling module 420, a first current sampling module 510, and a second current sampling module 520; the first voltage sampling module 410 is connected to the first drive output control pin of the H-bridge driver module 200 and outputs a first feedback digital signal to the control module 100; the second voltage sampling module 420 is connected to the second drive output control pin of the H-bridge driver module 200 and outputs a second feedback digital signal to the control module 100; the first current sampling module 510 is connected to the first drive output control pin of the H-bridge driver module 200 and is enabled and outputs a first current sampling feedback signal only when the battery management system performs a self-test before locking to determine whether the first drive output control pin of the H-bridge driver module 200 is overcurrent; the second current sampling module 520 is connected to the second drive output control pin of the H-bridge driver module 200 and is enabled and outputs a second current sampling feedback signal to the control module 100 only when the battery management system performs a self-test before locking.

[0027] Specifically, the electronic lock circuit of the battery management system of this embodiment operates through a self-test, locking, and unlocking process. Self-test is performed before locking, meaning that after the user inserts the charging gun, the battery management system can be awakened and perform an initialization self-test before officially swiping a card to activate locked charging. During the self-test, the control module 100 controls the first current sampling module 510 and the second current sampling module 520 to be enabled, and determines whether an abnormality has occurred in the drive output control pin of the H-bridge driver module 200 based on the first current sampling feedback signal of the first current sampling module 510 and the second current sampling feedback signal of the second current sampling module 520. If it is determined that the drive output control pin of the H-bridge driver module 200 has an abnormality, locking is not performed and a fault is reported. For example, if overcurrent is determined based on current sampling, it can be determined that the drive output control pin of the H-bridge driver module 200 has been tampered with, the drive instruction control is abnormal, or the drive port is short-circuited to ground. To avoid a safety accident caused by this abnormality during locking, locking is not performed and a fault is reported. If it is determined that the drive output control pin of the H-bridge driver module 200 has not an abnormality, when locking is performed, the first current sampling module 510 and the second current sampling module 520 are controlled to be in a disabled state to prevent the first current sampling module 510 and the second current sampling module 520 from being connected in parallel with the internal resistance of the motor, thereby affecting the drive current output during locking and unlocking and causing drive control confusion.

[0028] When locked, the control module 100 controls the first enable pin of the H-bridge driver module 200 to be high and the second enable pin to be low, and determines whether the channel drive output of the H-bridge driver module 200 is abnormal based on the first feedback digital signal output by the first voltage sampling module 410 and the second feedback digital signal output by the second voltage sampling module 420. If it is determined that the channel drive output of the H-bridge driver module 200 is abnormal, the locking is stopped and a fault is reported. Among them, the control module 100 can determine whether the first feedback digital signal output by the first voltage sampling module 410 is a low level; if so, it is determined that the first drive output control pin of the H-bridge driver module 200 is a low level, and then it is determined that the channel high-side drive output of the first drive output control pin of the H-bridge driver module 200 is abnormal, then the locking is stopped and a fault is reported; it can also determine whether the second feedback digital signal output by the second voltage sampling module 420 is a high level; if so, it is determined that the second drive output control pin of the H-bridge driver module 200 is a high level, and then it is determined that the channel low-side drive output of the second drive output control pin of the H-bridge driver module 200 is abnormal, then the locking is stopped and a fault is reported.

[0029] During unlocking, the control module 100 controls the first enable pin of the H-bridge driver module 200 to be low and the second enable pin to be high, and determines whether the channel drive output of the H-bridge driver module 200 is abnormal based on the first feedback digital signal output by the first voltage sampling module 410 and the second feedback digital signal output by the second voltage sampling module 420. If the channel drive output of the H-bridge driver module 200 is determined to be abnormal, unlocking is stopped and a fault is reported. The control module 100 can determine whether the first feedback digital signal output by the first voltage sampling module 410 is high; if so, it determines that the first drive output control pin of the H-bridge driver module 200 is high, and thus determines that the channel low-side drive output of the first drive output control pin of the H-bridge driver module 200 is abnormal, and thus unlocking is stopped and a fault is reported. The control module 100 can determine whether the second feedback digital signal output by the second voltage sampling module 420 is low; if so, it determines that the second drive output control pin of the H-bridge driver module 200 is low, and thus determines that the channel high-side drive output of the second drive output control pin of the H-bridge driver module 200 is abnormal, and thus unlocking is stopped and a fault is reported.

[0030] Thus, in the electronic lock circuit of the battery management system of this embodiment, the control module 100 can perform fault detection of the electronic lock circuit based on the corresponding feedback signals of the first voltage sampling module 410, the second voltage sampling module 420, the first current sampling module 510 and the second current sampling module 520 in the diagnostic module, thereby avoiding safety accidents when the electronic lock is locked and unlocked, thereby improving the safety of charging.

[0031] In one embodiment, the diagnostic module of the electronic lock circuit of the battery management system further includes a third voltage sampling module 430. The input of the third voltage sampling module 430 is connected to the normally open switch 320 provided on the electronic lock 300. The control module 100 receives a third feedback digital signal output by the third voltage sampling module 430. The control module 100 can determine whether the lock is locked or unlocked based on the third feedback digital signal output by the third voltage sampling module 430. If the lock is locked, the control module 100 stops driving the H-bridge driver module 200; if the unlock is unlocked, the control module 100 stops driving the H-bridge driver module 200. During locking, the control module can determine whether the locking time exceeds a first preset time based on the third feedback digital signal output by the third voltage sampling module. If the locking time exceeds the first preset time, the control module determines that a locking failure has occurred. During unlocking, the control module can determine whether the unlocking time exceeds a second preset time based on the third feedback digital signal output by the third voltage sampling module. If the unlocking time exceeds the second preset time, the control module determines that an unlocking failure has occurred.

[0032] Figure 2This is a schematic diagram of the specific connection of the electronic lock circuit of the battery management system provided by one embodiment of the present invention. Figure 2 As shown, the control module 100 is connected to the H-bridge driver module 200, which is in turn connected to the electronic lock 300. The control module 100 can be a main chip (MCU), such as a single-chip microcomputer. The H-bridge driver module 200 can be an H-bridge driver chip such as the DRV8872 or BTM7741, which can receive a 12V power supply. Considering chip cost and circuit design complexity, the DRV8872DDARQ1 H-bridge driver chip is preferred.

[0033] In one embodiment, if Figure 2 As shown, the first current sampling module 510 includes a first current sampling resistor Shunt1 and a first switch element Q1; the second current sampling module 520 includes a second current sampling resistor Shunt2 and a third switch element Q3. The first end of the first current sampling resistor Shunt1 is connected to the first drive output control pin OUT1 of the H-bridge driver module 200, and the second end of the first current sampling resistor Shunt1 is connected to the first end of the first switch element Q1. The first and second ends of the first current sampling resistor Shunt1 are also connected to the control module 100. The second end of the first switch element Q1 is grounded. The first switch element Q1 is only controlled to be in a closed state when the battery management system performs a self-test before locking. The first end of the second current sampling resistor Shunt2 is connected to the second drive output control pin of the H-bridge driver module 200, and the second end of the second current sampling resistor Shunt2 is connected to the first end of the third switch element Q3. The first and second ends of the second current sampling resistor Shunt2 are also connected to the control module 100. The second end of the third switch element Q3 is grounded. The third switch element Q3 is only controlled to be in a closed state when the battery management system performs a self-test before locking.

[0034] In one embodiment, if Figure 2 As shown, the first current sampling module 510 further includes a second switching element Q2, a first protection resistor R8, and a first power supply voltage; a first end of the second switching element Q2 is grounded, a second end of the second switching element Q2 is connected to the control end of the first switching element Q1, and is also connected to the first end of the first protection resistor, and the control end of the second switching element Q2 is connected to the control module 100; a second end of the first protection resistor R8 receives the first power supply voltage; the second current sampling module 520 further includes a fourth switching element Q4, a second protection resistor R9, and a second power supply voltage; a first end of the fourth switching element Q4 is grounded, a second end of the fourth switching element Q4 is connected to the control end of the second switching element Q2, and is also connected to the first end of the second protection resistor R9, and the control end of the fourth switching element Q4 is connected to the control module 100; a second end of the second protection resistor R9 receives the second power supply voltage.

[0035] Specifically, before the battery management system starts charging, the driver plugs in the charging gun, and the battery management system can be awakened by plugging in the gun, and performs the initialization self-test phase of the electronic lock before charging. During the self-test, the control module 100 outputs the first sampling enable signal DO_Shunt1_Enable as a low level of 0V. The second switch element Q2 cannot be turned on and is in the disconnected state because its control end receives the first sampling enable signal DO_Shunt1_Enable as a low level. Therefore, point a connected to the second switch element Q2 cannot be grounded through the disconnected second switch element Q2. The voltage at point a is pulled up by the first protection resistor R8 to the first power supply voltage, such as a high level of 5V, thereby causing the first switch element Q1 to be closed and in the closed state because its control end is connected to point a and receives a high level. During the self-test, the first switch element Q1 is a switch circuit that is normally in the closed state. The control module 100 can collect the analog values Shunt1+ and Shunt1- at both ends of the first current sampling resistor Shunt1 as the first current sampling feedback signal. According to Ohm's law I=U / R=(U shunt1+ -U shunt1- ) / R shunt1 The output current of the first drive output control pin OUT1 of the H-bridge driver module 200 can be calculated. Similarly, the control module 100 also outputs the second sampling enable signal DO_Shunt2_Enable as a low level of 0V. The fourth switch element Q4 cannot be turned on and is in an off state because its control end receives the second sampling enable signal DO_Shunt2_Enable as a low level. Therefore, point b connected to the fourth switch element Q4 cannot be grounded through the disconnected fourth switch element Q4. The voltage at point b is pulled up to the second power supply voltage, such as a high level of 5V, by the second protection resistor R9, thereby causing the third switch element Q3 to be closed and in a closed state because its control end is connected to point b and receives a high level. During self-test, the third switch element Q3 is a switch circuit that is normally in a closed state. The control module 100 can collect the analog values Shunt2+ and Shunt2- at both ends of the second current sampling resistor Shunt2 as the second current sampling feedback signal. According to Ohm's law I=U / R=(U shunt2+ -U shunt2- ) / R shunt2 The output current of the second driving output control pin OUT2 of the H-bridge driving module 200 can be calculated.

[0036] Because the control module 100 does not drive the H-bridge driver module 200 during the self-test, under normal conditions, no current should flow through the first and second drive output control pins OUT1 and OUT2. During the self-test, the control module 100 samples current through the first and second current sampling modules 510 and 520. Based on the processed output currents of the first and second drive output control pins OUT1 and OUT2 of the H-bridge driver module 200, the control module 100 can determine whether an abnormality has occurred in the drive output control pins of the H-bridge driver module 200. For example, whether the output current of the first or second drive output control pins OUT1 or OUT2 of the H-bridge driver module 200 exceeds a preset threshold, which can be pre-programmed into the control module 100. If an abnormality is determined to have occurred in the drive output control pins of the H-bridge driver module 200, such as interference with the drive output control pins, abnormal drive command control, or a short circuit to ground, the control module 100 will not be locked and a fault will be reported.

[0037] During self-test, if the control module 100 determines that the drive output control pins of the H-bridge driver module 200 are normal, it can execute lock operation based on a formal card swipe, etc., and disable the first current sampling module 510. For example, if the control module 100 outputs the first sampling enable signal DO_Shunt1_Enable at a high level of 5V, the second switch element Q2 is turned on and closed due to its control terminal receiving the high level of the first sampling enable signal DO_Shunt1_Enable. Therefore, point a connected to the second switch element Q2 is grounded to a low level through the closed second switch element Q2, causing the first switch element Q1 to be disconnected and open due to its control terminal being connected to point a and receiving a low level. This ensures that during the locking and unlocking phases of the electronic lock, the first sampling resistor Shunt1 of the first current sampling module 510 does not connect in parallel with the internal resistance of the motor 310, affecting the drive current output and causing drive control confusion. Similarly, if the control module 100 determines that the drive output control pins of the H-bridge driver module 200 have not experienced an abnormality, it can execute locking based on a formal card swipe, etc., and disable the second current sampling module 520. For example, if the control module 100 outputs the second sampling enable signal DO_Shunt1_Enable at a high level of 5V, the fourth switch element Q4 is turned on and closed due to the high level of the second sampling enable signal DO_Shunt2_Enable received at its control terminal. Therefore, point b connected to the fourth switch element Q4 is grounded to a low level through the closed fourth switch element Q4, causing the third switch element Q3 to be disconnected and open due to the low level received at its control terminal connected to point b. This ensures that during the locking and unlocking phases of the electronic lock, the second sampling resistor Shunt2 of the second current sampling module 520 does not connect in parallel with the internal resistance of the motor 310, affecting the drive current output and causing drive control confusion.

[0038] When the self-test is completed and normal, the user can unlock the lock and charge by swiping the card. When locking or unlocking, the control module 100 drives the electronic lock 300 through the H-bridge driver module 200, including:

[0039] (1) When locked normally, the control module 100 controls the first enable pin IN1 of the H-bridge driver module 200 to be high and the second enable pin IN2 to be low. If the control module 100 outputs the first digital output enable signal DO_Lock_Enable1 such as 3.3V high level and outputs the second digital output enable signal DO_Lock_Enable2 such as 0V low level, the H-bridge driver module 200 performs locking drive, and the first drive output control pin OUT1 of the H-bridge driver module 200 outputs the first drive output signal OD_Lock1 as 12V high-side drive, and the second drive output control pin OUT2 of the H-bridge driver module 200 outputs the second drive output signal OD_Lock2 as 0V low-side drive. At this time, the motor 310 in the electronic lock 300 rotates forward to achieve locking of the charging gun interface.

[0040] (2) During normal unlocking, the control module 100 controls the first enable pin IN1 of the H-bridge driver module 200 to be low and the second enable pin IN2 to be high. If the control module 100 outputs the first digital output enable signal DO_Lock_Enable1 such as 0V as low level and outputs the second digital output enable signal DO_Lock_Enable2 such as 3.3V as high level, the H-bridge driver module 200 performs unlocking drive, and the first drive output control pin OUT1 of the H-bridge driver module 200 outputs the first drive output signal OD_Lock1 as 0V low-side drive, and the second drive output control pin OUT2 of the H-bridge driver module 200 outputs the second drive output signal OD_Lock2 as 12V high-side drive. At this time, the motor 310 in the electronic lock 300 reverses to realize unlocking the charging gun interface. When locking, the control module 100 can determine whether a fault has occurred through the first voltage sampling module 410 and the second voltage sampling module 420, including: determining whether the first feedback digital signal output by the first voltage sampling module 410 is a low level; if so, determining that the channel high-side drive output of the first drive output control pin OUT1 of the H-bridge drive module 200 is abnormal; determining whether the second feedback digital signal output by the second voltage sampling module 420 is a high level; if so, determining that the channel low-side drive output of the second drive output control pin OUT2 of the H-bridge drive module 200 is abnormal.

[0041] When locking, the control module 100 can determine whether a fault occurs through the first voltage sampling module 410 and the second voltage sampling module 420, including: determining whether the first feedback digital signal output by the first voltage sampling module 410 is a low level; if so, determining that the first drive output control pin of the H-bridge driver module 200 is a low level, and determining that the channel high-side drive output of the first drive output control pin OUT1 of the H-bridge driver module 200 is abnormal; determining whether the second feedback digital signal output by the second voltage sampling module 420 is a high level; if so, determining that the second drive output control pin of the H-bridge driver module 200 is a high level, and determining that the channel low-side drive output of the second drive output control pin OUT2 of the H-bridge driver module 200 is abnormal.

[0042] Specifically, (1) during the locking diagnosis, the control module 100 controls the first enable pin IN1 of the H-bridge driver module 200 to be high level. For example, the control module 100 outputs the first digital output enable signal DO_Lock_Enable1 such as 3.3V high level. The control module 100 receives the first feedback digital signal DI_Lock1_Feedback through the first voltage sampling module 410 to determine whether the level state is low level. If so, the control module 100 can compare the state of the first enable pin IN1 driver output and the first driver output control pin OUT1 feedback diagnosis to analyze that the OUT1 channel high-side driver output is abnormal and the electronic lock 300 fails to lock.

[0043] (2) During the locking diagnosis, the control module 100 controls the second enable pin IN2 of the H-bridge driver module 200 to be low level. For example, the control module 100 outputs the second digital output enable signal DO_Lock_Enable2 as a low level of 0V. The control module 100 receives the second feedback digital signal DI_Lock2_Feedback through the second voltage sampling module 420 to determine whether the level state is high level. If so, the control module 100 can compare the state of the second enable pin IN2 driver output and the second driver output control pin OUT2 feedback diagnosis to analyze that the low-side driver output of the OUT2 channel is abnormal, and the locking of the electronic lock 300 fails.

[0044] When unlocking, the control module 100 can determine whether a fault occurs through the first voltage sampling module 410 and the second voltage sampling module 420, including: determining whether the first feedback digital signal output by the first voltage sampling module 410 is a high level; if so, determining that the first drive output control pin of the H-bridge driver module 200 is a high level, and determining that the channel low-side drive output of the first drive output control pin OUT1 of the H-bridge driver module 200 is abnormal; determining whether the second feedback digital signal output by the second voltage sampling module 420 is a low level; if so, determining that the second drive output control pin of the H-bridge driver module 200 is a low level, and determining that the channel high-side drive output of the second drive output control pin OUT2 of the H-bridge driver module 200 is abnormal.

[0045] Specifically, (3) during unlocking diagnosis, the control module 100 controls the first enable pin IN1 of the H-bridge driver module 200 to be low level. For example, if the control module 100 outputs the first digital output enable signal DO_Lock_Enable1 as 0V low level, the control module 100 receives the first feedback digital signal DI_Lock1_Feedback through the first voltage sampling module 410, and determines whether the level state is high level; if so, the control module 100 can compare the state of the first enable pin IN1 driver output and the first driver output control pin OUT1 feedback diagnosis, and analyze that the OUT1 channel low-side driver output is abnormal, and the unlocking of the electronic lock 300 fails.

[0046] (4) During unlocking diagnosis, the control module 100 controls the second enable pin IN2 of the H-bridge driver module 200 to be high level. For example, the control module 100 outputs the second digital output enable signal DO_Lock_Enable2 as a high level of 3.3V. The control module 100 receives the second feedback digital signal DI_Lock2_Feedback through the second voltage sampling module 420 to determine whether the level state is low level. If so, the control module 100 can compare the state of the second enable pin IN2 driver output and the second driver output control pin OUT2 feedback diagnosis to analyze that the high-side driver output of the OUT2 channel is abnormal, and the unlocking of the electronic lock 300 fails.

[0047] In one embodiment, if Figure 2As shown, the first voltage sampling module 410 includes a first resistor R1 and a second resistor R2; the first end of the first resistor R1 is connected to the first drive output control pin OUT1 of the H-bridge driver module 200; the first end of the second resistor R2 is connected to the second end of the first resistor R1 and is also connected to the control module 100, and the second end of the second resistor R2 is grounded; the second voltage sampling module 420 includes a third resistor R3 and a fourth resistor R4; the first end of the third resistor R3 is connected to the second drive output control pin OUT2 of the H-bridge driver module 200; the first end of the fourth resistor R4 is connected to the second end of the third resistor R3 and is also connected to the control module 100, and the second end of the fourth resistor R4 is grounded. The first end of the first resistor R1 receives the first drive output signal OD_Lock1 output by the first drive output control pin OUT1 of the H-bridge driver module 200. The first resistor R1 and the second resistor R2 perform series resistance division, and obtain a first feedback digital signal DI_Lock1_Feedback based on the voltage at the first end of the second resistor R2 and send it to the control module 100. The first end of the third resistor R3 receives the second drive output signal OD_Lock2 output by the second drive output control pin OUT2 of the H-bridge driver module 200. The third resistor R3 and the fourth resistor R4 perform series resistance division, and obtain a second feedback digital signal DI_Lock2_Feedback based on the voltage at the first end of the fourth resistor R4 and send it to the control module 100.

[0048] In one embodiment, an analog-to-digital conversion unit is provided inside the first voltage sampling module 410 to convert the sampled analog signal into a first feedback digital signal DI_Lock1_Feedback; an analog-to-digital conversion unit is provided inside the second voltage sampling module 420 to convert the sampled analog signal into a second feedback digital signal DI_Lock2_Feedback.

[0049] Therefore, the first voltage sampling module 410 and the second voltage sampling module 420 provided in the embodiment of the present invention can diagnose the high-side and low-side drive output conditions of the electronic lock without relying on the internal circuit of the H-bridge driver module 200; in addition, the digital signals output by the first voltage sampling module 410 and the second voltage sampling module 420 are both sent to the control module 100, such as the corresponding digital circuit acquisition port of the single-chip microcomputer. Compared with the analog circuit sampling scheme, the digital circuit sampling scheme has a more sensitive diagnostic signal response.

[0050] In one embodiment, the H-bridge driver module 200 uses an internal diagnostic protection unit to determine whether a power supply pin undervoltage, overcurrent, or thermal shutdown fault occurs. If a fault is determined to have occurred, the corresponding digital input fault detection signal is output to the control module 100, and the control module 100 stops driving the H-bridge driver module 200 and reports the fault. Figure 2 As shown, when the H-bridge driver module 200 detects an undervoltage, overcurrent, or thermal shutdown fault on the power supply pin of the electronic lock 300 driver chip, the H-bridge driver module 200 sends a digital input fault detection signal DI_Lock_Fault_Detection, such as a low level of 0V, to the control module 100, and the control module 100 reports a fault.

[0051] In one embodiment, when locking, if the control module 100 determines that the channel drive output of the H-bridge driver module 200 is normal and no fault detection signal is received, the motor 310 inside the electronic lock 300 rotates forward to lock the charging gun interface; when unlocking, if the control module 100 determines that the channel drive output of the H-bridge driver module 200 is normal and no fault detection signal is received, the motor 310 inside the electronic lock 300 rotates reverse to unlock the charging gun interface. Figure 2 As shown, when locking, if it is determined that there is no abnormality in the channel drive output of the H-bridge driver module 200 and no fault detection signal is received, the first drive output control pin OUT1 of the H-bridge driver module 200 outputs the first drive output signal OD_Lock1 as a 12V high-side drive, and the second drive output control pin OUT2 of the H-bridge driver module 200 outputs the second drive output signal OD_Lock2 as a 0V low-side drive. At this time, the motor 310 in the electronic lock 300 receives the first drive output signal OD_Lock1 output by the first drive output control pin OUT1 as a 12V high-side drive and the second drive output signal OD_Lock2 output by the second drive output control pin OUT2 as a 0V low-side drive, and rotates forward to lock the charging gun interface. When unlocking the lock, if it is determined that there is no abnormality in the channel drive output of the H-bridge driver module 200 and no fault detection signal is received, the first drive output control pin OUT1 of the H-bridge driver module 200 outputs the first drive output signal OD_Lock1 as a 0V low-side drive, and the second drive output control pin OUT2 of the H-bridge driver module 200 outputs the second drive output signal OD_Lock2 as a 12V high-side drive. At this time, the motor 310 in the electronic lock 300 receives the first drive output signal OD_Lock1 output by the first drive output control pin OUT1 as a 0V low-side drive and the second drive output signal OD_Lock2 output by the second drive output control pin OUT2 as a 12V high-side drive, and reverses to unlock the charging gun interface.

[0052] In one embodiment, when locking, the control module 100 determines whether the lock is locked based on the third feedback digital signal output by the third voltage sampling module 430, wherein the electronic lock 300 is provided with a normally open switch 320, and the normally open switch 320 is connected to the input end of the third voltage sampling module 430; when unlocking, the control module 100 determines whether the unlocking is in place based on the third feedback digital signal output by the third voltage sampling module 430.

[0053] In one embodiment, if it is determined that the lock is tight, the control module 100 stops driving the H-bridge driving module 200 ; if it is determined that the unlock is in place, the control module 100 stops driving the H-bridge driving module 200 .

[0054] Specifically, the control module 100 can also diagnose whether the lock is locked and unlocked. When diagnosing whether the lock is locked, the control module 100 controls the first drive output control pin OUT1 of the H-bridge driver module 200 to output the first drive output signal OD_Lock1 as a 12V high-side drive, and the second drive output control pin OUT2 to output the second drive output signal OD_Lock2 as a 0V low-side drive, thereby causing the motor 310 in the electronic lock 300 to rotate forward. The electronic lock 300 is equipped with a normally open switch 320. When the lock reaches the locked position, the normally open switch 320 is in place, i.e., closed. If points A and B are set at both ends of the normally open switch 320, points A and B are connected by the closed normally open switch 320. When a short circuit is formed between points A and B, the motor 310 stops rotating, and the electronic lock 300 is locked. At this point, the electronic lock 300 outputs an electronic lock status feedback signal ID_Lock_Status_Feedback at level 1 to the input of the third voltage sampling module 430. The third voltage sampling module 430 then outputs a third feedback digital signal DI_Lock_Status_Feedback, such as a high level 3.3V, to the control module 100. When performing unlocking diagnosis, the control module 100 controls the first drive output control pin OUT1 of the H-bridge driver module 200 to output the first drive output signal OD_Lock1 as a 0V low-side drive and the second drive output control pin OUT2 to output the second drive output signal OD_Lock2 as a 12V high-side drive. The motor 310 in the electronic lock 300 then reverses. The normally open switch 320 between points A and B remains open, and the normally open switch 320 is disconnected. This creates an open circuit between points A and B, causing the motor 310 to stop rotating and the electronic lock 300 to unlock. At this time, the electronic lock 300 outputs the electronic lock status feedback signal ID_Lock_Status_Feedback at level 0 to the input end of the third voltage sampling module 430 , and the third voltage sampling module 430 outputs the third feedback digital signal DI_Lock_Status_Feedback at low level 0V to the control module 100 .

[0055] In one embodiment, when locking, the control module 100 determines whether the locking time exceeds the first preset time based on the third feedback digital signal output by the third voltage sampling module 430; if the locking time exceeds the first preset time, it is determined that a locking failure has occurred; when unlocking, the control module 100 determines whether the unlocking time exceeds the second preset time based on the third feedback digital signal output by the third voltage sampling module 430; if the unlocking time exceeds the second preset time, it is determined that an unlocking failure has occurred.

[0056] In one embodiment, if Figure 2 As shown, the third voltage sampling module 430 includes a fifth resistor R5, a sixth resistor R6, and a seventh resistor R7. The first end of the fifth resistor R5 is connected to the normally-open switch 320 of the electronic lock 300, and the second end of the fifth resistor R5 is grounded. The first end of the sixth resistor R6 is connected to the first end of the fifth resistor R5. The first end of the seventh resistor R7 is connected to the second end of the sixth resistor R6 and is also connected to the control module 100, and the second end of the seventh resistor R7 is grounded. The first end of the fifth resistor R5 receives the electronic lock status feedback signal ID_Lock_Status_Feedback output by the electronic lock 300. The sixth resistor R6 and the seventh resistor R7 divide the voltage at the first end of the fifth resistor R5 through series resistors, and generate a third feedback digital signal DI_Lock_Status_Feedback based on the voltage at the first end of the seventh resistor R7, which is sent to the control module 100.

[0057] Figure 3 This is a flow chart of a diagnostic control method for an electronic lock circuit of a battery management system provided by an embodiment of the present invention. Figure 1 、 Figure 2 and Figure 3 , an embodiment of the present invention provides a diagnostic control method for an electronic lock circuit of a battery management system, comprising:

[0058] S110, during self-test, the control module 100 controls the first current sampling module 510 and the second current sampling module 520 to be in an enabled state, and determines whether an abnormality occurs in the drive output control pin of the H-bridge driver module 200 based on a first current sampling feedback signal of the first current sampling module 510 and a second current sampling feedback signal of the second current sampling module 520. If it is determined that an abnormality occurs in the drive output control pin of the H-bridge driver module 200, locking is not performed and a fault is reported. If it is determined that no abnormality occurs in the drive output control pin of the H-bridge driver module 200, the first current sampling module 510 and the second current sampling module 520 are controlled to be in a disabled state when locking is performed.

[0059] S120, when locking, the control module 100 controls the first enable pin of the H-bridge driver module 200 to be high and the second enable pin to be low, and determines whether the channel drive output of the H-bridge driver module 200 is abnormal based on the first feedback digital signal output by the first voltage sampling module 410 and the second feedback digital signal output by the second voltage sampling module 420; if it is determined that the channel drive output of the H-bridge driver module 200 is abnormal, the locking is stopped and a fault is reported.

[0060] S130, when unlocking, the control module 100 controls the first enable pin of the H-bridge driver module 200 to be low and the second enable pin to be high, and determines whether the channel drive output of the H-bridge driver module 200 is abnormal based on the first feedback digital signal output by the first voltage sampling module 410 and the second feedback digital signal output by the second voltage sampling module 420. If it is determined that the channel drive output of the H-bridge driver module 200 is abnormal, unlocking is stopped and a fault is reported.

[0061] As one embodiment, the diagnostic control method for the electronic lock circuit of the battery management system further includes:

[0062] Determine whether the first feedback digital signal output by the first voltage sampling module 410 is at a low level when locking; if so, determine that the first drive output control pin of the H-bridge driver module 200 is at a low level, determine that the channel high-side drive output of the first drive output control pin of the H-bridge driver module 200 is abnormal, stop locking, and report a fault;

[0063] Determine whether the second feedback digital signal output by the second voltage sampling module 420 is at a high level when locking; if so, determine that the second drive output control pin of the H-bridge driver module 200 is at a high level, determine that the channel low-side drive output of the second drive output control pin of the H-bridge driver module 200 is abnormal, stop locking, and report a fault;

[0064] Determine whether the first feedback digital signal output by the first voltage sampling module 410 is at a high level during unlocking; if so, determine that the first drive output control pin of the H-bridge driver module 200 is at a high level, determine that the channel low-side drive output of the first drive output control pin of the H-bridge driver module 200 is abnormal, stop unlocking, and report a fault;

[0065] It is determined whether the second feedback digital signal output by the second voltage sampling module 420 is at a low level when unlocking; if so, it is determined that the second drive output control pin of the H-bridge driver module 200 is at a low level, and it is determined that the channel high-side drive output of the second drive output control pin of the H-bridge driver module 200 is abnormal, then unlocking is stopped and a fault is reported.

[0066] As one embodiment, the diagnostic control method for the electronic lock circuit of the battery management system further includes: the H-bridge driver module 200 determines whether a power supply pin undervoltage, overcurrent, or thermal shutdown fault occurs through an internal diagnostic protection unit. If a fault is determined to have occurred, the corresponding digital input fault detection signal is output to the control module 100, and the control module 100 stops driving the H-bridge driver module 200 and reports the fault.

[0067] As one of the embodiments, the diagnostic control method of the electronic lock circuit of the above-mentioned battery management system further includes: when locking, the control module 100 determines whether the lock is locked according to the third feedback digital signal output by the third voltage sampling module 430, wherein the electronic lock 300 is provided with a normally open switch 320, and the normally open switch 320 is connected to the input end of the third voltage sampling module 430; if it is determined that the lock is locked, the control module 100 stops driving the H-bridge driver module 200; when unlocking, the control module 100 determines whether the unlocking is in place according to the third feedback digital signal output by the third voltage sampling module 430; if it is determined that the unlocking is in place, the control module 100 stops driving the H-bridge driver module 200.

[0068] As one of the embodiments, the diagnostic control method of the electronic lock circuit of the above-mentioned battery management system also includes: when locking, the control module 100 determines whether the locking time exceeds the first preset time based on the third feedback digital signal output by the third voltage sampling module 430; if the locking time exceeds the first preset time, it is determined that the locking fails; when unlocking, the control module 100 determines whether the unlocking time exceeds the second preset time based on the third feedback digital signal output by the third voltage sampling module 430; if the unlocking time exceeds the second preset time, it is determined that the unlocking fails.

[0069] The specific implementation of the diagnostic control method of the electronic lock circuit of the battery management system provided in this embodiment can refer to the above-mentioned embodiment of the electronic lock circuit of the battery management system, and the repeated parts are not repeated here.

[0070] An embodiment of the present invention further provides a storage medium storing a computer program. When executed by a processor, the computer program performs the steps of the diagnostic control method for an electronic lock circuit in a battery management system according to the above embodiment. The implementation of this storage medium can be found in the embodiment of the diagnostic control method for an electronic lock circuit in a battery management system, and any repetitions are omitted.

[0071] The present invention provides a diagnostic control method and storage medium for an electronic lock circuit of a battery management system. The electronic lock circuit includes a control module, an H-bridge driver module, and a diagnostic module. The diagnostic module includes a first voltage sampling module, a second voltage sampling module, a first current sampling module, and a second current sampling module. During self-test, the control module can perform current sampling by activating the first current sampling module and the second current sampling module to determine whether an abnormality occurs in the drive output control pin of the H-bridge driver module. During locking and unlocking, the control module can determine whether an abnormality occurs in the channel drive output of the H-bridge driver module based on the first feedback digital signal output by the first voltage sampling module and the second feedback digital signal output by the second voltage sampling module. Thus, fault detection of the electronic lock circuit is achieved, safety accidents when the electronic lock is locked and unlocked are avoided, and charging safety is improved. The first voltage sampling module and the second voltage sampling module provided in the embodiment of the present invention can diagnose the high and low side drive output of the electronic lock without relying on the internal circuit of the H-bridge driver chip. The first voltage sampling module and the second voltage sampling module use digital circuit acquisition ports at the control end of the control module. Compared with the analog circuit sampling scheme, this digital circuit sampling scheme has a more sensitive diagnostic signal response. At the same time, this design allows for the inclusion of a third voltage sampling module, which combines the level output status of the first enable pin of the H-bridge driver module, the level output status of the second enable pin of the H-bridge driver module, the first feedback digital signal output by the first voltage sampling module, and the second feedback digital signal output by the second voltage sampling module to use a redundant diagnostic combination to determine whether the electronic lock has a locking or unlocking drive fault. Furthermore, through the first and second current sampling modules, this solution can be used during self-test to determine whether the H-bridge driver module's drive output control pin has been interfered with, the drive instruction control is abnormal, or the drive port is short-circuited to ground, causing overcurrent. This prevents locking when the H-bridge driver module's drive output control pin is abnormal, avoiding safety accidents when the electronic lock is locked, thereby improving charging safety.

[0072] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of the technical contents disclosed above without departing from the scope of the technical solution of the invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the invention without departing from the content of the technical solution of the invention are still within the scope of the technical solution of the present invention.

Claims

1. An electronic lock circuit of a battery management system, characterized in that: It includes a control module (100), an H-bridge driving module (200) and a diagnostic module: The control module (100) is connected to a first enable pin and a second enable pin of the H-bridge drive module (200); a first drive output control pin of the H-bridge drive module (200) is connected to a first end of a motor (310) inside the electronic lock (300); and a second drive output control pin of the H-bridge drive module (200) is connected to a second end of the motor (310) inside the electronic lock (300); The diagnostic module comprises a first voltage sampling module (410), a second voltage sampling module (420), a first current sampling module (510) and a second current sampling module (520); the first voltage sampling module (410) is connected to the first drive output control pin of the H-bridge drive module (200) and outputs a first feedback digital quantity signal to the control module (100); the second voltage sampling module (420) is connected to the second drive output control pin of the H-bridge drive module (200) and outputs a second feedback digital quantity signal to the control module (100); the first current sampling module (510) is connected to the first drive output control pin of the H-bridge drive module (200) and is enabled only when the battery management system performs a self-test before locking and outputs a first current sampling feedback signal to the control module (100); the second current sampling module (520) is connected to the second drive output control pin of the H-bridge drive module (200) and is enabled only when the battery management system performs a self-test before locking and outputs a second current sampling feedback signal to the control module (100).

2. The electronic lock circuit of the battery management system according to claim 1, characterized in that: The first current sampling module (510) comprises a first current sampling resistor and a first switch element; the second current sampling module (520) comprises a second current sampling resistor and a third switch element; The first end of the first current sampling resistor is connected to the first drive output control pin of the H-bridge driving module (200), the second end of the first current sampling resistor is connected to the first end of the first switching element, and the first end and the second end of the first current sampling resistor are also connected to the control module (100); the second end of the first switching element is grounded; the first switching element is only controlled to be in a closed state when the battery management system performs a self-test before locking; The first end of the second current sampling resistor is connected to the second drive output control pin of the H-bridge drive module (200), the second end of the second current sampling resistor is connected to the first end of the third switch element, and the first end and the second end of the second current sampling resistor are also connected to the control module (100); the second end of the third switch element is grounded; and the third switch element is only controlled to be in a closed state when the battery management system performs a self-test before locking.

3. The electronic lock circuit of the battery management system according to claim 2, characterized in that: The first current sampling module (510) further comprises a second switch element, a first protection resistor and a first power supply voltage; the first end of the second switch element is grounded, the second end of the second switch element is connected to the control end of the first switch element and is also connected to the first end of the first protection resistor, the control end of the second switch element is connected to the control module (100); the second end of the first protection resistor receives the first power supply voltage; The second current sampling module (520) further comprises a fourth switch element, a second protection resistor and a second power supply voltage; the first end of the fourth switch element is grounded, the second end of the fourth switch element is connected to the control end of the first switch element and is also connected to the first end of the second protection resistor, the control end of the fourth switch element is connected to the control module (100); the second end of the second protection resistor receives the second power supply voltage.

4. The electronic lock circuit of the battery management system according to claim 1, characterized in that: The first voltage sampling module (410) includes a first resistor and a second resistor; the first end of the first resistor is connected to the first drive output control pin of the H-bridge drive module; the first end of the second resistor is connected to the second end of the first resistor and is also connected to the control module (100), and the second end of the second resistor is grounded; the second voltage sampling module (420) includes a third resistor and a fourth resistor; the first end of the third resistor is connected to the second drive output control pin of the H-bridge drive module; the first end of the fourth resistor is connected to the second end of the third resistor and is also connected to the control module (100), and the second end of the fourth resistor is grounded.

5. The electronic lock circuit of the battery management system according to claim 1, characterized in that: The diagnostic module further comprises a third voltage sampling module (430), the third voltage sampling module (430) being connected to a normally open switch (320) inside the electronic lock (300) and outputting a third feedback digital signal to the control module (100).

6. The electronic lock circuit of the battery management system according to claim 5, characterized in that: The third voltage sampling module (430) comprises a fifth resistor, a sixth resistor and a seventh resistor; the first end of the fifth resistor is connected to the normally open switch (320) of the electronic lock (300), and the second end of the fifth resistor is grounded; the first end of the sixth resistor is connected to the first end of the fifth resistor; the first end of the seventh resistor is connected to the second end of the sixth resistor and is also connected to the control module (100), and the second end of the seventh resistor is grounded.

7. A diagnostic control method for an electronic lock circuit of a battery management system according to any one of claims 1 to 6, characterized in that: include: During self-checking, the control module (100) controls the first current sampling module (510) and the second current sampling module (520) to be in an enabled state, and determines whether an abnormality occurs in the drive output control pin of the H-bridge driving module (200) based on a first current sampling feedback signal of the first current sampling module (510) and a second current sampling feedback signal of the second current sampling module (520); if it is determined that an abnormality occurs in the drive output control pin of the H-bridge driving module (200), locking is not performed and a fault is reported; if it is determined that no abnormality occurs in the drive output control pin of the H-bridge driving module (200), when locking is performed, the first current sampling module (510) and the second current sampling module (520) are controlled to be in a disabled state; When locking, the control module (100) controls the first enable pin of the H-bridge driver module (200) to be high and the second enable pin to be low, and determines whether the channel drive output of the H-bridge driver module (200) is abnormal based on the first feedback digital signal output by the first voltage sampling module (410) and the second feedback digital signal output by the second voltage sampling module (420); if it is determined that the channel drive output of the H-bridge driver module (200) is abnormal, locking is stopped and a fault is reported; When unlocking, the control module (100) controls the first enable pin of the H-bridge driver module (200) to be low level and the second enable pin to be high level, and determines whether the channel drive output of the H-bridge driver module (200) is abnormal based on the first feedback digital signal output by the first voltage sampling module (410) and the second feedback digital signal output by the second voltage sampling module (420); if it is determined that the channel drive output of the H-bridge driver module (200) is abnormal, unlocking is stopped and a fault is reported.

8. The diagnostic control method for the electronic lock circuit of the battery management system according to claim 7, characterized in that: Also includes: Determining whether the first feedback digital signal output by the first voltage sampling module (410) is at a low level when the device is locked; If so, it is determined that the first drive output control pin of the H-bridge drive module (200) is at a low level, and it is determined that the channel high-side drive output of the first drive output control pin of the H-bridge drive module (200) is abnormal, and the locking is stopped and a fault is reported; Determining whether the second feedback digital quantity signal output by the second voltage sampling module (420) is at a high level when locking; if so, determining that the second drive output control pin of the H-bridge drive module (200) is at a high level, determining that the channel low-side drive output of the second drive output control pin of the H-bridge drive module (200) is abnormal, stopping locking, and reporting a fault; Determining whether the first feedback digital quantity signal output by the first voltage sampling module (410) is at a high level when unlocking; if so, determining that the first drive output control pin of the H-bridge drive module (200) is at a high level, determining that the channel low-side drive output of the first drive output control pin of the H-bridge drive module (200) is abnormal, stopping unlocking, and reporting a fault; It is determined whether the second feedback digital quantity signal output by the second voltage sampling module (420) is at a low level when unlocking; if so, it is determined that the second drive output control pin of the H-bridge drive module (200) is at a low level, it is determined that the channel high-side drive output of the second drive output control pin of the H-bridge drive module (200) is abnormal, unlocking is stopped, and a fault is reported.

9. The diagnostic control method for the electronic lock circuit of the battery management system according to claim 7, characterized in that: Also includes: The H-bridge driving module (200) determines whether a power supply pin undervoltage, overcurrent, or thermal shutdown fault occurs through an internal diagnostic protection unit; if a fault is determined to have occurred, the corresponding digital input fault detection signal is output to the control module (100); the control module (100) stops driving the H-bridge driving module (200) and reports the fault.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the diagnostic control method of the electronic lock circuit of the battery management system according to any one of claims 7 to 9 are implemented.

Citation Information

Patent Citations

  • Control method and device of electronic lock of charger

    CN110356265A

  • Control circuit of electric vehicle charging locking device

    CN110609505A