schmitt trigger or comparator

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
labview1958
Posts: 184
Joined: Tue Apr 05, 2005 1:01 am
Contact:

schmitt trigger or comparator

Post by labview1958 »

Is there much difference between a scmitt trigger and a comparator. Can they be interchanged?
smartdog
Posts: 13
Joined: Tue Apr 25, 2006 5:32 am
Contact:

Post by smartdog »

Labview1958,

I am not sure what you mean by "interchanged", but they can give different results.

look at this page for what I mean:
http://www.sccs.swarthmore.edu/users/06 ... /e72/lab1/
(look at about the middle of the page


not much...but might get the converstaion rollin'

We all learn by sharing what we know
Smartdog
We all learn by sharing what we know
Smartdog
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba »

sigh. have you looked up the definitions of the two?

comparator: http://en.wikipedia.org/wiki/Comparator
schmitt trigger : http://en.wikipedia.org/wiki/Schmitt_trigger
labview1958
Posts: 184
Joined: Tue Apr 05, 2005 1:01 am
Contact:

comparator

Post by labview1958 »

LM319N is a comparator and OPL810 contains a scmitt trigger. If I want to find the rpm of a rotating disk, I would use an opto swith plus LM319N or OPL810? I intend to get a TTL signal and input it to the digital input of a daq board to find it's frequency. Which is better? Comparator or scmitt trigger?
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker »

A Schmitt trigger. Note that a comparator with feedback to the + input IS a Schmitt trigger; if you already have a comparator, just add a feedback resistor.
Dale Y
labview1958
Posts: 184
Joined: Tue Apr 05, 2005 1:01 am
Contact:

comparator

Post by labview1958 »

I am trying to find the total resistance(RT) of a scmitt trigger for threshold calculation. Le's say R1 is the resistor from the positive input to the ground and R2 the resistor connecting the source voltage and the positive input. The feedback resistor is R3. Is 1/RT = 1/R1 + 1/R2 + 1/R3? Is this the correct formula? I am assuming all three resistors are in parallel.
labview1958
Posts: 184
Joined: Tue Apr 05, 2005 1:01 am
Contact:

comparator

Post by labview1958 »

Would increasing the feedback resistance lower the upper threshold voltage?
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba »

I'm not sure what you are trying to accomplish. total resistance seems meaningless in this regard. You really do need to do your homework on comparators and the use of schmitt feedback. do you have Horowitz & Hill, "The art of electronics"? I suggest you get it because most of your questions are answered there.

Look at how comparators are defined. I assume you are using the negative input for your signal and the positive input for your "switching threshold" (cause it won't work the other way around). Use a resistor to feed back the output to the postitive input. The switching threshold is usually defined by a voltage divider of V+ to gnd (or V- if that's what you are using). The threshold gets modified by whether the output of the comparator is V+ or 0 (gnd). So the switching threshold is calced differently based on the whether the contribution of the feedback resistor is from 0 or V+. You can set this up with a spice program and see how it works. it would allow you to play with the values to get a better sense of it all.

Pardon me for being cranky but you seem to waste a lot of time flailing about for other people's opinions and not enough time figuring this stuff out for yourself. It's not that hard, you just have to put the effort forth.
User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Post by dr_when »

and read more about hysteresis!
"Who is John Galt?"
labview1958
Posts: 184
Joined: Tue Apr 05, 2005 1:01 am
Contact:

schmitt trigger

Post by labview1958 »

Let's say my source voltage is 6V. Wouls the final output from the schmitt trigger be either 0V or 6V? That it is a square wave?
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker »

A square wave has highs and lows of equal duration. If pulses are fixed width, then at one frequency (where pulse width = (1/frequency)/2 will output be a square wave.
Dale Y
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl »

Hi there,

When you use feedback you have to calculate the upper AND the
lower threshold voltages. You can then subtract the lower from
the upper to calculate the total noise margin.

To calculate the lower threshold voltage you put the feedback
resistor in parallel with the lower + input resistor and then calculate
the voltage at the + terminal of the comparator.

To calculate the upper threshold voltage you put the feedback
resistor in parallel with the upper + input resistor and then calculate
the voltage at the + terminal of the comparator.

Lets say your upper resistor is R1 and your lower resistor is R2,
and your feedback resistor is R3. Lets call the upper voltage
threshold VH and the lower one VL. Lets call the source voltage Vs.
The center tap of R1 and R2 goes to the comparator + input,
and the top of R1 goes to Vs and the bottom of R2 goes to ground.
R3, the feedback resistor, goes from comparator output to the +
input of the comparator. If the comparator requires a pullup resistor
make it small, like 2k.

We can then write the following formulas:

VH=Vs*R2/(R4+R2)
VL=Vs*R5/(R1+R5)

where
R4=R1*R3/(R1+R3)
and
R5=R2*R3/(R2+R3)

The noise margin is VH-VL.

Example:

Lets say Vs=5v, and R1=R2=R3=100k (100k each).
This gives us the following:

R1=100000
R2=100000
R3=100000
Vs=5
R4=50000
R5=50000
VH=3.33333
VL=1.66666
nm=1.66666 (noise margin)

BTW, it's typical to make all three resistors R1, R2 and R3 the
same value. In any case, they should each always be at least
10 times the value of the pullup resistor if a pullup is required.
LEDs vs Bulbs, LEDs are winning.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 39 guests