A common insult is the term “get real”. The way we have been learning all of these electronic circuits is to start with the ideal and then add one by one the real life problems of real components. Real life is going to smack us in the head very quickly as we start to understand the differentiator circuit. But on we go…full speed ahead over the cliff.

The purpose of the differentiator circuit is to perform the derivative calculation and to output a value proportional to the rate of change of the input. The input I used in the last post to describe the integrator is called a “step function”. The step function is a quick change from 0 to some voltage at a given time. For convenience, we set that time at t=0. A step function is equivalent to driving our car over a curb at t=0. The car analogy is a good one to understand why reality will smack us in the face. How big does the curb have to become before it really is a wall? As we look at the car tire hitting the curb we realize it is not a unit step at all, but there is period of time while the tire rolls across the bump. (Our car bottoming out on the suspension may think it was instantaneous… and probably so does our wrist on the steering wheel and our backside setting on the seat.)

As we look at the circuit in the diagram we see it is a modification of the inverting amplifier and we start with the same assumptions of infinite impedance in the op-amp and infinite gain. Current in the input is equal to the current flowing through the feedback resistor and this gives us: Ic = -Vout/Rf. Going back to the fundamentals of a capacitor: Charge equals the size of the Capacitor multiplied by the voltage across the capacitor or Q = C * V. Dividing both sides of that equation by t gives Q/t = C*Vin/t and by definition Q/t = I. For now I am going to use ΔVin to represent the change of the voltage in. Combining all of this and inserting it into the equation gives. Ic = C*ΔVin = -Vout/Rf. Solving for Vout gives:

Vout = -C*Rf *ΔVin.

Now we are at the point where reality hits us between the eyes with a 2X4. If we have a step input from 0 to 100V, or even 0 to 1 μV, and if that step happens instantly, ΔVin is infinity. This is equivalent to saying it doesn’t matter when our car hits a curb if the curb is the size of a dime laying on the pavement or a stone wall 2 ft high. We know from personal experience there is a heck of a difference. TIME TO GET REAL.

The first reality, although our circuit diagram does not show it, there is a resistance in series with the capacitor. Actually there are at least two resistors. The output impedance of the circuit driving Vin will prevent it from supplying an infinite current and the resistance of the leads to the capacitor will prevent it from drawing infinite current. However, both of these resistors a probably relatively small and we probably want to purposely install a resistor in series with the capacitor to actually limit the current. This will create an RC circuit with an associated time constant. I talk about the time constant in the post “Capacitors – Some more specifics“.

Now that we know the circuit will not act instantly, I also want to point out there is no such thing as a perfectly square rising step function. My very first post talked about “Wave Shape and Frequencies” and tries to explain that to have a perfectly square rising input would require an infinite number of harmonics. This means some frequency components of an infinite high frequency.

Now that I a danced all around the circuit what does this mean in real life? It means that we cannot achieve a perfect circuit to calculate the derivative. We can however, get one that is “good enough”. To do this we will have to really understand what we want to accomplish and that will mean understanding how fast and how much is good enough.

For example, lets say this is going to be used to do the derivative function in a PID controller. The machine we are wanting to control will only be able to react at a certain speed. We have no need to send signals much faster than what the machine can perform. Probably the fastest we care about is for the time constant of the RC network to be 10 times the speed of the machine itself.

In another example, lets say this circuit is to provide a trigger to another electronic circuit. In that case, all we need to be able to do is detect the change enough to produce the trigger pulse. Slowing the circuit would probably be a big help so we don’t provide false triggers and also so the pulse will be long enough to actually trigger the next circuit.

As I write all of this, there is another common statement that comes to mind. Moving from the ideal toward the reality of the situation requires us to think and make decisions. So as commonly said: “REALITY SUCKS”. Just kidding! That is why we are learning all of this stuff so we can do the work around and solve problems.

This finishes up the series of basic op-amp circuits.

Gary

“The Op-Amp Differentiator” by Create-and-Make.com is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

## Leave a Reply