 Op-amp Basics

What is an op-amp?

An op-amp (an abbreviation of Operational Amplifier) is simply an amplifier with two inputs. It amplifies, with very high gain, the difference between the inputs. These two inputs, in combination with the high gain, allow for wide range of circuits configurations.

Basic Op-amp Function

The op-amp's two inputs are called the non-inverting and inverting input.These are indicated with a "+" for the non-inverting input and a "-" for the inverting input. The op-amp amplifies the difference between these two inputs by a gain value to produce an output voltage. This gain value is called the open loop gain. The inputs of an op-amp draw very little current when a voltage is applied. A typical op-amp has an input resistance in the giga ohms. The inputs essentially appear as an open circuit. If +5 µV was applied to the non-inverting (+) input and -5 µV to the inverting (-) input of an op-amp with an open loop gain of 1,000,000, the output would be a positive 10V. This is found by taking the voltage difference and multiplying by the gain:

(0.000005V - (-0.000005V)) * 1,000,000 = 10V

If the inputs were reversed, and -5 µV was applied to the non-inverting input and +5 µV to the inverting input, then the output would be -10V.

This can be summed up in a simple "golden rule" for op-amps: When the non-inverting (+) input is greater than the inverting (-) input, the output increases to become a large positive output. This can rephrased without changing the meaning. When the inverting (-) input is greater than the non-inverting (+) input, the output moves to become large negative output.

Feedback

Op-amps are rarely used in the way described above, with the inputs directly driven, unless the goal is to simply figure out which input is more positive (in this case, the op-amp is being used as a comparator). Op-amps are normally used with additional components or connections.

Feedback allows the circuit designer to control the gain of the op-amp. The simplest feedback configurations for an op-amp is the buffer configuration. In this configuration the output of the op-amp is connected to the inverting (-) input. Remembering the golden rule allows us to analyze how the buffer configuration operates. We will start by letting the input be 0V. We will assume for the moment that the output is 1V. We don't know why it is 1V and we don't care in this case. If the output is 1 V, then the inverting input (-) is also 1 V because of their connection.

Since the inverting input is greater than the non-inverting input, the output will start to go negative according to the golden rule. As the output moves closer to 0V (to go negative when the output is 1V, it must cross 0V) the output becomes smaller because the difference between the inputs becomes smaller.

When the output is 0 V, the inverting (-) input is 0V due to the connection between them. With non-inverting (+) input at 0 V (we set it there), and the inverting (-) input at 0V, the output is at 0V. This is because (0V - 0V) * gain = 0V.  Everything is in balance.

Now let’s see what happens when we raise the input to 100 mV. As we do that, the non-inverting input becomes larger than the inverting input. When that happens the output moves towards a positive voltage. This happens because of our golden rule.  As the output rises in voltage, the inverting input rises as well because of the connection between them. When the difference between them is 0V the output is not driven one direction or the other. This happens when the inverting and non-inverting input are the same. In this case when both the inverting and non-inverting inputs are 100 mV.

In this simplest of feedback configurations, called a buffer, the output will follow the input. This happens because the op-amp will drive its output higher or lower based on the voltage difference between its two inputs. Op-amps respond very quickly to these input variations resulting in no appreciable lag between the input and the output within the op-amps rated frequency response.

Why do this at all?  Why build a circuit who's output is the same as its input?  It is to provide loading isolation or power (not voltage) gain.  The inputs of an op-amp look essentially like an open circuit - they are very high in resistance (usually greater than thousands of megohms). This means the circuit driving the op-amp is unaffected by the connection to the op-amp because the op-amp’s input looks like an open circuit.

The output of an op-amp appears to be 0Ω to the load it is driving. This is true even though the internal output resistance of an op-amp is typically in the tens of ohms range. This low output resistance is due to the feedback effect. If the load on the op-amp is high enough that the output begins to droop, then the feedback compensates for this drop and the output is held stable. The effect is that the output is constant with load variations which makes it appear that the op-amp has a 0Ω output resistance.  There are limits to this of course as an op-amp can only drive its rated current.

Feedback with Gain - Inverting Amplifier A slightly more complicated feedback arrangement is found in the inverting op-amp configuration. It uses two resistors to control the gain of the circuit. It is different from the buffer circuit which had a gain of 1. The amplifiers output is an amplified version of the input.

We can see how this circuit works by remembering the op-amp golden rule and remembering how a voltage divider works. In this circuit, the non-inverting input is connected to ground. This greatly simplifies the analysis of the circuit. From the golden rule we know that when the inverting input is greater than the non-inverting input the output goes negative. Since the non-inverting input is ground, or 0 V, all we need to concern ourselves with is the polarity and magnitude of the inverting input.

To start the analysis we will apply 1 V to the circuits input (the free end of R1). Assuming for the moment that the output of the op-amp was 0 V when we did this, the inverting input of the op-amp will see a voltage divided version of the input. If we take the op-amp out of the circuit and just draw the resistors with the voltages labeled this becomes a bit easier to see. With a 1 V input to the circuit the inverting input will see:

inverting input voltage = 1V * (R2/(R1+R2)) or 0.667V

With this positive voltage on the inverting input, the output will begin to go negative because it is larger than the 0V at the non-inverting input. It will do this until the output of the op-amp, applied though R2 to the inverting input, sums with the voltage from the 1V applied though R1, to yield 0V at the inverting input. In other words, the op-amp is not satisfied until the voltage difference between its inputs is 0V. This is the golden rule rephrased a bit for this circumstance. When the difference between the inputs is 0 V, the output stops being driven up or down.

To reach a 0 V difference between the inverting and non-inverting inputs, the output of the op-amp will continue to go negative until it is -2V. At this point the voltage at the inverting input is 0V. This can be seen by solving the voltage divider for the values of R1 and R2.

The gain of this inverting amplifier configuration is due only to the ratio of the resistors used. In all op-amp circuits, the op-amp is controlled by ratio of the feedback components. In this case, the gain is:

gain = output/input = -1 * (R2/R1)

A negative gain value (always the case with an inverting amplifier) indicates that the output has the opposite polarity of the input.

The input resistance of this amplifier is the value of R1.  The inverting input of the amplifier is maintained at 0V due to the feedback which keeps the voltage difference between the inverting and non-inverting inputs the same.  In this configuration the inverting input is referred to as a "virtual ground" because it is maintained at ground potential. When driving the input to the amplifier (the free end of R1), the circuit appears as if it is a resistor connected to ground.

Feedback with Gain - Non-Inverting Amplifier Another common op-amp circuit configuration is the non-inverting amplifier. It is similar to the inverting configuration with some differences in characteristics.

Our golden rule for op-amps can be used to determine how the circuit functions. Notice that the op-amp symbol in this case has been drawn with the non-inverting input at the top of the op-amp symbol.  The feedback configuration is similar to the inverting amplifier but the way in which the voltage division works is slightly different.

In this case the input signal is applied directly to the non-inverting input and a voltage divided version of the output is applied to the inverting input. The analysis of this circuit proceeds in the same way as the inverting amplifier circuit, which leads us to the conclusion that the output of the circuit will become the value needed to keep the inverting and non-inverting inputs of the op-amp at the same voltage. In this case that value is not 0V as is the case in the inverting amplifier due to its connection to ground.  Instead, the inverting input tracks the voltage divided version of the output.  In this way, it is similar to the buffer circuit we looked at first. The gain of a non-inverting amplifier configuration is found by:

gain - output/input = 1 + R2/R1

Intuitively this makes sense if you consider what happens when R1 is removed from the circuit. It becomes a buffer with a gain of 1.  Don't be confused by the resistance of R2 when we take R1 out. The inputs of the op-amp essentially draw no current.   When the current through a resistor goes towards 0, the voltage drop across it goes towards 0 which leaves R2 acting like a piece of wire with no voltage drop across it.

Looking at the details we know that Vinput = Vinv (Vinv is the voltage at the inverting input).  This is the case because the golden rule tells us that the op-amps output will change when there is an imbalance and the way in which the feedback resistors are connected causes the imbalance to diminish.

We also know that Vinv = Vout * (R1/(R1+R2)) due to the voltage divider formed by the resistors tied to the output.  Knowing that Vinput = Vinv (see the preceding paragraph) allows you to substitute Vinput for Vinv. After a little rearranging of the terms you get:

gain = Vout/Vin = 1 + R2/R1

The gain of the non-inverting circuit cannot be less than 1. This is different from the inverting configuration which can have a gain value less than 1. The non-inverting circuit configuration also has very high input resistance (typically many gigaohms) because the input is applied directly to the op-amps non-inverting input which is high resistance.

Wrap up

Op-amps are typically used with components that provide feedback which sets the gain of the circuit.  It is the ratio of these external components that control the circuits operation.  Three classic circuit configurations were examined here but many others exist.  Feedback components are not limited to resistors.  When reactive components (such as capacitors) are included in the feedback loop filters and oscillators can be designed.