Comparator Hysteresis Calculator

User Count: 2564

What is a comparator? A comparator generates a binary signal after comparing two input voltage signals that indicate the larger voltage. The output will be higher If the positive input (non-inverting) input is greater than the negative input ( inverting ) the output will be higher. It will be lower if the non-inverting input voltage is lower than the inverting voltage.

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

Comparator Calculations! (Setting Hysteresis)

Types of a comparator:

The comparators are mainly divided into two categories inverting and non-inverting. That is decided by the terminal on which the voltage is applied. If it's applied on the inverting terminal we will confirm the non-inverting end of our reference voltage and the comparator will act as an inverting comparator. On the other hand, if the voltage is applied to its non-inverting voltage making the inverting terminal a reference voltage terminal the comparator will act as the non-inverting comparator. Diagrams for both types of comparators are given below.

 Comparator Hysteresis Calculator

Figure 1 Non-inverting comparator

 

Comparator Hysteresis Calculator 

Figure 2 Inverting comparator

How do we achieve a comparator?

By using an op amp without negative feedback we can make a comparator. Due to the high voltage gain, a very small difference in input voltage is resolved. The comparator can be improved to a great extent by adding features like internal references and hysteresis to it. In our article, we will discuss in detail about comparator as hysteresis.


Hysteresis:

A phenomenon in which the values of physical properties are lagging behind the changes causing it is known as hysteresis. A general example of it is when a magnetic induction is lagging behind the magnetizing force. Here magnetic induction (a physical property of an inductor) is lagging behind the change in effect (magnetic force) that causing the induction. This phenomenon can also be defined as a concept in physical science. The output signal of a system not only depends upon input signals but the history of past inputs of an output signal also plays a vital role in it. Since history affects the value of an internal state this concept is quite logical. The phenomenon of hysteresis occurs in ferroelectric and ferromagnetic materials, for example, when ferromagnetic materials become permanently magnetized they will remain magnetized even after removing the magnetic field. This clearly shows we cannot revert the magnetized ferromagnetic material to zero unless we apply external factors like a field in the opposite direction or heat. Applying an alternating magnetic field under these conditions will generate a loop known as a hysteresis loop (magnetic hysteresis). Hysteresis is considered an ideal stabilizing mechanism because of its predictability.

Comparator Hysteresis Calculator

Figure 3 diagram illustrating hysteresis

 

I. A comparator not equipped with hysteresis:

As we discussed earlier the sole purpose of a comparator is to compare two different input signal levels of a system. A simple example of this is distinguishing between a high temperature and a low temperature by a system equipped with a comparator. Multiple transitions could occur due to signal or noise variations at the comparison thresholds. Here hysteresis serves the purpose of setting lower and higher limits to eradicate the multiple transitions generated by the noise. A comparator not equipped with a hysteresis will use a voltage divider to set the voltage threshold. When the comparator compares the threshold voltage (Vth) with the input signal (Vin). Then at the inverting input end, we apply the comparator’s input signal so that the output will have an inverted polarity. The output will drive to a low logic or a negative supply in the case of Vin > Vth. On the other hand, it will drive to a high logic or positive supply when Vin < Vth. We can use this simple methodology to determine if the actual signal (e.g. temperature) is above a predetermined value. However, this method has adverse side effects in the fields of science, physics, and electronics like most other things. The most common issue faced is the input affected by the noise, A minor quantity of noise at the input end can trigger the output. That causes an unpredictable output.


II. A comparator with the hysteresis:

As mentioned above the comparator without hysteresis can be very unstable, even a small noise can cause an erratic output. The input signal transitions below and above multiple times when it reaches the approaches the threshold (Vth). This causes the transitions below and above in the output numerous times as well. The functionality issues caused by these erratic transitions are easily understandable.  For example, consider an input signal for critical temperature readings and a vital monitor for its output. And interpret this by a microcontroller, as we know that if consistent or accurate messages are not provided to the microcontroller by erratic output the system will suffer a critical failure. However, with a minor change to our comparator circuit, we can equip it with a hysteresis. The two different threshold voltages will be used by the hysteresis to prevent the multiple transitions introduced in the circuit. The input signal must surpass the upper threshold (VH) to transition low or below the lower threshold (VL) to transition high. Typically, we do not consider noise a factor when we are using a comparator with hysteresis until it exceeds the range of hysteresis. In this case, the comparator with hysteresis generates some kind of additional transitions.  Therefore we set the range of it wide enough so it can cancel the noise up to a larger range. In temperature sensors, various alarm systems, and motor controls we widely use a comparator with hysteresis and It provides a critical functionality. Without a comparator with hysteresis, we cannot achieve stable functionality. So hysteresis in a comparator assures the importance of functionality, which provides us with a positive feedback methodology.  


What's the role of hysteresis in a comparator?

Capacitive strays from output to input (in case of non-inverting input) even without actual feedback circuitry may cause the comparator circuit to become unstable. As well as coupling of output currents in grounds (the point where non-inverting input is normally connected) could also cause instability. Paying careful attention to grounding and layouts, and guarding high impedance nodes can help us to minimize the coupling effects. Latching is another method that could be helpful in this regard. However, all these methods are not accurate to some extent and still instability occurs after their measures. So the most effective solution to all these problems is introducing a hysteresis as positive feedback into our system. This hysteresis can separate down-going and up-going switching points in such a way that before the reverse transition can occur the input must undergo a significant reversal once a transition has started. Varying signals with a small amount of noise when processing slowly, multiple output transitions are produced through the comparator. Noisy signals are a must to occur in all kinds of applications mostly at the industrial level. The noise is amplified by the open loop gain as the signal crosses the threshold region, which causes the bouncing of output back and forth. This situation is not considered ideal in most of the applications and can be cured by introducing hysteresis in the comparator. The diagram below illustrates the noise causing multiple transitions in a signal

 

Comparator Hysteresis Calculator

Figure 4 Multiple Transitions caused by the noise

 

How to design a comparator with hysteresis?

By feeding the positive input a small fraction of the output voltage (that could be a lower or an upper limit of voltage) we can apply the hysteresis to our comparator. A polarity-sensitive offset is added by the voltage to the input that increases its threshold range. We decide whether we are going to use our chosen comparator as an inverting or inverting configuration.  Some types of comparators provide both positive and negative outputs, allowing us a variety of their installation in a system. We can introduce the hysteresis by connecting the tap of two resistor voltage dividers with the positive input between the reference source and the positive outputs. The resistance ratio determines the value of the output voltage feedback. This circuit design frees a direct connection of the input signal to the inverting input as illustrated in the figure below.


I. A comparator with dual supplies using an inverting input

As illustrated in the figure below the hysteresis with dual supplies is designed, As shown in the figure the signal is applied to the inverting input of the comparator. The output-to-input plot is also given in the figure which shows the vicinity of the switching point. R1 is mostly much lower than the R2. In case when R2 is infinite, we will not get any hysteresis, and switching of devices will be done at the Vref. The hysteresis is calculated by the resistance ratio (R1/R1+R2) and the output levels. By the attenuation ratio the R2/(R1+R2).

 

Comparator Hysteresis Calculator

Figure 5  A comparator with dual supplies using an inverting input

 

II.A comparator with dual supplies using a non-inverting input

On the other hand, the figure below illustrates the signal applied to the non-inverting input of the comparator circuit. As the input signal is slightly attenuated, the hysteresis added to the comparator will be slightly larger as compared to the inverting case.

 

Comparator Hysteresis Calculator

Figure 6   A comparator with dual supplies using a non-inverting input

 

Applications:

I. Analog to digital conversions

The comparator with hysteresis is considered effectively a one-bit analog to digital converters. The signal switches from low to high state when the signal reaches a given level.

II. Detection of Level:

Level Detection is also possible through the level detection. The hysteresis voltage should be taken into them when undertaking this application so that the circuit switches on a required voltage.

III. Line reception;

A data line during its running condition could pick up some noise into a logic gate, to ensure that a logic output level is only changed as the data changed is very necessary. And also it’s because of the spurious noise that was picked up.

IV. Noise Immunity:

Increasing the noise immunity of a circuit is another important application of comparators with hysteresis using only a single input threshold. The switching of output rapidly back and forth from noise alone is caused by with only one input threshold and a noisy input signal. A noisy comparator with a hysteresis input signal can cause only one switch in output value near one threshold. After that, it will move to the next threshold to do another switch.

We can understand it with the example of an amplified infrared photodiode. It can generate an electric signal, between its absolute lowest value and its highest value this signal switches frequently. From a smooth signal, this signal is low pass-filtered and rises and falls corresponding to the related amount of time for which the signal is off and on. Through the input of the comparator with hysteresis the filtered output passes. The output of the comparator with hysteresis only passes from low to high as a net effect, then it receives an infrared signal that excites the photodiode. This excitation exists longer than some known period. As soon as the hysteresis circuit is high, it only passes for a longer period than a similar known period after the photodiodes are excited by infrared rays. The photodiodes are likely to have spurious switching, that is caused by noise from the surrounding. The delay caused by the comparator with hysteresis makes sure that output only switches when a device is stimulated by the input


V. Comparator with hysteresis as an oscillator:

A bistable multivibrator is another useful application of the Comparator with hysteresis and it can be used to implement as a relaxation oscillator which is another type of multivibrator.  By connecting a single RC integrated circuit between the output and input of an inverting comparator with hysteresis we can achieve it. A continuous square wave as output will be generated whose frequency will depend on R and C values also the threshold points of the comparator with hysteresis. A circuit diagram of a comparator with hysteresis used as an oscillator is illustrated below.

Comparator Hysteresis Calculator

Figure 7 Comparator with hysteresis as an oscillator


ALSO SEE:All Online Conversion Calculators by Richard


Hot Products

Image

PartNo

Manufacturer

Category

Package

Description

Price

Quantity

Operation

BLM18PG121SN1D 0603 (1608 Metric)

MURATA - BLM18PG121SN1D - Ferrite Bead, 0603 [1608 Metric], 120 ohm, 2 A, BLM18P Series, 0.05 ohm, &#177; 25%

-

In stock : 284104

Add to RFQ List

TP3420AV309 20-LCC (J-Lead)

IC TELECOM INTERFACE 20PLCC

-

In stock : please inquire

Add to RFQ List

2920L185DR 2920 (7351 Metric), Concave

PTC RESET FUSE 33V 1.85A 2920

-

In stock : 6000

Add to RFQ List

19-217/R6C-AL1M2VY/3T 0603 (1608 Metric)

LED RED CLEAR 2SMD

$ 0.02

In stock : 4856

Add to Cart

MPZ2012S102AT000 0805 (2012 Metric)

TDK - MPZ2012S102AT000 - FERRITE BEAD, 0.15OHM, 1.5A, 0805

-

In stock : 41396

Add to RFQ List

MC33153P 8-DIP (0.300, 7.62mm)

IC DRIVER GATE SINGLE IGBT 8DIP

-

In stock : 640

Add to RFQ List

SE2537L-R 16-VFQFN Exposed Pad

RF Amplifier 5GHz Gain 30 dB 3.3Volt -10C 85C

-

In stock : 3620

Add to RFQ List

SKY81294-14-001 9-BGA, WLCSP

IC LED FLASH DVR 1.2V 9CSP

$ 0.51

In stock : 1428

Add to Cart

SKY65084-360LF 8-VFDFN Exposed Pad

IC AMP 1.5-2.4GHZ LN 8QFN

-

In stock : please inquire

Add to RFQ List

HMC588LC4BTR 24-TFQFN Exposed Pad

IC OSC VCO WIDEBAND 24SMD

-

In stock : 4160

Add to RFQ List

MC1458D 8-SOIC (0.154, 3.90mm Width)

IC OPAMP GP 2 CIRCUIT 8SOIC

$ 0.93

In stock : 53

Add to Cart

80HCPS1432CRM 576-BBGA, FCBGA

IC SER RAPIDIO SWITCH 576FCBGA

-

In stock : please inquire

Add to RFQ List

MAX16816ATJ 32-WFQFN Exposed Pad

IC, LED DRIVER, BUCK-BOOST, TQFN-32

-

In stock : please inquire

Add to RFQ List

DS21Q48N 144-BBGA

IC LIU E1/T1/J1 4X 5V LONG144BGA

-

In stock : please inquire

Add to RFQ List

ALT6702RM45Q7 -

IC RF AMP CELLULAR SMD

-

In stock : please inquire

Add to RFQ List

LQH2HPN4R7MGRL 1008 (2520 Metric)

Fixed Inductors 1008 4.7uH 1000mA /-20%

-

In stock : 1600

Add to RFQ List

VLS252012HBX-2R2M-1 1008 (2520 Metric)

FIXED IND 2.2UH 2.3A 102 MOHM

-

In stock : 15984

Add to RFQ List

GRM188R61A106KAALD 0603 (1608 Metric)

CAP CER 10UF 10V X5R 0603

$ 0.01

In stock : 717810

Add to Cart

GRM0335C1E102GA01D 0201 (0603 Metric)

CAP CERAMIC 0.001UF 25V C0G 2% P

$ 0.10

In stock : 928

Add to Cart

EEF-CS1E150R 2917 (7343 Metric)

Aluminum Organic Polymer Capacitors 15uF 25volt

$ 0.65

In stock : 64000

Add to Cart