A hysteresis comparator circuit

By generating an adjustable threshold voltage and adjusting the hysteresis range online, the problem of the non-adjustable threshold voltage of traditional hysteresis comparators is solved, and high-precision hysteresis comparator applications are realized.

CN224947538UActive Publication Date: 2026-11-06SHENZHEN HOPEWIND ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522402519.9
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-11-06
Estimated Expiration
2035-11-12

Smart Images

  • Figure CN224947538U_ABST
    Figure CN224947538U_ABST
Patent Text Reader

Abstract

This utility model discloses a hysteresis comparator circuit, comprising: a controllable threshold voltage module for generating an adjustable first threshold voltage and a second threshold voltage; a comparator module, with a first input terminal connected to a threshold voltage, a second input terminal connected to an input voltage, and an output terminal outputting a target output voltage, used to change the target output voltage by comparing the magnitude of the input voltage and the threshold voltage; and a threshold switching module, with a first terminal connected to the first input terminal of the comparator module, a second terminal connected to the output terminal of the comparator module, and a third terminal connected to the output terminal of the controllable threshold voltage module, used to select either the first threshold voltage or the second threshold voltage as the threshold voltage based on the target output voltage. The hysteresis comparator circuit of this application features adjustable threshold voltage and hysteresis range, making it suitable for applications requiring high precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the field of hysteresis comparator circuit technology, and in particular to a hysteresis comparator circuit. Background Technology

[0002] Hysteresis comparators are one of the key circuits in modern electronic systems used to enhance the stability of signal decision. With their dual threshold characteristics, they can effectively suppress interference and prevent the output from oscillating near the threshold point due to small signal fluctuations. Therefore, they are widely used in various fields.

[0003] However, traditional hysteresis comparators are typically designed using Schmitt triggers. The threshold voltage of a hysteresis comparator usually needs to be set and adjusted via an external resistor network. For hysteresis comparators with open-collector (OC) or open-drain (OD) outputs, the value of the pull-up resistor affects the high-level output voltage, thus indirectly affecting the threshold voltage calculation. Furthermore, the accuracy and temperature drift of the resistor directly affect the accuracy and stability of the threshold voltage. Therefore, traditional hysteresis comparators cannot accurately detect minute voltage changes between two thresholds, are unsuitable for high-precision level comparisons, and have significant limitations in their application. Utility Model Content

[0004] This utility model provides a hysteresis comparator circuit that solves the problems of the threshold voltage and hysteresis range being unadjustable in traditional hysteresis comparators.

[0005] This utility model provides a hysteresis comparator circuit, comprising: a controllable threshold voltage module for generating an adjustable first threshold voltage and a second threshold voltage; a comparator module having a first input terminal connected to a threshold voltage, a second input terminal connected to an input voltage, and an output terminal outputting a target output voltage, for changing the target output voltage by comparing the input voltage with the threshold voltage; and a threshold switching module having a first terminal connected to the first input terminal of the comparator module, a second terminal connected to the output terminal of the comparator module, and a third terminal connected to the output terminal of the controllable threshold voltage module, for selecting either the first threshold voltage or the second threshold voltage as the threshold voltage based on the target output voltage.

[0006] In the hysteresis comparator circuit provided in this embodiment of the present invention, the controllable threshold voltage module includes a control unit and a voltage generation unit. The input terminal of the voltage generation unit is connected to the output terminal of the control unit, and the first output terminal or the second output terminal of the voltage generation unit is connected to the third terminal of the threshold switching module. The control unit controls the voltage generation unit to generate the first threshold voltage and the second threshold voltage, and the first output terminal and the second output terminal of the voltage generation unit respectively output the first threshold voltage and the second threshold voltage.

[0007] In the hysteresis comparator circuit provided in this embodiment of the present invention, the input terminal of the control unit is connected to the output terminal of the comparator module, wherein the control unit adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit according to the target output voltage.

[0008] In the hysteresis comparator circuit provided in this embodiment of the invention, the control unit adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit by PWM wave generation.

[0009] In the hysteresis comparator circuit provided in this embodiment of the present invention, the threshold switching module includes a driving unit and a switching unit. The first end of the switching unit is connected to the first input end of the comparator module, the second end is connected to the driving unit, and the third end is connected to the first output end or the second output end of the voltage generation unit. The driving unit is connected to the output end of the comparator module. The driving unit drives the third end of the switching unit to connect to the first output end or the second output end of the voltage generation unit according to the target output voltage.

[0010] In the hysteresis comparator circuit provided in this embodiment of the present invention, the comparison module includes a first comparator, the non-inverting input terminal of the first comparator is connected to the input voltage, the inverting input terminal is connected to the threshold voltage, and the output terminal outputs the target output voltage.

[0011] In the hysteresis comparator circuit provided in this embodiment of the present invention, the target output voltage is initially at a low level, the first threshold voltage is greater than the second threshold voltage, and the threshold switching module selects the first threshold voltage as the threshold voltage input to the first input terminal of the comparator module.

[0012] In the hysteresis comparator circuit provided in this embodiment of the present invention, the comparison module includes a first comparator, the non-inverting input terminal of the first comparator is connected to the threshold voltage, the inverting input terminal is connected to the input voltage, and the target output voltage is output.

[0013] In the hysteresis comparator circuit provided in this embodiment of the present invention, the target output voltage is initially at a high level, the first threshold voltage is greater than the second threshold voltage, and the threshold switching module selects the first threshold voltage as the threshold voltage input to the first input terminal of the comparator module.

[0014] This utility model provides a hysteresis comparator circuit, comprising: a controllable threshold voltage module for generating an adjustable first threshold voltage and a second threshold voltage; a comparison module with a first input terminal connected to a threshold voltage, a second input terminal connected to an input voltage, and an output terminal outputting a target output voltage, for changing the target output voltage by comparing the input voltage with the threshold voltage; and a threshold switching module with a first terminal connected to the first input terminal of the comparison module, a second terminal connected to the output terminal of the comparison module, and a third terminal connected to the output terminal of the controllable threshold voltage module, for selecting either the first threshold voltage or the second threshold voltage as the threshold voltage based on the target output voltage. The hysteresis comparator circuit of this application can generate an adjustable threshold voltage through the controllable threshold voltage module, enabling online adjustment of the positive and negative threshold voltages, thereby adjusting the hysteresis range of the hysteresis comparator, and is suitable for applications requiring high precision. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this utility model, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A circuit diagram of a hysteresis comparator circuit provided in an embodiment of this utility model; Figure 2 The output waveform diagram of the hysteresis comparator circuit provided in this embodiment of the present invention when a sine wave is input; Figure 3 Another circuit diagram of the hysteresis comparator circuit provided in this embodiment of the present invention; Figure 4 The output waveform diagram of the hysteresis comparator circuit provided in this embodiment of the present invention when a sine wave is input; Figure 5 This is a circuit diagram of a traditional hysteresis comparator.

[0017] The labels for the attached figures are as follows: 10. Controllable threshold voltage module; 11. Control unit; 12. Voltage generation unit; 20. Comparison module; 30. Threshold switching module; 31. Drive unit; 32. Switching unit. Detailed Implementation

[0018] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present utility model.

[0019] The directional terms used in this invention, such as "up," "down," "front," "back," "left," "right," "inner," "outer," and "side," are merely for reference to the accompanying drawings. Therefore, the directional terms used are for explanation and understanding of this invention, and not for limiting it. Furthermore, in the accompanying drawings, structures that are similar or identical are indicated by the same reference numerals.

[0020] First refer to Figure 5 , Figure 5 The circuit diagram of a traditional hysteresis comparator is shown below. Figure 5 As shown, a traditional hysteresis comparator uses a Schmitt trigger design. The Schmitt trigger consists of a comparator, a reference source circuit (Vref), a pull-up resistor R4, voltage divider resistors R1 and R2, and a positive feedback resistor R3. VTH represents the positive threshold voltage, and VTL represents the negative threshold voltage. The difference between the positive threshold voltage VTH and the negative threshold voltage VTL is the hysteresis interval ΔVT. When the comparator output VOUT is high, the input voltage VIN is less than the positive threshold voltage VTH, and the comparator output is high impedance, resulting in: Right now: When the input voltage VIN is greater than the positive threshold voltage VTH, the comparator outputs a low level. When VOUT is low, and the input voltage VIN is greater than the negative threshold voltage VTL, then: Right now: When the input voltage VIN is less than the negative threshold voltage VTL, the comparator outputs a high level. When the resistor values ​​in the circuit are fixed, VTH, VTL, and ΔVT are only related to Vref, and the adjustable range of the hysteresis interval ΔVT is extremely limited. Therefore, traditional hysteresis comparators cannot accurately detect minute voltage changes between two thresholds and are not suitable for high-precision level comparison. Furthermore, the threshold voltage of a hysteresis comparator typically needs to be set and adjusted through an external resistor network. For comparators with open-collector (OC) or open-drain (OD) outputs, the value of the pull-up resistor affects the high-level output voltage, thus indirectly affecting the calculation of the threshold voltage. The accuracy and temperature drift of the resistor also directly affect the accuracy and stability of the threshold voltage.

[0021] To address the problems of traditional hysteresis comparators, this embodiment provides a hysteresis comparator circuit, referring to... Figures 1 to 4 The hysteresis comparator circuit includes: a controllable threshold voltage module 10, used to generate an adjustable first threshold voltage and a second threshold voltage; a comparison module 20, with a first input terminal connected to a threshold voltage, a second input terminal connected to an input voltage, and an output terminal outputting a target output voltage, used to change the target output voltage by comparing the magnitude of the input voltage and the threshold voltage; and a threshold switching module 30, with a first terminal connected to the first input terminal of the comparison module 20, a second terminal connected to the output terminal of the comparison module 20, and a third terminal connected to the output terminal of the controllable threshold voltage module 10, used to select either the first threshold voltage or the second threshold voltage as the threshold voltage according to the magnitude of the target output voltage.

[0022] In specific implementation, the first threshold voltage and the second threshold voltage generated by the controllable threshold voltage module 10 are both scalars. The voltage values ​​of the first threshold voltage and the second threshold voltage are adjustable. The first threshold voltage can be a positive threshold voltage, and the second threshold voltage can be a negative threshold voltage. The difference between the first threshold voltage and the second threshold voltage is the hysteresis interval. By controlling the first threshold voltage and the second threshold voltage output by the controllable threshold voltage module 10, the hysteresis interval can be adjusted to a suitable value. The comparison module 20 has two input terminals and one output terminal. The first input terminal is used to connect the threshold voltage Vref, the second input terminal is used to connect the input voltage VIN, and the output terminal is used to output the target output voltage VOUT. The target output voltage VOUT is used as the output of the hysteresis comparison circuit. The output terminal of the comparison module 20 can be connected to the controlled object for it to use the target output voltage VOUT.

[0023] The comparison module 20 changes the target output voltage VOUT by comparing the input voltage VIN with the threshold voltage Vref. That is, the target output voltage VOUT is related to the input voltage VIN and the threshold voltage Vref. For example, when the input voltage VIN is greater than the threshold voltage Vref, the target output voltage VOUT can be high level, and when the input voltage VIN is less than the threshold voltage Vref, the target output voltage VOUT can be low level. The output of the controllable threshold voltage module 10 is connected to the first input of the comparison module 20 via a threshold switching module 30. The first end of the threshold switching module 30 is connected to the first input of the comparison module 20, the second end is connected to the output of the comparison module 20, and the third end is connected to the output of the controllable threshold voltage module 10. The threshold switching module 30 can select either a first threshold voltage or a second threshold voltage as the threshold voltage input to the first input of the comparison module 20 based on the magnitude of the target output voltage output by the comparison module 20. At any given time, the threshold switching module 30 only allows switching one of the first threshold voltage and the second threshold voltage as the threshold voltage input. Specifically, the threshold switching module 30 makes the selection by comparing the target output voltage VOUT with a preset threshold value. If the output voltage VOUT is greater than the preset threshold value, the first threshold voltage can be selected as the threshold voltage; if it is less than the preset threshold value, the second threshold voltage can be selected as the threshold voltage.

[0024] In practical applications, when the threshold switching module 30 switches the first threshold voltage as the threshold voltage input to the first input terminal of the comparison module 20, the comparison module 20 compares the first threshold voltage with the input voltage VIN to output the target output voltage VOUT. When the threshold switching module 30 switches the second threshold voltage as the threshold voltage input to the first input terminal of the comparison module 20, the comparison module 20 compares the second threshold voltage with the input voltage VIN to output the target output voltage VOUT. The target output voltage VOUT then serves as the control signal for the threshold switching module 30 to select and switch the first and second threshold voltages as the threshold voltages, thus forming a closed-loop feedback. Combined with the adjustable first and second threshold voltages, the hysteresis range is adjustable, enabling high-precision output.

[0025] In one embodiment, reference is made to Figure 1 and Figure 3The controllable threshold voltage module 10 includes a control unit 11 and a voltage generation unit 12. The input terminal of the voltage generation unit 12 is connected to the output terminal of the control unit 11. The first output terminal or the second output terminal of the voltage generation unit 12 is connected to the third terminal of the threshold switching module 30. The control unit 11 controls the voltage generation unit 12 to generate the first threshold voltage and the second threshold voltage. The first output terminal and the second output terminal of the voltage generation unit 12 respectively output the first threshold voltage and the second threshold voltage. In specific implementation, the controllable threshold voltage module 10 mainly consists of a control unit 11 and a voltage generation unit 12. The control unit 11 can be an MCU or a chip with logic control function. The voltage generation unit 12 has one input terminal and two output terminals. The input terminal is connected to the control unit 11, the first output terminal is used to output the first threshold voltage, and the second output terminal is used to output the second threshold voltage. The voltage generation unit 12 is controlled by the control unit 11 to generate the first threshold voltage and the second threshold voltage. The threshold switching module 30 can choose to connect the first input terminal of the comparison module 20 to the first output terminal or the second output terminal of the voltage generation unit 12, which is determined by the target output voltage VOUT output by the comparison module 20.

[0026] Furthermore, referring to Figure 1 and Figure 3 The input terminal of the control unit 11 is connected to the output terminal of the comparison module 20. The control unit 11 adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12 according to the target output voltage. Specifically, the input terminal of the control unit 11 is connected to the output terminal of the comparison module 20, so the control unit 11 can receive the target output voltage VOUT output by the comparison module 20 and adjust the magnitude of the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12 according to the magnitude of the target output voltage, finely adjusting the hysteresis range to achieve more precise and reliable control.

[0027] Furthermore, referring to Figure 1 and Figure 3 The control unit 11 adjusts the magnitudes of the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12 by transmitting PWM (Pulse Width Modulation) signals. In a specific implementation, the control unit 11 modulates the voltage generation unit 12 by transmitting PWM signals and sending modulated PWM signals to the input terminal of the voltage generation unit 12 to precisely adjust the magnitudes of the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12.

[0028] In one embodiment, the control unit 11 adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12 via a DAC output. In a more specific implementation, the control unit 11 can also adjust the magnitudes of the first threshold voltage and the second threshold voltage generated by the voltage generation unit 12 via a DAC (Digital-to-Analog Converter) output.

[0029] In one embodiment, reference is made to Figure 1 and Figure 3 The threshold switching module 30 includes a driving unit 31 and a switching unit 32. The first end of the switching unit 32 is connected to the first input terminal of the comparison module 20, the second end is connected to the driving unit 31, and the third end is connected to either the first or second output terminal of the voltage generation unit 12. The driving unit 31 is connected to the output terminal of the comparison module 20. The driving unit 31 drives the third end of the switching unit 32 to connect to either the first or second output terminal of the voltage generation unit 12 according to the magnitude of the target output voltage. In specific implementations, the threshold switching module 30 mainly consists of a driving unit 31 and a switching unit 32. The driving unit 31 can be a driving chip or circuit, and the switching unit 32 includes, but is not limited to, analog switches, relays, MOSFETs, and transistors. The switching unit 32 has three connection terminals: the first terminal of the switching unit 32 serves as an output terminal connected to the first input terminal of the comparison module 20; the second terminal of the switching unit 32 serves as a control terminal connected to the driving unit 31; and the third terminal of the switching unit 32 serves as a selection input terminal, which can be connected to either the first or second output terminal of the voltage generation unit 12. The driving unit 31 is connected to the output terminal of the comparison module 20. It can drive the third terminal of the switching unit 32 to be connected to the first or second output terminal of the voltage generation unit 12 according to the magnitude of the target output voltage, thereby realizing the switching between the first threshold voltage and the second threshold voltage as the threshold voltage of the comparison module 20.

[0030] In one embodiment, reference is made to Figure 1 The comparison module 20 includes a first comparator U1. The non-inverting input of the first comparator U1 is connected to the input voltage, the inverting input is connected to the threshold voltage, and the output terminal outputs the target output voltage. The target output voltage is initially low. The first threshold voltage is greater than the second threshold voltage. The threshold switching module 30 selects the first threshold voltage as the threshold voltage input to the first input terminal of the comparison module 20.

[0031] In specific implementation, the comparison module 20 includes a first comparator U1. In this embodiment, the non-inverting input of the first comparator U1 is the second input of the comparison module 20, the inverting input of the first comparator U1 is the first input of the comparison module 20, and the output of the first comparator U1 is the output of the comparison module 20. The first threshold voltage must be greater than the second threshold voltage. Specifically, the first threshold voltage is the positive threshold voltage VTH, and the second threshold voltage is the negative threshold voltage VTL. The first threshold voltage must be greater than the second threshold voltage, i.e., VTH > VTL. The non-inverting input of the first comparator U1 is connected to the input voltage VIN, and the inverting input of the first comparator U1 is connected to the threshold voltage Vref. The output of the first comparator U1 outputs the target output voltage VOUT, which is initially at a low level. The threshold switching module 30 selects to switch the first threshold voltage as the threshold voltage Vref. In practical applications, when the input voltage VIN is greater than the first threshold voltage, the first comparator U1 outputs a high level, and the target output voltage VOUT is high. At this time, the threshold switching module 30 switches the second threshold voltage as the threshold voltage Vref. When the input voltage VIN is less than the first threshold voltage, the first comparator U1 outputs a low level, and the target output voltage VOUT is low. At this time, the threshold switching module 30 selects to switch the first threshold voltage as the threshold voltage Vref.

[0032] In one embodiment, reference is made to Figure 3 The comparison module 20 includes a first comparator U1. The non-inverting input of the first comparator U1 is connected to the threshold voltage, and the inverting input is connected to the input voltage. It outputs the target output voltage. The target output voltage is initially high. The first threshold voltage is greater than the second threshold voltage. The threshold switching module 30 selects the first threshold voltage as the threshold voltage and inputs it to the first input of the comparison module 20.

[0033] In specific implementation, the comparison module 20 includes a first comparator U1. In this embodiment, the non-inverting input of the first comparator U1 is the first input of the comparison module 20, the inverting input of the first comparator U1 is the second input of the comparison module 20, and the output of the first comparator U1 is the output of the comparison module 20. The first threshold voltage must be greater than the second threshold voltage. Specifically, the first threshold voltage is the positive threshold voltage VTH, and the second threshold voltage is the negative threshold voltage VTL. The first threshold voltage must be greater than the second threshold voltage, i.e., VTH > VTL. The non-inverting input of the first comparator U1 is connected to the threshold voltage Vref, and the inverting input of the first comparator U1 is connected to the input voltage VIN. The output of the first comparator U1 outputs the target output voltage VOUT, which is initially at a high level. The threshold switching module 30 selects to switch the first threshold voltage as the threshold voltage Vref. In practical applications, when the input voltage VIN is greater than the second threshold voltage, the first comparator U1 outputs a low level, and the target output voltage VOUT is low. At this time, the threshold switching module 30 switches the second threshold voltage as the threshold voltage Vref. When the input voltage VIN is less than the second threshold voltage, the first comparator U1 outputs a high level, and the target output voltage VOUT is high. At this time, the threshold switching module 30 selects to switch the first threshold voltage as the threshold voltage Vref.

[0034] To further understand the hysteresis comparator circuit provided in this embodiment of the present invention, the following is in conjunction with... Figures 1 to 4 The working principle of the hysteresis comparator circuit is explained in detail.

[0035] (1) When the non-inverting input terminal of the first comparator U1 of the comparator module 20 is connected to the input signal VIN and the inverting input terminal is connected to the threshold voltage Vref, as follows: Figure 1 As shown, the control unit 11 controls the voltage generation unit 12 to generate a positive threshold voltage VTH and a negative threshold voltage VTL. The initial output voltage VOUT of the first comparator U1 of the comparison module 20 is low. At this time, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the positive threshold voltage VTH. The input voltage VIN is input to the first comparator U1 of the comparison module 20. When the input voltage VIN is greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 outputs a high level. This signal is transmitted to the control unit 11 or the controlled object. Simultaneously, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the negative threshold voltage VTL. Since the positive threshold voltage VTH is greater than the negative threshold voltage VTL, the input voltage VIN is also greater than the negative threshold voltage VTL. At this time, the output voltage VOUT of the first comparator U1 of the comparison module 20 remains high. When the input voltage VIN decreases to less than the negative threshold voltage VTL, the output voltage VOUT of the first comparator U1 of the comparison module 20 changes and outputs a low level. This signal is transmitted to the control unit 11 or the controlled object. At the same time, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the positive threshold voltage VTH. Since the negative threshold voltage VTL is less than the positive threshold voltage VTH, the input voltage VIN is also less than the positive threshold voltage VTH. At this time, the output voltage VOUT of the first comparator U1 of the comparison module 20 is still low. When the input voltage VIN increases to a level greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 changes to a high level. At this time, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the negative threshold voltage VTL. This process repeats, thus ensuring that when the input voltage VIN is greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 is high, and when the input voltage VIN is less than the negative threshold voltage VTL, the output voltage VOUT of the first comparator U1 of the comparison module 20 is low. During circuit operation, the positive and negative threshold voltages can be adjusted online at any time via the control unit 11.

[0036] Figure 2 The diagram shows the output waveform of the hysteresis comparator circuit when a sine wave is input. The maximum value of the sine wave is greater than the positive threshold voltage VTH, and the minimum value is less than the negative threshold voltage VTL.

[0037] (2) When the non-inverting input terminal of the first comparator U1 of the comparison module 20 is connected to the threshold voltage Vref and the inverting input terminal is connected to the input signal VIN, such as Figure 3 As shown, the control unit 11 controls the voltage generation unit 12 to generate a positive threshold voltage VTH and a negative threshold voltage VTL. The output voltage VOUT of the first comparator U1 of the comparison module 20 is initially high. At this time, the threshold switching module 30 will switch to the positive threshold voltage VTH.

[0038] The input voltage VIN is input to the first comparator U1 of the comparison module 20. When the input voltage VIN is greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 is low. This signal is transmitted to the control unit 11 or the controlled object. At the same time, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the negative threshold voltage VTL. Since the positive threshold voltage VTH is greater than the negative threshold voltage VTL, the input voltage VIN is also greater than the negative threshold voltage VTL. At this time, the output voltage VOUT of the first comparator U1 of the comparison module 20 is still low. When the input voltage VIN decreases to less than the negative threshold voltage VTL, the output voltage VOUT of the first comparator U1 of the comparison module 20 jumps and outputs a high level. This signal is transmitted to the control unit 11 or the controlled object. At the same time, the threshold switching module 30 switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the positive threshold voltage VTH. Since the negative threshold voltage VTL is less than the positive threshold voltage VTH, the input voltage VIN is also less than the positive threshold voltage VTH. At this time, the output voltage VOUT of the first comparator U1 of the comparison module 20 is still high. When the input voltage VIN increases to a level greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 changes to a low level. The threshold switching module 30 then switches the threshold voltage Vref of the first comparator U1 of the comparison module 20 to the negative threshold voltage VTL. This process repeats, ensuring that when the input voltage VIN is greater than the positive threshold voltage VTH, the output voltage VOUT of the first comparator U1 of the comparison module 20 is low, and when the input voltage VIN is less than the negative threshold voltage VTL, the output voltage VOUT of the first comparator U1 of the comparison module 20 is high. During circuit operation, the positive and negative threshold voltages can be adjusted online at any time via the control unit 11.

[0039] Figure 4 The diagram shows the output waveform of the hysteresis comparator circuit when a sine wave is input, where the maximum value of the sine wave is greater than the positive threshold voltage VTH and the minimum value is less than the negative threshold voltage VTL.

[0040] In summary, the hysteresis comparator circuit of this application effectively solves the pain points of traditional hysteresis comparators, and can realize online adjustment of positive and negative threshold voltages, thereby adjusting the hysteresis range of the hysteresis comparator, making it suitable for applications with high accuracy requirements.

[0041] The above description is merely a specific embodiment of this utility model, but the protection scope of this utility model is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this utility model, and these modifications or substitutions should all be covered within the protection scope of this utility model. Therefore, the protection scope of this utility model should be determined by the scope of the claims.

Claims

1. A hysteresis comparison circuit, characterized by, include: A controllable threshold voltage module is used to generate an adjustable first threshold voltage and a second threshold voltage; The comparison module has a first input terminal connected to a threshold voltage, a second input terminal connected to an input voltage, and an output terminal outputting a target output voltage. It is used to change the target output voltage by comparing the magnitude of the input voltage with the threshold voltage. The threshold switching module has a first end connected to the first input end of the comparison module, a second end connected to the output end of the comparison module, and a third end connected to the output end of the controllable threshold voltage module. It is used to select the first threshold voltage or the second threshold voltage as the threshold voltage according to the target output voltage.

2. The hysteresis comparison circuit of claim 1, wherein, The controllable threshold voltage module includes a control unit and a voltage generation unit. The input terminal of the voltage generation unit is connected to the output terminal of the control unit, and the first output terminal or the second output terminal of the voltage generation unit is connected to the third terminal of the threshold switching module. The control unit controls the voltage generation unit to generate the first threshold voltage and the second threshold voltage, and the first output terminal and the second output terminal of the voltage generation unit respectively output the first threshold voltage and the second threshold voltage.

3. The hysteresis comparison circuit of claim 2, wherein, The input terminal of the control unit is connected to the output terminal of the comparison module, wherein the control unit adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit according to the target output voltage.

4. The hysteresis comparison circuit of claim 2, wherein, The control unit adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit through PWM wave generation.

5. The hysteresis comparison circuit of claim 2, wherein, The control unit adjusts the first threshold voltage and the second threshold voltage generated by the voltage generation unit through the DAC output.

6. The hysteresis comparison circuit of claim 2, wherein, The threshold switching module includes a driving unit and a switching unit. The first end of the switching unit is connected to the first input terminal of the comparison module, the second end is connected to the driving unit, and the third end is connected to the first output terminal or the second output terminal of the voltage generation unit. The driving unit is connected to the output terminal of the comparison module. The driving unit drives the third end of the switching unit to connect to the first output terminal or the second output terminal of the voltage generation unit according to the target output voltage.

7. The hysteresis comparison circuit of any one of claims 1-6, wherein, The comparison module includes a first comparator, the non-inverting input terminal of the first comparator is connected to the input voltage, the inverting input terminal is connected to the threshold voltage, and the output terminal outputs the target output voltage.

8. The hysteresis comparison circuit of claim 7, wherein, The target output voltage is initially at a low level. The first threshold voltage is greater than the second threshold voltage. The threshold switching module selects the first threshold voltage as the threshold voltage input to the first input terminal of the comparison module.

9. The hysteresis comparison circuit of any of claims 1-6, wherein, The comparison module includes a first comparator, the non-inverting input of which is connected to the threshold voltage, the inverting input of which is connected to the input voltage, and the target output voltage is output.

10. The hysteresis comparison circuit of claim 9, wherein, The target output voltage is initially at a high level. The first threshold voltage is greater than the second threshold voltage. The threshold switching module selects the first threshold voltage as the threshold voltage input to the first input terminal of the comparison module.