(delicate music)
- Okay, so today we are going to talk about
operational amplifiers or op-amps,
in the differentiator configuration.
So, a differentiator circuit using an op-amp.
Now if you remember your calculus,
this shouldn't be too surprising,
but a differentiator is simply
something that measures the rate of change of something.
And that's all this circuit does,
is it takes the input
and the output shows the change on the input.
So if you have a constant on the input,
then your output is gonna be zero.
And if you have something
that's changing in a constant way on the input,
then your output is going to be a constant.
And if you have something that is constantly changing
you're going to have a constantly changing output.
Again, you can just take the input,
differentiate it,
and that is your output.
So, let's go over the circuit really quick.
Go over the math
to show how that relationship both is mathematically,
and also how we get it.
And then, I have a simple circuit here,
to show some of these concepts in real life
and I think it's pretty interesting.
I like differentiation for some reason,
but, everybody has their own things, so.
Whatever, let's get into this.
So, a differentiator is basically
where you take the non-inverting output,
tie it to ground,
and then the inverting output is connected to V-in
with a capacitor,
and then you have just a resistor
on that feedback loop from V-out.
So, I left off the F
for resistor and all that sort of stuff.
Just to keep the math a little bit easier.
But that is it.
All right, you have your feedback resistor
and your capacitor.
Now if you remember from circuits,
your capacitor blocks anything that's DC
and passes higher frequencies of AC
and the relationship between current
through a capacitor is not via OMS law,
but from the equation
C times DVDT
or it's the capacitance times the change in voltage
over the change in time,
which will give you the actual current through there.
Which is gonna be very important
as we break through all of this.
But as I mentioned,
the output is simply the derivative of the input
and then, it is actually just the multiplied by negative RC.
So in this case, the output is also inverted.
With that, let's just quickly derive this formula
and show where it comes from here
and then we'll jump into the practical example.
So as always,
we know that these two points are the same voltage
because of the out driving that.
So, you have on this inverting out,
excuse me, inverting input,
a virtual ground,
that you can assume that that is zero volts.
And then we also know,
that no current is going into either of those inputs.
And with that we can assume,
that our current going this way
is the same as our current going that way.
So, we just do our very simple relationship,
where we can say the current through here
is the voltage difference from V-in, to ground,
times the, excuse me,
the change in the voltage difference,
between V-in and ground times C.
So, we get this current I...
I equals...
there we go...
C...
D...
and then we can change that
to V-in minus zero,
because it's that voltage difference, over DT.
And of course that zero is going to just go away.
And then we know that this current
is simply going to be Ohm's law, very straightforward.
So, that is going to be zero volts
minus V-out,
over our resistance R.
Okay, and that is our equation,
now we're just gonna need to clean it up,
to make it look like that.
So again, getting rid of that zero
and getting rid of that zero.
And then we want V-out to be on its own.
All we have to do is multiply both sides by R.
So, we can bring the R over here
and then multiply both sides by negative one,
to get rid of this negative V-out
so that, we get that negative over here.
And then we get that R and then we still have that C.
And then we have DV-in
over DT...
equals V-out.
So an extremely, extremely simple calculation here,
on figuring out
how that relationship between V-in and V-out is.
I think the most challenging part for this
might be for those people
that are still learning basic circuits,
to remember that current through a capacitor
is simply C-D-V-D-T.
And if you know that, then this is extremely straightforward
and everything falls into place quite nicely.
So, that's the circuit set up,
the output equation,
and exactly how we get to that, that very simple derivation.
So let's jump onto the practical example,
where we'll talk about
some of the expectations you'll see in the performance,
some of the drawbacks
And I'd actually like to compare it to an integrator circuit
because you'll notice a couple of features that,
some things that we struggle with the integrator,
we don't struggle with our differentiator,
but some of the things that we struggle with
the differentiator
don't really affect an integrator circuit,
which makes sense,
because they're going in opposite directions.
But, let's get this pulled over here
and set up really quick and we'll jump right into that.
Okay, so once again, we have this breadboard here
and it is something I was thinking about,
that this may look overly complicated.
There are a lot of things connected to this
and the vast majority of that
is simply just connecting the oscilloscope
and the the waveform generator
and the power supply and all that sort of stuff.
When you actually are using this in a real circuit,
this is can be way simpler,
'cause you're not gonna have all of this stuff
connected to it in a normal circuit.
So, I just wanted to point that out
before I get into this,
just because I realize
that people might be looking at this thinking
"Why is this so complicated?"
And a lot of it is simply the measurement aspects.
So like normal, we have our power, it's positive 10 volts
and our negative VE, I think is what it's called.
It's right here.
So, that's our negative 10 volts.
We have tied our, not an inverting output to ground,
which is at zero volts.
And then this is our input
from the arbitrary waveform generator
and then, this is the oscilloscope,
so that we can do a direct comparison
of the, both the input and the output
and it is connected to this capacitor,
that is going into the inverting output.
Then the output,
is connected back to that inverting output,
via this resistor.
Okay, so that's, that's really it.
Let's jump into the wave forms themselves.
Okay, so here on the oscilloscope,
we have our yellow,
which is our input
and we have our blue,
which is our output.
So as you notice, this is just a simple square wave.
And so it is dropping
to a basically negative 2.5 volts here.
And then, it jumps up to positive 2.5 volts
and every time it changes,
you get a spike in the opposite direction remember,
because there's that negative RC value
and you'll notice that it takes a little while here,
before it jumps back up to zero.
So there is a bit of a responsiveness,
not issue, but something you need to take into account
and you can size your resistor and your capacitor with that
to make it so that, that is a longer or shorter response.
But, this is just a great example,
because again,
every time it drops down,
your output spikes up
and then there's no change in the input
so, the output changes to zero again
and every time you do that.
So, this is exactly what you would expect
for a square wave,
with your input being a square wave
and your output looking like
some sort of weird modified square wave,
but not exactly.
And again, in a perfect world
where you size this just right,
those would be just almost instantaneous spikes
where it spikes down and then immediately goes back.
But, we're seeing a little bit of time delay in there.
So, let's change this to a ramp input.
And now, this is interesting
because our ramp input, you're constantly changing,
you're constantly getting higher
and you're constantly getting lower,
you're constantly getting higher and just like that.
So our output, just as we'd expect, is the inverse.
As this has a negative downward trend,
we are seeing a positive voltage on the output.
And then as it's becoming positive,
again, because of the negative RC factor,
our output is negative.
So, the differential of a ramp wave is a square wave
and this is more of a true square wave.
You get some squiggles in the corners,
as you'd expect from any sort of imperfect device.
So again, if this were perfect,
that would be a perfect square wave on the output.
Now, we know that the derivative of a sine wave is a cosine
and so let's do a sine wave and see what it looks like.
There we go,
again, you can see that they are both sine waves
because they're constantly changing
and they're just out of phase,
with the yellow being the input
and then the blue being the output.
And so, that's nice, nice pretty wave and it looks great.
So that is exactly what we'd expect from all of these.
Again, I don't know if I'm saying this too many times,
but remember that it is the negative derivatives.
So, it will be flipped from what you would be expecting,
if you're just thinking of a simple derivative.
Now one of the things I want to point out,
is I'm going to shift this input,
give it a DC offset.
So, and it might mess with my triggering,
so if it goes wild for a second, I apologize,
but let's cause our input to go up.
Now, you can see the yellow line going up.
What, what are you noticing about the blue?
See I'm messing with the triggering.
Even though the input is going up, the blue,
the output is staying the same
and that's because it's a DC offset.
So you,
you know,
just, if you take the derivative of any equation,
you're gonna get rid of any constant.
And it's the same thing here,
that as you change that DC offset,
it's not going to affect your output in the slightest.
So, I also wanna point out,
you notice that the output isn't wandering,
it's not going up or down,
like we saw with the integrator circuit.
And that's because,
it doesn't matter if we have the DC bias input problem
between the two inputs.
So again, in reality,
the inputs to the op-amps aren't at the exact same voltage
and with the integrator circuit,
that difference is accentuated
and it gets bigger and bigger.
Whereas with this, with your differentiator,
it doesn't matter
if there's a DC offset between the inputs,
even a slight one,
because it doesn't care about that DC input.
So that's quite, that's quite nice.
Now granted, there are still some things
that you can do to make this more usable
in a real life application.
This is definitely more of a bench top experimental setup.
But one final thing that I do want to say
is that, unlike the integrator,
this is actually more susceptible
to a high frequency noise,
because again, it reacts to a change.
So, if you have something that spikes it,
you will see something on the output.
Whereas, a really quick blip on an integrator
isn't going to change the overall shape
of the waveform too much.
Whereas that will be accentuated
in a differentiator circuit.
So, that is something to take into consideration,
but that that's really it.
So conceptually, these are quite simple.
They can get more complicated
as you are using them in real life
and trying to make up
for the lack of perfection in op-amps
and lack of perfection and just circuits in general.
But they're quite straightforward in their most basic use
and they can be quite useful,
depending on the application you need.
These sort of things were incredibly important,
back in the days of analog computers,
but we won't get into that.
I do hope this was helpful.
If it was, give it a like subscribe to our channel.
If you have any questions,
leave 'em in the comments below
and we will catch you in the next one.
(lever clanking)