Comparator Hysteresis Calculator

This Online Hysteresis Comparator Calculator is able to compute the resistivity R2/R1 and calculate the reference voltage and resistivity, the reference hysteresis curve. You just need to enter the positive supply voltage and negative supply voltage of this comparator circuit and click the "Compute" button. And then you will get the values of High Threshold Voltage (VTH), Low Threshold Voltage (VTL), Ratio of R1/R2 Resistors and reference voltage(VR).

Input: (Note: Use minus sign "-" for negative voltages.)
Positive Supply Voltage: V
Negative Supply Voltage: V
Results:

Vth (High Threshold Voltage):

V

R2/R1 (Ratio of Resistors):

Vtl (Low Threshold Voltage):

V

Vr (Reference Voltage):

V
Comparator Circuit Schematic
Introduction

Comparators are a fundamental building block of electronics. Let’s discuss how to use a comparator, their ideal and nonideal characteristics, and walk through some calculations to set thresholds and hysteresis.  This circuit is how our Temperature Monitor, Seth, will accurately and quickly respond to overtemperature faults.

Comparator Calculations! (Setting Hysteresis)

Introduction of Comparator Hysteresis Calculator

Comparator with hysteresis calculator is online electronic calculation tool for electrical designers. With this Comparator Calculator, you can calculate values of Vth( High Threshold Voltage) and Vtl ( Low Threshold Voltage) for your Comparator Hysteresis. Meanwhile, this online calculator will help you to get the Vr (Rerence Voltage) and Ratio of R2/R1 Resistors Values. In a word, you can design the Comparator with Hysteresis with the help of this Hysteresis Comparator Calculator online. And the below, I will show you some information about Hysteresis and Comparator circuits. For example, What is Hysteresis and What is a Comparator? So keep reading.

Comparator Hysteresis Definition

A comparator having hysteretic loopback transmission properties is known as a hysteresis comparator. An inverting input hysteresis comparator with a double threshold is created using a positive feedback network based on an inverting input single threshold voltage comparator. The threshold voltage of this comparator fluctuates with the output voltage due to feedback.

At the non-inverting input, resistors R1 and R2 supply a reference voltage, while the inverting input receives the input voltage Vin. Due to the open drain outputs of most comparators, a pull-up resistor Rp is required at the output. Hysteresis is provided by the resistor Rh. When the input voltage is lower than the voltage at the node where R1, R2, and Rh meet, the comparator's output will be high.

This voltage would be set in the absence of Rh by the divider produced by R1 and R2. When the input voltage is very near to this level, the comparator's output might bounce between states, especially if the input or supply voltage is noisy. Not very appealing. The answer is to use Rh to introduce hysteresis. When Vin is low, the comparator's open drain has a high impedance, and Rp pulls the output high. Rp and Rh are now essentially in parallel with R1, and the voltage at the non-inverting input will be somewhat greater than it was before hysteresis was applied. The comparator output is now pushed low when Vin is high. Now that Rh is essentially in parallel with R2, the voltage at the non-inverting input is somewhat lower than it would be without hysteresis.

Comparator Hysteresis Example

A comparator is an electrical circuit that compares a signal's voltage to a reference value. The comparator's output swings to the top rail if the signal voltage is larger than the reference, and to the bottom rail if the signal voltage is less than the reference. Comparators are used for converting square digital signals from analog signals.

Hysteresis is a common feature in comparators that helps to remove noise and glitches. A comparator with hysteresis has two voltage thresholds: one high when the output is low and one low when the output is high.To have the output swing high if the input voltage is currently low, it must swing above the high threshold, which is greater than the reference voltage. In order for the output to swing to the low rail while the output is high, the input voltage must swing below the low threshold.

The LM339 comparator, which has four comparators in a 14-pin box, is a common comparator. There are two comparators in the LM393. The TL331 only has one comparator. Internal hysteresis, for example, desensitizes the MAX9031, MAX9021, and LTC6702 to input noise. Hysteresis replaces one switching point with two: one for increasing voltages and one for decreasing voltages. The hysteresis voltage is equal to the difference between the higher-level trip value (VTRIP+) and the lower-level trip value (VTRIP-) (VHYST). Hysteresis control is provided by a dedicated hysteresis pin on some comparators, such as the ADCMP341 and MAX931, LTC1540, LMP7300, MAX971.

Hysteresis may be built into a comparator circuit by connecting the output to the Comparator's positive wire via a resistor.

When working with comparators, calculating the resistor values for a given high and low threshold voltage is a frequent engineering task.

Applications of Comparator with Hysteresis

In comparator circuits, hysteresis is frequently used to reduce output noise and undesireable output transitions caused by slowly fluctuating or noisy input signals. When the input is near the switching point, a typical comparator circuit with a single switching point (i.e. no hysteresis) would "chatter" with superfluous output transitions. Schmitt triggers can be used to silence the noise. Schmitt triggers are also used to debounce mechanical switch outputs and to make relaxation oscillators.

Comparator Definition

Comparator ICs compare the voltages at their inputs and output a voltage that represents the sign of the net difference. The output of a comparator circuit swings to a value indicating logic 1 if the differential input voltage is higher than the input offset voltage (VOS) plus the needed overdrive. A comparator may be regarded of as a one-bit analog-to-digital converter in practice. Comparator Circuits are frequently employed in level detection, on-off controls, clock-recovery circuits, window detectors, and Schmitt triggers, in addition to being fundamental components of A/D converters.

Comparator Explained (Inverting Comparator, Non-Inverting Comparator and Window Comparator)

What is a Comparator

Depending on whether the input is migrating from low to high or high to low, a comparator with hysteresis exhibits a nonlinear response with various switching threshold voltages. To create the nonlinear response, the circuit uses positive feedback. The high threshold voltage is the input voltage that transitions from low to high. Similarly, the low threshold voltage is the input voltage for the high-to-low transition. The output of this online comparator with hysteresis calculator can swing from the positive supply rail to the negative supply rail.

Op-amp Voltage Comparator

An operational amplifier (op-amp) has a very high gain and a well-balanced difference input. This is similar to the features of comparators and can be used to replace them in low-performance situations.

A comparator circuit compares two voltages and produces a 1 (the positive side voltage) or a 0 (the negative side voltage) to indicate which is greater. Comparators are frequently used to verify whether an input has achieved a predefined value, for example. A comparator is often implemented with a specialized comparator IC, however op-amps can also be utilized. The symbols used in both comparator and op-amp diagrams are the same.

How to Make a Comparator Circuit

As illustrated in the below diagram, one popular way for making a comparator circuit with hysteresis is to employ an operational amplifier with positive feedback from the output to the input. The resistor ration(R2/R1), the reference voltage(Vref), and the positive(Vp) and negative(Vn) supply voltages all affect the hysteresis of this Comparator circuit.

Equations of Comparator Circuits

The Voltage Comparator Hysteresis design equations is as the following.
Vth=Vref*(1+R)/R-Vn*1/R
Vtl=Vref*(1+R)/R-Vp*1/R
Vref=Vn+(Vth-Vn)*R/(1+R)
R=(Vp-Vn)/(Vth-Vtl)
Where,
Vth = High threshold voltage
Vref = Reference voltage
Vn = Vegative supply voltage
Vtl = Low threshold voltage
Vp = Positive supply voltage
R = Resistance Ratio (R2/R1)

How Does A Comparator Work

In general, the comparator is used in electronics to compare two voltages or currents that are provided at the comparator's two inputs. That is, it takes two input voltages, compares them, and outputs a differential output voltage that can be either high or low. When an arbitrarily variable input signal hits the reference level or a predetermined threshold level, the comparator detects it. Different components, such as diodes, transistors, and op-amps, can be used to create the comparator. Many electrical applications employ comparators, which may be used to control logic circuits.

We can recognize the comparator symbol as the Op-Amp (Operational Amplifier) sign if we look closely, so how does this comparator vary from an op-amp? Although an ordinary Op-Amp could be used as the Comparators (Operational Amplifiers such as LM324, LM358, and LM741 cannot be used directly in voltage comparator circuits), an ordinary Op-Amp could be used as the Comparators (Operational Amplifiers such as LM324, LM358, and LM741 cannot be used directly in voltage comparator circuits).

When a diode or transistor is added to the amplifier's output, it may be used as a voltage comparator, although the genuine comparator is designed to have a faster switching time than the multifunctional Op-Amps. As a result, we can say that the comparator is a modified version of the Op-Amps that is developed specifically for digital output.

Related Online Calculation Tools

Frequently Asked Questions

What does the Comparator Hysteresis Calculator do?

This tool calculates key parameters for designing a comparator circuit with hysteresis, including the high threshold voltage (VTH), low threshold voltage (VTL), resistor ratio (R2/R1), and reference voltage (VR). By inputting the positive and negative supply voltages, users can generate these values to ensure stable switching behavior in noisy environments.

How do I input negative supply voltages?

For negative supply voltages, use the minus sign ("-") before the numerical value (e.g., "-5V"). The calculator supports both positive and negative rails to accommodate various circuit configurations. Ensure the positive voltage is higher than the negative voltage for valid results.

Why is hysteresis important in comparator circuits?

Hysteresis prevents unwanted output oscillations ("chatter") caused by noise or slow input signal transitions. By creating two distinct thresholds (VTH and VTL), it ensures the output switches cleanly between states, avoiding erratic behavior in applications like temperature monitoring or mechanical switch debouncing.

What are common applications of comparators with hysteresis?

Noise filtering: Stabilizing signals in environments with electrical interference. Debouncing switches: Eliminating false triggers in mechanical systems. Relaxation oscillators: Generating stable square-wave outputs. Threshold detection: Monitoring critical levels in temperature or voltage sensors.
Hot products

ImagePart NumberManufacturerCategoryPackage/CaseDescriptionPriceQuantityBuy/Quote
MMBT2222ALT1GMMBT2222ALT1GON SemiconductorTransistors - Bipolar (BJT) - SingleTO-236-3, SC-59, SOT-23-3TRANS NPN 40V 0.6A SOT23-

In stock : 682665

Minimum: 1

ATMEGA8515L-8AUATMEGA8515L-8AUMicrochip TechnologyEmbedded - Microcontrollers44-TQFPMCU 8-bit ATmega AVR RISC 8KB Flash 3.3V/5V 44-Pin TQFP-

In stock : 1

Minimum: 1

STM32F103RBT6STM32F103RBT6STMicroelectronicsEmbedded - Microcontrollers64-LQFPIC MCU 32BIT 128KB FLASH 64LQFP-

In stock : 7681

Minimum: 1

ATMEGA32A-AUATMEGA32A-AUMicrochip TechnologyEmbedded - Microcontrollers44-TQFPMCU 8-Bit ATmega AVR RISC 32KB Flash 3.3V/5V 44-Pin TQFP-

In stock : 16000

Minimum: 1

ATXMEGA128A1U-AUATXMEGA128A1U-AUMicrochip TechnologyEmbedded - Microcontrollers100-TQFPIC MCU 16BIT 128KB FLASH 100TQFP-

In stock : 1480

Minimum: 1

STM32F407VET6STM32F407VET6STMicroelectronicsEmbedded - Microcontrollers100-LQFPMCU 32-bit STM32F ARM Cortex M4F RISC 512KB Flash 2.5V/3.3V 100-Pin LQFP Tray-

In stock : 6280

Minimum: 1

STM32F405RGT6STM32F405RGT6STMicroelectronicsEmbedded - Microcontrollers64-LQFPMCU 32-bit STM32F ARM Cortex M4F RISC 1024KB Flash 2.5V/3.3V 64-Pin LQFP Tray-

In stock : 28349

Minimum: 1

STM32F103VBT6STM32F103VBT6STMicroelectronicsEmbedded - Microcontrollers100-LQFPMCU 32-bit STM32F1 ARM Cortex M3 RISC 128KB Flash 2.5V/3.3V 100-Pin LQFP Tray-

In stock : 4951

Minimum: 1

PIC18F46K20-I/PTPIC18F46K20-I/PTMicrochip TechnologyEmbedded - Microcontrollers44-TQFPIC MCU 8BIT 64KB FLASH 44TQFP-

In stock

Minimum: 1

STM8S003F3U6TRSTM8S003F3U6TRSTMicroelectronicsEmbedded - Microcontrollers20-UFQFNSTMICROELECTRONICS - STM8S003F3U6TR - MCU-

In stock : 150000

Minimum: 1

PIC16F883-I/SSPIC16F883-I/SSMicrochip TechnologyEmbedded - Microcontrollers28-SSOP (0.209, 5.30mm Width)8-bit Microcontrollers - MCU 7KB Flash 256 RAM 25 I/O-

In stock : 282

Minimum: 1

IRLR7843TRPBFIRLR7843TRPBFInfineon TechnologiesTransistors - FETs, MOSFETs - SingleTO-252-3, DPak (2 Leads + Tab), SC-63MOSFET N-CH 30V 161A DPAK-

In stock : 1124

Minimum: 1

STM32F427VIT6STM32F427VIT6STMicroelectronicsEmbedded - Microcontrollers100-LQFPARM Microcontrollers - MCU 32B ARM Cortex-M4 2Mb Flash 168MHz CPU-

In stock : 7506

Minimum: 1

NTA4153NT1GNTA4153NT1GON SemiconductorTransistors - FETs, MOSFETs - SingleSC-75, SOT-416MOSFET N-CH 20V 915MA SOT-416-

In stock : 382200

Minimum: 1

STM32F103RET6STM32F103RET6STMicroelectronicsEmbedded - Microcontrollers64-LQFPMCU 32-bit STM32F1 ARM Cortex M3 RISC 512KB Flash 2.5V/3.3V 64-Pin LQFP Tray-

In stock : 12380

Minimum: 1

PIC16F877-20I/PTPIC16F877-20I/PTMicrochip TechnologyEmbedded - Microcontrollers44-TQFPIC MCU 8BIT 14KB FLASH 44TQFP-

In stock : 903

Minimum: 1

LAN8720A-CP-TRLAN8720A-CP-TRMicrochip TechnologyInterface - Drivers, Receivers, Transceivers24-VFQFN Exposed PadIC TXRX ETHERNET 24QFN-

In stock : 4970

Minimum: 1

RB521S30T1GRB521S30T1GON SemiconductorDiodes - Rectifiers - SingleSC-79, SOD-523DIODE SCHOTTKY 30V 200MA SOD523-

In stock : 120000

Minimum: 1

PIC18F4685-I/PTPIC18F4685-I/PTMicrochip TechnologyEmbedded - Microcontrollers44-TQFPIC MCU 8BIT 96KB FLASH 44TQFP-

In stock : 4850

Minimum: 1

BLM18PG121SN1DBLM18PG121SN1DMurata ElectronicsFerrite Beads and Chips0603 (1608 Metric)MURATA - BLM18PG121SN1D - Ferrite Bead-

In stock : 355131

Minimum: 1