Welcome back to electronics. This is Dr. Ferri. In this lesson, we'll be covering differentiators and integrator circuits. In a previous lesson, we looked at basic op amp amplifier configurations. And those configurations, in those circuits, we used just straight resistors. In this case, we're going to introduce capacitors. And by doing that, we're able to create circuits that differentiate or integrate the input. We'll also demonstrate the performance of these sorts of circuits using oscilloscope on a real circuit. Let's start with the Differentiator Circuit. In this circuit everything is based on the iV characteristics of a capacitor, i is equal to C dvc dt. We're also going to look at using, the ideal characteristics of an ideal diode, which is zero current and idea op-amp. Going into these two terminals, and then the voltage drop across here is 0. So let me go through and do a KVL, around this right here. Going up through this source across a capacity through the resistor and back out to here. And I'm going to treat this as being a voltage drop like this, so actually I go straight back down to the ground right here. So, the KVL. Well, let's see, one thing that I can look at actually to, to simplify this, I'm going to do two KVL's. Let me do this first one, this one right here first. In this particular one, this voltage drop is 0. And this is the ground so, this actually is the ground right here. This is, this is equal to zero potential, that means that Vn is equal to the voltage across that capacitor. And we'll define the current. Is going in this direction so that voltage drop is plus minus V sub c. Now, my second KVL is around this outer loop right here, and writing that I get minus Vn plus V sub c plus R times i, because all the current going through that capacitor must go in this direction, since this current is zero in this little branch there. Plus V zero is equal to zero. Now these first two, this first equation still holds. In other words, these are equal, that means that this cancels out. And what I'm left with, is V0 is equal to minus R times i. While i is up here, C dvc dt. Well Vc, V sub c is equal to Vn. So that's where we get this equation right here. So this is now the equation that governs this circuit, the differentiator circuit. I want to show you an example of a real circuit that we've built to, to demonstrate this. And we're using real Op Amp chip right here. And that Op Amp chip has eight pins to it. And if you can look carefully right here there's, there's a little indent right up here and where those indents are, that shows you that the one-pin is going to be just to the left of it. It gives you the orientation. And there's a 1 pin 2, 2, 3, 4, 5, 6, 7 and 8. That's how I know how to hook things up. In the 2 pin we're going to be hooking up to V minus. Well V minus is right here, so let me show that as the 2 pin right here. Where is that over here? Well, the indent is right here, so the 2pin right there. We count 1, 2, and that's V minus. So actually let's start looking at this circuit right from the beginning. So we've got V in, goes into the capacitor. So V in comes in. That's from my function generator goes into one side of the capacitor. The other end of the capacitor goes into these V minus, which is right there the two pin. The other, the capacitor also goes into the resistor, And the resistors connected over to V sub 0. So v sub 0 is a 6 pin, I'm going to mark it as a 6 right there. So we should have a resistor going between the two pin and the six pin. So that's the two pin there, and there's a 6. So that's 1, 2, 3, 4, 5, 6. So that's the 6 pin right there. And that is connected to V0. Now the voltage source to power this, we've got minus 15 volts connected to pin four and plus 15 volts connected to pin seven. We can see V sub s here. And minus V sub s there. So this is now my circuit that implements this schematic. Let's look at the results here for this osiliscope. If V in, Is this voltage right there And V out is this voltage. So if we look at this voltage here, V out, and V in, so it does differentiate. If V in is a triangular wave, then if I take the derivative of it, I get a constant, and I'm actually going to get a positive constant, but then I negate it. So that's why it goes this way. So my output is equal to the derivative of the input. And I have a scaling factor in there of gain, which is equal to minus RC. And that's whatever I pick, so I pick, I design my circuit with a particular value of RC in mind. Now let's take a look at the integrator circuit. The integrator circuit, again, uses the IV characteristics of a capacitor. But this time we're going to integrate this equation and get the integral form of the eq, form of the IV characteristics here. And that's what we'll exploit. So this, su, this circuit has a switch in it. And the switch opens at time equals zero. So prior to time equals zero, we have a closed circuit right here. We short out the capacitor. So for t less than zero, we want to write the equation. In that case, we can look at a KVL around here, and around here, we're going to use this ideal op-amp characteristic, which is zero volts right there. So that means if that's zero volts, and I've got a current i that will define as going through this resistor, that resist, or that voltage across this resistor has to equal V in. So V in is equal to i times R, and also I can do another KVL. Around this outer part. Up, through this, voltage source across this resistor, up, through this, which is closed at, before time equals zero and back down to here. And, I'll do the same thing that I've done before just to, emphasize the fact that I can finish this loop. Right here back down to ground, and if I do that loop, I get minus Vin plus iR plus V0is equal to 0. Well since V-in is equal to IR, these two cancel- And I'm left with V0 is equal to 0. Now, for t greater than zero, the capacitor's now in the loop. So I can write, I can write a KVL going across that capacitor. I'm going to get the same minus V in plus iR. Now I have to go through the capacitor, and that capacitor is, voltage is, I'll call V sub C plus V 0 is equal to zero. Well, let me substitute in, again, this part cancels out, and let me substitute in for V 0from here. So we get 1 over the C, the integral from 0 to t of idt is equal to minus V0. Well, i is equal to, we can solve from up here, i is equal to V in over R. If I substitute that in for i, I'm going to get this equation right here. So, this is the equation of this line, where I take the input, I integrate it. I multiply it by a gain factor, and I get my output. Let's look at an integrator example. This is exactly like what we did before. The only thing different is I've switched the, I've switched these two components around, with the differentiator we have the capacitor here, now we've got it over here. So I've just switched these two around. And similarly I've taken this circuit and I, I just switched these, the resistor and the capacitor around. And everything else is the same So if I look at my results now- V in is right here and V out is right here and I'm integrating the in to give me the out. And I do have a little bit of clipping right here. Because it goes out of range, remember capacitors are the op amps will saturate when the, when the values get to large so we get a little bit of clipping here do to that. But otherwise what you're seeing is, I'm integrating this constant to give me a ramp, or, a, a sloped line. So I am implementing this equation with this circuit. In summary, we have looked at Differentiator and Integrator Op Amp circuits and we come up with these two equations, these input output equations for these two circuits. One is the Differentiator and the other is Integrator and I would like to mention that these two, these two circuits were very important to early analog computers. Early analog computers, they used differentiators and integrators, and they used op amps all through those computers in order to be able to do two things. One was integrate and differentiate, values, and the other thing was to provide gain. So old analog computers, full of Op Amp circuits. In our next lesson, we will do active filters. Thank you.