Latch circuit system based on high-voltage relay and control method

By designing a high-voltage relay latch circuit system including control module, delay module, comparison module and trigger module, the problem that traditional high-voltage relay control circuit cannot be automatically disconnected is solved, stability and safety are improved, and the Accurate control of the relay status.

CN119093912APending Publication Date: 2024-12-06BOZU TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411174914.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The traditional high-voltage relay control circuit cannot automatically disconnect the relay when the MCU is reset, causing the car to be in an uncontrollable state without the MCU, which may cause an accident.

Method used

A latch circuit system based on high-voltage relay is designed, including control module, delay module, comparison module and trigger module. The relay is closed and disconnected through different electrical signal states to ensure automatic disconnection in the abnormal situation of MCU. Turn on the relay.

Benefits of technology

Improves the working stability of the high-voltage relay, avoids jitter caused by short-term reset, increases safety when the MCU does not return to normal, and provides an output diagnostic function to improve the control accuracy of the relay status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119093912A_ABST
    Figure CN119093912A_ABST
Patent Text Reader

Abstract

The invention discloses a latch circuit system based on a high-voltage relay and a control method, the latch circuit system comprises a control module, a time delay module, a comparison module, a trigger module and a relay control module, the control module comprises a normal working state and an abnormal working and resetting state; according to the invention, a high-voltage relay latching function is added, the working stability of the high-voltage relay is improved, the jitter of the high-voltage relay during short-time reset is avoided, a latching circuit is optimized, the relay is automatically switched off if the MCU does not return to normal within a set time, and the safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of relay control circuits, and in particular to a latch circuit system and a control method based on a high voltage relay. Background Art

[0002] The current BMS (BATTERY MANAGEMENT SYSTEM) high-voltage relay control has no latching function, and directly operates the relay to close and open through the MCU (Micro controller Unit). When the MCU is reset due to low voltage, the relay is directly disconnected. If this happens during driving, it will be very dangerous. The car will lose power directly, resulting in an uncontrollable accident. The current traditional high-voltage relay latching function can only latch the current state. If the relay needs to be disconnected, the GPIO (General-purpose input / output) port of the MCU can only be operated again. If the MCU resets abnormally and the car runs away uncontrollably, the latching circuit cannot be controlled to disconnect the high-voltage relay again, causing the car to be powered on without the MCU. If an external short circuit is assumed, the high-voltage circuit cannot be quickly cut off, which will cause uncontrollable faults or accidents. Summary of the invention

[0003] In order to overcome the above shortcomings, the purpose of this application is to provide a latching circuit system and control method based on a high-voltage relay to solve the technical problem that the traditional high-voltage relay control circuit has no latching function and cannot be automatically disconnected after latching.

[0004] In order to achieve the above objectives, this application adopts the following technical solutions:

[0005] In a first aspect, the present application provides a latch circuit system based on a high voltage relay, comprising:

[0006] A control module, wherein the working state of the control module includes a first state and a second state, the control module performs a high level output or a low level output in the first state, and the control module performs a high impedance output in the second state;

[0007] A delay module, wherein the delay module is electrically connected to the control module, and when the control module is in the first state, the control module inputs a high level or a low level to the delay module, and when the control module is in the second state, the control module inputs a high impedance state to the delay module;

[0008] A comparison module, wherein the comparison module is electrically connected to the control module, and the comparison module is electrically connected to the delay module. When the control module is in the first state, the control module inputs a high-level signal to the comparison module and changes it to a low-level signal. When the control module is in the second state, the control module inputs a high-impedance signal to the comparison module, and the delay module inputs a high-level signal to the comparison module and changes it to a low-level signal.

[0009] A trigger module, wherein the trigger module is electrically connected to the control module, and the trigger module is electrically connected to the comparison module. When the control module is in the first state, the control module inputs a high level or a low level to the trigger module, and the comparison module inputs a high level input to the trigger module, and the output of the trigger module is the same as the input of the control module to the trigger module. When the control module is in the second state, the control module inputs a high impedance input to the trigger module to a low level input, and the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal. When the control module is in the second state, the trigger module outputs a low level.

[0010] A relay control module, the relay control module is electrically connected to the control module, and the relay control module is electrically connected to the trigger module, when the control module is in the first state, the control module inputs a high level to the relay control module and the trigger module inputs a high level to the relay control module so that the relay control module controls the relay to close, the control module inputs a low level to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open, when the control module is in the second state, the control module inputs a high impedance to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open.

[0011] Furthermore, the control module includes an MCU chip, and the MCU chip includes an output terminal 1, an output terminal 2, an output terminal 3, and an output terminal 4.

[0012] The first state includes the state when the MCU chip is working normally, and the output states of output terminal 1, output terminal 2, output terminal 3 and output terminal 4 of the MCU chip include high-level output and low-level output. The second state includes the state when the MCU chip is working abnormally and reset, and the output states of output terminal 1, output terminal 2, output terminal 3 and output terminal 4 of the MCU chip include high-impedance output.

[0013] Furthermore, the delay module includes a transistor 1, a transistor 2, a resistor 1, a resistor 2, a capacitor 1 and a power supply 1, wherein:

[0014] The output terminal 1 of the MCU chip is electrically connected to the control terminal of the transistor 1, the first terminal of the transistor 1 is connected to the control terminal of the transistor 2, the second terminal of the transistor 1 is grounded, the first terminal of the transistor 2 is connected to the power supply 1, the second terminal of the transistor 2 is electrically connected to the comparison module through the resistor 2, the resistor 1 is electrically connected to the circuit connecting the transistor 2 and the resistor 2, the resistor 2 is electrically connected to the capacitor 1, the capacitor 1 is grounded, and the output node on the circuit connecting the resistor 2 and the capacitor 1 is electrically connected to the comparison module.

[0015] Further, the comparison module includes a comparator chip 1, a comparator chip 2, a resistor 3, a resistor 4, a resistor 5, a resistor 6, a resistor 7, a resistor 8, a power supply 2 and a power supply 3, and the comparator chip 1 and the comparator chip 2 respectively include an input terminal 1, an input terminal 2 and an output terminal 1, wherein,

[0016] The power supply 2 is electrically connected to the input terminal 1 of the comparator chip 1 through the voltage-dividing node of the resistor 3 and the resistor 4, the resistor 2 is electrically connected to the output node on the capacitor 1 connection circuit, the power supply 1 is electrically connected to the input terminal 2 of the comparator chip 1, the output terminal 1 of the comparator chip 1 is electrically connected to the input terminal 1 of the comparator chip 2 through the voltage-dividing node of the resistor 5 and the resistor 6, the output terminal 2 of the MCU chip is electrically connected to the input terminal 2 of the comparator chip 2, and at the same time, the power supply 3 is electrically connected to the input terminal 2 of the comparator chip 2 through the voltage-dividing node of the resistor 7 and the resistor 8, and the output terminal 1 of the comparator chip 2 is electrically connected to the trigger module.

[0017] Furthermore, the input voltage calculation formula of the input terminal 1 of the comparator chip 2 includes:

[0018]

[0019] In the formula, V1 is the input voltage of the input terminal 1 of the comparator chip 2, Va is the output voltage of the output terminal 1 of the comparator chip 1, R5 is the resistance value of the resistor 5, and R6 is the resistance value of the resistor 6.

[0020] Furthermore, the input voltage calculation formula of the input terminal 2 of the comparator chip 2 includes:

[0021] When the MCU chip works normally,

[0022] V2=V GPIO2

[0023] Where, 2 is the input voltage of the second input terminal of the comparator chip, V GPIO2 is the output voltage of the output terminal 2 of the MCU chip;

[0024] When the MCU chip works abnormally and resets,

[0025]

[0026] In the formula, V2 is the input voltage of the input terminal 2 of the comparator chip 2, Vcc is the output voltage of the power supply 3, R7 is the resistance value of the resistor 7, and R8 is the resistance value of the resistor 8.

[0027] Further, the trigger module includes a trigger chip, a resistor nine and a resistor ten, and the trigger chip includes an input terminal one, an input terminal two and an output terminal one, wherein:

[0028] The output terminal 3 of the MCU chip is electrically connected to the input terminal 1 of the trigger chip, and the resistor 9 is arranged on the circuit connecting the MCU chip and the trigger chip, and the resistor 9 is used to pull down the voltage of the input terminal 1 of the trigger chip.

[0029] The output terminal 1 of the comparator chip 2 is electrically connected to the input terminal 2 of the trigger chip, and the resistor 10 is arranged on the circuit connecting the comparator chip 2 and the trigger chip, and the resistor 10 is used to pull down the voltage of the input terminal 2 of the trigger chip.

[0030] An output terminal 1 of the trigger chip is electrically connected to the relay control module.

[0031] Further, the relay control module includes a relay control chip, a resistor 11, a resistor 12, a resistor 13 and a resistor 14, the relay control chip includes an input terminal 1 and an input terminal 2, an output terminal 1, an output terminal 2 and an output terminal 3, and the MCU chip also includes an input terminal 1 and an input terminal 2, wherein,

[0032] The input terminal 1 of the relay control chip is electrically connected to the output terminal 1 of the trigger module, the input terminal 2 of the relay control chip is electrically connected to the output terminal 4 of the MCU chip, the output terminal 1 of the relay control chip is electrically connected to the input terminal 1 of the MCU chip, and the resistor 14 is arranged on the circuit connecting the two, the output terminal 2 of the relay control chip is electrically connected to the input terminal 2 of the MCU chip, the resistor 11 and the resistor 13 are arranged on the circuit connecting the two, the resistor 12 is arranged between the resistor 11 and the resistor 13, and the output terminal 3 of the relay control chip is electrically connected to the relay for controlling the on and off of the relay.

[0033] Furthermore, the circuit connecting the output terminal 1 of the relay control chip and the input terminal 1 of the MCU chip is a circuit for the MCU chip to collect the actual output current of the relay switch, and the calculation formula for the relay output current collection is as follows:

[0034]

[0035] Wherein, I is the output current of the relay, AD1 is the voltage value of the output terminal 1 of the relay control chip transmitted to the input terminal 1 of the MCU chip, 300 is the current amplification ratio, and R13 is the resistance value of the resistor 13;

[0036] The circuit connecting the output terminal 2 of the relay control chip and the input terminal 2 of the MCU chip is used to collect the output signal level. The calculation formula for the relay output voltage collection is as follows:

[0037]

[0038] Wherein, Vout is the relay output voltage, AD2 is the recovery voltage value transmitted from the output terminal 2 of the relay control chip to the input terminal 2 of the MCU chip, R11 is the resistance value of the resistor 11, and R12 is the resistance value of the resistor 12.

[0039] In a second aspect, the present application provides a control method for a latch circuit based on a high voltage relay, comprising:

[0040] When the control module is in the first state, the control method of the latch circuit for performing relay closing latching includes the following:

[0041] The control module inputs a high level to the delay module, and the control module inputs a high level to the comparison module from a high level to a low level to prepare for the next latching. The control module inputs a high level to the trigger module, and the comparison module inputs a low level to the trigger module from a high level. The trigger module inputs the same high level as the control module to the trigger module, and inputs a high level to the relay control module. At the same time, the control module inputs a high level to the relay control module, so that the relay control module controls the relay to close to complete the closed latching;

[0042] When the control module is in the first state, the control method of the latch circuit for performing relay disconnect latching includes the following:

[0043] The control module inputs a high level to the delay module, and the control module inputs a high level to the comparison module to prepare for the next latch. The control module inputs a low level to the trigger module, and the comparison module inputs a low level to the trigger module to prepare for the next latch. The trigger module inputs the same low level as the control module to the trigger module, and inputs a low level to the relay control module. At the same time, the control module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latch.

[0044] When the control module is in the second state, the control method of the latch circuit for performing relay disconnect latching includes the following:

[0045] The control module simultaneously inputs high-impedance state to the delay module, the comparison module, and the relay control module, the delay module inputs the comparison module from high level to low level, the comparison module inputs the control module and the trigger module from high-impedance state to low level, the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal, and the trigger module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latch.

[0046] Beneficial Effects

[0047] The present application provides a latching circuit system and control method based on a high-voltage relay, which increases the latching function of the high-voltage relay, improves the working stability of the high-voltage relay, and avoids the jitter of the high-voltage relay during a short reset; optimizes the latching circuit, and adds that if the MCU has not returned to normal within a set time, the relay will be automatically disconnected, thereby improving safety; and adds an output diagnostic function, which can improve the output voltage recovery and output current and control signal to diagnose the current state of the relay. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to provide an understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure. The shapes and sizes of the components in the accompanying drawings do not reflect the actual proportions and are only intended to illustrate the content of the present application.

[0049] Figure 1 This is a schematic diagram of the latch circuit system module based on a high-voltage relay in this application.

[0050] Figure 2 Schematic diagram of the latch circuit structure based on a high voltage relay in one embodiment of the present application.

[0051] Figure 3Schematic diagram of the control module circuit structure in one embodiment of the present application.

[0052] Figure 4 Schematic diagram of the circuit structure of the delay module in one embodiment of the present application.

[0053] Figure 5 Schematic diagram of the circuit structure of a comparison module in one embodiment of the present application.

[0054] Figure 6 Schematic diagram of the trigger module circuit structure in one embodiment of the present application.

[0055] Figure 7 This is a schematic diagram of the circuit structure of a relay control module in one embodiment of the present application. DETAILED DESCRIPTION

[0056] The above scheme is further described below in conjunction with specific examples. It should be understood that these examples are used to illustrate the present application and are not limited to the scope of the present application. The implementation conditions adopted in the examples can be further adjusted as the conditions of the specific manufacturer, and the unspecified implementation conditions are usually the conditions in conventional experiments.

[0057] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. In this article, "electrical connection" includes the situation where the constituent elements are connected together through an element with some electrical function. "Elements with some electrical function" are not particularly limited as long as they can transfer electrical signals between the connected constituent elements. "Elements with some electrical function" can be, for example, electrodes or wiring, or switching elements such as transistors, or other functional elements such as resistors, inductors or capacitors. "Up", "down", "left", "right", etc. are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.

[0058] In this application, the directions or positional relationships indicated by the terms "upper", "lower", "inner", "middle", etc. are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.

[0059] As described in the background technology, the current BMS high-voltage relay control has no latching function or even if it has a latching function, it can only latch the current state. If the relay needs to be disconnected, the GPIO port of the MCU can only be operated again. If the MCU is reset abnormally and the relay runs out of control, the latching circuit cannot be controlled to disconnect the high-voltage relay again.

[0060] In view of the above content, the inventor provides a latch circuit system and control method based on a high-voltage relay, which increases the latch function of the high-voltage relay, improves the working stability of the high-voltage relay, and avoids the jitter of the high-voltage relay during a short reset; optimizes the latch circuit, and adds that if the MCU has not returned to normal within a set time, the relay will be automatically disconnected, thereby improving safety;

[0061] like Figure 1As shown, the latch circuit system of the high-voltage relay includes a control module, the working state of the control module includes a first state and a second state, the control module performs a high-level output or a low-level output in the first state, and the control module performs a high-impedance output in the second state; a delay module, the delay module is electrically connected to the control module, when the control module is in the first state, the control module inputs a high-level input or a low-level input to the delay module, when the control module is in the second state, the control module inputs a high-impedance input to the delay module; a comparison module, the comparison module and the control module The control module is electrically connected to the comparison module, and the comparison module is electrically connected to the delay module. When the control module is in the first state, the control module inputs a high level to a low level to the comparison module. When the control module is in the second state, the control module inputs a high impedance state to the comparison module, and the delay module inputs a high level to a low level to the comparison module; a trigger module, the trigger module is electrically connected to the control module, and the trigger module is electrically connected to the comparison module. When the control module is in the first state, the control module inputs a high level or a low level to the trigger module, and the comparison module The module inputs the trigger module from low level to high level, and the output of the trigger module is the same as the input of the control module to the trigger module. When the control module is in the second state, the control module inputs the trigger module from high impedance to low level, and the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal. When the control module is in the second state, the trigger module outputs a low level; a relay control module, the relay control module is electrically connected to the control module, and the relay control module is electrically connected to the trigger module. When the control module is in the first state, the control module inputs a high level to the relay control module and the trigger module inputs a high level to the relay control module so that the relay control module controls the relay to close, the control module inputs a low level to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open, and when the control module is in the second state, the control module inputs a high impedance to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open.

[0062] The latch circuit system control method of the high voltage relay includes:

[0063] When the control module is in the first state, the control method of the latch circuit for performing relay closing latching includes the following: the control module inputs a high level to the delay module, the control module inputs a high level to the comparison module from a high level to a low level, in preparation for the next latching, the control module inputs a high level to the trigger module, the comparison module inputs a low level to the trigger module from a low level, the trigger module inputs the same high level as the control module inputs to the trigger module, the trigger module inputs a high level to the relay control module, and the control module inputs a high level to the relay control module, so that the relay control module controls the relay to close to complete the closing latching;

[0064] When the control module is in the first state, the control method of the latch circuit for performing relay disconnect latching includes the following: the control module inputs a high level to the delay module, the control module inputs a high level to the comparison module to prepare for the next latching, the control module inputs a low level to the trigger module, the comparison module inputs a low level to the trigger module to prepare for the next latching, the trigger module inputs the same low level as the control module inputs to the trigger module, the trigger module inputs a low level to the relay control module, and the control module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latching;

[0065] When the control module is in the second state, the control method of the latch circuit for performing relay disconnect latching includes the following: the control module simultaneously inputs high-impedance state to the delay module, the comparison module, and the relay control module, the delay module inputs to the comparison module from a high level to a low level, the comparison module inputs to the control module and the trigger module from a high-impedance state to a low level input, the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal, and the trigger module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latching.

[0066] Next, combine Figure 2-7 The present application is described exemplarily.

[0067] Example

[0068] An embodiment of the present application discloses a latch circuit system based on a high voltage relay, the circuit system comprising:

[0069] MCU chip U1, including low voltage test MCU chip, such as Figure 2 and 3As shown, the chip includes multiple output pins, namely GPIO1, GPIO2, GPIO3, GPIO4 (corresponding to the above-mentioned output terminal one, output terminal two, output terminal three, output terminal four, respectively), and also includes multiple input pins, namely AD1 and AD2 (corresponding to the above-mentioned input terminal one and input terminal two, respectively), and also includes a VCC pin, which is connected to the power supply, and a GND pin, which is grounded. The MCU chip U1 controls the operation of the latch system through the GPIO pin and collects the relay output current and voltage through the AD pin.

[0070] Delay module, such as Figure 2 and 4 As shown, it includes a transistor Q1 (ie, the transistor 1 mentioned above), a transistor M1 (ie, the transistor 2 mentioned above), a resistor R1 (ie, the resistor 1 mentioned above), a resistor R2 (ie, the resistor 2 mentioned above), a capacitor C1 (capacitor 1) and a power supply V1 (power supply 1), wherein,

[0071] GPIO1 of the MCU chip is electrically connected to the gate of transistor Q1, and the input of GPIO1 can control the on and off of Q1. When GPIO1 inputs a high level to the gate of transistor Q1, the DS electrodes of transistor Q1 are turned on. When GPIO1 inputs a low level to the gate of transistor Q1, the DS electrodes of transistor Q1 are turned off. The first electrode of transistor Q1 is electrically connected to the gate of transistor M1, and the second electrode of transistor Q1 is grounded. When transistor Q1 is turned on, transistor M1 is turned on. When transistor Q1 is turned off, transistor M1 is turned off. The first electrode of transistor M1 is electrically connected to the power supply V1, and the second electrode of transistor M1 is electrically connected to the input end (i.e., pin 3) of the comparator chip U2A through the resistor R2. The resistor R1 is electrically connected to the circuit connecting the transistor M1 and the resistor R2. The resistor R2 is electrically connected to the capacitor C1, and the capacitor C1 is grounded. The output node A on the circuit connecting the resistor R2 and the capacitor C1 is electrically connected to the input end (i.e., pin 3) of the comparator chip U2A;

[0072] GPIO1 inputs a high level to the gate of transistor Q1, transistor Q1 is turned on, transistor M1 is also turned on, the input end of the comparator chip U2A (i.e. pin 3) inputs the voltage of V1, GPIO1 inputs a low level to the gate of transistor Q1 or GPIO1 is in high impedance state, transistor Q1 is disconnected, transistor M1 is also disconnected, and capacitor C1 is discharged through resistors R1 and R2. The voltage will continue to decrease during discharge, thereby playing a delay function. The delay time can be controlled by matching the resistance and capacitance of resistors R1, R2, and capacitor C1.

[0073] Compare modules such as Figure 2 and 5As shown, it includes a comparator chip U2A (i.e., the comparator chip one mentioned above), a comparator chip U3A (i.e., the comparator chip two mentioned above), a resistor R3 (i.e., the resistor three mentioned above), a resistor R4 (i.e., the resistor four mentioned above), a resistor R5 (i.e., the resistor five mentioned above), a resistor R6 (i.e., the resistor six mentioned above), a resistor R7 (i.e., the resistor seven mentioned above), a resistor R8 (i.e., the resistor eight mentioned above), a power supply V2 (i.e., the power supply two mentioned above) and a power supply V3 (i.e., the power supply three mentioned above). The comparator chip U2A includes pin 1 (the output terminal one mentioned above), pin 2 (the input terminal one mentioned above), pin 3 (the input terminal two mentioned above), pin 4 is grounded, and pin 5 is connected to the power supply V2. The comparator chip U3A is the same as the comparator chip U2A.

[0074] The power supply V2 is electrically connected to the pin 2 of the comparator chip U2A through the voltage-dividing node B of the resistor R3 and the resistor R4, the output node B on the resistor R2 and the capacitor C1 connection circuit and the power supply V1 are electrically connected to the pin 3 of the comparator chip U2A, the pin 1 of the comparator chip U2A is electrically connected to the pin 2 of the comparator chip U3A through the voltage-dividing node C of the resistor R5 and the resistor R6, the GPIO2 of the MCU chip is electrically connected to the pin 3 of the comparator chip U3A, and at the same time, the power supply V3 is electrically connected to the pin 3 of the comparator chip U3A through the voltage-dividing node D of the resistor R7 and the resistor R8, and the pin 1 of the comparator chip U3A is electrically connected to the CP pin of the trigger chip U4;

[0075] Comparator chip U2A determines the level of pin 1 output by comparing the voltage of pin 3 and pin 2. When the level of pin 3 is greater than that of pin 2, pin 1 outputs a high level. When the level of pin 3 is less than that of pin 2, pin 1 outputs a low level.

[0076] The voltage of power supply V2 is divided by resistors R3 and R4 and input to pin 2 of comparator chip U2A.

[0077] When M1 is turned on, the voltage of the power supply V1 is input to pin 3 of the comparator chip U2A. When M1 is turned off, the capacitor C1 is discharged through resistors R1 and R2 and input to pin 3 of the comparator chip U2A.

[0078] When GPIO1 outputs a high level, Q1 and M1 are turned on, the voltage of pin 3 of U2A is the voltage of V1, and the voltage of pin 2 of U2A is the voltage of V2 divided by resistors R3 and R4. The voltage of V1 is the same as the voltage of V2, so at this time the voltage of pin 3 is greater than the voltage of pin 2, and pin 1 of U2A outputs a high level.

[0079] When GPIO1 outputs a low level or is reset, Q1 and M1 are disconnected. At this time, the C1 capacitor is discharged through R1 and R2. When the discharge voltage gradually decreases and the voltage of pin 3 is less than the voltage of pin 2, pin 1 of U2A outputs a low level.

[0080] In the comparator chip U3A:

[0081] The voltage output from pin 1 of comparator chip U2A is divided by resistors R5 and R6 and then input to the voltage of pin 2 of comparator chip U3A.

[0082] The voltage of the power supply V3 is input to the voltage of the pin 3 of the comparator chip U3A after being divided by the resistors R7 and R8. At the same time, the voltage of the GPIO2 of the MCU chip is input to the voltage of the pin 3 of the comparator chip U3A after being divided by the resistors R7 and R8.

[0083] The input voltage calculation formula of pin 2 of comparator chip U3A is as follows:

[0084]

[0085] In the formula, V1 is the voltage input to pin 2 of the comparator chip U3A, Va is the voltage output from pin 1 of the comparator chip U2A, R5 is the resistance value of resistor five, and R6 is the resistance value of resistor six.

[0086] The input voltage calculation formula of pin 3 of comparator chip U3A is as follows:

[0087] When the MCU chip is working normally,

[0088] V2=V GPIO2

[0089] Where V2 is the voltage input to pin 3 of the comparator chip U3A, V GPIO2 The output voltage of GPIO2 of the MCU chip;

[0090] When the MCU chip works abnormally and resets,

[0091]

[0092] Wherein, V2 is the voltage input to pin 3 of the comparator chip U3A, Vcc is the output voltage of the power supply V3, R7 is the resistance value of resistor seven, and R8 is the resistance value of resistor eight;

[0093] MCU works normally, the control flow of comparator chip U3A is:

[0094] When the pin 1 of the comparator chip U3A needs to output a high level, the MCU chip is operated to make GPIO2 output a high level. At this time, V2>V1, and the pin 1 of U3A outputs a high level.

[0095] When the pin 1 of the comparator chip U3A needs to output a low level, the MCU chip is operated to make GPIO2 output a low level. At this time, V2<V1, and the pin 1 of U3A outputs a low level.

[0096] When the MCU works abnormally or is reset, the control flow of the comparator chip U3A is:

[0097] At this time, GPIO2 is in high-impedance output, the level of pin 3 of the comparator chip U3A is the voltage-divided level of R7 and R8, and the level of pin 2 of the comparator chip U3A is converted from high level to low level under the influence of the delay module. Before the delay circuit is triggered, V2<V1, and pin 1 of U3A outputs a low level. After the delay circuit is triggered, V2>V1, and pin 1 of U3A outputs a high level.

[0098] Trigger modules such as Figure 2 and 6 As shown, it includes a trigger chip U4, a resistor R9 (i.e. the above-mentioned resistor nine), a resistor R10 (i.e. the above-mentioned resistor ten), and the trigger chip includes a pin D (i.e. the above-mentioned input terminal one), a pin CP (i.e. the above-mentioned input terminal two), and a pin Q (i.e. the above-mentioned output terminal one), wherein,

[0099] GPI03 (i.e., the above-mentioned output terminal three) of the MCU chip U1 is electrically connected to the pin D of the trigger chip U4, and the resistor R9 is set on the circuit connecting the MCU chip U1 and the trigger chip U4, and the resistor R9 is used to pull down the voltage of the pin D of the trigger chip U4. Pin 1 of the comparator chip U3A is electrically connected to the pin CP of the trigger chip U4, and the resistor R10 is set on the circuit connecting the comparator chip U3A and the trigger chip U4, and the resistor R10 is used to pull down the voltage of the pin CP of the trigger chip U4, and the Q pin of the trigger chip U4 is electrically connected to the relay control module;

[0100] The working principle of the trigger chip U4 is as follows: when the pin CP of the trigger chip U4 is converted from a low level to a high level, the state of the pin Q follows the state of the pin D, that is, when the pin D is at a low level, the pin Q is at a low level, and when the pin D is at a high level, the pin Q is at a high level. If the state of the pin Q needs to be updated, the pin D needs to be operated, and the pin CP is converted from a low level to a high level again to lock the state of the pin Q. Otherwise, even if the pin D is converted from a high level to a low level, the pin Q does not change with the state change of the pin D, and the pin CP needs to be operated again to update and lock the pin Q.

[0101] Table 1 below is the control truth table of the trigger chip:

[0102] CP D Q ↑ H H ↑ L L

[0103] Table 1

[0104] In the table, CP is pin CP of the trigger chip U4, D is pin D of the trigger chip U4, Q is pin Q of the trigger chip U4, ↑ is a conversion from low level to high level, H is a high level, and L is a low level.

[0105] Relay control module, such as Figure 2 and 7 As shown, it includes a relay control chip U5, a resistor R11 (the above-mentioned resistor eleven), a resistor R12 (the above-mentioned resistor twelve), a resistor R13 (the above-mentioned resistor thirteen), and a resistor R14 (the above-mentioned resistor fourteen). The relay control chip U5 includes a pin IN (the above-mentioned input terminal one), a pin DEN (the above-mentioned input terminal two), a pin IS (the above-mentioned output terminal one), a pin OUT1 (the above-mentioned output terminal two), and pins OUT2 and OUT3 (the above-mentioned output terminal three), wherein,

[0106] Pin IN of the relay control core U5 is electrically connected to pin 1 of the trigger module U4, pin DEN of the relay control chip U5 is electrically connected to GPIO4 of the MCU chip, pin IS of the relay control chip U5 is electrically connected to AD1 of the MCU chip, and resistor R14 is set on the circuit connecting the two, pin OUT1 of the relay control chip U5 is electrically connected to AD2 of the MCU chip, resistor R11 and resistor R13 are set on the circuit connecting the two, resistor R12 is set between resistor R11 and resistor R13, pins OUT2 and OUT3 of the relay control chip U5 are electrically connected to the relay (EXT-HSD1) for controlling the on and off of the relay; R11 and R12 are relay output sampling voltage divider resistors, and R14 is the relay output current sampling pull-down resistor; the current sampling internal is a constant current source that calculates the output actual current value by sampling the voltage value.

[0107] The MCU chip collects the actual output current of the relay switch. The calculation formula for the relay output current is as follows:

[0108]

[0109] Wherein, I is the output current of the relay, AD1 is the voltage value of the MCU chip AD1 sent from the pin IS of the relay control chip U5, 300 is the current amplification ratio, and R13 is the resistance value of the resistor R13;

[0110] The circuit connecting the pin OUT1 of the relay control chip U5 and the AD2 of the MCU chip is used to collect the output signal level. The calculation formula for the relay output voltage collection is as follows:

[0111]

[0112] Wherein, Vout is the output voltage of the relay, AD2 is the sampling voltage value transmitted from the pin OUT1 of the relay control chip to the AD2 of the MCU chip, R11 is the resistance value of the resistor R11, and R12 is the resistance value of the resistor R12.

[0113] Table 2 below is the relay output control diagnostic truth table

[0114] AD1 AD2 IN Fault type 1 1 1 Normal output 1 0 1 Short circuit to ground 0 1 1 open circuit 0 1 0 Short circuit to power supply

[0115] Table 2

[0116] In the table, "1" is a high level and "0" is a low level.

[0117] By controlling the GPI0 pin of the MUC chip to control the relay output and current collection, and coordinating with the output voltage collection of the port, the output diagnosis function can be realized, which can improve the output voltage collection and output current and control signal to diagnose the current state of the relay.

[0118] Another embodiment of the present application further provides a latch circuit system control method based on a high voltage relay, the control method comprising the following steps:

[0119] When the MCU chip is working normally, the relay latching process includes the following:

[0120] Closed latch: Set GPI01 and GPI04 of the MCU chip to high level, set GPI02 to high level for 1 second, and restore to low level after 1 second to prepare for the next lock. GPI01 is high level, Q1 is turned on, M1 is turned on, U2A pin 3 inputs V1 voltage, U2A pin 23 inputs V2 divided voltage, pin 3 voltage is greater than pin 2 voltage, U2A pin 1 outputs high level to U3A pin 2, U3A pin 3 is converted from high level to low level, at this time U4 pin CP of the trigger chip is converted from low level to high level, the trigger chip pin Q follows the pin D level, the trigger chip pin Q outputs high level, the relay control chip U5 pin IN inputs high level to control the relay to close, and the lock is completed.

[0121] Disconnect latch: set GPI01 of MCU chip to high level, GPI04 to low level, GPI02 to high level for 1 second, and restore to low level after 1 second to prepare for the next lock, Q1 is turned on, M1 is turned on, U2A pin 3 inputs V1 voltage, U2A pin 23 inputs V2 divided voltage, pin 3 voltage is greater than pin 2 voltage, U2A pin 1 outputs high level to U3A pin 2, U3A pin 3 is converted from high level to low level, at this time U4 pin CP of trigger chip is converted from low level to high level, trigger chip pin Q follows pin D level, trigger chip pin Q outputs low level, relay control chip U5 pin IN inputs low level to control the relay to disconnect, and lock is completed.

[0122] When the MCU works abnormally or is reset, the relay latching process

[0123] GPIO1, GPIO2, GPIO3, and GPIO4 of the MCU chip become high-impedance outputs, M1 is controlled by GPIO1, M1 is disconnected, and V1 stops supplying power to pin 3 of the U2A chip. At this time, the power is supplied by capacitor C1 and maintains a high level; R1 and R2 pull the C1 capacitor down to a low level for discharge. When the discharge voltage is less than pin 2 of the U2A chip, U2A pin 1 outputs a low level, GPIO2 of U3A pin 3 changes from a high level to a high-impedance input, U3A pin 2 changes from a high level to a low level, U3A pin 3 is greater than pin 2, pin 1 outputs a high level, and the trigger D pin GPIO3 is a high-impedance input. R14 pulls the D pin down to a low level, which is a low level at this time. After the discharge delay of C1, R1, and R2, the CP pin changes from a low level to a high level, and the Q pin follows the D pin to output a low level. The pin IN of the relay control chip U5 inputs a low level to control the relay to disconnect for protection.

[0124] The above embodiments are only for illustrating the technical concept and features of the present application, and their purpose is to enable people familiar with the technology to understand the content of the present application and implement it accordingly, and they cannot be used to limit the protection scope of the present application. Any equivalent transformation or modification made according to the spirit of the present application shall be included in the protection scope of the present application.

Claims

1. A latch circuit system based on a high voltage relay, characterized in that: include: A control module, wherein the working state of the control module includes a first state and a second state, the control module performs a high level output or a low level output in the first state, and the control module performs a high impedance output in the second state; A delay module, wherein the delay module is electrically connected to the control module, and when the control module is in the first state, the control module inputs a high level or a low level to the delay module, and when the control module is in the second state, the control module inputs a high impedance state to the delay module; A comparison module, wherein the comparison module is electrically connected to the control module, and the comparison module is electrically connected to the delay module. When the control module is in the first state, the control module inputs a high-level signal to the comparison module and changes it to a low-level signal. When the control module is in the second state, the control module inputs a high-impedance signal to the comparison module, and the delay module inputs a high-level signal to the comparison module and changes it to a low-level signal. A trigger module, wherein the trigger module is electrically connected to the control module, and the trigger module is electrically connected to the comparison module. When the control module is in the first state, the control module inputs a high level or a low level to the trigger module, and the comparison module inputs a high level input to the trigger module, and the output of the trigger module is the same as the input of the control module to the trigger module. When the control module is in the second state, the control module inputs a high impedance input to the trigger module to a low level input, and the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal. When the control module is in the second state, the trigger module outputs a low level. A relay control module, the relay control module is electrically connected to the control module, and the relay control module is electrically connected to the trigger module, when the control module is in the first state, the control module inputs a high level to the relay control module and the trigger module inputs a high level to the relay control module so that the relay control module controls the relay to close, the control module inputs a low level to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open, when the control module is in the second state, the control module inputs a high impedance to the relay control module and the trigger module inputs a low level to the relay control module so that the relay control module controls the relay to open.

2. The latch circuit system based on a high voltage relay according to claim 1, characterized in that: The control module includes an MCU chip, and the MCU chip includes an output terminal 1, an output terminal 2, an output terminal 3, and an output terminal 4. The first state includes the state when the MCU chip is working normally, and the output states of output terminal 1, output terminal 2, output terminal 3 and output terminal 4 of the MCU chip include high-level output and low-level output. The second state includes the state when the MCU chip is working abnormally and reset, and the output states of output terminal 1, output terminal 2, output terminal 3 and output terminal 4 of the MCU chip include high-impedance output.

3. The latch circuit system based on a high voltage relay as claimed in claim 2, characterized in that: The delay module includes a transistor 1, a transistor 2, a resistor 1, a resistor 2, a capacitor 1 and a power supply 1, wherein: The output terminal 1 of the MCU chip is electrically connected to the control terminal of the transistor 1, the first terminal of the transistor 1 is connected to the control terminal of the transistor 2, the second terminal of the transistor 1 is grounded, the first terminal of the transistor 2 is connected to the power supply 1, the second terminal of the transistor 2 is electrically connected to the comparison module through the resistor 2, the resistor 1 is electrically connected to the circuit connecting the transistor 2 and the resistor 2, the resistor 2 is electrically connected to the capacitor 1, the capacitor 1 is grounded, and the output node on the circuit connecting the resistor 2 and the capacitor 1 is electrically connected to the comparison module.

4. The latch circuit system based on a high voltage relay as claimed in claim 3, characterized in that: The comparison module includes a comparator chip 1, a comparator chip 2, a resistor 3, a resistor 4, a resistor 5, a resistor 6, a resistor 7, a resistor 8, a power supply 2 and a power supply 3, and the comparator chip 1 and the comparator chip 2 respectively include an input terminal 1, an input terminal 2 and an output terminal 1, wherein: The power supply 2 is electrically connected to the input terminal 1 of the comparator chip 1 through the voltage-dividing node of the resistor 3 and the resistor 4, the resistor 2 is electrically connected to the output node on the capacitor 1 connection circuit, the power supply 1 is electrically connected to the input terminal 2 of the comparator chip 1, the output terminal 1 of the comparator chip 1 is electrically connected to the input terminal 1 of the comparator chip 2 through the voltage-dividing node of the resistor 5 and the resistor 6, the output terminal 2 of the MCU chip is electrically connected to the input terminal 2 of the comparator chip 2, and at the same time, the power supply 3 is electrically connected to the input terminal 2 of the comparator chip 2 through the voltage-dividing node of the resistor 7 and the resistor 8, and the output terminal 1 of the comparator chip 2 is electrically connected to the trigger module.

5. The latch circuit system based on a high voltage relay as claimed in claim 4, characterized in that: The input voltage calculation formula of the input terminal 1 of the comparator chip 2 includes: In the formula, V1 is the input voltage of the input terminal 1 of the comparator chip 2, Va is the output voltage of the output terminal 1 of the comparator chip 1, R5 is the resistance value of the resistor 5, and R6 is the resistance value of the resistor 6.

6. The latch circuit system based on a high voltage relay as claimed in claim 4, characterized in that: The input voltage calculation formula of the input terminal 2 of the comparator chip 2 includes: When the MCU chip works normally, <h2 style=";text-align:left;direction:ltr">V2=V<h2 style=";text-align:left;direction:ltr"> GPIO2 Where V2 is the input voltage of the second input terminal of the comparator chip, V GPIO2 is the output voltage of the output terminal 2 of the MCU chip; When the MCU chip works abnormally and resets, In the formula, V2 is the input voltage of the input terminal 2 of the comparator chip 2, Vcc is the output voltage of the power supply 3, R7 is the resistance value of the resistor 7, and R8 is the resistance value of the resistor 8.

7. The latch circuit system based on a high voltage relay according to claim 4, characterized in that: The trigger module includes a trigger chip, a resistor nine and a resistor ten, and the trigger chip includes an input terminal one, an input terminal two and an output terminal one, wherein: The output terminal 3 of the MCU chip is electrically connected to the input terminal 1 of the trigger chip, and the resistor 9 is arranged on the circuit connecting the MCU chip and the trigger chip, and the resistor 9 is used to pull down the voltage of the input terminal 1 of the trigger chip. The output terminal 1 of the comparator chip 2 is electrically connected to the input terminal 2 of the trigger chip, and the resistor 10 is arranged on the circuit connecting the comparator chip 2 and the trigger chip, and the resistor 10 is used to pull down the voltage of the input terminal 2 of the trigger chip. An output terminal 1 of the trigger chip is electrically connected to the relay control module.

8. The latch circuit system based on a high voltage relay according to claim 7, characterized in that: The relay control module includes a relay control chip, a resistor 11, a resistor 12, a resistor 13 and a resistor 14, the relay control chip includes an input terminal 1 and an input terminal 2, an output terminal 1, an output terminal 2 and an output terminal 3, and the MCU chip also includes an input terminal 1 and an input terminal 2, wherein: The input terminal 1 of the relay control chip is electrically connected to the output terminal 1 of the trigger module, the input terminal 2 of the relay control chip is electrically connected to the output terminal 4 of the MCU chip, the output terminal 1 of the relay control chip is electrically connected to the input terminal 1 of the MCU chip, and the resistor 14 is arranged on the circuit connecting the two, the output terminal 2 of the relay control chip is electrically connected to the input terminal 2 of the MCU chip, the resistor 11 and the resistor 13 are arranged on the circuit connecting the two, the resistor 12 is arranged between the resistor 11 and the resistor 13, and the output terminal 3 of the relay control chip is electrically connected to the relay for controlling the on and off of the relay.

9. The latch circuit system based on a high voltage relay according to claim 8, characterized in that: The circuit in which the output terminal 1 of the relay control chip is connected to the input terminal 1 of the MCU chip is used for the MCU chip to collect the actual output current of the relay switch. The calculation formula for the relay output current collection is as follows: Wherein, I is the output current of the relay, AD1 is the voltage value of the output terminal 1 of the relay control chip transmitted to the input terminal 1 of the MCU chip, 300 is the current amplification ratio, and R13 is the resistance value of the resistor 13; The circuit connecting the output terminal 2 of the relay control chip and the input terminal 2 of the MCU chip is used to collect the output signal level. The calculation formula for the relay output voltage collection is as follows: Wherein, Vout is the relay output voltage, AD2 is the recovery voltage value transmitted from the output terminal 2 of the relay control chip to the input terminal 2 of the MCU chip, R11 is the resistance value of the resistor 11, and R12 is the resistance value of the resistor 12.

10. A control method for a latch circuit based on a high voltage relay, characterized in that: include: When the control module is in the first state, the control method of the latch circuit for performing relay closing latching includes the following: The control module inputs a high level to the delay module, and the control module inputs a high level to the comparison module from a high level to a low level to prepare for the next latching. The control module inputs a high level to the trigger module, and the comparison module inputs a low level to the trigger module from a high level. The trigger module inputs the same high level as the control module to the trigger module, and inputs a high level to the relay control module. At the same time, the control module inputs a high level to the relay control module, so that the relay control module controls the relay to close to complete the closed latching; When the control module is in the first state, the control method of the latch circuit for performing relay disconnect latching includes the following: The control module inputs a high level to the delay module, and the control module inputs a high level to the comparison module to prepare for the next latch. The control module inputs a low level to the trigger module, and the comparison module inputs a low level to the trigger module to prepare for the next latch. The trigger module inputs the same low level as the control module to the trigger module, and inputs a low level to the relay control module. At the same time, the control module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latch. When the control module is in the second state, the control method of the latch circuit for performing relay disconnect latching includes the following: The control module simultaneously inputs high-impedance state to the delay module, the comparison module, and the relay control module, the delay module inputs the comparison module from high level to low level, the comparison module inputs the control module and the trigger module from high-impedance state to low level, the signal sent by the comparison module to the trigger module is converted from a low level signal to a high level signal, and the trigger module inputs a low level to the relay control module, so that the relay control module controls the relay to disconnect to complete the disconnect latch.