Schmitt trigger - virtual ground? - Page 1
Forum section: electronics / beginners

author: nForce
author_rank: Frequent Contributor
timestamp: January 25, 2016, 05:34:59 pm
content: Hello,i am calculating and simulating different kinds of schmitt triggers, and I found thishttp://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.

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 25, 2016, 05:55:35 pm
content: 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.

author: orolo
author_rank: Frequent Contributor
timestamp: January 25, 2016, 07:09:41 pm
content: 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 0Vat the time of crossing, which is right. At any other time, it may not be so.

author: tggzzz
author_rank: Super Contributor
timestamp: January 25, 2016, 09:24:09 pm
content: 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.

author: Zero999
author_rank: Super Contributor
timestamp: January 25, 2016, 11:44:29 pm
content: Quote from: tggzzz on January 25, 2016, 09:24:09 pmYes, there's a TI application note about that somewhere.

author: nForce
author_rank: Frequent Contributor
timestamp: January 26, 2016, 11:21:42 am
content: Quote from: orolo on January 25, 2016, 07:09:41 pmSo if I have the same configuration, but it's let say 5V on the inverting input. Therefore it's 5V on the non-inverting inputat the time crossing.So when analyzing schmitt triggers I can assume same voltages on the inputsBut only for the time crossing?

author: nForce
author_rank: Frequent Contributor
timestamp: January 26, 2016, 02:17:55 pm
content: No I think I am wrong, but I don't know why.

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 26, 2016, 04:03:11 pm
content: As I said in the first post, a comparator doesnotuse negative feedback. Youcannotuse the simplification of virtual ground in analyzing the circuit. That simplification only applies when negative feedback is present and operating correctly.

author: nForce
author_rank: Frequent Contributor
timestamp: January 26, 2016, 04:31:01 pm
content: @XFDDesign,How can I then analyze the circuit? Because on the link, Va = 0.

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 26, 2016, 04:56:02 pm
content: 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 isnotoperating 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.0V3. 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 forcehysteresis.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.

author: nForce
author_rank: Frequent Contributor
timestamp: January 26, 2016, 08:49:19 pm
content: 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.

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 26, 2016, 09:10:02 pm
content: 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.

author: nForce
author_rank: Frequent Contributor
timestamp: January 27, 2016, 04:36:37 pm
content: 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?

author: nForce
author_rank: Frequent Contributor
timestamp: January 28, 2016, 11:11:27 am
content: Sorry, for double post.But only one person on this forum understands schmitt triggers and my questions?

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 28, 2016, 05:53:19 pm
content: 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.

author: nForce
author_rank: Frequent Contributor
timestamp: January 29, 2016, 08:35:13 pm
content: Hmm, I have found this calculator, which is a "single supply", but hastwotresholds.http://pcbheaven.com/drcalculus/index.php?calc=st_nonsym_sp

author: XFDDesign
author_rank: Frequent Contributor
timestamp: January 30, 2016, 02:02:26 am
content: Ok.All of the schmitt triggers mentioned abovealsohavetwothresholds.

author: nForce
author_rank: Frequent Contributor
timestamp: February 01, 2016, 02:40:22 pm
content: 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.

author: nForce
author_rank: Frequent Contributor
timestamp: February 01, 2016, 03:29:04 pm
content: Oh, sorry I have calculated.