 Good morning. Today, this morning we are going to talk about op-amp circuits. In the first half, we will cover linear circuits and in the second half, we will cover non-linear circuits. Now, Professor Sharma has already introduced the topic yesterday and some of these things that I am going to show today will overlap with what he has said, but I thought I will go through this slide so that you can use these in your classroom and in general might find useful. So, let us begin with op-amp circuits. So, to begin with some introduction and this is always good to tell students so that they know what it is all about rather than just beginning with the inverting amplifier and so on. So, the operation amplifier, the main feature of the op-amp is that it is a versatile building block that can be used for realizing several electronic circuits and as we will see very simply and of course, you have seen that yesterday already. The use of op-amp is the user from cumbersome details such as transistor biasing coupling capacitors and by this time the students would have already done for example, the common emitter amplifier and they know how difficult it is to design the biasing current and so on and the temperature changes, the bias currents change and so on which is the problem and so the use of op-amp will actually free the user from these cumbersome details and allow the user to use as use the use the op-amp almost as a black box. The characteristics of an op-amp are nearly ideal and therefore op-amp circuits can be expected to perform as per as per theoretical design in most cases. So, the performance is performance or the gain or the frequency etcetera of an oscillator will depend in an op-amp circuit will depend only on the external components and not the op-amp itself as long as the op-amp has high gain. Amplifiers built with op-amps work with DC input voltages as well and this is this has to be contrasted with the common emitter amplifier. At this point, you should point out to students that if you have a common emitter amplifier and applied small DC voltage like 2 millivolts, even if the op-amp has a gain of 100, it is even if the common emitter amplifier has a gain of 100, it is simply not going to amplify because the biasing the because the coupling capacity is going to simply block of the DC input voltage. Whereas in op-amps, if you make an amplifier like an inverting amplifier or a non-inverting amplifier, it is going to work with DC input voltages as well as time varying input voltage and that is a very big plus for op-amp circuits. And it is extremely useful in sensor applications where things are more or less steady, they do not really they are not transient. The user can generally carry out circuit design without a thorough knowledge of the intricate details and we will see what those details are often op-amp. This makes the design process simple and you have already seen that yesterday in the in process of the Sharma lecture. So, one last point which is very important and which people often ignore and that is this, the last point. And Einstein of course, was a great scientist, but he also had a great sense of what is required and what is not required. So, Einstein said this, make everything as simple as possible, but not simpler. And when you say that op-amp is a black box, you should realize that it is not a black box and there are things that we need to worry about at some point. Things like offset voltages, input bias currents, in many applications they are not important, but there are applications where these will play a crucial role and you will need the user will need to pick an op-amp which has favorable characteristics in that respect. So, we should definitely know where the ideal world ends, that is when you can treat op-amp as a black box, not worry about it inside and where the real one, the real world begins. So, that is very important and that is why I am going to show you this figure that is the block diagram of the, that is the block diagram of a real op-amp and that is 741. So, I will zoom it to this level and if you cannot see the names etcetera do not worry about it, these slides are on the web, you can just download it and view it later at your convenience. But this is just essentially gives you an idea of how complex 741 is inside. 741 was is one of the earlier op-amps, one of the first perhaps and these days we have op-amps even made in CMOS and they might look quite different than this. So, the 741 it has got lots of transistors, some 25, 26 transistors and this is the input pair. So, Q1, Q2 is the input pair and that is the inverting input, sorry that is the non-inverting input, this is the inverting input and in the block diagram we show these inverting and non-inverting inputs here, the inverting input and the non-inverting input, inverting input alright. Then there of course there is a supply voltage Vcc and minus VEE and those are shown in op-amps like this Vcc and minus VEE. In many figures we just drop these out because we just assume that they are there. Next, so that is the first stage and that is the current source, the biasing current source that Professor Shama was mentioning yesterday, that the output of the first stage is taken from here, that is given to the next stage and then that is an output push-pull pair, that is the output terminal. If the current has to be sourced, it is sourced like this. If it has to be sunk, it is sunk like this alright. Now, the students really at this stage will not know the details, but it is good to tell them that it is complex and therefore sometimes we need to worry about offset currents, bias currents, slew rate and so on. There is this single capacitor here in this entire circuit, there is just one capacitor and that is used to compensate the op-amp and to make it stable and you can certainly should read more about this in a book like Gray and Mayer or Cedransmit. Now, because of this capacitor also there is slew rate limitation because this capacitor can be charged or discharged by a certain current coming through the circuit and that places a limit on the slew on the on how fast the output can increase or decrease. So, all those things are actually not to be explained to the students at this point, we just need to tell them that this it is indeed a complex circuit. So, let us go ahead and this whole complex circuit is represented by this simple block here and very often we will not even show V C C and minus V V E. Let us go to the next slide. As far as this course on basic electronics is concerned we do not really need to worry about the inside the internal details of an op-amp, but just look at it look at what it does. So, this is the op-amp you will you will use a plus V C C minus V E like that and then the equivalent circuit of that entire block is simply an input resistance which is large for an ideal op-amp it is infinity. Then followed by current voltage gain and then there is an output resistance between the output terminal and ground. And very often or almost always we say that R i is so large that this is like an open circuit and therefore, these inputs do not really draw any current. And we say that this R o is 0 which is realistic in many cases and therefore, this output voltage is simply the voltage gain times the input voltage and the voltage gain of course, is very large. The external resistances which are of the order of a few kilo ohms are generally much larger than R o this resistance and much smaller than R i this input resistance and therefore, we can assume that R i is very large infinity R o is very small 0 without significantly affecting the analysis and that is indeed what we do always and that is what makes the op-amp such a nice building block because you do not need to actually worry about these values of R i and R o. Next slide next point now since this is the first time the students are looking or even seeing an op-amp it is very important to point out that V C C and minus V E which could be plus minus 5 volts to plus minus 15 volts they must be supplied otherwise the op-amp will not work and that of course, has to go as to do with this previous circuit. If you do not supply this V C C and V E obviously, none of these transistors will get any bias and things will not will simply not work. So, I am saying this specifically because there are students in the lab who do not connect the supplies and ask the ask the instructor what is wrong and debug their circuit it happens very often or they do not connect ground that is also ground actually is in the op-amp if you notice there is no explicit pin for the ground. So, therefore, all you have is this all you have is this V C C rail here on top and minus V E rail at the bottom and therefore, there is no there is no connection for in a 7 4 1 4 ground and therefore, sometimes people do not connect ground anywhere and then they get in trouble and when you do this experiments the students do the experiments for the first time they will often make this mistake that is why it is important to point these out. Next point as we have said the op-amp circuits the supply voltages are often not shown explicitly, but we understand that they are always there. Now, here is a small table which shows the performance of an ideal op-amp and the performance of 7 4 1 just some key parameters. So, the for an ideal op-amp the gain or the voltage gain is infinite for a 7 4 1 it is not infinite, but fairly large 100000 which comes to 100 dB the input resistance for an ideal op-amp is infinite for a 7 4 1 it is 2 mega ohms. Now, 2 mega ohms is still much larger than let us say 1 kilo ohm or 5 kilo ohms and therefore, we often treat this r i as infinite r o ideal op-amp is should be 0 for a 7 4 1 it is like 50 ohms or 75 ohms which is still much smaller than this kilo ohms that we normally use in circuits. Therefore, we can treat that as 0, but this table tells you that if you use in an inverting amplifier if you use 1 mega ohm and 2 mega ohms or 100 ohms and 50 ohms you will not get the gain that you expect because then this assumption of r i being very large r o being very small will not hold any more let us go to the next slide. So, next slide actually is very very important and that will also answer the question that was raised yesterday about virtual ground and stuff like that. So, here is the description of an ideal op-amp we have already ignored r i and r o saying that they are very large and very small respectively. So, if you have that and if I plot now v o as a function of v i I will get something like this. Now, if we if your saturation voltage or the peak voltage that you can get from this op-amp is let us say 10 volts just as a simple number 10 volts and minus 10 volts then you have a rail to rail difference of 20 volts and 20 volts and the gain of 10 raise to 5 that will give you something like 0.2 millivolts. So, if you change the input by 0.2 millivolts let us say you change it from minus 0.1 millivolts to 0.1 millivolts remember we are talking about millivolts here very small voltage minus 0.1 millivolts plus 0.1 millivolts you can change your output from minus 10 volts all the way to plus 10 volts. So, it is a very very small input voltage that gives you very large change in the output voltage and that of course, is characteristic feature of the op-amp a very large gain. If you look at now if you look at this in a more normal scale where this goes from minus 5 volts to 5 volts the output goes from minus 10 volts to plus 10 volts you see that this entire region the so called linear region gets compressed into just a vertical line and this looks more like a comparator characteristics and an op-amp indeed is a comparator in the open loop and that is what it boils down to. So, it is very important to show these kinds of figures to the students. So, that these things get fixed in their mind that there is something called saturation there is something called linear and the extent of the linear region is very very small and small is like 0.2 millivolts very small compared to any voltages that we normally use like a few volts. So, what next? So, the output voltage V o is limited to plus minus V sat where V sat is V sat is actually depends on that very first block that I showed and it is about 1 and a half 1.5 volts less than V cc. In this example we have taken it as just a nice number 10 volts, but it could be 12 volts 13 volts and so on. Let us go to the next slide. So, let me expand this again. So, this is just a reproduction of that earlier figure. So, now comes the important point about op-amp circuits. Broadly op-amp circuits can be divided into two categories and you must be knowing this already. When the op-amp is operating in the linear region that is one whole class of circuits and when the op-amp is operating in the saturation region that is another class of circuits and these are fairly different in terms of understanding. So, therefore, we need to just make a distinction right at the beginning. Now, what decides whether the op-amp in a given circuit will operate in the linear region or saturation region that will depend on different things. One the input voltage magnitude, two the type of feedback and that of course, for the Sharma is pointed out to some extent yesterday whether the feedback is negative or positive. If it is negative feedback then the op-amp is likely to work in the negative in the linear region. If it is positive feedback then the op-amp is likely to work in the saturation region and we will take just a qualitative look at feedback a little later. Feedback is very complicated concept, but let us just look at it qualitatively later on. Is the audio alright any problems? So, what is the implication of the linear region? Let us look at that now. So, this is very, very important and it is good to point it out right at the beginning of your op-amp lectures. So, we have already said that this linear region is extremely narrow and if your op-amp is in this region what it means is your v plus minus v minus this difference here is the output voltage which could be anywhere between minus 10 and 10 divided by a v the voltage gain and the voltage gain is 10 raise to 5 100000. What it means is this v plus minus v minus is nearly equal to 0 and therefore, we can say that v plus and v minus are nearly equal if the op-amp is operating in this linear region. If it is not if it is in this region or in that region then of course, we cannot say any such thing and indeed there are circuits in which v plus and v minus can be vastly different alright that is one. So, that is simply following from the fact that the op-amp is operating in the linear region and that the gain is large. Second since the input resistance is typically much larger than any other resistance in the circuit normally this would be in the order of kilo ohms and the input resistance would be of the order of mega ohms. This input current I in here that current or that current is nearly 0. So, that is another very useful feature that we are going to use in analyzing circuits. So, all of these linear circuits in which op-amp the op-amp is operating in the linear region can be understood by these two so called golden rules. So, one golden rule is that the v plus and v minus are nearly the same. The second rule is that the input bias current of the op-amp is 0. These two golden rules enable us to understand several op-amp circuits. We will not go through this may be let us just go through this linear the first inverting amplifier and we will not go through the non-inverting and so on because professor Sherma has already talked about this, but here I want to just point out a few things which are included in the slide you will find it convenient to use in a class. So, essentially it is simply the application of these two golden rules that we talked about since v plus and v minus are nearly the same and v plus is here is 0. Therefore, v minus is also 0 that is number one that immediately tells you what this current should be v i minus 0 by r 1 and that is v i by r that is r 1. So, the non-inverting input is at real ground here and the inverting input is not at real ground, but is at it is at virtual ground is virtually the same as 0 volts, but not really at 0 volts. So, that is why it is called virtual ground. The next thing that we use is the second golden rule since this current is 0 the current that we calculated must go around like that through this R 2 and that immediately gives us the output voltage. So, we will let us not go to the algebra it is very straight forward you have done it yesterday. So, this is what you will get one important question that students have often asked is what happens to this current an important question to answer. So, that nobody has any doubt about that in their minds. So, where does the current go this is where the current goes and I need to expand this quite a bit. So, the current that is coming from v i v i by r 1 that is the current that goes through R 2 and then after that if there is a load resistance some of that current can go through the load resistance and some current will always go through the op amp even if this and you know that the circuit works even if there is no load resistance in that case this all of this current will simply go through this op amp. And now the at this point it is important to connect this simple picture with the actual op amp diagram and that is just. So, that people know what is happening inside an op amp just at least have some idea. So, let us do that and that is this slide right. So, if this current is going into the op amp this is the op amp then the current actually travels like that this q 20 which you may or may not be able to read, but I will just point out the path. If the current is being is going inside the op amp then it goes from this output terminal through this transistor into minus v e. If the current is coming out of the op amp then it comes from v c c it comes to this transistor and then it goes out. So, there is a there is definitely a connection between this detailed plot detailed diagram and the simple box that you see in the in the symbol. So, getting back so let us at this point it is good to show some pictures. So, that students get some idea of the usefulness of the circuits. So, here there is an input voltage the blue the red one and output voltage and this design for a gain of 10 k by 1 k 10 volts. So, that is a picture always helps to fix something in mind. So, you know students know that this is not in the air it is actually here. Here is a very important point something that we actually did say earlier. Now, so this is this is very crucial. So, the gain of this inverting amplifier is minus r 2 by r 1 it is called the closed loop gain as opposed to the open loop gain which is very large. The gain this gain the closed loop gain r 2 by r 1 can be adjusted simply by changing r 1 or r 2 it is as simple as that and you do not need to worry about what this will do to the bias current inside the op amp and so on that is very very important. Imagine trying to do the same thing in the common emitter amplifier you simply cannot do it. For the common emitter amplifier on the other end the gain is minus g m times r c parallel r l if you remember all of this. This actually will depend on how the b j t is biased because this g m depends on i c and the moment you change the temperature or beta or something something this gain is going to change and if you change your r l that will not affect the bias current because of the coupling capacitor but it will change the gain in a cumbersome manner because it comes in parallel with r c. So, the op amp circuits the design is extremely simple you just need to design the external components not worrying about what is inside the black box the op amp and that is why op amps are the popular. Now, one question that of course will come to students mind students mind this is there a limit to this amplification and of course there is if you keep on increasing the input voltage beyond a certain point the op amp will saturate and at this point it is good to show a picture like this showing saturation. So, here the op amp has saturated and therefore it is not useful for this particular input voltage because the output is distorted I am not going to go through this is another important slide another limitation that we have an op amp. So, not everything is not perfect and we need to worry about some of these things if you keep increasing the frequency of the input signal here it is 25 kilohertz you will not get the output that you expect you will expect what you will expect from this red input is the green output but that does not that is not what actually happens what actually happens is this triangle waveform comes at the output and as you know this is because of the slew rate limitation of the op amp. The slew rate limitation is basically that the output can only change or increase or decrease at a maximum rate for the 741 it is 0.5 volts per microsecond let me check that. So, the slew rate so this is this is a slide that you can show to explain what slew rate does to an inverting amplifier slew rate of an op amp is the maximum rate at which the op amp output can rise up all for the 741 the slew rate is 0.5 volts per microsecond and in fact you can see these slopes these will turn out to be more or less that 0.5 volts per microsecond and if why is the output not given by this green curve which is the theoretically expected output because this the rise here is faster than what the op amp can give you the op amp can only give you this rise and this rise here actually is far higher than 0.5 volts per microsecond therefore the op amp cannot keep up with the input voltage. What do you do in such cases in such cases you choose an op amp which has a higher slew rate and there are of course these op amps will be more expensive but they are available in the market do not ask me what the number is but there you can look up the web and you will find those. So, let us go ahead and I am not going to talk about this is I am not going to talk about non-inverting amplifier but before we leave the topic of inverting amplifier here is one very very important point and it is something that a doubt that lingers in students questions and it must be clarified alright. Now, if you look at the look at our analysis how did we analyze the circuit we said that these two are virtually the same. So, therefore this is 0 volts then we calculated this current we said that this current also goes like this and then we said this v o is 0 volts minus i 1 minus i times r 2 and therefore we got minus r 2 by r 1. Now, suppose this plus and minus were actually exchanged you will get this circuit and if I carry out the same analysis once again I will again get the same expression and reality of course we know that this will not happen this circuit will not act as an inverting amplifier with this plus and this is minus and that is very very difficult at this stage to explain. So, we can just as far as the students are concerned we can just refer to feedback at this point and just leave it at that and tell them that this circuit will not actually work and we will come back to that later. So, why does it not work because our assumption that the op amp is working in the linear region does not hold in this circuit and that is because the feedback has become positive. Now, it turns out that the circuit 2 is also useful which is actually a Schmitt trigger and we will discuss that later. So, that is one important point you must make when you are before leaving the topic of the inverting amplifier. So, even about even when we talk about the inverting amplifier there are so many things that textbooks do not talk about. Textbooks will only show the circuit they will say v o is minus i r 2 by r 1 there is a negative sign therefore it is called inverting amplifier and it will they will stop at that. But there is so much that I mean there is so much more to it for example, the op amp saturates if the input voltage becomes large the op amp is slew rate limited if the input frequency is high and so on. All of these things are very often not even mentioned in textbooks and that gives the wrong very often gives the wrong impression to students. So, it is important to just point these out and all of these can be done if you just show a simple show a few pictures even without a retail explanation. So, now let us go to we will not go to we will not go to the non-inverting amplifier because it is fairly straightforward you have done it yesterday as well. This is an important question inverting or non-inverting which one will you choose? Say let us say we want the gain of 10 I can make r 2 by r 1 10 here I can make r 2 by r 1 equal to 9 and I will get the same gain in both these circuits which one of these is preferable. Of course, one thing is the sign here is different, but let us say we are not bothered about the sign we just bothered about the amplification. Then which configuration should be preferred? So, that is an important question and that has to the answer has to do with the input resistance. The input resistance in this circuit is r 1 because this is at virtual ground input resistance in this circuit is the input resistance of the op amp which is very large. Therefore, the non-inverting configuration is preferable if your input resistance is a constraint in your circuit. So, the rest of the slide just says these points. So, let us go ahead. What is the special case of the non-inverting amplifier? It is the buffer and what is the buffer with r 1 very large that means open circuit. So, you have an open circuit here and r 2 very small or 0 ohms you have a short circuit here and that is called a buffer. So, the gain of this circuit becomes simply 1. So, v o is equal to v i and of course, it looks at the first glance it looks like we are not achieved anything because we have just got we have just reproduced this v i without really amplifying it and students will wonder at this stage what is the use of this. Then we need to talk about how an amplifier or how a load will load an amplifier and how a buffer helps in solving that problem. So, let me let us just illustrate that point. Suppose, you have an amplifier like this right. So, there is an amplifier with a source voltage v s and an output resistance R L. Now, from this amplifier this gain is a v and you would expect the output voltage to be a v times v s and that is in the ideal case. In practice what happens is because of this R s and R i because the R i is not infinite there is a voltage division here because this R o is not 0 there is a voltage division here and then you will end up with instead of a v times v i you end up with a v times this voltage division factor times v s. So, that is not desirable and that is where a buffer can help. So, there are some there is there is one more slide which explains that and you can go through it later, but that is an important point to explain when you talk about a buffer. So, I will I will skip that here is an example where a buffer is useful ok op-amp circuits linear region continued and this summer is simply an extension of the inverting amplifier and it is a good circuit to describe at this stage. Can we make this full screen or something is it possible otherwise every time I go to the next slide this is is it possible ok. So, let us look at the summer again it is a circuit in which the op-amp is working in the linear region and therefore, this v minus is virtually the same as v plus which is 0 and and so on. Then you can calculate all of this current i 1 and i 2 and i 3 then the second golden rule that the input current of the op-amp is 0. Therefore, all of this current which is i 1 plus i 2 plus i 3 will go through R f and eventually you can calculate the output voltage ok. You know you know all that and that is what you will get and it is not go through it ok. I wanted to show you this figure which can be useful for students to understand what is going on ok. So, in this figure we are 3 input voltages v i 1 is a DC voltage of 1 volt v i 2 is this green 1 v i 3 is the yellow 1 and this circuit is going to add all of them I think R 1 R 2 R 3 are all equal to 1 k and R f is 2 k. So, you are going to get v o is equal to minus 2 times all of these voltages added and that is what your output comes to and you see that this DC voltage 1 volt has given you a shift of minus 2 volts at the output and this is also a good way to point out that the op-amp work for DC input voltages as well as AC input voltages which in common emitter amplifier cannot do. So, it is just shows goes to show that the versatile nature of the op-amp as a building block. So, there is one question why external resistance is larger than r o and smaller than r i ok. It is by design when you make an op-amp circuits you use resistors like 1 k, 5 k, 10 k, 50 k, but you do not use things like 1 meg or 2 meg or 10 meg or you do not use things like 5 ohms, 10 ohms, 50 ohms right. So, it is by design it is not and it is because the op-amps have finite r i and r o. So, what will be the output of an op-amp with AC input of 50 millivolts on 1 terminal and 50 millivolts DC on another terminal ok. If you are using the op-amp in the open loop 50 millivolts DC and DC on 1 terminal 50 millivolts AC on the other terminal ok. So, the op-amp is in the open loop op-amp is going to act like a comparator and you are just going to get a square wave may be with whatever duty cycle it decided by these numbers. That will also and if you are using the op-amp in the open loop you need to actually worry about the offset voltage. So, the output will also depend on what is the output the offset voltage of the op-amp not just your inputs especially if the inputs are so small. How to check the status of an op-amp IC in a lab the status of an op-amp you mean the question is not very clear I can see that this question can mean two different things one whether the op-amp is working to check that there is something called a linear IC tester you can just plug the IC the IC into that machine and then it will tell you whether it works or not. The other thing is to hook up a simple inverting amplifier and see if it works, but how to check the status of an op-amp IC in a lab if you are if you have a working circuit and you want to know whether it is in the linear region or not just look at v plus and v minus if they are very close then it is in the linear region. Under what circumstance op-amp amplifier alternately coupled is used I do not quite understand this question as far as op-amp amplifiers are considered like inverting non-enhancing you can connect AC inputs directly to the inputs you do not really need any coupling capacitors alright so let us go to the next part of this op-amp circuits part two okay. So I think in this part we are going to continue with linear circuits as well let us go to the next slide okay one very important concept that students are often not very familiar with is the so-called common mode and differential mode voltages and the common mode projection ratio it is so important that it has to be really drilled in with some example at an early stage okay. So let me let us just take this example and this is a very very typical instrument instrumentation amplifier kind of application let us say you are sensing a temperature or pressure and that sensor that quantity is going to influence one of these resistors for example if it is a strain gauge then this resistance is going to be mounted on the strain on the on the part that you are going to measure the strain of and all these others are constant okay so this is a very very commonly used bridge configuration. So let us look at this common mode and differential mode voltages in the context of this common application okay next. So let us consider this bridge circuit for sensing temperature pressure etc with R A R B R C all equal equal to R and this R D we will say varies with the quantity to be measured it could be temperature pressure strain etc. So this all of these R A R B R C are equal to R and R D is equal to R plus delta R where delta R could be positive or negative depending on whether the temperature or pressure is more or less than the nominal temperature okay next. So the bridge what is the purpose of this bridge? The bridge converts this delta R which is the result of a temperature change or a pressure change to a signal voltage and where is the signal voltage taken that is taken between V 1 and V 2 here and of course this voltage is going to be small because delta R is small and then therefore that needs to be suitably amplified and that is the purpose of an amplifier and this could be a difference amplifier it could be an instrumentation amplifier and then we will see why an instrumentation amplifier is used. So let us look at this particular bridge circuit and this essentially is the motivation for a large common voltage reaction ratio and definitions for this common mode voltages differential mode voltages. So assuming that this amplifier has a large input resistance what it means is this current and this current drawn by the amplifier is 0 in that case V 1 is going to be simply R R B by R A plus R B times V C C and that is just half V C C. So V 2 is R D which is R plus delta R divided by R C which is R plus R D which is R plus delta R times V C C. So if I put X a small number the fraction as delta R by R then I get half 1 plus X by 1 plus X by 2 times V C C and X is a small number it could be like 0.05 0 2 0.1 plus or minus depending on the quantity that you are measuring and I can use this you can I can simplify this using approximations and I get finally something like this half 1 plus X by 2 times V C C. So this V 1 here is half V C C V 2 here is half V C C plus a little bit extra and that extra quantity is actually proportional to the signal that you are trying to measure and it is good to take an example at this point just to fix these ideas in the mind of the student. So let us take an example let us say V C C is 15 volts R is 1 K delta R is a small number 0.01 K. So this is like no 1 percent of the nominal value and V 1 will be V C C by 2 which is 15 volts by 2 7.5 V 2 will be 7.5 plus that X by 2 factor and that comes to 0.0375 or 37.5 millivolts. So the differential mode signal that you are looking at the difference between these two is actually very very small compared to the common mode which is large 7.5 and that is actually the key to instrumentation amplifier. So next slide. So this is the same circuit as before and let me and this is what we got earlier. So the V 1 node was sitting at 7.5 volts V 2 is sitting at 7.5 plus a very small number 37.5 millivolts much smaller than 7.5 volts and what we would like to do is to amplify only V 2 minus V 1 that we would like to amplify only 0.0375 and not the 7.5 because that is the quantity that is proportional to the signal that we are trying to measure. So at this point it is we need to define a few things. What is the common mode voltage defined as it is half V 1 plus V 2. In this case V 1 and V 2 are nearly 7.5 volts and if you take half of that you will just get 7.5 approximately. V D is the differential mode voltage and that is the difference between V 2 and V 1. In this case that is 0.0375 or 37.5 millivolts. So these are the definitions. So the common mode voltage is defined as V 1 plus V 2 by 2 the average of the two. Differential mode voltage is defined as the difference between the two and in this case as we said before we would like to amplify only the differential mode part and not the common mode part. So what is the important point to note in this particular slide that is here. Note that the common mode voltage is quite large compared to the differential mode voltage. It is 7.5 volts compared to the 37.5 millivolts that we are trying to measure and this is a very common situation in transducer circuit because we are always going to use some bridge and therefore this is very common. Now this leads us to the definition of the common mode rejection ratio. So here it is once again and there is an amplifier V plus and V minus. So V plus V minus are the inputs to this amplifier and it has got a common mode component V c and a differential mode component V d. So V plus is V c plus V d by 2 V minus is V c minus V d by 2. So an ideal amplifier would only amplify the difference between these two and that is just V d and that will give you some gain times V plus minus V minus times A d times V d where V d is called the differential gain or simply the gain A v. In practice as we know the amplifier will also amplify the common mode component and the actual output will be given by the A d times V d which we want plus some common mode gain times V c which we do not want. So A c times V c is the output voltage that we actually do not want. In fact we want it to be 0 where A c is called the common mode gain. So this is now very important. The ability of an amplifier to reject the common mode signal is given by the common mode rejection ratio C M R R and that is simply A d by A c. So if A c is small, A d is large then C M R R is going to be large and you want this C M R to be infinite or as large as possible. For the 741 op-amp the C M R R is about 90 dB which comes to 30,000 and 30,000 in many cases is considered large enough and we might in fact say that it is infinite. So now even if the op-amp as an infinite common mode rejection ratio, there are still some problems, there are still some mismatch issues between the in the in the resistors that you use. For example, let us take an example in the next slide. We will come back to the C M R R later. So let us look at two circuits. One is the difference amplifier, the other one is the instrumentation amplifier and see how they perform with respect to these kinds of applications where there is a large common mode voltage and a small differential mode voltage. So this circuit we have done yesterday. I will not do it, I will not go through the derivation but I would like to point out here that this the gain of this circuit can be derived in two ways. One, the usual way just assume that just use this fact that I plus is 0 calculate this V plus equal to V I 2 times R 4 by R 3 plus R 4 and V plus V minus being the same this voltage is also given by the same expression. Then you can calculate this current and you know this current goes like that and then finally, you get the output voltage. So this is something that we that is standard and we that is certainly one way of doing it. The other method of deriving this result the same result what is the final result? Let me just read it out here R 2 by R 1. So the result is V o equal to R 2 by R 1 times V I 2 minus V I 1 and your process Sharma has done this yesterday. But I just wanted to point out another interesting way of deriving this same result and that is by using superposition. So let me explain that. Now this circuit actually since the op amp is in the linear region we are free to use superposition and what does it mean? That means we can I can make this V I 2 equal to 0 apply V I 1 calculate V o 1. Then I can make V I 1 equal to 0 apply V I 2 and calculate V o 2 and finally, my output V o is given by V o 1 plus V o 2. So that is another way of doing this and you can look at this details later. Just gives the student some confidence that superposition and all these things actually work in practice and are useful. Let us go to the next slide. So this is something that process Sharma was doing yesterday R 2 by R 1 times V I 2 minus V I 1. Now let us get back to let us put together our sensing mechanism this bridge circuit and the difference amplifier and see what happens. So we see some problems if I do so there is this V 2 minus V 1 that this circuit is going to amplify and we see that since it is since this circuit only amplifies V 2 minus V 1 that is exactly what we want. That is right now is not a problem but there is a problem because of the loading of this circuit of the bridge. So what happens is if I just if I just connect these two directly to these two terminals the inputs of the op amp inputs of the difference amplifier then this from here we are going to see some resistance R 3 plus R 4 and that is going to come in parallel with R D and therefore, I am going to basically disturb this value of V 2 which I expected to be something it is not going to be something else. So there is a problem there and that is because this difference amplifier does not have a large input resistance. So that is one problem we will come we will also mention another problem. So the resistance seen from V 2 is R 3 plus R 4 which is small enough to cause V 2 to V 2 to change and that of course is not desirable because then we are not going to measure what we intend to it is going to be modified by this R 3 plus R 4 factor and that is something that we certainly do not want in a good instrument. So definitely need to improve on the input resistance of this difference amplifier. So we will discuss and improve difference amplifier later, but before we do that let us see let us point out another problem. Let us discuss another problem with the above difference amplifier which can be which can be important in some applications. So let us look at the next slide. So in the next slide we are showing this difference amplifier again and we are applying V i 1 equal to V c minus V d by 2 and V i 2 equal to V c plus V d by 2 where these are the common mode voltages and the common mode and differential mode voltages respectively. All right now let us say the op amp is ideal and it has infinite common mode rejection ratio. So the CMRR of the op amp itself is not an issue, but even this R 1 and R 2 would not be exactly matched. For example, this R 3 is expected to be exactly equal to R 1, R 4 is expected to be exactly equal to R 2. In reality they are going to be slightly different because these resistors have some tolerances and they are not going to be exactly equal. So let us just take an example and say that R 3 is not exactly equal to R 1, but it is R 1 plus some delta R. In that case what you get is this expression you can show this and then you will get R 2 by R 1 times V d minus X times V c where X is delta R by R 1 plus R 2. Show this this is very important do not just take my word for it go through the algebra do the simplification and show that you actually get this result. So what is the bottom line? The bottom line is that now we have a V c here the common mode voltage which was not there earlier in our expression earlier we had just R 2 by R 1 V i 2 minus V i 1 that was fine. Here now we have R 2 by R 1 the differential mode input and there is a common mode term and of course the common mode term is going to get multiplied by a small number X, but let us see it might still have an effect. So what is the key? The key is that this V c is much larger than V d and therefore even if this X is small this term and this term actually could be comparable and that is a problem. So what you would think is a purely differential mode output will be sort of corrupted by this common mode term and we do not want that. So let us just take a look at some numbers. Let us just look at this specific example the same example as we had before in that the common mode voltage was 7.5 volts V d was 0.0375 volts and now what is the common mode term in the output voltage that is X times R 2 by R 1 times V c and that is 0.75 volts. What is the differential mode term in the output voltage that is R 2 by R 1 times the differential mode voltage and that is 0.375 volts right. So in fact the common mode voltage is a completely spurious output that we do not want, but it is substantial you can see that in fact in this particular example it is even larger than the differential mode contribution to the output voltage and therefore if you measure this measure the output voltage you are going to get some get you are going to get a wrong value of the output and therefore we this is not desirable. So therefore we need a circuit which reduces which will reduce the common mode component at the output. So in summary what we had we there we discussed two problems with this different amplifier if you are going to hook up a bridge circuit here then it is going to bother it is going to change the voltages in this bridge circuit that is one because it is input resistance is not very large. Second if there is a component mismatch between say R 3 and R 1 or even R 4 and R 2 we took just one example then it has it is going to lead to substantial common mode voltage at the output which is going to spoil over the operation of the circuit. So how do you improve this and that answer you should already know and that is the instrumentation amplifier. So here is the instrumentation amplifier so at the outside we notice that it is not just one op amp but three op amps. So it is definitely going to be more expensive than a simple different amplifier but it of course comes with its advantages and that is why it is used. So first thing that we notice is this V i 1 and V i 2 are now going to see the input resistance of the op amp which is of the order of mega ohms. So you are going to see some mega ohms here you are going to see some mega ohms here and therefore if I connect this to a bridge circuit that is fine because then that bridge circuit operation is not going to be disturbed so that is one very important point. The other important point has to do with the common mode rejection ratio and that is what is explained in this particular slide so let us see what that is. So how does this circuit work it is very simple V plus is nearly equal to V minus if the op amps are operating in the linear region which they are in this circuit therefore this V a this voltage here is the same as V i 1 and V b this voltage here is the same as V i 2. So we have V i 1 here and V i 2 here alright so what is this current i 1 this current i 1 is simply V i 1 minus V i 2 divided by R 1 that is what this shows here. Now since this no current can go into the op amp either here or here what we can say is that this i 1 is also the same current in this resistors R 2 and this R 2 and this R 2 right. So that entire this i 1 the path that it will follow is like this right and therefore this V o 1 minus V o 2 is going to be R 2 plus R 1 plus R 2 times i 1 and that is and finally what you get here is simply the same difference amplifier that we have seen before and if we put all of these things together then you will get this expression R 4 by R 3 1 plus 2 R 2 by R 1 times V i 2 minus V i 1. Now how is this improved circuit in terms of the CMRR and the reason is very simple. Let us consider that this V i 1 and maybe I have another slide on that let me just draw. So this is simply an illustration of what we were just saying even if I hook up another circuit here like the bridge this is going to draw very very small current 0 current and therefore this V 1 is not going to change this terminal is also going to draw very small current therefore this V 2 is not going to change. So in other words like hooking up this instrumentation amplifier to my bridge circuit I am not going to disturb the measurement that is important and that is because of these large input resistances of these op amps ok. Next so let us the next slide has talks about the CMRR let us look at that ok. Why is this a better circuit as far as CMRR concerned is concerned that is given here. So as we have seen earlier V i 1 and V i 2 can have a large common mode component V c alright. So as we have seen earlier V i 1 and V i 2 can have a large common mode component and we saw an example where this V c was 7.5 volts very large indeed. What is the effect of V c on this particular instrumentation amplifier circuit let us see. So at this node V a is V i 1 and let us say that is given by V c minus V d by 2 the common mode component and the differential mode component V b as we said is the same as V i 2 and that is the common mode component V c plus V d by 2. Now what is will this current change because of the common mode voltage actually turns out does not change because this current will still remain V a minus V b divided by R 1 and that is this term minus that term and you can see that this V c is simply getting cancelled and you are getting this current dependent only on V d which is a very nice thing ok. And this holds even if your R 2 and R 2 prime are not matched normally they are supposed to be the same but even if R 2 and R 2 prime are not exactly equal suppose this R 2 prime is equal to R 2 plus delta R this current will still not have any term in V c ok and that is why the output of the circuit will not depend on V c the common mode input voltage very very important feature of the instrumentation amplifier ok. So the instrumentation amplifier improves on the difference amplifier in two aspects first it provides a large input resistance at both at both these terminals and it provides an excellent C M R R in fact in this ideal case the C M R R is infinite because there is no output there is no V c at all in this output voltage. Then there are a few other things current to ok let us just talk about current to voltage conversion actually there is I think I have more material than I have time for so I will have to add some point choose between topic. But let us look at this current to voltage conversion why are you worried about current to voltage conversion because some circuits produce an output in the form of a current ok for example if you shine light on a photo diode the output is in the form of a current which we would like to convert into a voltage. So if the output of a circuit is a current it is convenient to convert that into a voltage for further processing and that is why we need a current to voltage conversion ok. What is the simplest current to current to voltage conversion you can think about and that is a that is a simple resistor and so you pass the current through a resistor you will get V o equal to I s times R ok. So that is the first thing that comes to mind not adequate of course because because of loading effect suppose you have this simple resistor to convert your current into a voltage. Now if you do not have anything connected to it V o 1 is I s times R now the moment you have an amplifier connected to this circuit it is not I s times R anymore because because this R is now going to be R parallel R i so it is going to be V o 1 equal to I s times R in parallel with R i and that is why your input voltage itself is going to change and therefore what you measure will depend on the input resistance of the amplifier therefore it is not desirable to have just a simple resistor to convert a current into a voltage and that is where op amp again comes to a comes to a rescue and let us see how ok. Let us go to the next slide ok. So again the operation of the circuit is extremely simple and it is like this. So there is a current and we know that this current in entering the op amp is 0 therefore this current has to go like this and of course eventually it will go into the op amp and so on not a concern right now. So and this since the op amp is in a linear region we say that P minus is nearly equal to 0 volts and the output voltage then is 0 minus this current I s times R and that is exactly minus I s times R. So you have an output which is proportional to the input current and just a multiplying factor R. Now note that here although we have a load resistance here it does not enter this expression right. So there is there is no dependence of the output voltage on the load resistance and that is an extremely desirable feature of a current to voltage converter that will not happen if you just use a simple resistor to current to convert a current into a voltage. Here is an example a reverse biased photo diode you shine light on it it generates a current and that that current that current will produce an output voltage. So these things are used all over the place for sensing light ok. So that is ok let us go to the next integrator I think Professor Sharma has already talked about this yesterday will not discuss this further but I just wanted to point out that there are some plots that you might find useful ok. So here is a plot if there is an input voltage of this kind that is the output voltage and you can actually show this in the class if you like and ask the students that to verify that this output voltage is going to be a certain value and so on. Here is a square wave example and corresponding output voltage for certain values of R and C ok. Then there are non idealities in op-amps like offset voltage bias currents and so on and I put all these material in the slides but in a basic electronic course probably there is not enough time to cover these things. So I will not really talk about this right now but you are welcome to just look at it later. This table may be interesting to you ok and if somebody actually is building an application which requires the bias current to be very small then appropriate op-amps can be picked. For example the 741 has got a bias current of 80 nanoamperes and offset current of 20 nanoamperes that means the difference between this current and that current and an offset voltage of 1 millivolt ok. Now suppose you have an application where you are not satisfied with 1 millivolt then you can go for a more expensive op-amp and higher performance. So this op-op77 has got 10 micro volts offset voltage 1.2 nanoamperes bias current 0.3 nanoamperes offset current that so these two have BJT inputs and if you want a really low input bias current you can go for a FET input op-amp and it is a 411 that has got a bias current of just 50 picoamperes and that of course has to do with our JFET lecture yesterday. The JFET has got a reverse bias PN junction at the gate and therefore the currents are very small. So it is good to at least give some idea to the students that op-amps with various specs are available in the market ok. So there are some other slides that we can skip ok. I just have a few slides on filters and Professor Sharma has already talked about filters yesterday but I thought I will just share with you some of the slides which you might find useful to show in class to explain what a filter is all about ok. In this slide we have two voltages V1 a low frequency voltage and V2 a high frequency voltage and we are going to add these two V1 and V2. So this essentially is the motivation behind filters. What is the motivation? Why do you need filters? So this slide is can be used for that purpose. So in practice what we have is we have a signal like this which is a sum of two signals and we want to see either the low frequency part or the high frequency part and that brings us to low frequency filter low pass filter which will give you if I apply this V if I pass this through an appropriate low pass filter I will I will get this V1 as output. If I apply this if I pass this through a high pass frequency high pass filter I will get V2. So it will pass V2 and block V1. So that is just a motivation of V1 of the of filters what filters are all about ok. And before we actually go to op amp filters it is good to explain what ideal filters look like ok. So an ideal filter actually looks like a gain of 1 that is pass and a very sharp fall with I mean infinite infinitely fast fall and then 0 that is what an ideal low pass filter would look like. And here is an illustration of what it does ok. So this is the Fourier transform of an input signal. It has got a component two components before omega c where omega c is the cutoff frequency of this low pass filter and two components at which are higher than omega c ok. Now you are making this go through this particular filter and what this will do is it will chop off these two components and it will keep these two components the lower ones. And that is the if you look at the spectrum after at V0 of t then it will look like this. So it is good to explain filter operation in this manner ok. What are the various kinds of filters low pass band pass and at this stage it is good to still consider ideal filters with sharp edges and then come to real cases ok. So here is an example again this is something you will find useful in illustrating what is the low pass filter, what is the high pass filter, what is the band pass filter, what is the band DJ filter and so on ok. So let us go back let us just look at this slide in more detail. Now you may not be able to view this too well but go back I mean look at this slide later on download these and see. So the first example shows a filter which is a low pass filter 1 up to here sorry I need the pointer ok. 1 up to here and then a sharp drop and then 0 here ok. Now if I apply this signal that is combination of V1, V2, V3 I get this. If I apply this signal to this particular filter what it will do is it will remove this particular component that is this pin component and it will pass the other 2 sorry it will remove these 2 components that will pass the pin component and that is what you get. So just go through this slide and things are of course self-explanatory and you can understand what is what is happening in each case ok. What are the practical what are practical filter circuits? In practical filter circuits the ideal filter response is approximated with a suitable H of omega H of j omega which that can be obtained with circuit element. For example H of s could look like this to represent the 5th order low pass filter and in the rest of this pdf file we have only examples. Here we show an ideal low pass filter and actual low pass filter ok and then there are these definitions that there is this pass band and stop band and so on and some filters will have these oscillations and then of course the sharp is not extremely sharp but there is some db per decade fault and so on. So that is a this is an ideal case and there is a practical case and the students should actually know about this similarly for IPADs alright. I will just show some examples and then I think we will end the lecture and these examples you can actually show in class because then its filters is something which is very difficult because it is not possible normally to plot all of these things on the board. So if you have some ready made material like this it might be useful to you. So here is here are Butterworth filters order 1, order 2, order 3, order 4, order 5 and that is what H looks like on a linear scale ok. Now when we talk about filters the linear scale is not very useful because then we cannot make out the order of the filter very well. So therefore we can plot H in db and omega in log scale and then this thing comes out very clearly. So n equal to 1 filter will have a slope will have a drop of 20 db per decade this will have 40 db per decade and so on 5 will have 100 db per decade ok. So and these are the Shebyshev filters and you can point out the difference between Butterworth and Shebyshev. In Shebyshev filters you have these little wiggles in the in the pass band. In Shebyshev this is flat in sorry in Butterworth it is flat. Apart from that of course this for the same order n equal to 1 the slope here will be 20 db per decade the slope here also will be 20 db per decade and so on. So just wanted to share with you some of these figures which may be useful to you. High pass and then there are some examples ok. Let me just show some examples and all of these examples are actually ready made examples in the SQL distribution. So you can even ask the students to vary some parameter and see what happens and so on that can be useful to them. So here is a low pass filter and for this simple cases like this you can actually derive these results in class and then show this figure that this is what it will do. High pass filter and then there are some more complex examples second order band pass filter ok. This is a graphic equalizer this you can we do not have time to go through this but it is a circuit which is not given in standard textbook but it is useful to in the real world and the students might particularly get quite excited about it because this has to do with audio amp applications. So it is good to show them that some of these things actually are useful used in day to day life and are directly applicable ok. So there are more figures and we will stop at this point maybe I can just take a few questions.