Fast reversal HVIL detection circuit built based on LM339
Through the fast inversion HVIL detection circuit built based on LM339, simple I/O level identification is used to use the GPIO port of the MCU, which solves the problems of high software complexity and high hardware cost in the on-off detection of high voltage bus circuit of new energy battery packs in the prior art, and achieves the detection effect of fast response speed and low cost.
Patent Information
- Application Number
- CN202420126627.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2034-01-18
AI Technical Summary
The prior art has complex design solutions in the high-voltage bus circuit on-off detection of new energy battery packs, resulting in high software complexity and high hardware costs.
The fast inversion HVIL detection circuit built based on LM339 is adopted, and the low-voltage loop circuit, comparator and reference circuit are used to perform simple I/O level identification using the GPIO port of the MCU to achieve rapid diagnosis of the open and non-open states of the external loop.
It significantly reduces the complexity of software and hardware costs, has fast response speed, can efficiently locate external faults, and is suitable for high-voltage bus circuit on and off detection of new energy battery packs.
Smart Images

Figure CN222599809U_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of circuit technology, and in particular to a fast reversal HVIL detection circuit based on LM339. Background Art
[0002] At present, the demand for on-off detection of high-voltage bus circuits of new energy battery packs has become more and more common. The current design solutions are relatively complex analog sampling or detection of PWM circuit signals, which brings problems such as high software complexity and high hardware cost.
[0003] Therefore, there is an urgent need for a fast reversal HVIL detection circuit based on LM339 that can significantly reduce software complexity and hardware cost. Utility Model Content
[0004] The purpose of this application is to address the above-mentioned problems existing in the prior art and provide a fast reversal HVIL detection circuit based on LM339.
[0005] In order to achieve the above application purpose, this application adopts the following technical solution: the fast reversal HVIL detection circuit based on LM339 includes MCU and also includes:
[0006] A low voltage loop circuit, one end of which is connected to a power supply, and the other end is connected to the in-phase terminal of a comparator;
[0007] The comparator has a reference circuit connected to its inverting terminal and its output connected to the GPIO port of the MCU.
[0008] The reference circuit includes a resistor R5 and a resistor R6. One end of the resistor R5 is connected to the inverting end of the comparator, and the other end is connected to a power supply. One end of the resistor R6 is connected to the inverting end of the comparator, and the other end is grounded.
[0009] Furthermore, a resistor R3 is provided between the low-voltage loop circuit and the power supply, and a resistor R4 is connected between the low-voltage loop circuit and the comparator, and the other end of the resistor R4 is grounded.
[0010] Furthermore, a resistor R1 is provided between the output end of the comparator and the GPIO port of the MCU, and the other end of the resistor R1 is connected to a power supply.
[0011] Furthermore, the voltage of all power supplies is 5V.
[0012] Furthermore, the resistance value of the resistor R5 and the resistor R6 is 1 kΩ.
[0013] Furthermore, the resistance value of the resistor R1 is 1 kΩ.
[0014] Furthermore, the resistance value of the resistor R3 is 1 kΩ.
[0015] Compared with the prior art, this application has the following beneficial effects:
[0016] 1. This application uses a comparator with a ns response level to set the reference source (circuit composed of R5 and R6) and the external loop on-off status to quickly diagnose the closed loop of the entire link (when the external loop 1 is turned on, the voltage after R3 / R4 voltage division is greater than 2.5V of the reference source, so the comparator output is high. When the external circuit is open, the comparator input becomes 0V, and the voltage is less than the comparator's reference voltage 2.5V, so the output is low. This level conversion can be used by the MCU's general I / O to identify the open and non-open states of the external loop). The MCU does not require complex ADC conversion or PWM detection, and can efficiently locate external faults through simple I / 0 level recognition, thereby significantly reducing the complexity of the software and having the advantages of fast response speed and low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a circuit diagram of this application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0019] Those skilled in the art should understand that, in the disclosure of the present application, the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the above terms should not be understood as limiting the present application.
[0020] like Figure 1 As shown, the fast reversal HVIL detection circuit based on LM339 includes.
[0021] The low-voltage loopback circuit of the external high-voltage device, when the external loop 1 is turned on, the voltage after R3 / R4 voltage division is greater than the reference source 2.5V, so the comparator output is high. When the external circuit is open, the comparator input becomes 0V, and the voltage is less than the comparator's reference voltage 2.5V, so the output is low. This level conversion can be used by the MCU's general I / O to identify the open and non-open states of the external loop.
[0022] In this embodiment, a resistor R3 is provided between the low-voltage loop circuit and the 5V power supply, and a resistor R4 is connected between the low-voltage loop circuit and the comparator, and the other end of the resistor R4 is grounded. Figure 1 The rectangular frame has a high-voltage interlock output OUT and a high-voltage interlock input IN. The high-voltage interlock output OUT is connected to a 5V power supply, and the high-voltage interlock input IN is connected to the non-inverting end of the comparator.
[0023] Comparator and reference circuit, when the external loop is open, the positive input voltage of the comparator becomes 0V, and the comparator will experience voltage reversal.
[0024] Among them, LM339 is an integrated circuit, specifically a four-way differential comparator. It contains four independent voltage comparator units, each of which can be used to compare two input voltages and output a high or low level signal according to the relationship between them. When the voltage of the non-inverting input terminal (IN+) is higher than the voltage of the inverting input terminal (IN-), the corresponding comparator output is a low level; conversely, when the voltage of the IN+ terminal is lower than the IN- terminal, the output is a high level. In this embodiment, a 5V power supply is connected through resistor R7, and the other pole is grounded. The inverting end is connected to a reference circuit, and the output end is connected to the GPIO port (General Purpose Input / Output, which can be used to input or output digital signals) of the MCU. The reference circuit includes resistors R5 and R6. One end of resistor R5 is connected to the inverting end of the comparator, and the other end is connected to the power supply. One end of resistor R6 is connected to the inverting end of the comparator, and the other end is grounded.
[0025] Inverting voltage output, such as Figure 1 Status:
[0026] State 1:
[0027] External box connection complete ( Figure 1 ① in the figure), the level state of the comparator circuit output is 1 ( Figure 1 ②), through the GPIO port detection of MCU ( Figure 1 ③)
[0028] State 2: If the external link is disconnected due to a fault or an open circuit of a high-voltage component ( Figure 1 ① in the figure), the level state of the comparator circuit output is 0 ( Figure 1 ②), through the GPIO port detection of MCU ( Figure 1 ③) and reach a high state.
[0029] In this embodiment, a resistor R1 is provided between the output end of the comparator and the GPIO port of the MCU, and the other end of the resistor R1 is connected to a 5V power supply.
[0030] The parts not described in detail in this application are prior art, so this application does not describe them in detail.
[0031] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0032] Although this article uses more professional terms, it does not exclude the possibility of using other terms. These terms are used only to more conveniently describe and explain the essence of this application; interpreting them as any additional restrictions is contrary to the spirit of this application.
[0033] The present application is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of products under the inspiration of the present application. However, no matter what changes are made in the shape or structure, any technical solution that is the same or similar to that of the present application falls within the protection scope of the present application.
Claims
1. A fast reversal HVIL detection circuit based on LM339, including an MCU, is characterized in that: Also includes: A low voltage loop circuit, one end of which is connected to a power supply and the other end is connected to the in-phase terminal of a comparator; A comparator, wherein the inverting end is connected to a reference circuit, and the output end is connected to the GPIO port of the MCU; The reference circuit includes a resistor R5 and a resistor R6, wherein one end of the resistor R5 is connected to the inverting end of the comparator and the other end is connected to a power supply, and one end of the resistor R6 is connected to the inverting end of the comparator and the other end is grounded.
2. The fast reversal HVIL detection circuit based on LM339 according to claim 1, characterized in that: A resistor R3 is provided between the low voltage loop circuit and the power supply, a resistor R4 is connected between the low voltage loop circuit and the comparator, and the other end of the resistor R4 is grounded.
3. The fast reversal HVIL detection circuit based on LM339 according to claim 1, characterized in that: A resistor R1 is provided between the output end of the comparator and the GPIO port of the MCU, and the other end of the resistor R1 is connected to a power supply.
4. The fast reversal HVIL detection circuit based on LM339 according to claim 3 is characterized in that, The voltage of all the power supplies is 5V.
5. The fast reversal HVIL detection circuit based on LM339 according to claim 4 is characterized in that, The resistance value of the resistor R5 and the resistor R6 is 1 kΩ.
6. The fast reversal HVIL detection circuit based on LM339 according to claim 5 is characterized in that: The resistance value of the resistor R1 is 1 kΩ.
7. The fast reversal HVIL detection circuit based on LM339 according to claim 2 is characterized in that: The resistance value of the resistor R3 is 1 kΩ.