The operational amplifier, usually referred to as an opamp, is a very useful component in the world of electronics. It has at least 3 ports: a non-inverting input (marked with a +), an inverting input (marked with a -) and an output. It also has 2 power rails, which (roughly) define the highest and lowest voltages it can output and receive. The opamp allows designers to manipulate signals in the following ways:

  • Amplify or attenuate the signal
  • Increase or decrease offset
  • Turn differential to single-ended, or vice-versa
  • Combine multiple signals into one
  • Act as a buffer
  • Convert current to voltage, or vice-versa
  • Filtering
  • Multiple of the above

The opamp, in short, allows designers to implement mathematical operations and much more, hence the name. I’ll get into examples in another post, but first, how does it work?

The operational amplifier, in isolation, is very simple. It takes in two signals and outputs the difference between those two voltages times a very large number in other words:

A, the gain of the opamp, is “very large” which can be anywhere around a thousand to tens of millions. This by itself isn’t very impressive; if you have an opamp with a gain of a thousand, then you can turn a signal that’s a couple of millivolts into one that’s a couple of volts. But even for this simple application, the opamp struggles; the gain is not very well characterized, tends to change with temperature and time, and varies between chips. In other words, opamps generally are not meant to operate in this mode. However, one application for this is as an analog comparator; if VIN2 > VIN1, then the opamp will output the highest voltage it can, and if VIN2 < VIN1, then the opamp will output the lowest voltage it can. If the opamp is powered by 0 volts on its negative rail, and 3.3 or 5 volts on its positive rail, its output could be interpreted as a logic low or logic high. However, there are analog comparator ICs that do this function much better, so again this is not the ideal application of opamps.

The opamp becomes a very powerful tool when it has negative feedback, or when the output of the opamp has a path back to the negative input. When an opamp has negative feedback, it has the useful property of forcing both its inputs to be the same value, which we’ll show below. Here’s the simplest opamp circuit with feedback:

There are 3 ways to understand how opamps work, in order of increasing complexity and accuracy:

  1. Intuitive: forget the equation I mentioned above, and think about the analog comparator example. The simplest way of thinking of an opamp is this: if the non-inverting input is greater than the inverting input, then the output increases. If the inverting input is greater, than the output decreases. If they’re the same, then the output stop changing. Using these three rules, let’s look at the example above:
    1. VIN and VOUT are both initially 0 V. Since both inputs are 0 V, the output does not change.VIN suddenly increases to 1 V, but VOUT is still at 0 V. Since the non-inverting input is larger than the inverting input, the output will begin to increase.When VOUT is at 0.5 V, the non-inverting input will still to larger, so the output will continue to increase. In this example, as long as VOUT is smaller than VIN, the output will continue to increase. In other words, as long as the non-inverting input is greater than the inverting input, the output will continue to increase.When VOUT finally reaches 1 V, both inputs will be the same, so the output will stop changing, VOUT will therefore have a final value of 1 V, which is the same as VIN. In other words, when both inputs are the same, the output stops changing.If VOUT overshoots by accident, say VOUT is 1.1 V, then the inverting input is now greater than the non-inverting input. In this example, as long as VOUT is greater than VIN, it will continue to decrease. In other words, as long as the inverting input is greater than the non-inverting input, the output will continue to decrease.
  2. Electrical Engineering: in school, especially in the electrical engineering undergrad, you’re told to assume that both inputs to the opamp are equal if you have negative feedback. This assumption allows you to derive equations quickly and easily:

3. Control Systems: below is a simple model of the opamp shown previously

Here, E is the error signal (difference between the non-inverting input and inverting input), A is the gain of the opamp, and VOUT = A / (1+A) * VIN. In the Intuitive and Electrical Engineering method, we got VOUT = VIN. However, the Control Systems method shows that the output actually depends on the gain of the opamp. As mentioned before, the gain A is very large, and the larger A is, the closer VOUT and VIN are; at A = 1000, VOUT is 99.9% of VIN. This is the reason the gain A does not need to be very well controlled for most applications; as long as it is “very large,” you can assume the opamp is working correctly (ie. the assumption that both inputs are the same holds). However, as we’ll talk about in a future post, A varies with frequency. As the frequency of the input increases, A starts to decrease. Eventually, A will be small enough that the assumption VOUT = VIN no longer holds. For example, when A = 5, VOUT is only 83% of VIN; at A = 1, VOUT is only 50%.

The control systems approach will give you the most information about the opamp. It’ll tell the designer about the error on the output, transient response and stability. But for most purposes, the electrical engineering approach is sufficient; assuming both inputs are the same voltage will allow you to very rapidly and accurately analyze how circuits behave; for this reason we’ll be using it unless there’s a reason not to. Here area a couple more examples of what opamps can do:

Non-inverting gain
Inverting Gain
Voltage Subtractor with Gain
Voltage Adder

Leave a comment

Design a site like this with WordPress.com
Get started