A multi-level input logic judgment circuit

Through the improved window comparator hardware circuit and logic composite circuit, the problem of delayed response and high cost of the multi-level input logic judgment circuit is solved, and fast and reliable multi-level voltage input logic judgment is realized, which is suitable for both 12V and 24V voltages. level of application.

CN108347233BActive Publication Date: 2024-09-17SHENZHEN LONDIAN ELECTRICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN201810371109.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-04-23
Publication Date
2024-09-17
Estimated Expiration
2038-04-23

AI Technical Summary

Technical Problem

The existing multi-level input logic judgment circuit has a lag in response when detecting the input voltage state, and the cost is high. Moreover, the hardware circuit method and the microcontroller software programming method each have performance limitations, making it difficult to achieve fast and sensitive multi-level voltage signal judgment.

Method used

A multi-level input logic judgment circuit is designed, which uses an improved window comparator hardware circuit. Through n sets of comparators and logic composite circuits, a voltage dividing circuit and a two-input logic gate are used to realize the logic judgment of multi-level voltage input, which reduces the cost. The number of threshold point potentials improves response speed and reliability.

Benefits of technology

It achieves fast and reliable logical judgment of multi-level voltage inputs, avoids the "crash" problem in software programming, reduces the implementation cost of the overall circuit, and shows good detection results on two-level voltage inputs of 12V and 24V.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108347233B
    Figure CN108347233B
Patent Text Reader

Abstract

The present invention discloses a multi-level input logic judgment circuit, wherein the comparator circuit has n groups of comparators and n threshold point potentials, each group of comparators has two comparators to obtain 2n comparison output voltages, and the undervoltage and overvoltage sampling of the input voltage to be compared is divided into two independent voltage-dividing branches, and the voltage obtained after the voltage division of R1 and R2 is respectively sent to the inverting end of the even-numbered comparator, and compared with the threshold potential of the inverting end, and the voltage obtained after the voltage division of R3 and R4 is respectively sent to the inverting end of the odd-numbered comparator, and compared with the threshold potential of the inverting end, at which time the odd-numbered comparator obtains the overvoltage state of each of the n paths (overvoltage state when the output is high level, non-overvoltage state when the output is low level). The present invention realizes the function of multi-input potential logic judgment by designing the hardware circuit of the improved window comparator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of constant voltage output circuit design, and in particular to a multi-level input logic judgment circuit. Background Art

[0002] In order to ensure the normal operation of the system, it is necessary to judge the state of the input signal in time in order to respond. When the voltage signal is used as the input, it is necessary to judge the three working states of the input voltage: undervoltage, overvoltage and normal. When the input voltage is detected to be abnormal, that is, undervoltage or overvoltage, the system needs to stop running or automatically implement protection. The same is true for multi-voltage level (hereinafter referred to as multi-level) input. If any input is abnormal, the corresponding protection measures need to be initiated. As far as multi-level input logic judgment is concerned, the current common microcontrollers implement functions through software design, which has the disadvantages of delayed response and high cost.

[0003] There are generally two ways to detect the state of multi-level input voltage and perform logical judgment, namely the hardware circuit method and the microcontroller software programming method.

[0004] When the hardware circuit method is used, the voltage signal is generally compared and detected by a comparator to obtain the logic potential, and then the detected logic potential signal is directly transmitted to the logic compound circuit for logical judgment, and an actual control signal is obtained to supply the potential protection circuit. Pure hardware circuits are often used for single input voltage state detection.

[0005] When using the microcontroller software programming method, the voltage signal must first be sampled and detected through the analog-to-digital conversion module, and then logical judgment can be performed through the microcontroller software programming, which can easily judge multi-level input signals.

[0006] The response speed of the hardware circuit method and the microcontroller software programming method is affected by the constraints of semiconductor materials and working environment, and the microcontroller software programming method is also affected by the microcontroller clock signal and the conversion accuracy of the analog-to-digital conversion module, the sampling voltage range and other constraints.

[0007] Although the response speed of semiconductor devices is getting faster and faster under the current high-speed development trend, the performance of the single-chip software programming method is more restricted than that of the hardware circuit method. Therefore, compared with the software programming method, the hardware circuit method responds more promptly and sensitively to the direct logical judgment of the voltage signal, and has a wide potential measurement range, a small error range, and a low overall circuit implementation cost. Under the same performance conditions, the response of the single-chip software programming method will not be as timely as the hardware circuit method, and it is not easy to integrate, and the overall circuit implementation cost is relatively high. Summary of the invention

[0008] The purpose of the present invention is to provide a multi-level input logic judgment circuit, which realizes the function of multi-input potential logic judgment by theoretical analysis and designing the hardware circuit of the improved window comparator, so as to overcome the shortcomings of the prior art.

[0009] The technical solution of the present invention to solve the technical problem is: a multi-level input logic judgment circuit, including a comparator circuit and a logic compound circuit, characterized in that: the comparator circuit has n groups of comparators, n threshold point potentials U_set_1, ..., U_set_n, each group of comparators has two comparators to obtain 2n comparison output voltages U_out_1, ..., U_out_2n, undervoltage and overvoltage sampling of the input compared voltage U_in is divided into two independent voltage-dividing branches, and the undervoltage sampling voltage-dividing branch includes a resistor R 1 and R 2 , the overvoltage sampling voltage divider branch includes resistor R 3 and R 4 ; The inverting terminal of the even-numbered comparator is connected to the R 1 and R 2 The voltage divider circuit is composed of R 1 With R 2 The voltage obtained after voltage division is sent to the inverting terminal of the even-numbered comparator respectively, and compared with the threshold potential of the inverting terminal, so that the even-numbered comparator obtains the undervoltage state of each of the n paths; the inverting terminal of the odd-numbered comparator is connected to the R 3 With R 4 The voltage divider circuit is composed of R 3 With R 4 The voltages obtained after voltage division are respectively sent to the non-inverting terminals of the odd-numbered comparators and compared with the threshold potential of the inverting terminals, so that the odd-numbered comparators obtain the overvoltage state of each of the n paths.

[0010] The logic compound circuit includes n groups of logic input signals, each group of logic input signals is input by n two-input OR logic gates to obtain n operation output signals, and the n operation output signals are sent to AND logic gates to finally obtain a composite output signal U_out.

[0011] Resistor R 1 , R 2 , R 3 , R 4 The parameters are determined according to the following formula:

[0012]

[0013] in,

[0014] The beneficial effects of the present invention are:

[0015] The present invention adopts an improved window comparator, and adopts a pure hardware design scheme for the state detection and logic judgment circuit of multi-level voltage input, which has fast response and high reliability, and there is no "freeze" problem of the program in the software during long-term operation. Based on the simple and basic threshold voltage window comparator circuit, the two-level window voltage comparator is analyzed, and the two-level and multi-level composite window voltage comparator is designed, and applied to the state detection and logic judgment circuit of 12V and 24V two-level voltage input. The rationality and practicality of the multi-level composite voltage window comparator are confirmed through simulation and experiment, which can provide reference for practical related engineering applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a multi-level output characteristic diagram of the circuit of the present invention.

[0017] Figure 2 The invention discloses a multi-stage composite window comparator circuit diagram.

[0018] Figure 3 It is the logic complex circuit diagram of the present invention.

[0019] Figure 4 The invention relates to an input dual voltage level logic protection circuit. DETAILED DESCRIPTION

[0020] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0021] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection; it can also be a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0022] See also Figure 1-4The present invention provides a multi-level input logic judgment circuit, including a comparator circuit and a logic compound circuit, characterized in that: the comparator circuit has n groups of comparators, n threshold point potentials U_set_1, ..., U_set_n, each group of comparators has two comparators to obtain 2n comparison output voltages U_out_1, ..., U_out_2n, and the undervoltage and overvoltage sampling of the input compared voltage U_in is divided into two independent voltage-dividing branches, and the undervoltage sampling voltage-dividing branch includes a resistor R 1 and R 2 , the overvoltage sampling voltage divider branch includes resistor R 3 and R 4 . R 1 With R 2 The voltages obtained after voltage division are respectively fed into Figure 2 The inverting terminal of the even-numbered comparator (A2, A4, ..., A2n) is compared with the threshold potential of the non-inverting terminal. At this time, the even-numbered comparator obtains the undervoltage state of each of the n paths (undervoltage state when the output is high level, non-undervoltage state when the output is low level); R 3 With R 4 The voltage obtained after voltage division is sent to the non-inverting terminal of the odd-numbered comparator (A1, A3, ..., A(2n-1)) and compared with the threshold potential of the inverting terminal. At this time, the odd-numbered comparator obtains the overvoltage state of each of the n paths (overvoltage state when the output is high level, non-overvoltage state when the output is low level). The specific description is as follows:

[0023] The design of this circuit is divided into two parts, one is a multi-level composite window comparator circuit, and the other is a logic composite circuit. And its circuit output characteristic diagram is as follows Figure 1 shown.

[0024] Figure 1 Among them, U_low_1, U_high_1, U_low_2, U_high_2, …, U_low_n, and U_high_n respectively represent the first-level low threshold potential point, the first-level high threshold potential point, the second-level low threshold potential point, the second-level high threshold potential point, the nth-level low threshold potential point, and the nth-level high threshold potential point of the multi-level input voltage (there are other levels of high and low threshold potential points that are not marked in between). At the same time, the threshold point potentials satisfy U_high_n>U_low_n>…>U_high_2>U_low_2>U_high_1>U_low_1. If U_in<U_low_x, it is called the undervoltage condition corresponding to the xth level; if U_low_x<U_in<U_high_x, it is called the normal condition corresponding to the xth level; if U_in>U_high_x, it is called the overvoltage condition corresponding to the xth level.

[0025] The structure of the multi-stage composite window comparator circuit is as follows Figure 2 As shown, the structure of the logic compound circuit is as follows Figure 3 shown.

[0026] The multi-stage composite window comparator circuit has 2n comparators (A1, A2, A3, A4, ..., A(2n-1), A 2n), n threshold point potentials (U_set_1, U_set_2, ..., U_set_n), and 2n comparison output voltages (U_out_1, U_out_2, U_out_3, U_out_4, ..., U_out_(2n-1), U_out_2n).

[0027] Here, from the properties of the upper and lower limits of the threshold potential, it can be seen that the upper and lower limits of each level of potential in the n-level input satisfy U_high_n>U_low_n>U_high_(n-1)>U_low_(n-1)>...>U_high_1>U_low_1. At the same time, the potentials of each threshold point of the multi-level composite window comparator circuit should satisfy U_set_n>U_set_(n-1)>...>U_set_1.

[0028] This circuit divides the undervoltage and overvoltage sampling of the input voltage U_in into two independent voltage-dividing branches. The undervoltage sampling voltage-dividing branch is R 1 and R 2 The overvoltage sampling voltage divider branch is R in the figure. 3 and R 4 composition.

[0029] R 1 With R 2 The voltage obtained after voltage division is sent to the inverting terminal of the even-numbered comparator (A2, A4, ..., A2n) respectively, and compared with the threshold potential of the non-inverting terminal. At this time, the even-numbered comparator obtains the undervoltage state of each of the n paths (undervoltage state when the output is high level, non-undervoltage state when the output is low level); R 3 With R 4 The voltages obtained after voltage division are respectively fed into Figure 2 The in-phase terminal of the odd-numbered comparator (A1, A3, ..., A(2n-1)) is compared with the threshold potential of the inverting terminal. At this time, the odd-numbered comparator obtains the overvoltage state of each of the n paths (overvoltage state when the output is high level, and non-overvoltage state when the output is low level). Here, the comparison output voltage (U_out_1, U_out_2, U_out_3, U_out_4, ..., U_out_(2n-1), U_out_2n) obtained by the 2n-path comparator is obtained by Figure 2The logic circuit performs logic combination of voltages to obtain a multi-level input potential logic judgment signal output.

[0030] It can be seen that the lower limit values ​​U_low_1, U_low_2, ..., U_low_n and the upper limit values ​​U_high_1, U_high_2, ..., U_high_n of the n-way voltage input become the threshold point potentials under the equivalent undervoltage state and overvoltage state under the corresponding input. The input voltage is compared with U_set_1, U_set_2, ..., U_set_n after being taken by the voltage divider circuit, which is equivalent to the input voltage being directly compared with U_low_1, U_high_1, U_low_2, U_high_2..., U_low_n, U_high_n. This method converts the undervoltage and overvoltage areas into two paths. Only n comparison threshold point potentials are needed in the circuit to form the required potential identification. This is also the principle that the circuit requires fewer threshold point potentials than the conventional multi-limit comparator circuit.

[0031] The design parameters are determined according to the following formula:

[0032]

[0033] in

[0034] In the process of designing and determining parameters, it is necessary to clarify U_low_1, U_high_1, U_low_2, U_high_2..., U_low_n, U_high_n. Then you can first determine the values ​​of U_set_1, U_set_2,..., U_set_n, and then use the above formula to determine R 1 , R 2 , R 3 , R 4 , to realize the parameter setting of the entire circuit.

[0035] The multi-level composite window comparator circuit scheme is applied to electronic circuits with two different input voltage levels: 12V and 24V. Figure 4 The input dual voltage level logic protection circuit shown in the figure. As shown in the figure, the undervoltage and overvoltage sampling of the input voltage (V-BAT) are divided into two independent voltage divider branches. The undervoltage sampling voltage divider branch is R 1 and R 2 The overvoltage sampling voltage divider branch is R in the figure. 3 and R 4 composition.

[0036] At the same time, at a 12V input level, its undervoltage and overvoltage values ​​are 10.5V and 15V respectively; at a 24V input level, its undervoltage and overvoltage values ​​are 21V and 30V respectively.

[0037] By calculation, the four resistors can take values:

[0038] R 1 =24K ohm, R 2 =11K ohm, R 3 =39K ohm, R 4 =11K ohm. The two-way voltage-dividing sampling signals are respectively sent to the four comparator units A, B, C, and D of the LM339 chip. Two voltage-stabilizing diodes (Zener diodes, BZV55-B3V3) are connected in series to form the comparison reference voltage of the four comparators, and each voltage-stabilizing diode is connected in parallel with a 10nF ceramic capacitor as a high-frequency bypass capacitor to filter out the interference signals of the comparison reference voltage from inside and outside the circuit. Because the LM339 comparator belongs to the "open drain" output type, a "pull-up" resistor with a resistance of 2K ohm is added to the output end of each comparator unit to ensure that the correct state can be output.

[0039] The outputs of the four comparators are connected to the subsequent logic gate circuit. Because of the working characteristics of the CMOS logic chip and its operation in 5V mode, a voltage divider circuit is added to the output of each comparator to make the input voltage reach the input standard of the CMOS logic chip. Figure 2 Circuit connection, when the comparator output is high level, it means the input voltage is in undervoltage or overvoltage state; when the comparator output is low level, it means the input voltage is in a reasonable working range.

[0040] It can be analyzed that when the output terminals OA and OB of comparator units A and B output high level, they correspond to the overvoltage and undervoltage protection outputs when the battery is inputted with 12V; and when the output terminals OC and OD of comparator units C and D output high level, they correspond to the overvoltage and undervoltage protection outputs when the battery is inputted with 24V.

[0041] The four logic signals OA, OB, OC, and OD are sent together into a logic compound circuit that conforms to the logic expression "Control_out = OA.OD + OB + OC", and finally a composite output signal Control_out is obtained.

[0042] Although the embodiments of the present invention have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the claims and their equivalents. Any improvements not made through creative work shall be included within the scope of protection of the present invention.

Claims

1. A multi-level input logic judgment circuit, comprising a comparator circuit and a logic compound circuit, characterized in that: The comparator circuit has n groups of comparators, n threshold point potentials U_set_1, ..., U_set_n, each group of comparators has two comparators to obtain 2n comparison output voltages U_out_1, ..., U_out_2n, undervoltage and overvoltage sampling of the input compared voltage U_in is divided into two independent voltage-dividing branches, and the undervoltage sampling voltage-dividing branch includes a resistor R 1 and R 2 , R 1 and R 2 Connected in series between the power supply U-in and the ground, the overvoltage sampling voltage divider branch includes a resistor R 3 and R 4 , R 3 and R 4 Connect in series between the power supply U-in and the ground; the inverting terminal of the even-numbered comparator is connected and connected to the R 1 and R 2 The voltage divider circuit is composed of R 1 and R 2 The voltage obtained after voltage division is respectively sent to the inverting terminal of the even-numbered comparator and compared with the threshold potential of the inverting terminal, so that the even-numbered comparator obtains the undervoltage state of each of the n paths; the inverting terminal of the odd-numbered comparator is connected to the R 3 and R 4 The voltage divider circuit is composed of R 3 and R 4 The voltage obtained after voltage division is respectively sent to the non-inverting terminal of the odd-numbered comparator and compared with the threshold potential of the inverting terminal, so that the odd-numbered comparator obtains the overvoltage state of each of the n paths; the inverting input terminal of the odd-numbered comparator and the positive input terminal of the even-numbered comparator in each group of comparators are U_set_1, ..., U_set_n, respectively, the positive input terminal of the odd-numbered comparator is connected to the overvoltage sampling voltage-dividing branch, and the inverting input terminal of the even-numbered comparator is connected to the undervoltage sampling voltage-dividing branch; The logic compound circuit includes n groups of logic input signals, each group of logic input signals is input through n two-input OR logic gates to obtain n operation output signals, the n operation output signals are sent to AND logic gates to finally obtain a composite output signal U_out, the logic compound circuit is a CMOS logic circuit, and the input signals are U_out_1, ..., U_out_2n output by the comparator circuit.

2. The multi-level input logic judgment circuit according to claim 1, characterized in that: resistance R 1 , R 2 , R 3 , R 4 The parameters are determined according to the following formula: ; in, ; U_low_1, U_high_1, U_low_2, U_high_2,…, U_low_n, U_high_n respectively represent the first level low threshold potential point, the first level high threshold point potential, the second level low threshold point potential, the second level high threshold point potential, the nth level low threshold point potential, and the nth level high threshold point potential of the multi-level input voltage.

Citation Information

Cited By

  • Single-cycle tc type detection circuit and integrated circuit chip

    CN122904821A