Tutorials:
Sensors, interfaces and bus systems (SENIN, BUSSY)

Operational amplifiers (wiki)

last updated: 2022-11-18

Quick links

For students:

Beginning with this chapter we will come across many "Just do it" tasks. These tasks have to be carried out and have to be documented thoroughly!
Your marks will depend on the documentation!

To better understand parts of this module, first work through the module electronics fundamentals ELEFU.

Introduction

Song of this chapter: Imran Khan > Unforgettable > Amplifier

An operational amplifier (opamp or op-amp) is a very versatile building block used in analog circuits. The op-amp is a differential amplifier build with transistors and resistors in an integrated circuit. Op-amps are among the most widely used electronic devices because their characteristics (gain, impedances, bandwidth, ...) can be changed with external components. An advantage is that their characteristics change only slightly with temperature or internal component tolerance.

With op-amps we can build many different things like:

and so on.

Op-amps had their origins in analog calculators or analog computers!

Here a picture of an analog computing machine at the Lewis Flight Propulsion Laboratory circa 1949 (NASA):


analog computer

We will not study op-amps in depth, but only so far that we can use them. In this module we need op-amps mainly to amplify voltages from analog sensors, so that microcontroller can work with the data.

Op-amp (wiki)

The op-amp is a voltage amplifier with a differential input (output is single-ended) and a a very high open loop gain (about 100000), meaning the differential input voltage is amplified by a factor 105-106.

The differential input is calculated with: Uin = Uin2 - Uin1.

formula voltage gain

formula voltage gain

Op-amps are differential amplifiers with a high gain and a high input impedance.

Differential amplifiers means we have two inputs, and amplify the difference between the inputs. The input impedance (impedance is the AC equivalent of the resistance, used for DC) is very high, meaning the op-amp has very little impact on whatever is connected to its inputs, because the current drain is negligible.

The output impedance is low (like the inner resistance of a battery), and the op-amp is able to supply a significant current (e.g. 20 mA) to its load.

The energy for the op-amp is provided mostly from a bipolar voltage power supply, from ±2 V to ± 18V (often ± 15V or ± 12V). Op-amps with unipolar power supply are more rarely used.

Without power (UCC- and UCC+) the op-amp will not function, so don't forget to connect these pins.

A very old and known general-purpose op-amp is the 741. Here we see the circuit:

741 circuit

source: https://en.wikipedia.org/wiki/Operational_amplifier, Daniel Braun license: https://creativecommons.org/licenses/by-sa/3.0/deed.en

There exist many modern and slightly changed (improved) versions of this chip (often cheaper and better than the original). Here some versions (always check the data sheet; thanks to Peter J. Vis):

Here is the DIL or DIP package for all these op-amps:

DIL 741

"Just do it" OA1:

Op-amp symbol

symbols op-amp

We need five terminals to connect the bipolar voltage, the differential input and the output. Mostly the first symbol without the terminals for power is used, because of it's simplicity. The actual symbol (third symbol, DIN EN 60617) is seldom used in schematics. Without power (UCC- and UCC+) the op-amp will not function, so don't forget to connect pin 4 and 7 even when the first symbol is used in your circuit!

Comparator (wiki)

An op-amp without feedback and external components can not be used as an amplifier. Even with a small voltage, the output voltage will be equal to or greater than the supply voltage. Such a situation is called the saturation of the amplifier.

But a comparator needs this behaviour!

Without feedback (open loop) an op-amp acts as a comparator.

If we hold the inverting input to ground (0 V) the voltage Uin applied to the positive input will saturate the op-amp and the the output will be maximum positive. With a negative Uin the output will be maximum negative.

"Just do it" OA2:

comparator circuit

Op-amp circuits with feedback (basic circuits, wiki)

The operational amplifier has a - and a + input called the inverting (-) and non-inverting input. To key to using op-amps as amplifiers is to feed the output back to the input. To use the op-amp as amplifier the feedback will normally go to the inverting input to reduce the input voltage an with this the overall gain (a part of the output voltage is subtracted from the input voltage an so reduces the input voltage). A positive feedback to the non-inverting input enforces the difference and can be used to get a faster comparator.

Inverting amplifier

For an inverting op-amp we feed the output back to the inverting input through R2 and apply the input signal through R1 to the inverting input. The non-inverting input is connected to ground.

As the input voltage between the two inputs is very small (near 0 V) and the positive input is tied to ground we get a virtual ground (0 V) on the negative input. Uout lies over R2 to virtual ground and Uin lies over R1 to virtual ground. With the high impedance of the op-amp the current into the op-amp is near 0 A, so the only current flows through the two resistors. With Kirchhoff's second (voltage) law we get: Uin·R1 = -Uout·R2 respectively the gain GU = -R2/R1.

inverting op-amp

"Just do it" OA3:

mic circuit

Non-inverting amplifier

To get a non-inverting amplifier we have to feed the input voltage to the non-inverting input. With the same thinking as above we get: Uin·R1 = Uout·(R2 + R1). So the gain of the non-inverting op-amp is always greater than one. With two similar resistors we get a gain of two.

non inverting op-amp

"Just do it" OA4:
"Just do it" OA5:

Voltage follower

A very interesting circuit is the voltage follower. It is a non-inverting amplifier with R2 = 0 and R1 = ∞, witch gives us a gain of 1. The word amplifier is not really appropriate so voltage follower or buffer are better.

voltage follower

The voltage follower does not change the signal. It's advantage is the high input impedance and the low output impedance to isolate (buffer) a signal. The input signal will be unaffected by the circuit it is driving. We have already seen a good example in the chapter about DAC's. An R-2R ladder will function only if no current is drawn from the circuit. To use the output signal (get a current) we need to use a buffer circuit:

r2r circuit

Summing amplifier

By adding resistances to the inverting input of an inverting amplifier we can create a summing amplifier. The currents are added in the node (junction) at the inverting input. Because there is practically no current entering the op-amp, the sum of the currents pass through R2. If all resistors have the same value (R), we get: Uout = -R·((Uin1/R) + (Uin2/R)) respectively Uout = -(Uin1 + Uin2). With different values for the resistances we get a weighted sum. With three resistances we can add 3 voltages etc..

In our oscilloscope picture the output is already inverted!

summing op-amp

An interesting option is to make the resistors adjustable.

Differential amplifier

With the differential amplifier we are able to calculate the difference between two voltages. Often we use R1 = R2 and R3 = R4 reducing the formula to: Uout = R2/R1·(Uin2 - Uin1). For good results the resistances must be very precise.

In our example all resistors are equal, so we get Uout = Uin2 - Uin1.

differential op-amp

Inverting differentiator and integrator

Changing resistances with capacitors can build an inverting differentiator (left) or integrator circuit (right). They can be used as a low-pass electronic filter or a high-pass electronic filter. Other uses will be as controller in control and feedback systems (D and I controller).

In a practical application one encounters difficulties (drift of the voltage) with this simple circuits. They have to be enhanced with further components.

inverting differentiator and integrator

Active filters (wiki)

Filters are very important in electronics and are used in a variety of manners in circuits. In electronics fundamentals (ELEFU) we have seen how to build filters with a resistor and a capacitor. These passive filters are often simple, inexpensive and need no power supply. To build more complex filter (higher order) with passive components can get very challenging and expensive because of the needed inductances. Op-amps with especially their high input impedance (voltage follower) help to isolate the different stages of a filter and have a gain that helps to adjust the signal and to compensate the losses. A filter including active elements like op-amps is called an active filter. A drawback of active filters could be the limited bandwidth.

A popular and simple filter of the second order combining two first order RC filter is the Sallen-Key filter. Such a filter can easily be designed by an online tool like here.

op-amp sallen-key

"Just do it" OA6:

More applications of op-amps (wiki)

There are much more circuits that could be realised with op-amps. Examples are a Wien bridge oscillator, inductance gyrator, precision rectifier, logarithmic amplifier, exponential amplifier etc..

"Just do it" OA7:

Interesting links