Author Topic: Schmitt trigger - virtual ground?  (Read 5677 times)

0 Members and 1 Guest are viewing this topic.

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Schmitt trigger - virtual ground?
« on: January 25, 2016, 05:34:59 pm »
Hello,

i am calculating and simulating different kinds of schmitt triggers, and I found this http://howtomechatronics.com/how-it-works/electrical-engineering/schmitt-trigger/, where it's written, that Va (Voltage at node A) is zero. This node is the entering point to the non-inverting input.

Ok, so it's zero like different configurations of op amps.

But when I measured in lt spice, I get a positive voltage of 10 V, when I applied 10 V at Vin. The same goes for the sinusoidal signal. It's 10 V.

Why, is that? Because the calculations are OK, but it's not 0 V.
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #1 on: January 25, 2016, 05:55:35 pm »
A Schmitt Trigger does not operate on negative feedback, but rather on the open-loop nature of the opamp having very high gain.

Around the offset voltage, you'll have some small error that gets multiplied up by the openloop gain of the opamp (say 100,000V/V). The idea of this design is to use a small amount of the output signal to shift the "cross-over" point seen by the non-inverting node.

Suppose at startup the output of the op-amp were at -10V (on a split supply). If you want 1V of hysteresis (+/-500mV) you design the resistive network such that when the input is +0.5V, the non-inverting terminal sees "about" 0V (since the inverting node is grounded). When the input voltage exceeds 0.5v, the open loop gain slams up to the rail, outputting +10v. Now at +10V, the input must cross -0.5V and go slightly lower, before the output switches again. Any noise within that boundary will not affect the output.

 

Offline orolo

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: es
Re: Schmitt trigger - virtual ground?
« Reply #2 on: January 25, 2016, 07:09:41 pm »
Using op-amps as comparators forces them to saturate, hitting a rail. Once saturated, their ideal behavior ends.

To better understand this, simulate the op-amp in open loop configuration and with a sinusoidal signal: the voltage at the positive node will follow the input voltage, and won't be ground save at the crossing points. The output will be square (depending on the op-amp).

If you close the loop, the situation gets a bit more complex. Adding positive feedback causes the rails to be 'sticky'. Imagine your input signal is positive and crosses ground, becoming negative. The op-amp output hits the negative rail, and the voltage divider provided by the feedback pulls the positive input further down, taking it away from ground, and preventing subsequent crosses. If the ratio R1/R2 is too high, the input drive might be too low to cause the output to change rail again (excessive hysteresis). If the ratio R1/R2 is low enough, the rails are sticky, but not too much.

In any case, in this configuration, you cannot assume that a virtual ground appears at the op-amp input, since that virtual ground has become an unstable equilibrium due to the positive feedback. Any slight deviation from perfect ground will be amplified away from ground. And the positive input won't stay at zero. Note that in the text you link, they only assume that the positive rail is at 0V at the time of crossing, which is right. At any other time, it may not be so.
« Last Edit: January 25, 2016, 07:13:01 pm by orolo »
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19447
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Schmitt trigger - virtual ground?
« Reply #3 on: January 25, 2016, 09:24:09 pm »
Using opamps as comparators is a classic design "anti-pattern". There is no guarantee how long the output will take to come out of saturation, and there are many other "interesting" problems.  Start with "phase reversal", and proceed from there.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19479
  • Country: gb
  • 0999
Re: Schmitt trigger - virtual ground?
« Reply #4 on: January 25, 2016, 11:44:29 pm »
Using opamps as comparators is a classic design "anti-pattern". There is no guarantee how long the output will take to come out of saturation, and there are many other "interesting" problems.  Start with "phase reversal", and proceed from there.
Yes, there's a TI application note about that somewhere.

 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #5 on: January 26, 2016, 11:21:42 am »
Note that in the text you link, they only assume that the positive rail is at 0V at the time of crossing, which is right. At any other time, it may not be so.

So if I have the same configuration, but it's let say 5V on the inverting input. Therefore it's 5V on the non-inverting input at the time crossing.

So when analyzing schmitt triggers I can assume same voltages on the inputs But only for the time crossing?
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #6 on: January 26, 2016, 02:17:55 pm »
No I think I am wrong, but I don't know why.
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #7 on: January 26, 2016, 04:03:11 pm »
As I said in the first post, a comparator does not use negative feedback. You cannot use the simplification of virtual ground in analyzing the circuit. That simplification only applies when negative feedback is present and operating correctly.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #8 on: January 26, 2016, 04:31:01 pm »
@XFDDesign,

How can I then analyze the circuit? Because on the link, Va = 0.
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #9 on: January 26, 2016, 04:56:02 pm »
By not much more than I described in the first post I made.

1. You pick an arbitrary starting state of the output. The device operates in open loop, so it'll be one rail or the other. The amplifier is not operating in a linear mode. Suppose you start with the output at the low rail, say -10.0V.

2. Identify a starting condition which makes the output state valid. If Vo=(-10), then Vp the non-inverting terminal must be at a lower potential than Vn, the inverting terminal. If Vn is grounded, then Vp < 0. Suppose Vp=-1.0V

3. The opamp is then trying to use its massive open-loop gain to take (-1.0) - 0 = -1 and multiply it up by 100,000V/V, attempting to make the output -100,000V. Your supplies are limited so it stops at, say, -10V.

4. Vo is then ~= 100,000 * (Vp - Vn)
when Vp is slightly more positive than Vn, which is to say Vp > 0, the output slams to the positive rail, and then outputs +10V.

5. A schmitt trigger is a circuit design which leverages the "well defined output states" of the comparator to force hysteresis.

6. Go back to the initial state where Vo = -10V again. If you wanted the state to only change once the applied voltage were +0.5V instead of 0V, you then need to use a resistor from the input to the Vp terminal, and a resistor from Vp to vout.

7. Since the change happens roughtly around Vp=0, you pick a starting current, then find an appropriate hysteresis resistor: Rh = (0-(-10))/current, suppose I choose 1mA, then Rh=10kOhm.

8. So now, once I apply 0.5V, I need to have 1mA flow from the input to this targeted value of vp~=0: (0.5-0)/0.001 = 499 Ohms. So I install a 499 ohm resistor from the input to the Vp node and call this Ri.

9. When Vin = 0.5V, Vp crosses the zero and the huge amount of gain causes an output change.

10. Now the output is +10V. The applied input now sinks (10-0.5)/10.5kOhm = 904uA and Vp is then 0.5 + 904u*499 = 0.951V.

11. Your input begins going negative. What applied input will change the output? Whatever input will cause Vp to cross 0V.

12. Going the other way, 1mA will flow through Rh when Vp=0, the input will be sinking this 1mA. If the input is sinking, then Vin = (0 - 499 *0.001) ~= -0.5V.

13. If the input goes from 0.5 to 0V, and never reaches -0.5V, then the output will never switch. At 0V, Vp=0.475V, which is still above 0V.

A schmitt trigger is a non-linear circuit, so you have to do non-linear analysis.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #10 on: January 26, 2016, 08:49:19 pm »
Thanks, your explanation is much clearer then the site, which I provided the link.

Do you understand, why they are calculating schmitt trigger with symetrical hysterisis and non-symetrical at two different points? At symetrical they calculated the Vin, at non-symetrical they calculated Va.
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #11 on: January 26, 2016, 09:10:02 pm »
Their usage of "symmetry" sucks, and as well is poorly documented.

It isn't "non-symmetrical" hysteresis. It's "single supply" design. You should be able to notice that the input terminals used have reversed. It's still open loop, positive feedback, but they changed what is producing the control. On the single-supply design, the input Vref and the two resistors become a Thevenin equivalent voltage. The resistors in the divider form the equivalent "Ri" from my above description, and just leaves Rh=R2. As the output changes, the trip point changes at Vp. Vn is no longer held constant. When Vn is higher than the trip point, the output goes low. When it's lower than the trip point, the output goes high.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #12 on: January 27, 2016, 04:36:37 pm »
I don't know what do you mean by "single supply" design.

And how it isn't non-symmetrical hysteresis, if we get two different thresholds?
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #13 on: January 28, 2016, 11:11:27 am »
Sorry, for double post.

But only one person on this forum understands schmitt triggers and my questions?
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #14 on: January 28, 2016, 05:53:19 pm »
Single supply: only one voltage potential. I.e. a single 9V battery is a single supply (ignoring other gimmicks).

A dual or split supply is a supply where there are two potentials, typically equal an opposite in magnitude. I.e. +/-12V.

Once it goes single supply, there is some middle threshold point that is set. The hysteresis switches around that particular set point. You can actually have asymmetric hysteresis  with this approach if this were on a split supply, but that isn't what they showed.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #15 on: January 29, 2016, 08:35:13 pm »
Hmm, I have found this calculator, which is a "single supply", but has two tresholds.

http://pcbheaven.com/drcalculus/index.php?calc=st_nonsym_sp
 

Offline XFDDesign

  • Frequent Contributor
  • **
  • Posts: 442
  • Country: us
Re: Schmitt trigger - virtual ground?
« Reply #16 on: January 30, 2016, 02:02:26 am »
Ok.

All of the schmitt triggers mentioned above also have two thresholds.
 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #17 on: February 01, 2016, 02:40:22 pm »
I have an real example in LTspice:

How do I calculate 2 different thresholds values for this non-inverted schmitt trigger, with the 2 V supply on the inverting input?

Thanks eevblog.

 

Offline nForceTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: ee
Re: Schmitt trigger - virtual ground?
« Reply #18 on: February 01, 2016, 03:29:04 pm »
Oh, sorry I have calculated.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf