28. July 2006
Comparator With Hysteresis(Schmitt-Trigger)

In some cases one needs a comparator with a hysteresis. This curcuit suggestion shows further the possibility of a inverting or non-inverting operation.

Komparator Mit Hysterese und Eingangsspannungsteilern
The ciruit above shows a typical comparator circuit with addional input voltage dividers.
On the left side are two voltage dividers. R4 and R5 divide the input voltage V1 and generate the voltage V3. R6 and R7 divide the input voltage V2 and generate V4.
With R3 and R2 the histeresis will be set, the use of R1 is only this of a current limiter to following circuits.
The maximum output voltage of this circuit depends on the supply voltage of the OP.
For the following observations all possible losses are neglegted.
Observation of an inverting Schmitt-Trigger
Komparator Mit Hysterese und Eingangsspannungsteilern

For the following observations the positive supply voltage is defined to 5 Volts, the negative supply voltage is defined to 0 Volt(supply voltage not shown in the figure).
R2
and R3 are defined to 10 kΩ. V3 will be set as reference voltage to a value of 2.5 V.

V3 is the reference voltage and defines when the comparator will switch. If the voltage V4 on the inverting input (−) sinks below the voltage V+ then the output voltage Va of the OP will raise to the value of the positive supply voltage. If the voltage V4 is higher than V+ then the output voltage will be the value of the negative supply voltage.

R2 causes a positive feedback.

Lets take a look on the following cases:

1st case: V4 is higher than V+
That leads to: the ouput of the OP has ground potential. So V+ can be calculated as follows:
.
V3 is 2.5 V. Thus V+=2.5 V*(10/20)=1.25 V.
For the comparator to switch  (when Va=5V), V4 needs to be less than V+, that means less than 1.25 V.

2nd case: V4 is less than V+
The output is on the level of the positve supply voltage(Va = 5 V). Va is greater than V3. The voltage divider consisting of R2 and R3 has an offset to the ground wich is the value of V3. That needs to be considered in the calculation. The voltage V+ is calculated as follows:

V+=V3+((Va−V3)*R3/(R2+R3))

V+=2.5 V+((5 V−2.5 V)*(10/20))=3.75 V. When the value of V4 is higher than that voltage the comparator switches.
The histeresis in this case is (3.75−1.25) V=2.5 V.
The comparator is symmetric to the voltage V3.Observation of a non-inverting Schmitt-Trigger

1st possibility

Komparator falsch invertierender Betrieb

If you swap the input terminals of the OP, thus connecting V+ with the inverting input (−) of the OP and V4 with the non-inverting input (+), the following behaviour occurs:
V+ is now connected to the inverting input (−) of the OP.

1st case: V4 is greater than V+

That leads to: The voltage on (+) is higher than the voltage on (−), the output has therefore the value of the positive supply voltage.(Va=+5 V). V+ is calculated as in the case 2 above: V+=3.75 V. For the comparator to switch the voltage on (+) must be lower than the voltage on (−), that means V4 must be below 3.75 V.

2nd case: V4 is less than V+

That leads to: The Voltage on (+) is lower than the voltage on (−), because of that the output is on ground level(Va=0V). The voltage  V+ is calculated as in the 1st case of the inverting Schmitt-Trigger: V+=1.25 V. For the comparator to switch the voltage on (+) must be higher than V+. If V4 is higher than 1.25 V the compatator will switch.
Conclusion:
Let’s look on the requirements for the switch in case 1 and case 2: for the ouput voltage to go low (Va=0V) V4 must be less than 3.75 V. For Va=5 V, V4 must be higher than 1.25 V.

Let’s pretend V4 is 2.5 V.
Then  both contitions are true. That may lead to a constant switching of the output of the OP between  0 V und 5 V: We have created an  oszillator.
Obviosly this approach does not work.

What additional possibilities are there?

2. possibility

Komparator Mit Hysterese

We connect the reference voltage with the inverting input (−) of the OP and connect the voltage to be monitored on V3.
Let’s take a look on that 2nd possibility and use the original circuit. On V4 is now a voltage of 2.5 V. On V3 we connect a variable voltage that can change between 0 V and 5 V.

What happens now?
As long as V4 is higher than  V+, then Va=0 V.

With the given values for the devices we can calculate what value has V+ depending on V3.

Let’s have a look on the both possible cases.

1st case: V4 is higher than V+
Va=0 V. For the comparator to switch V+ must be higher than V4 werden. V4 is 2.5 V. V+ must be higher than 2.5 V.

The voltage divider R3/R2 is now between V3 and 0 V. The value of R2 is 10 kΩ, the value of R3 too. Ohm’s Law dictates: V+/R2 = V3/(R2+R3) thus V3 = V+*(R2+R3)/R2 = 2,5 V*(20)/10 = 5 V.

If V3 is more than 5 V the comparator will switch.

2nd case: V4 is less than V+
Va=5 V. For the comparator to switch V+ must be less than V4 werden. V4=2,5 V.

The voltage divider R2/R3 is now between 5 V and V3. V+ = V3 + (5 V−V3) * R3/(R2+R3) = V3 + (5 V −V3) * 0,5.

After conversion of this equation we get V3 = 2*V+ −5 V = 2*2,5 V−5 V = 0 V.

With the given values for R2 and R3 this comparator is not usable, because in case 1 V3 needs to be higher than 5 V and in case 2 less than 0 V.

But we excluded these conditions at the start of our observations.

Conclusion:
The resistors R2 and R3 need other values.

In the 1st case we want to achieve that V+ is higher than 2.5 V when V3 is less than 5 V.

We define that V+ shall be 2.5 V when V3 = 4 V.

It makes no sense to change both resistors.

We let R2=10 kΩ. V3/(R2+R3)=V+/R2. Thus R3 = (V3/V+) * R2−R2 = (4/2,5) * 10 kΩ−10 kΩ = 6 kΩ.

For the 2nd case that leads to:

V+ = V3 + (Va−V3) * R3/(R2+R3).

Converted for V3:

V3 = ((R2 * V+) − R3*(Va− V+))/R2 =((10kΩ*2,5 V)−6 kΩ*(2,5 V))/10 kΩ =(2,5 − 1,5) V =1 V.

The calculations shows that this approach brings the desired success.

It is necessary that the resistors R2 and R3 are not of the same value.

R3 needs to be less than R2.

The exact values depend on the desired threshold and on the desired hysteresis.

The components for the non-inverting Schmitt-Trigger need other values than for the inverting if you want to achieve the same hysteresis.

For comparision we put the values of R2 and R3 for the non-inverting Schmitt-Trigger into the formulas for the inverting Schmitt-Trigger.

With that values the threshold voltages of V4 are 1.56 V and 3.44 V.
The hyteresis with these values of  R2 and R3 in this case is 1.88 V for the inverting and 4 V for the non-inverting Schmitt-Trigger.



© 2006 — 2019 Transistorgrab.de


2 Kommentare »

  1. schönschön

    Kommentar by Dodod