Author Topic: Stability of comparator compared to schmitt trigger  (Read 4810 times)

0 Members and 2 Guests are viewing this topic.

Offline TrondTopic starter

  • Newbie
  • Posts: 2
  • Country: gb
Stability of comparator compared to schmitt trigger
« on: November 12, 2016, 06:25:36 am »
Hi there,

Before I ask my actual question: I'm not an EE. Please forgive me for probably butchering EE technical terms. I'm trying my very best to avoid it.

So I've build this comparator circuit with a feedback resistor for hysteresis:



I do understand, that an real world opamp (or comparator) does have a non-zero input offset voltage. So the voltage that's required on the input to make the output change state might be different between two different comparator types, two different comparators of the same type or even vary with environmental influences such as temperature. (Also, I'm writing 'change state' which is probably incorrect, since the output doesn't have two discrete states but just amplifies the voltage differential and I do realize that a real-world opamp does not have infinite gain, but 'change state' is the best explanation I can give).
The question is: If there's an output transition at a given time t0 and another ouput transition later at t1, how different could the input voltages at t0 compared to t1 have been (assumed that the environmental conditions such as temperature, reference voltage, actual resistance of the individual resistors etc. are the same). I think that is what an EE calls stability. Is a comparator (or opamp) in  this case significantly different from a schmitt trigger (real-world jellybean devices, such as the 74hc14 or so).

I'm asking because an EE confused the hell out of me by saying an opamp would always be infinitely better than a schmitt trigger is this situation. Keep in mind, that I'm not interested in the actual input voltage that makes the output change state, as long as it's the same input voltage at t0 and t1, so as far as I understand, input offset voltage should not be an issue as long at it is a constant. Also, when I ask EEs they usually ask me about SNR and input frequencies, so let's assume no noise and a frequency of maybe 1 Hz.

I'm not trying to start a super theoretical discussion about opamps, but usually when I ask EEs these type of questions they just hit me back with a ton of technical terms and I'm trying my best to ask a question that's as unambiguous as possible.

Thank you for taking the time to read my question. Any pointers (also to what I have to look for in a datasheet) are greatly appreciated.

Cheers!
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Stability of comparator compared to schmitt trigger
« Reply #1 on: November 12, 2016, 06:57:08 am »
as if Dave heard you, he just made a video for that! Basically your circuit  and a schmitt trigger logic input are the same. your circuit has some advantages though:
- you can adjust both voltages to your need by changing the resistor values
- the voltages are much more accurate than those of a logic schmitt trigger

Probably that's what your EE means.

Make sure you use a comparator with rail-to-rail push-pull output. opamp also works, but limits speed
 most of them don't like driving into saturation, which is what do you here deliberately.
We Are The Watt - Resistance Is Futile!
 

Offline TrondTopic starter

  • Newbie
  • Posts: 2
  • Country: gb
Re: Stability of comparator compared to schmitt trigger
« Reply #2 on: November 12, 2016, 07:10:05 am »
Hey tatus,

Thanks for your reply.
I get that I can adjust the actual hysteresis with a comparator (compared to a schmitt trigger where I'm stuck with the internal hysteresis of the device) and also that the actual voltage where the output changes states is more predictable. But that's just precision, which doesn't matter in this context. As long as the comparator (or schmitt trigger) gives me the same output for two identical inputs (no matter what the actual input voltage is and how far off it is from the 2.5V one would expect with the circuit above) I'm happy.
Are the input offset voltage and the gain of a comparator (and other parameters that might influence the actual switching point of the output) constant if the environmental conditions don't change? I guess in the real world the reference would have a much greater effect than the stability of the input offset voltage, right?
I guess the temperature stability of a comparator is usually better than that of a schmitt trigger? Usually, a schmitt trigger doesn't specify temperature drift in the datasheet so I guess it's worse than the 4µV/C that I've seen from comparators that are just a couple of pennies.

Cheer!
 

Offline tatus1969

  • Super Contributor
  • ***
  • Posts: 1273
  • Country: de
  • Resistance is futile - We Are The Watt.
    • keenlab
Re: Stability of comparator compared to schmitt trigger
« Reply #3 on: November 12, 2016, 07:37:14 am »
for the comparator based schmitt trigger, you can choose components by required offset and switching speed, just do your tradeoff between them and cost. you can go into the microvolts range if you need. The same holds for the temperature coefficient. Not true for the logic gate schmitt. High temp coeff, high production spread. The hysteresis is reasonably defined, but the mid voltage can vary a lot. If you look in the satasheet, you'll mostly find only typical values, they don't tell you the spread at all. That is because these inputs are meant to be fed by other logic signals, and these normally have enough voltage span to safely cross the hysteresis region.

Maybe I haven't got the point of your question yet, all I can say that both circuits are schmitt triggers and behave in the same way, timing wise.
We Are The Watt - Resistance Is Futile!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: Stability of comparator compared to schmitt trigger
« Reply #4 on: November 12, 2016, 10:31:21 am »
The differential pair used at the input of an operational amplifier or comparator and its biasing arrangement make its offset voltage much more stable than the single ended design found in a logic gate Schmitt trigger.  The operational amplifier or comparator also has PSRR and CMRR (power supply rejection and common mode rejection) which a common Schmitt trigger lacks; the power supply pins are effectively additional inputs.

The photograph below shows jitter in a TTL gate caused by millivolts of modulation of the power supply voltage because of its lack of PSRR.  A comparator would show insignificant or at least better jitter in the same circuit.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16272
  • Country: za
Re: Stability of comparator compared to schmitt trigger
« Reply #5 on: November 12, 2016, 02:58:39 pm »
Be aware as well that many comparators and all opamps have a limit on the differential voltage you can apply to the inputs, and also might have different CMRR ranges for the inputs. Some behave badly when you exceed these limits, either by latching up, crowbarring the supply in some cases, or by having an output that slams to one rail or the other, often not the right one as internal nodes saturate. Check always that your input voltages and feedback voltages do not hit these limits.

Also remember that many opamps and comparators cannot do a rail to rail swing on the output voltage, and have limits there that will affect threshold levels. The LM311 especially has an ouptut that is a NPN transistor with both collector and emitter brought out to pins, but the internal drive has a very limited drive ability, so you cannot use it as a buffer, but must use it as a saturated switch to ground. Many also have back to back diodes as protection for the internal transistors ( especially true of JFET opamps)  which are either regular diodes or zener diodes, so you can have a very high current flow into or out of the input pins when you exceed common mode range. The 741 for example, while it will run near rail to rail on the inputs with +- 15V supplies, has a differential voltage limit of around 6V as the internal long tailed pairs will break down at around 7V difference, and will be severely degraded if this is done for long periods.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16545
  • Country: us
  • DavidH
Re: Stability of comparator compared to schmitt trigger
« Reply #6 on: November 12, 2016, 06:59:28 pm »
Be aware as well that many comparators and all opamps have a limit on the differential voltage you can apply to the inputs, and also might have different CMRR ranges for the inputs.

With the exception of some NPN input operational amplifiers like precision and video amplifiers, this is not common for comparators or operational amplifiers within their supply limits.  I have never seen either with different CMRR ranges for their inputs.

Quote
Some behave badly when you exceed these limits, either by latching up, crowbarring the supply in some cases, or by having an output that slams to one rail or the other, often not the right one as internal nodes saturate. Check always that your input voltages and feedback voltages do not hit these limits.

Latchup except from phase reversal is unheard of today.  Phase reversal is not as common as it used to be because improved and modern parts usually include protection from this.  I have only seen ESD cause crowbarring.

Quote
The LM311 especially has an output that is a NPN transistor with both collector and emitter brought out to pins, but the internal drive has a very limited drive ability, so you cannot use it as a buffer, but must use it as a saturated switch to ground.

The LM311 transfer characteristic graph which is mislabeled on some datasheets shows symmetrical 50mA output capability.  The uncommitted NPN output of course has a lower saturation to ground than to supply.  The saturation voltage specifications are given at different currents, 50mA for a high output and 6mA for a low output, because those will be the typical output currents in high side (not logic) and low side (logic) applications.

Quote
Many also have back to back diodes as protection for the internal transistors ( especially true of JFET opamps)  which are either regular diodes or zener diodes, so you can have a very high current flow into or out of the input pins when you exceed common mode range.

This is uncommon to unknown with JFET amplifiers because of the high JFET gate breakdown voltage.  I know of no examples.

Quote
The 741 for example, while it will run near rail to rail on the inputs with +- 15V supplies, has a differential voltage limit of around 6V as the internal long tailed pairs will break down at around 7V difference, and will be severely degraded if this is done for long periods.

The 741 has no input differential voltage limit within the supply voltages.  The high base-emitter breakdown voltage of the 741's PNP cascode prevents base-emitter breakdown of the NPN input transistors.  This was a major selling point compared to its predecessor, the 709, which did have such a limit and also suffered from latchup.

PNP input operational amplifiers including precision ones are naturally protected from this.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf