1 00:00:00 --> 00:00:01 All right. Good morning, 2 00:00:01 --> 00:00:02 all. 3 00:00:02 --> 00:00:09 4 00:00:09 --> 00:00:14 You have two handouts, lecture notes and an article on 5 00:00:14 --> 00:00:19 mixed signal chips. A mixed signal stands for 6 00:00:19 --> 00:00:27 circuits that have both analog and digital components to them. 7 00:00:27 --> 00:00:31 The reason I am giving you the handout is that Lab 4 and also 8 00:00:31 --> 00:00:36 your last homework involve designing and building a mixed 9 00:00:36 --> 00:00:39 signal circuit. It's a real fun exercise. 10 00:00:39 --> 00:00:44 And I just wanted to tell you that from past experience people 11 00:00:44 --> 00:00:49 who have taken 6.002 often view the last lab as the single most 12 00:00:49 --> 6.002. fun thing they did in all of 13 6.002. --> 00:00:52 14 00:00:52 --> 00:00:56 So, as you go into Lab 4, you should be telling yourself 15 00:00:56 --> 00:00:59 I should be having fun, I should be having, 16 00:00:59 --> 00:01:05 I should be having fun. You have to positively psych 17 00:01:05 --> 00:01:08 yourself. Otherwise, it's going to go by. 18 00:01:08 --> 00:01:12 And then you're going to say boy, that was fun, 19 00:01:12 --> 00:01:16 I wish I had savored the moment as I was doing it. 20 00:01:16 --> 00:01:18 All right. Let's see. 21 00:01:18 --> 00:01:21 What do we do today? Today's lecture is actually 22 00:01:21 --> 00:01:24 going to be a fair amount of fun. 23 00:01:24 --> 00:01:30 We are going to blast through a bunch of fun things. 24 00:01:30 --> 00:01:34 And some things that you will be quite unprepared for. 25 00:01:34 --> 00:01:38 Until now, in the last two lectures with op amps we talked 26 00:01:38 --> 00:01:42 about negative feedback. That is applying some portion 27 00:01:42 --> 00:01:47 of the output voltage to the negative input so that I could 28 00:01:47 --> 00:01:50 control this high strung device, my op amp. 29 00:01:50 --> 00:01:55 Today, what we are going to do is try to get a handle on what 30 00:01:55 --> 00:01:59 happens if we use positive feedback. 31 00:01:59 --> 00:02:03 It's the usual curious child. You tell them to do this, 32 00:02:03 --> 00:02:06 and of course they're going to try to do this as well. 33 00:02:06 --> 00:02:11 And we are going to try to do that and see what happens and 34 00:02:11 --> 00:02:14 look to see if we can build some useful circuits. 35 00:02:14 --> 00:02:16 Today -- 36 00:02:16 --> 00:02:28 37 00:02:28 --> 00:02:31 As motivation, let me do a quick review of a 38 00:02:31 --> 00:02:37 circuit that should now become affixed in your brains in a 39 00:02:37 --> 00:02:41 standard pattern. This is a circuit that gives 40 00:02:41 --> 00:02:44 you negative feedback. 41 00:02:44 --> 00:02:56 42 00:02:56 --> 00:02:58 R1 and R2. 43 00:02:58 --> 00:03:03 44 00:03:03 --> 00:03:07 And I apply a vIN. By now you should be able to 45 00:03:07 --> 00:03:11 look at this pattern. And this is your inverting 46 00:03:11 --> 00:03:15 amplifier pattern. So, you should be able to write 47 00:03:15 --> 00:03:20 down by inspection this is simply vIN or the minus vIN 48 00:03:20 --> 00:03:25 times R2 divided by R1. This is an amplifier whose gain 49 00:03:25 --> 00:03:30 is controlled by the ratio of R2 and R1. 50 00:03:30 --> 00:03:34 This is a negative feedback circuit because it is always fun 51 00:03:34 --> 00:03:37 to do the intuition thing and say that look, 52 00:03:37 --> 00:03:41 if this voltage tends to go more positive than I care then 53 00:03:41 --> 00:03:44 this negative input goes more positive than I care. 54 00:03:44 --> 00:03:48 If that goes more positive then the negative input v minus 55 00:03:48 --> 00:03:52 becomes more positive in the plus input which yanks the 56 00:03:52 --> 00:03:54 output down. So, there is a nice 57 00:03:54 --> 00:03:59 counteracting force that keeps the output stable. 58 00:03:59 --> 00:04:03 Let's look at this circuit. Being curious engineers, 59 00:04:03 --> 00:04:08 let's look at the opposite here where I give myself some 60 00:04:08 --> 00:04:12 positive feedback in this op amp. 61 00:04:12 --> 00:04:24 62 00:04:24 --> 00:04:27 And it is going to be interesting to analyze this 63 00:04:27 --> 00:04:32 because what we find out on the face of it is not quite actually 64 00:04:32 --> 00:04:35 how it behaves. We are going to spend most of 65 00:04:35 --> 00:04:38 the lecture today on understanding the dynamics of 66 00:04:38 --> 00:04:42 circuits that look like this and to see if we can build some fun 67 00:04:42 --> 00:04:46 and interesting circuits and systems based on this kind of 68 00:04:46 --> 00:04:49 positive feedback. It is positive feedback because 69 00:04:49 --> 00:04:52 I am feeding back a portion of the output to the positive 70 00:04:52 --> 00:04:55 input. And you should be able to stare 71 00:04:55 --> 00:04:58 at this and already begin to intuit what should happen to 72 00:04:58 --> 00:05:01 this. Let's think about it. 73 00:05:01 --> 00:05:03 This is zero. Remember, with positive 74 00:05:03 --> 00:05:08 feedback, the famous v plus is equal to v minus method doesn't 75 00:05:08 --> 00:05:10 apply anymore. Let's apply very simple 76 00:05:10 --> 00:05:12 analyses. If this is zero, 77 00:05:12 --> 00:05:16 let's say for example that this output tends to go a little bit 78 00:05:16 --> 00:05:18 more positive. This output, 79 00:05:18 --> 00:05:20 due to some noise or perturbation, 80 00:05:20 --> 00:05:24 tends to go up a little bit. If that goes up a little bit 81 00:05:24 --> 00:05:28 then because of feedback this node tends to go up a little 82 00:05:28 --> 00:05:31 bit. If this node tends to go up a 83 00:05:31 --> 00:05:35 little bit this exacerbates the positive input here and this one 84 00:05:35 --> 00:05:38 goes cachunk, whacks into the positive rail. 85 00:05:38 --> 00:05:42 Let's take the other point of view and look at it intuitively. 86 00:05:42 --> 00:05:44 What if this one tries to droop a little bit? 87 00:05:44 --> 00:05:48 If it droops a little bit then the input at the plus terminal 88 00:05:48 --> 00:05:51 droops a little bit. If that tends to go down a 89 00:05:51 --> 00:05:55 little bit, that makes the output droop further and it goes 90 00:05:55 --> 00:05:59 and hits into the negative rail. I can see that this circuit 91 00:05:59 --> 00:06:02 wants to hammer into the positive rail or hammer into the 92 00:06:02 --> 00:06:05 negative rail because of the positive feedback. 93 00:06:05 --> 00:06:08 It is like if you give incredibly positive feedback all 94 00:06:08 --> 00:06:11 the time, and by positive feedback I mean feedback 95 00:06:11 --> 00:06:14 encouraging the child to do whatever the child is doing. 96 00:06:14 --> 00:06:17 It could be if he does bad stuff you give a lot of positive 97 00:06:17 --> 00:06:21 feedback or good stuff you give a lot of positive feedback then 98 00:06:21 --> 00:06:24 you are guaranteed to have a very good child or a very bad 99 00:06:24 --> 00:06:26 child. You are not going to have 100 00:06:26 --> 00:06:29 anybody in the middle. Same way here. 101 00:06:29 --> 00:06:33 By giving positive feedback you're going to drive this into 102 00:06:33 --> 00:06:37 the positive rail or drive this into the negative rail. 103 00:06:37 --> 00:06:40 Now, I am going to analyze this in two steps. 104 00:06:40 --> 00:06:44 First I am going to analyze this using a method you've seen 105 00:06:44 --> 00:06:49 before which is replace the op amp with its equivalent circuit 106 00:06:49 --> 00:06:52 and analyze it statically. And by analyzing it statically 107 00:06:52 --> 00:06:56 we are going to show that the simple static analysis will 108 00:06:56 --> 00:07:01 yield the following expression. I put this in quotes, 109 00:07:01 --> 00:07:04 well, for a reason you will see shortly. 110 00:07:04 --> 00:07:09 When I apply a plain and simple static analysis here is what I 111 00:07:09 --> 00:07:11 find. Let's go ahead with the 112 00:07:11 --> 00:07:15 analysis and see what is basically different about these 113 00:07:15 --> 00:07:17 two. And, first of all, 114 00:07:17 --> 00:07:22 I will confirm for you that our naive analysis we have seen so 115 00:07:22 --> 00:07:25 far will give rise to that expression. 116 00:07:25 --> 00:07:30 So, let's go ahead and analyze that circuit. 117 00:07:30 --> 00:07:38 And to analyze that circuit what I will do is replace the op 118 00:07:38 --> 00:07:46 amp with its equivalent circuit. If you remember the op amp is 119 00:07:46 --> 00:07:54 characterized by the following circuit, A times v+ minus v-, 120 00:07:54 --> 00:07:59 vOUT. This is the equivalent circuit 121 00:07:59 --> 00:08:04 of my op amp. And let me just impose that 122 00:08:04 --> 00:08:11 external circuit on this op amp. I have grounded my v- terminal. 123 00:08:11 --> 00:08:16 My v+ terminal goes through a resistor and a supply, 124 00:08:16 --> 00:08:20 the v into ground, it's the resistance R1. 125 00:08:20 --> 00:08:25 This terminal goes to the output through a resistor R2. 126 00:08:25 --> 00:08:30 So, this is the equivalent circuit. 127 00:08:30 --> 00:08:35 And I can apply the same good-old techniques I have 128 00:08:35 --> 00:08:42 learned about all through this course to this circuit and see 129 00:08:42 --> 00:08:45 what vOUT looks like. Very simply, 130 00:08:45 --> 00:08:51 vOUT is this expression here A times v+ minus v-. 131 00:08:51 --> 00:08:56 And because of my ground connection v- is zero. 132 00:08:56 --> 00:09:02 Then let me go ahead and replace v+ with the voltage that 133 00:09:02 --> 00:09:07 relates vOUT and vIN. What is v+? 134 00:09:07 --> 00:09:12 v+ is simply the current through this part of the 135 00:09:12 --> 00:09:18 circuit, the current flowing here times the resistance R1. 136 00:09:18 --> 00:09:22 That gives me the drop across R1. 137 00:09:22 --> 00:09:28 And to that I add vIN and that will give me V+. 138 00:09:28 --> 00:09:32 And then of course I multiply this by the gain here. 139 00:09:32 --> 00:09:35 So, let me write down that expression. 140 00:09:35 --> 00:09:40 The current through this is simply vOUT minus vIN. 141 00:09:40 --> 00:09:44 That is the voltage drop between these two points. 142 00:09:44 --> 00:09:48 I divide that by the resistance R1 plus R2. 143 00:09:48 --> 00:09:52 That gives me the current flowing through here. 144 00:09:52 --> 00:09:55 That times R1 is the drop across resistor R1. 145 00:09:55 --> 00:10:02 And to that I add vIN and that gives me the voltage v+. 146 00:10:02 --> 00:10:07 So, this is v+. That is simply vIN plus the 147 00:10:07 --> 00:10:14 drop across the resistance R1. Let me shuffle things around 148 00:10:14 --> 00:10:20 and put all the vOUT terms on this side here. 149 00:10:20 --> 00:10:28 I get a 1+ for that vOUT and let me move AR1 divided by R1 150 00:10:28 --> 00:10:36 plus R2 to the left-hand side. And I pick up a minus sign. 151 00:10:36 --> 00:10:40 So, I get AR1 divide by R1 plus R2. 152 00:10:40 --> 00:10:46 I pick up that. And on the left-hand sign I end 153 00:10:46 --> 00:10:53 up with vIN, and my vIN here is a function of the vIN that I 154 00:10:53 --> 00:10:57 have here. I have an A multiplying both 155 00:10:57 --> 00:11:03 the vINs. And then I get a one for this 156 00:11:03 --> 00:11:08 vIN here and there is a minus sign, so I get a minus R1 157 00:11:08 --> 00:11:13 divided by R1+R2. That is the expression that I 158 00:11:13 --> 00:11:17 have. Let me go ahead and simplify 159 00:11:17 --> 00:11:23 that a little further and move this whole thing down here. 160 00:11:23 --> 00:11:30 That gives me my expression as a function of vIN. 161 00:11:30 --> 00:11:33 What I will do is, let me continue here. 162 00:11:33 --> 00:11:37 vOUT=vIN A(1-R1/(R1+R2)). By the way, you may be 163 00:11:37 --> 00:11:42 wondering why I am going through so laboriously what is seemingly 164 00:11:42 --> 00:11:46 a very simple exercise. The reason I want to do is it I 165 00:11:46 --> 00:11:52 want to very carefully show you that the result produced by this 166 00:11:52 --> 00:11:55 exercise is exactly that. No magic here. 167 00:11:55 --> 00:11:58 No cheating. We are going to get exactly 168 00:11:58 --> 00:12:02 that. And then stare at it and say 169 00:12:02 --> 00:12:07 huh, how did that happen? And then we are going to try to 170 00:12:07 --> 00:12:11 figure out how it actually behaves following that. 171 00:12:11 --> 00:12:16 I divide this by 1-AR1/(R1+R2). And by now you should be 172 00:12:16 --> 00:12:22 familiar with the technique of ignoring small numbers when I 173 00:12:22 --> 00:12:27 have a big number next to it. So, AR1/(R1+R2) can be very 174 00:12:27 --> 00:12:32 much larger than one because A is very large. 175 00:12:32 --> 00:12:37 So, I can ignore my one there. And then what I am going to do 176 00:12:37 --> 00:12:42 is multiply the numerator and denominator by R1+R2. 177 00:12:42 --> 00:12:46 Oh, this A and this A is going to cancel out. 178 00:12:46 --> 00:12:50 This A and this A will then cancel out. 179 00:12:50 --> 00:12:54 And then I multiply the numerator and denominator by 180 00:12:54 --> 00:12:59 R1+R2, so this R1+R2 vanishes. I get R1+R2 here. 181 00:12:59 --> 00:13:06 R1+R2 minus R1 is simply R2. And then down here I get a R1 182 00:13:06 --> 00:13:11 and then I have a minus sign out there. 183 00:13:11 --> 00:13:18 Notice that vOUT we have found to be equal to vIN R2 divided by 184 00:13:18 --> 00:13:21 R1. That is not wrong. 185 00:13:21 --> 00:13:28 That is correct. Technically that is correct. 186 00:13:28 --> 00:13:32 But you will see in a few seconds that in practice that 187 00:13:32 --> 00:13:35 that's rarely what you are going to see happen. 188 00:13:35 --> 00:13:38 And we will try to understand why that is so. 189 00:13:38 --> 00:13:42 What we have done so far, if you stare at these two 190 00:13:42 --> 00:13:46 panels here, first of all, we know that the inverting 191 00:13:46 --> 00:13:50 amplifier has the expression for vOUT up there. 192 00:13:50 --> 00:13:54 And through this laborious exercise we have also shown that 193 00:13:54 --> 00:13:59 even with positive feedback, if I take a static view of the 194 00:13:59 --> 00:14:03 circuit -- If I take a snapshot of the 195 00:14:03 --> 00:14:06 circuit and simply analyze it as a static circuit, 196 00:14:06 --> 00:14:11 I get the same expression vOUT. But what we are going to do is 197 00:14:11 --> 00:14:16 when I explain to you that look, a small perturbation in vOUT is 198 00:14:16 --> 00:14:20 going to drive the op amp to the positive and negative rail, 199 00:14:20 --> 00:14:23 that is where the insight begins to show. 200 00:14:23 --> 00:14:28 That if everything were magical and I could somehow exactly keep 201 00:14:28 --> 00:14:32 things just so that will be true. 202 00:14:32 --> 00:14:35 I will be able to build that positive feedback circuit where 203 00:14:35 --> 00:14:38 the output is equal to R2/R1 vIN. 204 00:14:38 --> 00:14:42 But remember even the slightly amount of perturbation is going 205 00:14:42 --> 00:14:46 to send the op amp scurrying off to the positive rail or the 206 00:14:46 --> 00:14:48 negative rail. How do we analyze that? 207 00:14:48 --> 00:14:52 How do we analyze the behavior of a circuit that based on a 208 00:14:52 --> 00:14:56 small perturbation begins to move one place or another? 209 00:14:56 --> 00:15:00 We want to analyze the dynamics of the op amp. 210 00:15:00 --> 00:15:04 And to analyze the dynamics what I need to do is give you a 211 00:15:04 --> 00:15:08 slightly more detailed view of the operational amplifier. 212 00:15:08 --> 00:15:12 If the operational amplifier is not moving instantaneously 213 00:15:12 --> 00:15:16 between the plus and minus rail, I need to give you a more 214 00:15:16 --> 00:15:21 detailed model that encapsulates the behavior of the op amp. 215 00:15:21 --> 00:15:24 And so let me do that. If you want to study the 216 00:15:24 --> 00:15:30 dynamics of an op amp -- By dynamics I mean how an op 217 00:15:30 --> 00:15:38 amp moves as I perturb the input or the output and so on. 218 00:15:38 --> 00:15:46 To capture the dynamics of the op amp we build a slightly more 219 00:15:46 --> 00:15:51 involved circuit, so v+ and v-. 220 00:15:51 --> 00:16:06 221 00:16:06 --> 00:16:10 This is what we've seen before, two terminals and dependent 222 00:16:10 --> 00:16:14 source that amplifies the difference input here by a large 223 00:16:14 --> 00:16:17 amount. Instead what we are going to do 224 00:16:17 --> 00:16:21 here is something slightly different and interpose the 225 00:16:21 --> 00:16:24 following circuit in the middle here. 226 00:16:24 --> 00:16:29 This is a model of the dynamics of an op amp. 227 00:16:29 --> 00:16:33 We are going to impose a small RC circuit in here. 228 00:16:33 --> 00:16:35 This is R. This is C. 229 00:16:35 --> 00:16:40 And I am going to call the voltage across the capacitor v*. 230 00:16:40 --> 00:16:45 Notice what I have done is rather than say this is Av+ 231 00:16:45 --> 00:16:50 minus v- I am breaking it apart in two dependent sources, 232 00:16:50 --> 00:16:55 the first dependent source, which is simply v+ minus v-, 233 00:16:55 --> 00:17:01 and there is a RC time constant surrounding it and then here I 234 00:17:01 --> 00:17:07 simply add on my gain Av*. Notice that if it turned out 235 00:17:07 --> 00:17:09 that the resistance here, for example, 236 00:17:09 --> 00:17:14 was zero then v+ minus v- would appear across v* and this would 237 00:17:14 --> 00:17:16 be A(v+ - v-), what you have seen before. 238 00:17:16 --> 00:17:20 It is always good to take a look at circuits and look at 239 00:17:20 --> 00:17:24 what happens when some component goes to an extreme value. 240 00:17:24 --> 00:17:29 This would give you your basic op amp circuit. 241 00:17:29 --> 00:17:33 What I would like to do next is analyze the following circuit to 242 00:17:33 --> 00:17:38 understand how positive and negative feedback work together. 243 00:17:38 --> 00:17:42 And by understanding that then be able to explain how a 244 00:17:42 --> 00:17:47 positive feedback circuit works or a negative feedback circuit 245 00:17:47 --> 00:17:49 works. Here is what I will do. 246 00:17:49 --> 00:17:54 This part simply corresponds to my positive feedback circuit, 247 00:17:54 --> 00:17:56 R2, R1. So, that is my positive 248 00:17:56 --> 00:18:00 feedback circuit. And I will do the same thing on 249 00:18:00 --> 00:18:02 this side. 250 00:18:02 --> 00:18:09 251 00:18:09 --> 00:18:12 All I am doing is applying both a positive feedback through R2 252 00:18:12 --> 00:18:15 and R1 and negative feedback through R4 and R3 and 253 00:18:15 --> 00:18:19 representing the dynamics of the op amp and then standing back 254 00:18:19 --> 00:18:22 and ee, all right, let's see what happens to you. 255 00:18:22 --> 00:18:25 So, I am sticking positive feedback, negative feedback, 256 00:18:25 --> 00:18:30 the dynamics of the op amp here and let's see what happens. 257 00:18:30 --> 00:18:38 What I would like to do is impose this circuit on top of 258 00:18:38 --> 00:18:46 this op amp model. To save myself some effort, 259 00:18:46 --> 00:18:54 let me just go ahead and modify this circuit directly. 260 00:18:54 --> 00:19:02 I get an R2 here, an R1 here, and then up here I 261 00:19:02 --> 00:19:09 get an R4, R3 here. The math is going to be just a 262 00:19:09 --> 00:19:14 little bit grubby but the result is actually pretty spectacular. 263 00:19:14 --> 00:19:18 So, all I have done is replace the op amp with its internal 264 00:19:18 --> 00:19:21 circuit out here. And now we are going to take a 265 00:19:21 --> 00:19:26 look at what happens to op amp dynamics when there is a small 266 00:19:26 --> 00:19:29 perturbation. Let's develop an equation of 267 00:19:29 --> 00:19:33 this circuit containing a capacitor using techniques that 268 00:19:33 --> 00:19:38 we already know. Just to give you some insight 269 00:19:38 --> 00:19:42 into what you're going to see, notice that if I make a small 270 00:19:42 --> 00:19:46 perturbation in the voltage across the capacitor, 271 00:19:46 --> 00:19:50 let's say I make a small perturbation to the capacitor 272 00:19:50 --> 00:19:55 voltage let's say by applying some initial condition kind of 273 00:19:55 --> 00:19:59 thing onto the capacitor. Then let's say that the output 274 00:19:59 --> 00:20:03 changes to some value K. So, the change on the capacitor 275 00:20:03 --> 00:20:07 must have been K divided by A. And what you are going to see 276 00:20:07 --> 00:20:11 is what happens to the op amp when the initial condition on 277 00:20:11 --> 00:20:14 the capacitor is such that this output gets perturbed to the 278 00:20:14 --> 00:20:16 value K. Let's write an equation for 279 00:20:16 --> 00:20:19 this little circuit and see what happens. 280 00:20:19 --> 00:20:22 Recall our goal was to understand what happens when I 281 00:20:22 --> 00:20:24 perturbed the output a little bit. 282 00:20:24 --> 00:20:29 Here I perturbed the output such that its value goes to K. 283 00:20:29 --> 00:20:33 And I can perturb the output by changing what happens at the 284 00:20:33 --> 00:20:36 capacitor. Let me write the equation for 285 00:20:36 --> 00:20:41 this circuit now and then to understand what happens to this 286 00:20:41 --> 00:20:45 capacitor circuit if I let go after giving it a small 287 00:20:45 --> 00:20:48 perturbation. What I am going to do is let me 288 00:20:48 --> 00:20:53 start by writing the good old equation for this little circuit 289 00:20:53 --> 00:20:56 here. And that equation is simply the 290 00:20:56 --> 00:21:02 voltage here v+ minus v- equals the voltage across the RC. 291 00:21:02 --> 00:21:08 So, v+ minus v- will be equal to the voltage drop across the 292 00:21:08 --> 00:21:13 resistor plus that across the capacitor. 293 00:21:13 --> 00:21:17 The voltage across the capacitor is v*. 294 00:21:17 --> 00:21:24 The voltage across the resistor is the current through the 295 00:21:24 --> 00:21:31 capacitor C dv*/dt times R. So, v* plus RC dv/dt is equal 296 00:21:31 --> 00:21:37 to v+ minus v-. RC dv*/dt plus v* is v+ minus 297 00:21:37 --> 00:21:40 v-. You have done this millions of 298 00:21:40 --> 00:21:43 times before, but yet again. 299 00:21:43 --> 00:21:49 This voltage here is equal to the drop across these two, 300 00:21:49 --> 00:21:54 and the drop across these two is v*, the drop across C, 301 00:21:54 --> 00:22:00 plus the current through the capacitor C dv/dt times the 302 00:22:00 --> 00:22:05 resistance R. Or you can apply the node 303 00:22:05 --> 00:22:10 method as well and get the same expression. 304 00:22:10 --> 00:22:16 Now, we also know here that vO divided by A is v*. 305 00:22:16 --> 00:22:24 I can go ahead and replace this guy here, v* by vO divided by A. 306 00:22:24 --> 00:22:29 RC/A dvO/dt. Recall, I want the dynamics of 307 00:22:29 --> 00:22:35 vO so let me just get an expression in vO. 308 00:22:35 --> 00:22:43 So, I get vO divided by A plus v+ minus v- equals. 309 00:22:43 --> 00:22:51 Now, I want an expression in vO, an equation in vO, 310 00:22:51 --> 00:23:00 so I need to express v+ and v- in terms of vO. 311 00:23:00 --> 00:23:09 What are these expressions? The expression for v- is vO and 312 00:23:09 --> 00:23:16 this voltage divider, so it's vOR3/(R3+R4). 313 00:23:16 --> 00:23:25 And just for simplicity, let me call this some constant 314 00:23:25 --> 00:23:30 gamma minus. This is some fraction 315 00:23:30 --> 00:23:37 R3/(R3+R4). And let me call that fraction 316 00:23:37 --> 00:23:42 gamma minus. Similarly, v+ is vO R1/(R1+R2). 317 00:23:42 --> 00:23:45 And let me call that gamma plus. 318 00:23:45 --> 00:23:51 All I am doing is replacing v+ and v- in terms of vO. 319 00:23:51 --> 00:23:57 So, effectively, what I have here is v+ is some 320 00:23:57 --> 00:24:03 fraction of vO. That's the best intuitive way 321 00:24:03 --> 00:24:09 of thinking about it, some fraction of vO. 322 00:24:09 --> 00:24:14 And v- is some fraction of vO as well. 323 00:24:14 --> 00:24:21 And I just stick these. I now have an expression in vO. 324 00:24:21 --> 00:24:29 Don't get psyched by gamma plus and gamma minus. 325 00:24:29 --> 00:24:34 Simply read this as if it is an F1 and F2 if you would like. 326 00:24:34 --> 00:24:39 So, vO times some fraction minus vO times some other 327 00:24:39 --> 00:24:42 fraction. I am feeding back some fraction 328 00:24:42 --> 00:24:48 of the output to the positive and to the negative terminals. 329 00:24:48 --> 00:24:52 Then, just moving things around a little bit, 330 00:24:52 --> 00:24:55 dividing throughout by A divided by RC. 331 00:24:55 --> 00:25:00 So, I divided by A divided by RC. 332 00:25:00 --> 00:25:08 Plus vO divided by RC. And what I am going to do here 333 00:25:08 --> 00:25:15 in a second, vO gamma plus minus gamma minus. 334 00:25:15 --> 00:25:24 And I have multiplied by A divided by RC throughout. 335 00:25:24 --> 00:25:34 Finally, collecting all the vO terms I get vO times one divided 336 00:25:34 --> 00:25:42 by RC plus A divided by RC. I got a plus sign here so I 337 00:25:42 --> 00:25:47 will just reverse these two guys in there, gamma minus minus 338 00:25:47 --> 00:25:51 gamma plus equals zero. All I have done here is simply 339 00:25:51 --> 00:25:56 grunged through some math to express this equation in terms 340 00:25:56 --> 00:25:59 of vO. And just to make it even 341 00:25:59 --> 00:26:04 simpler, I will just replace this thing by one divided by T, 342 00:26:04 --> 00:26:09 much as we did for first order equations. 343 00:26:09 --> 00:26:19 What I end up with is dvO/dt+vO/T=0. 344 00:26:19 --> 00:26:29 345 00:26:29 --> 00:26:33 Despite all the grubbiness, I end up with something that is 346 00:26:33 --> 00:26:36 very, very familiar to all of us. 347 00:26:36 --> 00:26:41 I went through a bunch of gyrations to substitute for v+, 348 00:26:41 --> 00:26:45 v- and v*, but at the end of the day I got the simple 349 00:26:45 --> 00:26:48 expression which was dvO/dt+vO/T=0. 350 00:26:48 --> 00:26:52 Where capital T is the time constant of the circuit, 351 00:26:52 --> 00:26:57 and the time constant of the circuit relates to the 352 00:26:57 --> 00:27:01 expression in there 1/RC+A/RC(gamma minus - gamma 353 00:27:01 --> 00:27:05 plus). The gamma minus and gamma plus 354 00:27:05 --> 00:27:09 are the respective portions of the output fed back to the 355 00:27:09 --> 00:27:12 negative input and the positive input. 356 00:27:12 --> 00:27:15 Now, as we all know, based on very simple intuition 357 00:27:15 --> 00:27:20 that we can completely predict the behavior of a first order of 358 00:27:20 --> 00:27:24 an RC circuit once we know what the initial condition of the 359 00:27:24 --> 00:27:28 capacitor is and once you know the time constant. 360 00:27:28 --> 00:27:32 That's it. We know, we are masters at the 361 00:27:32 --> 00:27:36 fact that the capacitor is going to behave like this. 362 00:27:36 --> 00:27:40 It is going to be exponential. And I do know that the time 363 00:27:40 --> 00:27:42 constant capital T. What's here? 364 00:27:42 --> 00:27:45 It is simply the initial condition. 365 00:27:45 --> 00:27:49 There is no drive input. I am not driving this with any 366 00:27:49 --> 00:27:52 input here. There is no input drive 367 00:27:52 --> 00:27:55 anywhere here. This is simply the natural 368 00:27:55 --> 00:27:58 dynamics of the system. And, recall, 369 00:27:58 --> 00:28:03 I start off with bumping the capacitor voltage such that the 370 00:28:03 --> 00:28:06 output starts off being K. That is it. 371 00:28:06 --> 00:28:10 You should be able to write down this expression and the 372 00:28:10 --> 00:28:14 form of the response simply based on this. 373 00:28:14 --> 00:28:18 So, this is what I bumped up the output to be by perturbing 374 00:28:18 --> 00:28:22 the capacitor voltage. My output response based on 375 00:28:22 --> 00:28:25 this equation is going to look like that. 376 00:28:25 --> 00:28:30 Let's try to understand what that means. 377 00:28:30 --> 00:28:32 It is actually quite a lot of fun. 378 00:28:32 --> 00:28:37 How do we plot that response? You all learned that the way to 379 00:28:37 --> 00:28:40 plot the response is plot the initial value, 380 00:28:40 --> 00:28:43 plot the final value, and go cachoock, 381 00:28:43 --> 00:28:45 right? It's pretty simple. 382 00:28:45 --> 00:28:48 I am going to start at K. I know that. 383 00:28:48 --> 00:28:53 I am going to start at K and I am going to go and find out what 384 00:28:53 --> 00:28:57 the steady state value is. Here is where the interesting 385 00:28:57 --> 00:29:01 stuff comes in. The final value on the 386 00:29:01 --> 00:29:06 capacitor depends a lot on whether T is positive or 387 00:29:06 --> 00:29:09 negative. In my RC circuits that I looked 388 00:29:09 --> 00:29:13 at what was T? In the very simple RC circuit 389 00:29:13 --> 00:29:18 we looked at what was capital T? What was the time constant? 390 00:29:18 --> 00:29:19 RC. This was RC. 391 00:29:19 --> 00:29:24 This was a positive quantity. When capital T is positive my 392 00:29:24 --> 00:29:27 output is going to look like this. 393 00:29:27 --> 00:29:33 When T is positive. And T is positive when this 394 00:29:33 --> 00:29:39 expression is positive. And if A is so large that I can 395 00:29:39 --> 00:29:43 ignore the 1/RC term, if A is very, 396 00:29:43 --> 00:29:50 very large and I can ignore the left-hand term here then T is 397 00:29:50 --> 00:29:57 positive when gamma minus is greater than gamma plus. 398 00:29:57 --> 00:30:00 So, when gamma minus is greater than gamma plus, 399 00:30:00 --> 00:30:04 I have a stable circuit, this is the good-old stuff we 400 00:30:04 --> 00:30:08 have seen before. Now things begin to make sense. 401 00:30:08 --> 00:30:11 Intuitively, what am I saying here? 402 00:30:11 --> 00:30:15 All the gammas and other pieces of crapola aside, 403 00:30:15 --> 00:30:18 what am I really saying here in English? 404 00:30:18 --> 00:30:22 What I am saying here is that if the portion of the output fed 405 00:30:22 --> 00:30:27 to the negative input is greater than that fed to the positive 406 00:30:27 --> 00:30:32 input then I have net negative feedback. 407 00:30:32 --> 00:30:36 I have net negative feedback. I am feeding the output back to 408 00:30:36 --> 00:30:39 both the positive and negative inputs. 409 00:30:39 --> 00:30:44 And if my negative input has a stronger effect then I am going 410 00:30:44 --> 00:30:49 to see the op amp output decay down to a value that I expect 411 00:30:49 --> 00:30:54 which is going to be zero. Notice that since I am not 412 00:30:54 --> 00:30:58 applying any input here, I expect the stable point for 413 00:30:58 --> 00:31:03 this to be output going to zero. I don't have any input there. 414 00:31:03 --> 00:31:06 Let's take a look at another situation. 415 00:31:06 --> 00:31:08 What happens when the opposite is true? 416 00:31:08 --> 00:31:12 What happens when gamma minus is less than gamma plus? 417 00:31:12 --> 00:31:15 When I feedback more, what happens when I do this, 418 00:31:15 --> 00:31:18 when gamma plus is greater than gamma minus? 419 00:31:18 --> 00:31:21 The opposite is true. This means that I am feeding 420 00:31:21 --> 00:31:25 back more to the positive input. A bigger proportion goes to the 421 00:31:25 --> 00:31:30 positive than the negative. What happens then? 422 00:31:30 --> 00:31:34 Then what happens is capital T becomes negative. 423 00:31:34 --> 00:31:39 We cannot see this happening on the RC circuit because capital T 424 00:31:39 --> 00:31:42 is equal to RC, but here we have a more 425 00:31:42 --> 00:31:47 complicated circuit and capital T can go negative. 426 00:31:47 --> 00:31:52 If capital T goes negative then this whole thing in the exponent 427 00:31:52 --> 00:31:56 there goes positive. If that goes positive what 428 00:31:56 --> 00:32:02 should the output look like? It should take off into 429 00:32:02 --> 00:32:05 never-never land. There we go. 430 00:32:05 --> 00:32:11 I start off at zero and a make a small perturbation, 431 00:32:11 --> 00:32:17 and the output should go as t divided by capital T. 432 00:32:17 --> 00:32:23 The dynamics of this it goes berserk, so it is net positive 433 00:32:23 --> 00:32:27 feedback. This is called a stable 434 00:32:27 --> 00:32:31 situation. This is unstable. 435 00:32:31 --> 00:32:36 What happens when capital T goes to infinity? 436 00:32:36 --> 00:32:41 When capital T goes to infinity, spend five seconds 437 00:32:41 --> 00:32:45 thinking about what it means physically. 438 00:32:45 --> 00:32:51 What does it mean for the time constant of an RC circuit to go 439 00:32:51 --> 00:32:56 to infinity? That means that your R and C 440 00:32:56 --> 00:33:00 are very, very, very large. 441 00:33:00 --> 00:33:03 That means that circuit is going to be very, 442 00:33:03 --> 00:33:05 very sluggish. Think elephant. 443 00:33:05 --> 00:33:08 A big time constant. I want to move a leg. 444 00:33:08 --> 00:33:11 It takes a while to do that. Think big. 445 00:33:11 --> 00:33:15 Big time constant. So, everything is going to 446 00:33:15 --> 00:33:18 happen really slowly. It's like moving in molasses. 447 00:33:18 --> 00:33:22 Big time constant. Everything is going to happen 448 00:33:22 --> 00:33:26 really, really slowly. If gamma minus is greater than 449 00:33:26 --> 00:33:30 gamma plus with a huge time constant it is going to look 450 00:33:30 --> 00:33:35 like this. And the output is going to look 451 00:33:35 --> 00:33:38 like this. I make T even larger. 452 00:33:38 --> 00:33:42 All right. It is going to like this. 453 00:33:42 --> 00:33:47 454 00:33:47 --> 00:33:51 I make these so large that T tends to zero, 455 00:33:51 --> 00:33:57 T tends to infinity in which case I get this situation. 456 00:33:57 --> 00:34:00 The output goes dah. OK? 457 00:34:00 --> 00:34:02 Very slow. Very lethargic. 458 00:34:02 --> 00:34:06 Big time constant. T tends to infinity. 459 00:34:06 --> 00:34:10 And so if this is stable, this is unstable, 460 00:34:10 --> 00:34:13 this is called corresponding neutral. 461 00:34:13 --> 00:34:18 And there is a mechanical analog to all of this. 462 00:34:18 --> 00:34:23 You can show that this situation is akin to let's say I 463 00:34:23 --> 00:34:30 had a physical well of the sort and I had a ball in there. 464 00:34:30 --> 00:34:33 I let the ball go. Then the ball will come down 465 00:34:33 --> 00:34:36 here and settle down in a stable state. 466 00:34:36 --> 00:34:40 Any small perturbation of the ball will get it to come down 467 00:34:40 --> 00:34:44 and settle down here. The unstable situation is this 468 00:34:44 --> 00:34:49 situation where I have a ball sitting up here where any small 469 00:34:49 --> 00:34:54 perturbation will get it to zip down to a positive rail or to a 470 00:34:54 --> 00:34:57 negative rail. So, this is an unstable 471 00:34:57 --> 00:35:02 equilibrium situation. And exactly the reason we got 472 00:35:02 --> 00:35:06 this analysis in the static situation is that this can 473 00:35:06 --> 00:35:08 happen. If I do this circuit here and 474 00:35:08 --> 00:35:13 don't perturb it then I could get the output sitting at zero, 475 00:35:13 --> 00:35:17 but the slightest perturbation, boom, it is going to fall down 476 00:35:17 --> 00:35:20 or go up. What about the neutral 477 00:35:20 --> 00:35:23 equilibrium state? That can be modeled like a 478 00:35:23 --> 00:35:27 table top and the ball is here. It doesn't matter where you go. 479 00:35:27 --> 00:35:32 There you are. How many people saw the 480 00:35:32 --> 00:35:37 Buckaroo Bonzi thing? Possibly well before your time. 481 00:35:37 --> 00:35:39 OK. I have this table here. 482 00:35:39 --> 00:35:45 No matter what I do to it, it just goes and settles down 483 00:35:45 --> 00:35:49 where it is, and that is neutral equilibrium. 484 00:35:49 --> 00:35:55 But what this gives you is a fun view of the dynamics of the 485 00:35:55 --> 00:36:02 operational amplifier as I make small perturbations to it. 486 00:36:02 --> 00:36:06 And the even more interesting thing here is you have the tools 487 00:36:06 --> 00:36:11 based on your first order RC analysis to analyze the dynamics 488 00:36:11 --> 00:36:15 of a simple op amp circuit. OK, so much for theory. 489 00:36:15 --> 00:36:18 Now let's get to some action here. 490 00:36:18 --> 00:36:19 All right. Fine. 491 00:36:19 --> 00:36:22 That is really pretty, good and so on, 492 00:36:22 --> 00:36:26 but what can you do for me? What good does this property do 493 00:36:26 --> 00:36:30 for me? What can I build? 494 00:36:30 --> 00:36:34 What we will do is look at the op amp circuit and focus on the 495 00:36:34 --> 00:36:37 situation where I have net positive feedback. 496 00:36:37 --> 00:36:42 In particular just look at this circuit with R1 and R2 and send 497 00:36:42 --> 00:36:46 both to infinity. So, I have no negative feedback 498 00:36:46 --> 00:36:50 and I ground this terminal here and take a look at what happens 499 00:36:50 --> 00:36:55 to a circuit with positive feedback and see if I can build 500 00:36:55 --> 00:37:01 some interesting circuits. What you are going to do is 501 00:37:01 --> 00:37:06 build on a circuit called the basic comparator. 502 00:37:06 --> 00:37:11 What is that? If I have an op amp that looks 503 00:37:11 --> 00:37:18 like this, and remember a VS rail and minus VS supply there, 504 00:37:18 --> 00:37:23 this is v+, this is v-, I can build a very basic 505 00:37:23 --> 00:37:29 comparator by doing the following. 506 00:37:29 --> 00:37:34 All the circuits I am going to show you are going to build on 507 00:37:34 --> 00:37:39 this basic little circuit. What I am going to do is 508 00:37:39 --> 00:37:43 consider applying an input to the v- terminal, 509 00:37:43 --> 00:37:48 applying some sort of an input and taking a look at how the 510 00:37:48 --> 00:37:52 output behaves. So, I apply some input vIN. 511 00:37:52 --> 00:37:57 And if I just do that, if this is v+ minus v- here 512 00:37:57 --> 00:38:03 then I am going to get something that goes like this. 513 00:38:03 --> 00:38:09 That is when this is positive here then this guy is going to 514 00:38:09 --> 00:38:16 go to the VS rail and this guy is going to go to the minus VS 515 00:38:16 --> 00:38:19 rail. In terms of the, 516 00:38:19 --> 00:38:24 if I plot the same thing, in terms of vIN, 517 00:38:24 --> 00:38:29 and this is vOUT, if I plot the thing in terms of 518 00:38:29 --> 00:38:36 vIN then notice that as vIN increases this guy should go to 519 00:38:36 --> 00:38:42 a negative rail. So, in terms of vIN it looks 520 00:38:42 --> 00:38:45 like this. What this says is that as the 521 00:38:45 --> 00:38:50 input becomes more and more positive applied to v- then the 522 00:38:50 --> 00:38:55 output goes to minus VS, and if the input becomes more 523 00:38:55 --> 00:39:00 and more negative then the output goes to VS. 524 00:39:00 --> 00:39:05 This is what is called a very basic comparator circuit. 525 00:39:05 --> 00:39:10 It compares the two inputs and goes up if the input is in one 526 00:39:10 --> 00:39:16 direction and goes to the other rail if the input is in the 527 00:39:16 --> 00:39:21 opposite direction. So supposing I feed this- I can 528 00:39:21 --> 00:39:26 plot this is a function of time. Let's say I plot vIN. 529 00:39:26 --> 00:39:32 Let's say I feed some vIN here. Let me just call this. 530 00:39:32 --> 00:39:37 I feed some vIN to this circuit here, then what do you expect 531 00:39:37 --> 00:39:41 the output to look like, the output wave form? 532 00:39:41 --> 00:39:45 For all positive vINs the output is negative. 533 00:39:45 --> 00:39:50 So, my output vO is going to be negative as long as vIN is 534 00:39:50 --> 00:39:54 positive. And when vIN becomes negative 535 00:39:54 --> 00:39:59 this one shoots up and behaves like this. 536 00:39:59 --> 00:40:02 This is minus VS. That is plus VS. 537 00:40:02 --> 00:40:07 This is my input vIN. Then this guy is going to be my 538 00:40:07 --> 00:40:11 output. As vIN is positive output slams 539 00:40:11 --> 00:40:15 to the negative rail. When vIN becomes negative the 540 00:40:15 --> 00:40:19 output slams to the positive rail. 541 00:40:19 --> 00:40:24 So, that is quite nice. And so such a circuit is pretty 542 00:40:24 --> 00:40:28 useful to me. Let's say, for example, 543 00:40:28 --> 00:40:32 I want to build a little digital circuit that is fed ones 544 00:40:32 --> 00:40:34 and zeros. I can use a comparator to turn 545 00:40:34 --> 00:40:37 my vIN voltage into a sequence of ones and zeros. 546 00:40:37 --> 00:40:41 When vIN is positive I produce a zero and when vIN is negative 547 00:40:41 --> 00:40:44 I produce a one. I can get this one, 548 00:40:44 --> 00:40:48 zero, one, zero sequence coming out corresponding to the values 549 00:40:48 --> 00:40:50 of vIN being greater or less than zero. 550 00:40:50 --> 00:40:54 Now, one problem with something like this is that this circuit 551 00:40:54 --> 00:40:59 can be quite messy in the following situation. 552 00:40:59 --> 00:41:04 Suppose I superimpose a small amount of noise in vIN. 553 00:41:04 --> 00:41:08 In particular, let's say that I have some 554 00:41:08 --> 00:41:13 amount of noise on vIN. I get a bunch of noise sitting 555 00:41:13 --> 00:41:17 around here. What happens is that at this 556 00:41:17 --> 00:41:22 point where the value goes negative, I do bump up. 557 00:41:22 --> 00:41:30 But when for a second I have my input going above zero again -- 558 00:41:30 --> 00:41:34 -- this output comes down again and out here it goes up again. 559 00:41:34 --> 00:41:39 I get this nasty behavior at the point where the input is 560 00:41:39 --> 00:41:42 around zero. When the input is around zero, 561 00:41:42 --> 00:41:46 the input is meandering around zero because of noise, 562 00:41:46 --> 00:41:51 I get a huge amount of up and down glitches on the output. 563 00:41:51 --> 00:41:55 That's not very nice. And we will do a little circuit 564 00:41:55 --> 00:42:00 that attempts to fix that little problem. 565 00:42:00 --> 00:42:04 What we are going to do is use positive feedback. 566 00:42:04 --> 00:42:11 And I am going to build you a circuit that shows that we can 567 00:42:11 --> 00:42:15 eliminate this for small noise on the input. 568 00:42:15 --> 00:42:19 So, let's build the following circuit. 569 00:42:19 --> 00:42:23 So I still feed vi to the negative input, 570 00:42:23 --> 00:42:30 but this time around I give it some positive feedback. 571 00:42:30 --> 00:42:33 So, I give it some positive feedback. 572 00:42:33 --> 00:42:38 And what I am going to do is feedback a portion of vO to the 573 00:42:38 --> 00:42:42 positive input. This is positive feedback. 574 00:42:42 --> 00:42:47 And, in particular, let's assume that VS equals 12 575 00:42:47 --> 00:42:50 volts. And to the negative one I 576 00:42:50 --> 00:42:54 connect -VS. This guy is going to go between 577 00:42:54 --> 00:42:57 12 and -12. And correspondingly because 578 00:42:57 --> 00:43:05 these two are equal this one is going to go between 6 and -6. 579 00:43:05 --> 00:43:08 This is going to be a 12 or -12. 580 00:43:08 --> 00:43:12 Remember, the top rail and the bottom rail. 581 00:43:12 --> 00:43:16 And this one is going to be a +6 or -6. 582 00:43:16 --> 00:43:21 And let's understand how this circuit works when I apply an 583 00:43:21 --> 00:43:25 input vIN. Let's start by saying that 584 00:43:25 --> 00:43:30 assume my input is zero for a moment. 585 00:43:30 --> 00:43:35 And let's say my output starts off being 12 volts. 586 00:43:35 --> 00:43:40 The output is 12 volts then the input here is going to be 6 587 00:43:40 --> 00:43:44 volts. In this case v+ is going to be 588 00:43:44 --> 00:43:47 6 volts. The output is 12, 589 00:43:47 --> 00:43:52 v+ is going to be 6 volts. And my circuit is sitting out 590 00:43:52 --> 00:43:57 there doing nothing. Now, this started off being 591 00:43:57 --> 00:44:02 zero. Let's say vIN increases. 592 00:44:02 --> 00:44:05 As vIN begins to increase what happens? 593 00:44:05 --> 00:44:08 Well, nothing until vIN reaches 6 volts. 594 00:44:08 --> 00:44:11 Since this is 6, vIN has to go up to 6 volts, 595 00:44:11 --> 00:44:16 has to equal this voltage before I can flip the circuit. 596 00:44:16 --> 00:44:19 What happens when vIN is greater than 6 volts, 597 00:44:19 --> 00:44:24 if vIN goes above 6 then I have more voltage on a negative 598 00:44:24 --> 00:44:30 terminal than the positive so the op amp flips its state. 599 00:44:30 --> 00:44:36 And vO gets to -12 volts. When vi goes above 6, 600 00:44:36 --> 00:44:42 vO gets to 12 volts. And what does v+ go to? 601 00:44:42 --> 00:44:50 In this state v+ goes to half of -12 which is -6 volts. 602 00:44:50 --> 00:45:00 Now, this guy is sitting at -6 and this guy is sitting at -12. 603 00:45:00 --> 00:45:03 If this one keeps rising nothing happens, 604 00:45:03 --> 00:45:07 so output can stay at -12. So I am pretty safe. 605 00:45:07 --> 00:45:10 Then let's say v begins to come down. 606 00:45:10 --> 00:45:15 As v begins to come down, does anything happen when v 607 00:45:15 --> 00:45:19 gets to 6 again? If v is equal to 6 what 608 00:45:19 --> 00:45:22 happens? Nothing because this is at -6 609 00:45:22 --> 00:45:25 now. So, there is still a huge net 610 00:45:25 --> 00:45:30 negative voltage here from v+ to v-. 611 00:45:30 --> 00:45:36 And so therefore I sit at -12. Oh, well, I keep coming down 612 00:45:36 --> 00:45:42 until I reach -6. When I reach -6 here these two 613 00:45:42 --> 00:45:46 become equal. And what happens when this 614 00:45:46 --> 00:45:51 becomes less than -6? v- becomes less than -6. 615 00:45:51 --> 00:45:58 If this one goes below this voltage, this is -6 and this is 616 00:45:58 --> 00:46:02 -7. There is a net positive voltage 617 00:46:02 --> 00:46:06 between v+ and v-, so this output swings to the 618 00:46:06 --> 00:46:10 positive rail like so. We will spend a lot more time 619 00:46:10 --> 00:46:15 on this in the next few minutes to really hammer the point home. 620 00:46:15 --> 00:46:19 What is interesting about this is that even though the moment 621 00:46:19 --> 00:46:24 vi became more than 6, I swung to the positive rail, 622 00:46:24 --> 00:46:28 and then I had to go all the way back down to -6 before I 623 00:46:28 --> 00:46:34 could change state. I had to go way down before it 624 00:46:34 --> 00:46:39 could flip again. How can we make use of that? 625 00:46:39 --> 00:46:46 Well, let me draw you a little vi versus vO diagram and then 626 00:46:46 --> 00:46:50 talk about how that can be useful to us. 627 00:46:50 --> 00:46:55 This is vi, this is vO, this is zero. 628 00:46:55 --> 00:47:00 Let's say this is 12, -12, -6, +6. 629 00:47:00 --> 00:47:04 Let's plot that on the screen and see what it looks like. 630 00:47:04 --> 00:47:08 As I told you, the output was at 12 volts to 631 00:47:08 --> 00:47:11 begin with and my input was at zero. 632 00:47:11 --> 00:47:15 So, my input kept increasing. When the input hit +6 what 633 00:47:15 --> 00:47:20 happened to my output? My output swung down to -12. 634 00:47:20 --> 00:47:23 As the input kept increasing nothing happened. 635 00:47:23 --> 00:47:26 This was step one, this was step two, 636 00:47:26 --> 00:47:31 step three. My input kept increasing and 637 00:47:31 --> 00:47:36 output stayed at -12 volts. Then what I said was well, 638 00:47:36 --> 00:47:41 let's bring the input down. So, my input began to go down, 639 00:47:41 --> 00:47:44 step four, became more and more negative. 640 00:47:44 --> 00:47:47 Nothing happened until I reached -6. 641 00:47:47 --> 00:47:51 When I reached -6 I swung positive, step five. 642 00:47:51 --> 00:47:54 Again, one, two, three, four, 643 00:47:54 --> 00:47:56 five. I am going up here. 644 00:47:56 --> 00:48:01 It came up here. And nothing happens until I 645 00:48:01 --> 00:48:06 reach -6, but at -6 boom, I switch to the positive rail. 646 00:48:06 --> 00:48:10 And as I get more and more negative I stay there. 647 00:48:10 --> 00:48:13 Then again, as I start increasing again, 648 00:48:13 --> 00:48:16 nothing happens until I reach +6. 649 00:48:16 --> 00:48:19 Think of that as your seventh step. 650 00:48:19 --> 00:48:24 What is spectacular about this is that I seem to have a circuit 651 00:48:24 --> 00:48:30 that now has some knowledge of where it came. 652 00:48:30 --> 00:48:33 If it is coming from here it switches at +6, 653 00:48:33 --> 00:48:37 but if it is coming from here it switches at -6. 654 00:48:37 --> 00:48:42 So, there seems to be sort of a lag in the behavior of the 655 00:48:42 --> 00:48:46 circuit or some memory property in the circuit. 656 00:48:46 --> 00:48:50 This kind of behavior is called hysteresis. 657 00:48:50 --> 00:48:54 The word comes from magnetic circuits where, 658 00:48:54 --> 00:49:00 or rather elements that you're trying to magnetize. 659 00:49:00 --> 00:49:04 Where if you take a magnet and move it over a piece of metal it 660 00:49:04 --> 00:49:07 may leave some residual magnetism in it. 661 00:49:07 --> 00:49:11 And, in the same way, that is called hysteresis. 662 00:49:11 --> 00:49:14 Same way here. As the voltage increases it 663 00:49:14 --> 00:49:19 seems to leave some residual in the circuit so that it effects 664 00:49:19 --> 00:49:22 when it shifts. The good news with this is that 665 00:49:22 --> 00:49:27 now, if I take the same kind of noisy wave form that I had 666 00:49:27 --> 00:49:32 before and do this -- If this is vi then what is 667 00:49:32 --> 00:49:38 going to happen is for vO I am going to be negative at this 668 00:49:38 --> 00:49:42 point. Nothing happens here because I 669 00:49:42 --> 00:49:47 have to get to -6 or +6 before something happens. 670 00:49:47 --> 00:49:52 Out here I get to -6 and I switch state and go up to +12. 671 00:49:52 --> 00:49:58 And then this one comes up above -6 very slightly out 672 00:49:58 --> 00:50:01 there. Nothing happens because the 673 00:50:01 --> 00:50:05 next change will happen only when the input goes to +6. 674 00:50:05 --> 00:50:09 So, if eventually the input gets to +6 and then I am going 675 00:50:09 --> 00:50:13 to change state again. It is actually a really cool 676 00:50:13 --> 00:50:17 property and something that is completely non-obvious. 677 00:50:17 --> 00:50:20 In the last 30 seconds let me show you a quick demo. 678 00:50:20 --> 00:50:24 And, based on this property of hysteresis, I have actually 679 00:50:24 --> 00:50:29 built a little circuit. Let me do that first. 680 00:50:29 --> 00:50:34 Notice here that I am showing you the input on the X axis vi 681 00:50:34 --> 00:50:38 and vO on the Y axis. Notice how the output switches 682 00:50:38 --> 00:50:43 at +6 volts and switches at a -6 volts to +12 or -12. 683 00:50:43 --> 00:50:48 That's the hysteresis property. And we can actually use this 684 00:50:48 --> 00:50:53 property to build a clock circuit, which is on page 9, 685 00:50:53 --> 00:51:00 build an oscillator that sits there and oscillates by itself. 686 00:51:00 --> 51:03 And you will see details of that in recitation tomorrow.