A comparator with hysteresis question.

Thread Starter

bitrex

Joined Dec 13, 2009
79
I have seen in some positive feedback comparator circuits used in the non-inverting mode a resistor connected between the non-inverting input and Vcc, in addition to the input resistor and feedback resistor. I'm wondering why this arrangement is used and how it changes the threshold equations?
 

Audioguru

Joined Dec 20, 2007
11,248
The hysteresis provides by positive feedback makes the output switch states very quickly with a snap action. The switching threshold voltages are a little apart.

A comparator without hysteresis usually oscillates when its input voltages are near the threshold voltage.
 

Thread Starter

bitrex

Joined Dec 13, 2009
79
Thank you for your reply. Most non-inverting op-amp comparators I've seen simply consist of a 2 resistor feedback network between the output and the non-inverting input. I understand how the system works in this configuration - what I'm wondering is why in some circuits there is an additional resistor between the non-inverting input and the supply.
 

Wendy

Joined Mar 24, 2008
23,421
Comparators as a class tend to use open collector outputs, they can take the current to ground, but they have to way to connect their output to the positive power supply. This means they must have a pull up resistor or equivalent.

Look up the data sheet for a LM393 (dual comparitor) or LM339 (quad) and you will see what I mean.
 

Ron H

Joined Apr 14, 2005
7,063
Thank you for your reply. Most non-inverting op-amp comparators I've seen simply consist of a 2 resistor feedback network between the output and the non-inverting input. I understand how the system works in this configuration - what I'm wondering is why in some circuits there is an additional resistor between the non-inverting input and the supply.
The resistor from vcc to the noninverting input and the resistor from the noninverting input to ground form a voltage divider which sets the switching threshold. The resistor from the output to the noninverting input provides positive feedback. See Audioguru's comments.
 

Thread Starter

bitrex

Joined Dec 13, 2009
79
I think a picture would help me clarify my question, so I drew one up...:D



The top comparator is the schmitt trigger circuit I am familiar with. The bottom circuit is the one I've seen in a design - my guess is that it's arranged this way because the designer is using a single supply op amp and wants to shift the threshold voltages but can't use the negative input to apply a reference voltage? To find the triggering threshold one could write by superposition \(\frac{Vcc}{2} = Vin*\frac{R3}{R3+R4||R5} + Vcc*\frac{R4}{R4+R3||R5} + Vo*\frac{R5}{R5+R4||R3} \) and solve that for Vin when Vo = Vcc and 0. Does that seem correct?
 

SgtWookie

Joined Jul 17, 2007
22,230
I'd rather see the original circuit before commenting.

Note that showing a GND symbol as Vcc/2 is confusing. The idea of schematics is to eliminate ambiguity. Ground by definition is a 0v reference potential. It cannot be both 0v and Vcc/2. If you wish to show a reference to Vcc/2, then show a resistive divider between Vcc and GND, where both resistors are equal, or show a voltage source that is 1/2 the value of Vcc - but don't label ground as Vcc/2, as that is illogical.

It is preferable to attach images directly on this site, rather than to link to external sites.

You can do this by using the "Go Advanced" button below the reply box, then "Manage Attachments" to obtain a pop-up dialog (ensure popups are permitted for this site) to attach your images. .png format images are preferred, as .jpg images are lossy and appear fuzzy.

This is your image:
 

Attachments

Last edited:

Thread Starter

bitrex

Joined Dec 13, 2009
79
I'd rather see the original circuit before commenting.
It's in a book, not online, and it's also part of a much larger circuit. I thought I had represented a large enough portion of the schematic to represent the functional unit in question. I don't have a scanner available here at the moment so if it isn't enough to analyze properly please let me know what needs clarification and I'll see what I can do.

Note that showing a GND symbol as Vcc/2 is confusing. The idea of schematics is to eliminate ambiguity. Ground by definition is a 0v reference potential. It cannot be both 0v and Vcc/2. If you wish to show a reference to Vcc/2, then show a resistive divider between Vcc and GND, where both resistors are equal, or show a voltage source that is 1/2 the value of Vcc - but don't label ground as Vcc/2, as that is illogical.
Ok.

It is preferable to attach images directly on this site, rather than to link to external sites.

You can do this by using the "Go Advanced" button below the reply box, then "Manage Attachments" to obtain a pop-up dialog (ensure popups are permitted for this site) to attach your images. .png format images are preferred, as .jpg images are lossy and appear fuzzy.
I've been told by members of other sites that use the same discussion system that they prefer not to download untrusted attachments and would rather have website links instead. However, if attachments is the way it's done here then that's the way I'll do it from now on.
 

thyristor

Joined Dec 27, 2009
94
Note that showing a GND symbol as Vcc/2 is confusing. The idea of schematics is to eliminate ambiguity. Ground by definition is a 0v reference potential. It cannot be both 0v and Vcc/2. If you wish to show a reference to Vcc/2, then show a resistive divider between Vcc and GND, where both resistors are equal, or show a voltage source that is 1/2 the value of Vcc - but don't label ground as Vcc/2, as that is illogical.
On the contrary..... in the absence of any voltage rails shown, then labelling the reference point as Vcc/2 removes any ambiguity as to what is the reference value. So we know that "0" is Vcc/2 and not the negative side of Vcc. It also precludes the necessity to show voltage rails and split rail resistors which would just clutter up the diagram.

As an analogy, I notice you often make English spelling and grammatical mistakes in your posts but I don't pick you up on them because the meaning is still (so far) unambiguous. :)
 
Last edited:

thyristor

Joined Dec 27, 2009
94
I think a picture would help me clarify my question, so I drew one up...:D



The top comparator is the schmitt trigger circuit I am familiar with. The bottom circuit is the one I've seen in a design - my guess is that it's arranged this way because the designer is using a single supply op amp and wants to shift the threshold voltages but can't use the negative input to apply a reference voltage? To find the triggering threshold one could write by superposition \(\frac{Vcc}{2} = Vin*\frac{R3}{R3+R4||R5} + Vcc*\frac{R4}{R4+R3||R5} + Vo*\frac{R5}{R5+R4||R3} \) and solve that for Vin when Vo = Vcc and 0. Does that seem correct?
I think they are using the additional resistor to produce non-symmetrical switching points. It does make the algebra somewhat more complex though.
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
I think a picture would help me clarify my question, so I drew one up...:D



The top comparator is the schmitt trigger circuit I am familiar with. The bottom circuit is the one I've seen in a design - my guess is that it's arranged this way because the designer is using a single supply op amp and wants to shift the threshold voltages but can't use the negative input to apply a reference voltage? To find the triggering threshold one could write by superposition \(\frac{Vcc}{2} = Vin*\frac{R3}{R3+R4||R5} + Vcc*\frac{R4}{R4+R3||R5} + Vo*\frac{R5}{R5+R4||R3} \) and solve that for Vin when Vo = Vcc and 0. Does that seem correct?
No, that doesn't seem correct.

\(\frac{Vcc}{2} = Vin*\frac{R4||R5}{R3+R4||R5} + Vcc*\frac{R3||R5}{R4+R3||R5} + Vo*\frac{R4||R3}{R5+R4||R3} \)

The difference between the two thresholds is the hysteresis.
 
Last edited:
Top