A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

The op-amp integrator.

An Op-Amp Integrator

An Op-Amp Integrator

Now that we know about how capacitors perform and we have learned about the calculus operation called integration, we are finally able to go back to the basic op-amp circuits and talk about the one of the two remaining circuits.  It has not been all that long ago that microprocessors where too slow to be used in high speed control and the most modern motor and hydraulic controls depended upon op-amp circuits.   I became curious and that equipment is still for sale today, but most newer motor drives use digital electronics to do the calculations.

I would like to make one announcement before we proceed into the post. I have created four videos that explain the same thing explained in the series of posts about the PID cruise control.  It is another way of seeing it all again.   The four can be found on my YouTube page in a playlist called PID Control

Before we go on to the integrator it makes sense to go way back into the crevices of our mind and review the basic assumptions about an ideal op-amp and the inverting op-amp amplifier circuit.

The two important initial assumptions for the ideal op-amp are: First,the op-amp circuit has infinite gain and second, it has infinite input impedance.  The infinite gain means that if the inverting amplifier is operating within the operating range, both the  inverting (-) input and the non-inverting (+) input must be at the same value.  This is because even if there is a slight difference the output will be infinite.   Since the non-inverting input is at zero potential, the inverting input also at zero.   This is referred to as “virtual ground” potential.

Because the input impedance of the op-amp is infinite, no current will flow into or out of the inverting input.   This means that any current flowing to the junction labelled Node 1 in the diagram from Vin through Rg must continue to flow through Rf to Vout.

By ohms law the voltage drop across Rg divided by Rg must equal the voltage drop across Rf divided by Rf  or:  (Vin-0)/Rg = (0-Vout)/Rf.  Solving this equation  by throwing out the zeros and moving things around gives:  Vout = (-Vin)*Rf/Rg.   This was all described in the post titled: “The Inverting Op-Amp Amplifier Circuit“.

Later we dealt with the way a real op-amp diverges from an ideal op-amp in several posts but the one titled “Op-Amp Current and Voltage Offset” will be the most important one to us today.   The summary of the conclusions was that if we keep the resistance values in the 5K to 100K range it will act so close to ideal that we will not be able to detect any differences.

An Op-Amp Integrator

An Op-Amp Integrator

Now looking at the integrator circuit, imagine we have a constant DC voltage at the input and this voltage is applied at a time we will call t=0. (This will change soon enough.)  As before in the inverting amplifier, the inverting input is at virtual 0 volts so a current will flow through Rg that is equal to Vin/Rg.   Because no current can flow through the Op-amp inputs the current through C must be equal to the current through Rg. At this point I need to go into some definitions I have not adequately covered in previous posts.

Current is defined as the flow of charge past a point and specifically:  I = Q/t  where charge is given the letter Q and charge is in a unit called Coulombs.  A good analogy is to imagine water.  The amount of water is gallons and the flow of water is gallons/time.  Q can be thought of as a gallon of electrons, but more specifically it is 6.24150465 X 1018 electrons.  That is a really big number and pretty useless for us to remember.  The important thing to remember is 1Q = 1Amp X 1 second  or Q=I*t where t is in seconds.

The charge being stored in a capacitor is Q=C*V where V is the voltage across the capacitor.  Solving this for the Voltage gives V= Q/C.  Now combining this with the previous equation for Q gives us V=I*t/C.  Now it is time for a visual analogy.  I is flow so imagine a water tank being filled at a rate of I gallons/second.   The height of the water in the tank (equivalent to V) is related to the flow X time and inversely related to the size of the tank (C).

Our Car with no air friction

Our Car with no air friction

Now going back to the integrator circuit if we replace V with Vout and worry about polarity -Vout = I * t/C.  If we replace the I with the I across the resistor Rg we get: -Vout = (Vin/Rg) * (t/C) or making it a little prettier Vout = -Vin*t/(Rg*C).   With a constant voltage this gives a graph very similar to the one to the left except Vout would be going negative instead of positive.   We have just integrated a constant voltage.

Before I complicate things, lets do a little thinking about what this means.  If C is increased or Rg is increased the integrating action will take longer.  It is easy to see why Rg will slow things down because the current through it will be less.   Since we are trying to match current going out with current coming in to the inverting input, a larger C will build voltage more slowly for a given amount of current.  (Just like a bigger tank will increase level more slowly for a given flow of water.)

If things are changing we need to replace -Vin*t with the integral sign.  In this case I would probably write the equation: Vout = -(∫Vin(t))/(Rg*C).  As I said in the last post, don’t let the little cobra snake looking thing, ∫, freak you out.  Just think of the simple constant voltage case and baby step into thinking of “the area under the curve.”   In a future post I will show what the integral and derivative do to some typical waveforms.

There is one big problem we have to deal with.  We are using real op-amps that have some current and voltage offset.  This is equivalent to a very small Vin.  A small Vin over a very large time will integrate to create a very large output voltage.   In real integrator circuits this is handled by installing some sort of switch across the capacitor.  When the circuit is at idle, the switch shorts out the capacitor preventing any charge and therefore voltage build-up.   Once the circuit is operating the small offset will cause a very small error, but this will be very small.

In the “not so old days” when large DC motor drives were installed. start-up engineers were hired to do the initial tuning to the PI controllers within the drives.   (A drive is the electronic box that provided the power to the motor.)  These engineers came with a whole assortment of capacitors.  These had crimp-on connectors to slide on pins on the drive to tune the integral gain.  It took a significant amount of time to power down the drive, change the component, power-up the drive, turn on a paper chart recorder and perform the test.   Things are a little easier now with computers.

As always, I hope you found this educational and enjoyable.  If you have any questions, please e-mail me.

Gary

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

If you found this post educational and entertaining, please consider subscribing to my blog using one of the icons in the sidebar on the home page or the e-mail subscription form at the bottom of every page.


 

 

Print Friendly

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>