 So, we continue with op-amp circuits and now in this session we will talk about some circuits that involve non-linear operation of the op-amp. So, we will first talk about precision rectifier that you can make with op-amps and to begin with before we actually go to precision rectifiers let us see it is good to show the students as well what an ordinary diode can do as the rectifier. So, let us just take a simple half wave rectifier. So, if this diode conducts the V o is just V i minus some 0.7 volts or so and that gives you the straight line with an intercept of about 0.7 volts the turn on voltage of this diode and the slope of this line is 1 because this V o equal to V i minus 0.7 and when of course, V i is less than 0.7 then there is no conduction and then the output voltage is 0. So, that is this particular line. So, we are essentially coming to why we need improved circuits and that will bring us to precision rectifiers using op-amps. So, what is the problem with this circuit? The problem with this circuit is that if your V i is small if the input voltage is let us say less than 0.7 volts then you are at the output you are going to get only 0 volts. So, this whole dual point of rectifying then is lost you cannot you do not get any output and that is a that is a drawback of the simple diode rectifier and that is indeed the motivation for using better circuit like this is called precision rectifier circuit and these are made with op-amps alright. So, let us go ahead and let us see what a simple precision rectifier will look like. Now, this is a circuit that is there in most textbooks. So, the important thing is how do you go about analyzing this circuit it is not trivial and it is better it is better to actually show they show them logically how things follow from one another one another rather than just giving them the circuit and giving them the output input relationship that is the least satisfactory output. So, let us just see how we can systematically consider these various cases and logically derive the output input characteristics. So, what is the what is what can happen to this diode it can either conduct or it cannot conduct these are the two possibilities and it is best to take these two cases one by one and then see what happens to output voltage what happens to the input voltage and then combine the two cases. So, first we will consider this case where the diode is conducting what happens if the diode is conducting if the diode is conducting this feedback loop then gets closed right and then the circuit actually is very similar to a buffer except that this diode is there in the output circuit, but this diode is like just a constant voltage drop. So, in that case that sense it is very similar to a buffer. So, if that is the case if it is like a buffer the op amp operates in the linear region we can say that this V plus and V minus are more or less equal because the gain of the op amp is very high and the diode if it is conducting it is replaced by a constant voltage drop of V d that is what is shown over here and of course, it is important to note that the diode current can only go in that direction from plus to minus. So, the feedback loop is closed and the circuit looks like the buffer that we have seen earlier. So, now let us see what what can be what more can we say here it is since the input current is 0 that current is 0 the current entering the minus the inverting terminal we can say that this current I R here is the same as this current I d. So, we can say that I R and I d R equal because the op amp does not draw any current at the input. So, what does it mean what it means is we already have this V plus and V minus it is small in this particular case what happens to this 0.7 volts drop to the diode. So, let us see that first what is V plus minus V minus it is V o 1 by A V where V o 1 is this output voltage here that divided by A V is the voltage gain of the op amp which is 10 raise to 5 very large and what is V o 1 V o 1 is V o 1 is V o plus 0.7 third voltage drop. So, that is V o 1 V o plus 0.7. So, here V plus minus V minus is V o 1 by A V which is V o plus 0.7 by A V and that because A V is very large is 0 volts or more or less 0 volts what it means is that V plus and V minus are essentially at the same voltage and V o therefore is equal to V i. So, all of this is logically derived from the fact that the diode is conducting and that is the first case that we have considered. So, what else can we say about this case what else we can say it is here. Now, when does this situation arise what we are talking about is there is this diode conducting can only conduct in that power direction and so and all of that current goes through this resistor and therefore V o and. So, therefore the current through the resistor can only be positive and therefore V o can only be positive and because V o is equal to V i V i can only be positive. So, all of these conclusions we can draw simply from the fact that the diode is conducting. So, that all of these considerations give us this particular this particular part of the characteristics that is V i is positive V o is positive and V o is equal to V i and therefore we have a straight line going through the origin with a slope equal to 1 and it is important to point out that this 0.7 volts does not enter this figure at all because it has got divided by A V and therefore it has got reduced to 0 and that is why this is a much improved circuit as compared to the simple diode half wave rectifier. We are not done yet we are we have only considered the first case now let us consider the second case when D is not conducting that is in the next slide. So, here we consider the second case where D is not conducting when is D is not when is D not conducting for what condition at the input. So, D is not conducting when the first case that we just considered is not happening that means V i must now be less than 0. So, if D is not conducting the diode is essentially an open circuit and now the op amp is in the open loop configuration and if the op amp is in the open loop configuration what do we say about V o this there is no current anywhere in the circuit and there is no current therefore through the resistor and therefore V o is equal to 0 and as we said earlier this will happen when the first case does not happen and the first case happened when V i was positive. So, therefore this case happens when V i is negative and therefore this particular consideration gives us this part of the V o V i characteristic. Now, we put these things together that is in the next slide we put these things together and we get the complete V i characteristic V o versus V i characteristic. So, V o is equal to V i and this goes all the way through the origin V o is 0 here. So, this looks very much like the diode half wave rectifier except now we have got rid of that V d drop because as we saw in the previous slide it got divided by A v. So, this is really an ideal kind of situation where V o is equal to V i without any diode drop and if V i is positive and V o is 0 V i is negative in this part the diode is conducting in this part diode is not conducting. So, all that we concluded just on the basis of simple considerations about the diode conducting or not conducting or let us look at some results. Let me go back. So, if I apply an input voltage the blue one I get an output voltage which is sorry the red one is the input voltage V i and the blue one is the output voltage. So, the output voltage is equal to the input voltage in this half and output voltage is 0 in this half like that. This circuit is called a super diode because this is like a diode except that this V d equal to 0.7 has now disappeared and it has been replaced by V d equal to 0. So, it is like a diode with a 0 turn on voltage. So, that is a nice thing about this circuit. What is the is this a good circuit? The answer is that it is good if it is if the frequency is low and that is because if you look at this circuit when this diode is not conducting the op-amp is in the open loop and your V o the op-amp is going to get driven into saturation and V plus and V minus are not going to be V minus is going to be 0 in that part and V i is going to be whatever V i you apply. So, therefore, V plus and V minus are not going to be equal and therefore, that is going to drive the op-amp into saturation. So, that is what is shown here by this yellow line when the op-amp when the diode is not conducting this half of the cycle the op-amp actually saturates the output voltage goes to minus V sat. Now, all this is if your frequency is a small if your frequencies are large like let us say 25 kilowatts 50 kilowatts whatever 4741 and when the op-amp goes into saturation it will take some time to come out of saturation and that will give rise to that will give rise to a waveform which is not quite what you expect but slightly different. So, that is that is therefore, this circuit needs to be improved upon. So, the op-amp needs to come out of saturation when the input voltage changes from negative to positive values and this is a relatively slow slow process and it limits the speed of the circuit. So, therefore, there are better circuits which we do not require the op-amp to go into saturation. Let us see some of those or at least one of those. So, the way this circuit works this is also half wave rectifier it is got two diodes is like this let us take the case where D 1 conducts. So, now these are some details that we actually should skip because otherwise it will you have the slides to go through it later. These are some details which show that if D 1 is conducting D 2 cannot be conducting and therefore, the path of this current is like that that is that is what happens if D 1 is conducting. You can also show that and it is all done here. You can also show that if D 2 conducts then D 1 cannot conduct and the path of the current is like that as shown by the gray arrows alright. So, let us for the moment let us just assume that this is what happens and you can see the explanation for this later. So, if D 1 conducts we have this path and if D 2 conducts we have this path. So, clearly if D 1 is conducting what can we say about the input voltage the input voltage then is that the current is like this this voltage is at 0 volts because there is a feedback path and then the op amp is in the linear region and the input voltage the this current can only go from V from this input into this inverting input towards this inverting input and therefore, this V i can only be positive. So, this situation applies when V i is positive this situation in this situation the current can only go in that direction from the inverting terminal towards V i. So, in that case V i is necessarily less than 0. So, we have two situations V i greater than 0 where this happens V i less than 0 where this happens. Now let us see how what it leads to in this case if V i is greater than 0 the path of the current is like this there is no current in R 2 and this output voltage is sitting at 0 volts. In this situation the output current the there is a path here and this is essentially like an inverting amplifier you have 0 volts here virtual ground. So, therefore, this current is V i by R 1 and that same current is going is going like that and therefore, V o is this voltage plus this voltage drop and that will give you R 2 by R 1 times V i. So, if you do put all of these things together you will get the characteristics that we have shown in the next figure you will get something like this. So, it is the output is minus R 2 by R 1 times V i when d 2 conduct and this 0 if d 1 conduct and note that this is a little different than the earlier one because in the earlier one we had 0 volts here now we have 0 volts here in the positive side. But essentially there is a big difference between those between the previous circuit and this circuit and that is that the feedback loop is closed in both case in both V i greater than 0 case and V i less than 0 case in this for this circuit and therefore, the op amp remains in the linear region that is the big plus over the last circuit. In fact, we can we have some simulation results which will confirm that. So, let us just show that simulation results. So, this plot shows the red one is V i the blue one is V o. So, if V i is positive V o is 0 if V i is negative V o is minus V i. So, it is doing half wave rectification and V o 1 the output of the op amp is always small voltage V o 1 here it is about 1.5 volts and in the negative it is about minus 0.5 volts. So, the op amp does not enter saturation in this with this particular section that is because the feedback path is closed either through d 1 or through d 2. So, there is definitely a big plus as far as speed is concerned because if the op amp is not entering saturation then your circuit will be faster. If it does not enter saturation it does not have to come out of saturation and therefore, the speed of the circuit can be higher than the previous one. Now, if you are using if you have looked at sequel distribution there is a file called precision half wave and you can actually run and get the results and run that same file and get the results. Improved half wave precision rectifier continued this is a similar circuit the difference is that the direction of the diodes is now reversed and then what you get is you can analyze this circuit and then you get something like this V o is 0 here and V o is minus R 2 by R 1 times V i in this region. Now, it is good to talk about some application at this point because we have considered a very important circuit and that is a rectifier op amp rectifier and that is a precision rectifier that means it can amplify voltages which are rather small which are even less than 0.7 volts which we cannot do which we cannot rectify with the simple diode resistor rectifier circuit. So, what is being shown here is this is the super diode that is a circuit that we just discussed it is an op amp and there is an R resistive load and then that is there is a capacitor. So, this is essentially like the diode half wave rectifier with a capacitor filter that is what this is and this diode is not a simple diode, but it is the improved diode which we have just discussed which will have an op amp. So, if we do that then this will start rectifying at 0 volts and not at 0.7 volts and then therefore, you can actually use this to trace the envelope of this particular signal and this is an application where AM signal the signal shown in live blue is the amplitude modulated signal the signal shown in dark blue is the demodulated signal the output of this circuit. So, this is an application where we have demodulation of even small voltages which is you see that the amplitude here is just 100 millivolts or so or 150 millivolts which is much smaller than the 0.7 volts that an ordinary diode would turn on at. So, therefore, this circuit is much better than the half wave diode rectifier and we get by demodulation this envelope of the AM signal. You can play with this circuit for example, it is very important to tell the students at this point that this value of the capacitor is very important. If the capacitor value is too small what will happen is it will discharge too fast and it will have the ripple here will increase. If the value of the capacitor is too large what will happen is it will stay constant it will not drop at all and then this at this point it will just remain constant and it will lose out all this information. So, therefore, it is a very good exercise for students to do I just play with this value of the capacitor and see what happens to the demodulated waveform and of course once this demodulation is done we need to pass this through a filter. So, that the little ripple over here is removed and you get the original signal back. So, that is an application for a half wave rectifier to continue further let us talk about a full wave pesitant rectifier. This is a full wave rectifier it is best illustrated in terms of a block diagram. So, for example, this is the input voltage there is a half wave rectifier which is inverting. So, at V o 1 you will get this kind of waveform. This one I am simply multiplying it by minus 1 and therefore, at this point V b I will get V b versus V i like that and to get a waveform like this to get a V o versus V i transfer characteristics like this which is the full wave rectifier. What we need to do is we need to multiply this by minus 2 to get this particular characteristics V a versus V i and then we add this V a here and V b here and then if you add these two you will see that this slope will be minus 1 and this slope will be plus 1. So, that is a block diagram of how you can generate this full wave rectifier and this is the actual assimilation result. So, that is the input voltage and that is the output voltage. How do you do all these things? We already looked at this inverting half wave rectifier in this circuit in the previous slide and that is that goes in this block. Then how do you multiply something by minus 2 that is that we can do by somewhere. So, this block is serving as summing this voltage directly as well as this voltage with a negative sign and so all of this is being implemented by just two op-amps one op-amp serving as the inverting half wave rectifier and then another one serving as an inverting somewhere. Note that these register values are different here we have R that is to give you a slope of 1 here that is R by R here and we have R by 2 here that will give you the slope of 2. So, then you get these and these and it is being added and then finally at the output you will get this kind of characteristics. So, this is called a precision full wave rectifier by precision because we have got it of this 0.7 volts diode drop it will this will actually go through 0 not 0.7. Let us continue further may be let us consider this particular one because it has got a very nice interesting application wave shaping with diodes. All right let us take a very simple circuit like this with a single diode register R here R prime here R 0 here 0 volts here minus V 0 here this is a constant voltage a negative voltage. And if you do analyze this circuits consider two cases D of and D on and we can take an on voltage of 0.7 volts or something if you do this you will get V versus I where I is this current I is this current here and V is this voltage at this point and why are we plotting things with respect to I that will become clear later. So, if I get V if I plot V versus I I get for these two different conditions I get two different curves and that is what V versus I looks like and how we got this should actually go through all these details and figure that out very interesting. Okay next slide okay now this okay I would there is actually a problem with this viewer here. So, I cannot keep adding these things without disturbing this we cannot view the whole thing and still add things. So, therefore what I will say is you can go through this slides later and see how this fits into the previous one. Let us just show the final result. So, what this so this circuit is essentially composed of individual blocks that we have just discussed and you can see that the block that we discussed that is one register another register and then there is a diode that is repeated four times and each time you do that you introduce a break in this V versus I curve right and eventually what we do is we put this whole network in the feedback path of this inverting amplifier and as a result you get this kind of characteristics for V o versus V I and if now if I apply a triangle at the input I get reasonable approximation for a sign. So, this is a triangle to sign wave converter. So, this kind of circuit illustrates both diodes and op-amp circuit okay. So, if you notice in the diode in the precision rectifiers we had one circuit in which the op-amp went into saturation but in the other circuits the op-amp actually did not go into saturation and that was an advantage because then that those circuits are faster in which the op-amp remains in the linear region. So, let us now look at some other circuits and in these circuits the op-amp will go into saturation and let us see some of these circuits as well okay. Now, this of course is a very important circuit as the Schmitt trigger and let us see how in fact the Schmitt trigger is not very different than an inverting amplifier it is just a simple change of sign plus minus okay and to explain that in class in two first or secondary students is not easy but here is a qualitative way of doing that. So, let us just take the inverting amplifier essentially what happens is if I switch this plus and minus the feedback actually becomes positive and therefore this inverting amplifier fails to work as an inverting amplifier and it and as you know it works as a Schmitt trigger which is useful in other ways but not as an inverting amplifier. So, let us just qualitatively show that this first circuit has negative feedback in it okay how do we go about doing that. So, let us start with an ideal equation V o the output voltage here of the op-amp is given by the gain of this op-amp A v multiplied by v plus minus v minus okay let us call that equation one. Now, since the op-amp has high input resistance this current and this current are the same and of course this we have seen before and we get and we get what do we get then this is V i this is V o and you can write the you can get the expression for this current as V i minus V o by R 1 plus R 2 and then you can get this voltage at P minus. So, V minus is V i times R 2 by R 1 plus R 2 plus V o by R 1 plus R 2 okay let us call that equation 2. Now, let us just try to understand qualitatively why this feedback is considered negative. So, let us say your V i increases what happens as a result as a result of V i increasing look at equation 2. If V i increases your V minus is going to increase as shown here what happens if V minus increases if V minus increases V o is going to decrease because V minus has come with a negative sign. So, if V o is therefore the output voltage is going to decrease and that is because of equation 1. If V o decreases what happens to V minus V minus will decrease from equation 2. So, if V i is increasing there is one trend here for V minus to increase, but there is another trend here for V minus to decrease and if you look at these two boxes you see that this feedback is negative and therefore what happens in practice is the of course all of these things are it is not as if there is a time delay between this process all of this thing is happening together and then the circuit reaches a stable output voltage and then you can the circuit reaches a stable equilibrium so to say and then we can actually perform the analysis assuming that the op amp is in the linear region. If we interchange these two terminals then the situation is very very different as shown here. What happens if I make this the plus terminal and that sorry I do not have a pointer what if what happens if I do if I make this the plus terminal and this the minus terminal then everything actually changes let us see how. Now, what we what we have is again we will we will say that this current is small because that is an input current of the op amp and there is a base of a transistor there which will draw a small current. So, we can say that this V plus is now given by V i minus this voltage drop and this voltage drop can be found once you know this current what is this current V i minus V o divided by R 1 plus R 2 putting all of that together you get V plus equal to V i minus R 2 by R 1 plus R 2 plus V o times R 1 by R 1 plus R 2. All right and this equation of course still holds because it holds for both both these cases. Now, what happens V i increases if I V i increases my V plus is going to increase because of this term because of equation 3. If V plus increases go back to this equation 1 if V plus increases V o is going to increase so V o is going to increase. If V o increases now go back to this equation this V o is coming with a plus sign. So, V o increases V plus also increases and that is what is shown over here. So, in other words they if as a change in V i I have a upward I have an upward trend in V plus here and upward trend here again in V plus. So, therefore, the feedback is positive here the trend was opposite here I had an upward trend here, but a downward trend here. So, therefore, this was negative feedback this is positive feedback. And therefore, what happens in such a circuit is it does not reach any stable output value, but the op amp will simply enter saturation. So, we now have a positive feedback situation as a result the output voltage will rise or fall indefinitely. So, it will either hit plus V sat or it will hit minus V sat and finally, this output voltage gets limited by saturation. So, it is very important to explain to the students how these two circuits are so similar in terms of the configuration, but still so different in terms of operation a completely different this is an amplifier and this is a comparator a Schmidt comparator. Same thing goes with a non-inverting amplifier this is over old friend the non-inverting amplifier. And here what we have done is a plus and minus R interchange and now we get a completely different circuit and as we know this is also a Schmidt trigger also although a different kind of Schmidt trigger than the previous one. So, here again we can show that the feedback in this case is negative in this case is positive. So, let us see how. So, this equation of course still holds the output voltage is given by the gain of the op amp times V plus minus V minus. Now, the other equation is a little different here this output voltage is V o and there is no current being drawn at this terminal. So, therefore, the V minus is simply going to be the output voltage times R 1 by R 1 plus R 2. So, now let us see what happens if I make a slight change in V i, if I change V i what happens to V i is the same as V plus. So, I let us say I increase V i that is the same thing as increasing V plus and therefore, V o will increase and that is what is shown over here. If V o increases what happens to V i that will also increase because of equation 2 and that is what is shown over here. If V minus increases go back to equation 1 if V minus increases V o is going to decrease because of this negative sign and that is what is shown over here. So, again you see an upward trend here in some quantity and downward trend here in the same quantity and therefore, the feedback is negative. The circuit will reach a stable equilibrium and therefore, the analysis that we did assuming linear region is fine and then you can derive the expression for the output voltage in terms of the input voltage. In this situation looks very similar, but now plus and minus are interchanged. So, this equation 1 still holds equation 2 is now replaced by V plus being equal to V o times R 1 by R 1 plus R 2. Now, let us see what happens if V i increases your output voltage is going to decrease because V i is now the same as V minus. So, if V minus increases the output voltage is going to decrease because of this negative sign that is what is shown here. If V o decreases what happens to V plus V plus will also decrease. If V plus decreases what will happen to V o V o will decrease. Now, we have the same trend here V o going down V o going down and therefore, this is a positive feedback situation. Again as in the previous case this circuit will the output will just keep increasing either towards V sat or minus V sat and then finally, we will the op amp will enter saturation. So, in these kinds of circuits which are unstable the output of the op amp is not going to be between V sat and minus R minus. It is going to be at V sat or minus V sat and not anywhere in between because of the unstable nature of this circuit and that is very important to clarify. So, it is very important to clarify in class that these circuits are they are seemingly very similar in terms of configuration, but in terms of operation they are vastly different. Let us go to the next slide. So, this both of these things actually are Schmidt triggers as we as we already know you must have done must be teaching these things in class and they are nothing but the inverting and non-inverting amplifiers with the plus minus interchange. So, this is an inverting amplifier with plus minus interchange. This is a non-inverting amplifier with plus minus interchange because of positive feedback both of these circuits are unstable. The output at any time is only limited by saturation of the op amp that is output will only be either plus V sat or minus V sat. Now, the important question is what use is a circuit that is stuck at either plus V sat or minus V sat that is an important question that comes to mind and of course as we know this it turns out that these circuits are actually useful and we know that we can make oscillators with these and we will actually see examples of that, but before we do that let us see what it does. So, this is it is best to take some specific numbers and work out the BO versus VI characteristics in all of these things. So, in this what we have done is we have taken this inverting Schmidt trigger. So, it is the same as the positive what is it called the non-inverting amplifier with plus minus interchange and it turns out to be an inverting Schmidt trigger. So, where do we begin with such a circuit? We begin with let us say a high input voltage in particular I have taken an example of 5 volts. So, let us say this is 5 volts and at 5 volts let us see what the output is and this can be done by just taking some considering some cases and what do we know about the circuit we know that the output voltage can be either at plus V sat or minus V sat and that is all it does not have any other option, but to be at either of these values. So, let us suppose as the first case I take BO is equal to plus V sat. So, what the situation now is this is 5 volts this is 10 volts I have taken V sat as 10 volts here. So, this is 5 volts and this is 10 volts and let us see if that is possible if this is 10 volts there is a 9 K here there is a 1 K here. So, this is going to be at 1 volt. So, the situation is like this there is a 1 volt here at plus 5 volts here at minus and the output we have assumed to be plus 10 and we see that that is actually not possible this is 5 and this is 1 then the output cannot be plus V sat it will only be minus V sat. So, therefore it is very easy to show that this first case is actually inconsistent with our assumption of BO being plus V sat. So, therefore what the other option which is BO equal to minus V sat and that turns out to be consistent and you can show that and therefore, we have at least one point on the in the BO versus VI plane to start with and what is that point that point is BO is. So, VI is 5 volts right here and BO is minus 10 that is minus V sat. Now, it is important actually to look at this voltage that is playing a very crucial role in all of this operation. So, if this is minus 10 volts this is going to be simply by voltage division 1 over 10 times the output voltage that is minus 1 volt. So, we have one data point in this whole transfer characteristics BO versus VI and that is input voltage is 5 volts output voltage is minus 10 and this V plus is minus 1 volt. So, let us take this further now you can always say in class that this is a non inverting Schmidt trigger and this is what its characteristics looks like and etcetera. But if you derive this logically it is much more satisfied with the analysis and that is why we are doing all this. And you can actually show that if you increase BO if increase VI from 5 to 10 the same situation actually you will apply BO will continue to be minus V sat V plus will continue to be minus 1 volt. So, that is that now the important question is what happens when you come back and that is where. So, that is the next slide. So, we already got up to this point now what happens if we come back. So, let us just take it up to here. What happens if I go on decreasing the input voltage? Now this is at this point it is very crucial to know what is going on at V plus. So, V plus because of voltage division is going to be R 1 over R 1 plus R 2 times BO and that is as long as this output voltage is minus 10 volts this V plus is going to be minus 1 volt. So, as now as long as your VI is actually larger than minus 1 volt there is no difference the circuit remains in this particular state. But if I cross this minus 1 volt then things change then what happens is the output is going to switch from minus V sat to plus V sat and that is what is being shown here. It is very important to sort of derive these things systematically. So, that the student actually understand this will lead to a much deeper understanding of this circuit. So, as soon as your input voltage crosses minus 1 volt the output is going to switch to plus V sat and then it is easy to show that actually it is going to stay there. Once it switches to plus V sat V plus now becomes plus 1 volt and if you are. So, V plus is now sitting at 1 plus 1 volt this is plus 1 volt and now if your input if you decrease it further like in this direction it is always going to be smaller than this plus 1 volt here and therefore, your output is always going to be at plus V sat. So, we can we can complete that part of the characteristics. What happens now if you come back if you come back now your V plus is sitting at plus 1 volt and therefore, the transition will only happen when you cross plus 1 volt at this point and that in fact will complete your characteristics. So, that is the complete characteristics it can be systematically and logically explained you know just from the basic rather than just giving this circuit and giving this figure in class it makes much better sense to actually explain why it is like that. So, this is our now this is our V o versus V i characteristics and that is it is equally important to also talk about V plus here right. So, V plus in at any stage is simply given by voltage division and therefore, it is actually proportional to V o if V o becomes plus 10 volts V f V plus becomes plus 1 volt V o becomes sorry V o becomes plus 10 V plus becomes plus 1 V o becomes minus 10 V plus becomes minus 1 and there is a simple proportionality factor of R 1 over R 1 plus R 2 which is the voltage division. So, that is how this and this we would call the inverting Schmitt trigger because if your input voltage is positive large positive then your output voltage is negative the input voltage is negative the output voltage is positive. Therefore, we call this the inverting Schmitt trigger next slide. So, before we go to the non-inverting Schmitt trigger it is important to define a few things are called these values here the input voltage here at which this transition occurs is called the threshold voltage high V th this point is called threshold voltage low is a some people call this the tripping point or the threshold point and as we have seen this is simply given by plus minus this is given by plus R 1 by R 1 plus R 2 times V o and this one is given by minus R 1 by R 1 plus R 2 times V sat and this width between these two V th and V l V t l is called the hysteresis width and what is so unusual about this circuit as compared to amplifiers and so on that the tripping point will really depend on where we are on the V o versus V i axis in that sense this circuit has memory. For example, if I if I tell you that this input voltage is 0 volts you will not be able to tell me whether you are the output voltage is 10 volts or minus 10 volts because it will depend on whether we came from here or whether we came from here. So, in that sense this circuit as a as memory and that is all very crucial in understanding the operation of the circuits which are based on this Schmitt trigger. Let us look at the non-inverting Schmitt trigger and the reason and in some ways it is similar but in some in one way it is in one important way it is sort of very different than the inverting case and therefore, it is worthwhile going through this. So, in this case once again we can start off as we can start off at one data point let us say we apply 5 volts and you can actually show that this the circuit cannot be at minus V sat it can only be at plus V sat and that gives us this initial data point. So, the V input is 5 volts the output voltage is 10 volts that is V sat I have taken V sat as a good round number of 10 volts for simplicity and then V plus and that is where the difference between the circuit and the previous circuit come. What is V plus here? V plus actually will not depend both on V i as well as V o in the in the previous case V plus or the threshold point dependent only on the output voltage. Here the input voltage as well as the output voltage is going to influence the voltage at this point and how is it how is it going to affect that that is going to affect it like this. V plus is R 2 by R 1 plus R 2 times V i plus R 1 by R 1 plus R 2 times V o. So, if we do this it turns out that this case 1 in which we assume that minus V sat V o is minus V sat or minus 10 volts is ruled out and it turns out that the other case that V o is plus V sat is actually consistent and therefore that is the data point that we talked about here that data point. What happens if we move to the right increasing V i? Let us see what happens to this voltage. Let us look at this equation this V plus depends on V i and also on V o. Now V o is plus 10 volts that is fixed. So, this number is fixed and V i you are increasing right you are increasing V i from 5 volts onwards. So, this term is going to be larger and larger. So, as a result what is going to happen to V plus is it is going to increase and it is at this point it is already some 5 more than 5 volts and it is only going to be larger than 5 volts. What is V minus? In all of these cases V minus is always at 0 and therefore V plus minus V minus is going to be positive and therefore V o is going to remain at V sat and that is what happens. So, let us just show this part. So, if I keep increasing V input V o will remain at V sat and then V plus also increases because of the dependence that we just looked at and now the important thing is to come back and see what happens. So, at some point my input voltage is going to cross at some point this V plus is going to cross 0 and that is the point where the output voltage is going to switch to minus 10. So, that is the next slide. So, now what we are doing is we are going in this negative direction. As a result if you are decreasing V i your V plus is also going to decrease and at some point this positive influence of V o equal to plus 10 is going to be compensated by this negative influence of V i and that is and this V plus is therefore going to cross 0 volts and that is that is happening at we are now approaching that point here. So, beyond this point this V o is going to switch to minus 10 volts. So, let us see what that looks like and the rest of them of course are just details like this R 2 by R 1 plus R 2 in this case is 9 by 10 V i R 1 by R 1 plus R 2 is 1 by V o. So, let us see what that does. So, that is what happens there. So, when V plus crosses 0 V o is going to change. Once V o changes what will happen to this equation V o is now negative. So, now this term is going to be negative it was and this was positive in this region and now it is going to be negative. So, what happens if I increase if I decrease V i further or increase it in the negative direction. If I do that this term is already negative because my V o is negative minus 10 volts this V i is also negative and therefore V plus is going to continue to be negative. If V plus is negative my output voltage is going to be minus V z and that is what is shown over here. So, now the important the interesting part is what happens if I come back. If I come back there is at some point at some positive value of V i this is going to be more positive than this negative term and then there is going to be a flipping again of the output voltage and that is what this is. So, all of these arrows etcetera have definite meaning and so this figure and the previous one looks actually they look pretty similar except that this is non-inverting that one was inverting, but the other big difference here is that this V plus here actually changes it is not constant because it does depend on the input voltage and these are things that you actually can observe when you do the lab today it is today or tomorrow. When you do the lab on a Schmidt trigger you should actually look at the oscillator look at V i on the x axis and V o on the y axis also V plus on the y axis and see what you get over there. To do that you will have to connect your V i the input voltage to the x channel that is channel 1 V o to channel 2 or V plus to channel 2 as whichever you want to see and then put the oscilloscope in the x y mode then you will see this figure. Non-inverting Schmidt trigger. So, there is some salient points about this non-inverting Schmidt trigger. What the threshold voltage values here are going to be are given by plus minus r 1 over r 2 times V sat and this you can derive from the condition that when V plus crosses 0 the output changes and one of them will give you V T h the other one will give you V T l. The second point is actually common to the inverting and non-inverting Schmidt triggers. As in the inverting Schmidt trigger this circuit also has a memory because of this hysteresis here. For example, if I ask you what is the output voltage as 0 volts it is you cannot tell me whether it is plus 10 or minus 10 because it will depend on whether you came like this or whether you came like this. So, that is the memory effect again it has a hysteresis width which is given by V T h minus V T l. So, these two circuits are basically pretty similar except one is inverting the other one is non-inverting. Now, what use are these Schmidt triggers? So, before we do that let us just summarize this. So, there are two types of Schmidt triggers and it is actually always good to show these things on the same slide or if you are using a blackboard at the same time because they are so similar and they are also so similar to the inverting amplifier and non-inverting amplifier. So, for example, this inverting so this is the inverting Schmidt trigger it is very similar to the non-inverting amplifier with plus minus interchanged. This is the inverting this is the non-inverting Schmidt trigger, but it is very similar to the inverting amplifier with plus minus interchanged. So, it is good to show this slide where all of these things are together. So, that just it just becomes a little easier for the student to remember what is what. Now, what use is this Schmidt trigger circuit that can be explained by this slide. Let us look at this in detail. So, we should talk about comparators. Let us take a comparator and a simple op-amp can act as a comparator because it has a very high gain and if your V plus is even slightly higher than V minus is you are going to get plus V set if your V plus is going to be slightly lower than V minus you are going to get minus V z and that is what a comparator does. It gives you a positive output for one condition and negative output for another. So, all this is fine. What is the motivation for using a Schmidt comparator as opposed to and that is in the next slide. So, this slide explains why you want to use a Schmidt trigger. So, here is an analog signal and as applied to a simple op-amp as a comparator. So, if the input voltage goes above 0, the output voltage is high. If the input voltage goes below 0, the output voltage is low and so this is what you would expect from this circuit. All this is fine, but in practice there are problems and that is because of noise. So, let us see what happens if you have noise on this circuit, noise on the input. So, this is what happens if you have some noise on your input signal. So, this is your original input. The actual input will not be as clean as this because there is a pickup and there is noise and so on. So, in the actual input signal you will have some distortions and there is I have shown this as some disturbance riding over the input voltage and if the distortion is such that this crosses 0 more than once, then you are in trouble. For example, here just look at this one. It is not very clear in this picture, but if I expand this part, then you see that this input voltage is actually crossing 0 three times. It is supposed to cross only once, but it is actually crossing and then crossing back and then crossing again. And if you feed this to a comparator, you are going to get one state here, another state here, another state here, another state here. So, instead of making one transition, we now have one, two and three transitions. So, there is one extra spurious pulse that we are getting and suppose you are feeding this to a counter, that counter is going to erroneously count an extra count. So, that is not desirable and this happens because there are these spurious pickups and noise signals on top of your input voltage. A Schmidt trigger can be used to eliminate this so-called comparator chatter and let us see in next slide to do that. So, okay now the same signal with in the presence of some disturbance is now fed to a comparator which is a Schmidt comparator or the non-inverting Schmidt trigger that we just saw. And what does that do? So, to see that what we do is, so this is the expanded view of this particular part which was giving us trouble, same thing here. So, it is crossing 0 twice and the ordinary comparator actually gave us two, three transitions here. Now, let us see what the Schmidt trigger does, okay. So, in order to see that what we do is we have this is your input voltage, this axis is your time and this is your input voltage, okay. So, let me plot input voltage on this axis and output voltage on this axis. So, if the input voltage is large and positive, now output voltage is plus V sat, if the input voltage is large and negative, the output voltage is minus V sat and in between we have this hysteresis. So, now my input is now coming like that, okay. And in this figure what is happening is my input is coming like that and the relevant transition is not the first one, but the second one. So, if my input crosses this value then my output is going to change. So, in this figure the input has to cross this VTL value for the output to change, okay. And once I am in that region and now the relevant threshold is this value here VTH, okay. So, now unless the input actually goes above this there is no, there is going to be no spurious transition. So, beyond this point my output is going to be going to remain low and therefore now instead of counting three transitions I count only one transition as we would like. So, this is how Ashmit Rikor will help you to will serve as a better comparator than an ordinary comparator.