Op-Amps and Comparators

Thread Starter

adam555

Joined Aug 17, 2013
858
Just realized the practical difference between a comparator and a schmitt trigger. The schmitt trigger is like adding a positive feedback to prevent noise; isn't it?

like in this example from the ebook...



In which the comparator without positive feedback would produce the result in A and the comparator with positive feedback would produce the result in B (like a schmitt trigger).

 

LvW

Joined Jun 13, 2013
1,754
adam555;674577 The schmitt trigger is like adding a positive feedback to prevent noise; isn't it? [/QUOTE said:
...to prevent noise?
It´s more accurate to say: ...to prevent that noise can influence the switching behaviour of the device.
 

ian field

Joined Oct 27, 2012
6,536
Its sort of like "moving the goalposts" when the input crosses Vref and the output switches state - the positive feedback resistor "pulls" Vref slightly so Vin has to go back a little further than where it originally crossed the line to make the output switch back again.
 

crutschow

Joined Mar 14, 2008
34,408
You almost always add a small amount of positive feedback to a comparator (making it a Schmitt Trigger) to avoid the output oscillating at the trigger point. This oscillation can be caused by just the internal noise of the comparator circuit.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
But, can you buy already made schmitt triggers and differencital amplifiers -without having any other use-, or do you always have to make them with comparators and opamps, respectively?

What I'm getting at is, for example: when I see a circuit with the symbol for the schmitt trigger ("B" in the post above); does it mean that I need to use a schmitt trigger, or that I have to use a comparator acting as a schimitt trigger?
 

Jony130

Joined Feb 17, 2009
5,488
Normally we can easily buy "ordinary" op amp, comparator with complementary output configuration or with open collector output also instrumentation amplifiers are "ordinary" part. And we can buy them quite easily. The rest of the circuit are very rare.
And to be honest I never see IC comparator with a internal Schmitt trigger input.
 

ian field

Joined Oct 27, 2012
6,536
But, can you buy already made schmitt triggers and differencital amplifiers -without having any other use-, or do you always have to make them with comparators and opamps, respectively?

What I'm getting at is, for example: when I see a circuit with the symbol for the schmitt trigger ("B" in the post above); does it mean that I need to use a schmitt trigger, or that I have to use a comparator acting as a schimitt trigger?
"Horses for courses" - most TTL/CMOS Schmitt triggers don't have any provision for defining your own switching points, a comparator usually does.

Sometimes Vin is too noisy for the noise margin of tailor-made ST-gates, so a comparator is used so the positive feedback can be designed to give a wide enough noise margin.
 

crutschow

Joined Mar 14, 2008
34,408
TTL/CMOS Schmitt triggers are often use to square up an input from an external source with a slow rise or fall time since standard logic gates can oscillate or malfunction under those conditions. But as ian noted, the trigger point and hysteresis of these gates is not adjustable. If you want adjustable and precise trigger points along with a selectable hysteresis value then an op amp or comparator circuit is typically used.

As I previously noted, differential amps are a general circuit category that includes op amps. If you find a specialized differential amp or Schmitt trigger that suits you needs, then you can use it. Op amps are very general purpose devices and thus are commonly used for many different applications where a specialized amp may not work. Of course there's no requirement that "have to use" an op amp or comparator for a specific application. That's up to you, as the designer, to determine what makes the best design based upon cost, parts count and availability, operating requirements, etc.
 

ian field

Joined Oct 27, 2012
6,536
Generally speaking, most run of the mill op-amps are a bit stodgy for use as comparators, and you have to select the type carefully if you need rail to rail output.

OTOH - if you roll back a comparator with enough nfb; it can operate in linear mode as an amplifier - some types give pretty good bandwidth when used this way, compared to common or garden variety op-amps.
 

crutschow

Joined Mar 14, 2008
34,408
.....................
OTOH - if you roll back a comparator with enough nfb; it can operate in linear mode as an amplifier - some types give pretty good bandwidth when used this way, compared to common or garden variety op-amps.
The more negative feedback, the more likely the comparator will oscillate. You need a compensation network along with the feedback.
 

ian field

Joined Oct 27, 2012
6,536
The more negative feedback, the more likely the comparator will oscillate. You need a compensation network along with the feedback.
I've made some pretty tasty amplifiers with little more than a TL431 (comparator with built in 2.5Vref - all in a TO92 package) going straight from an electret mic to a high impedance speaker (>35R).

The feedback resistor gives total nfb from cathode to control input - to get gain you have to split the top part of the feedback resistor and add a resistor to create a tapping point, the tap is AC shunted to GND by an electrolytic capacitor.

With total elimination of AC nfb, there was too much gain - even with this very simple setup it took a long twisted pair to get the mic far enough from the speaker to avoid howlround.

The gain can be moderated by putting some resistance or a pot in series with the electrolytic, not all electrolytics are the same - some had less ESR and parasitic inductance than others, so a few of the builds were prone to local radio breakthrough - a 100uH choke in series with the electrolytic fixed that.
 

Thread Starter

adam555

Joined Aug 17, 2013
858
I already experience some problems for not being familiar with the particular specs and differences in opamps and comparators.

For example, the function generator I built uses a comparator to convert the triangular wave into a square wave; and none of the comparators I had at home worked for some reason.

I also had to buy an additional opamp for the amplifying stage that would work well at 300Khz; as the ones I had at home would not go above 50Khz because of the slew rate.

I guess there's nothing like stepping into all these problems yourself to really understand what all this variety in differential amplifiers is about.
 
Top