The objective of this activity is to introduce the reader to a very useful yet not that well known type of electronic components, the operational amplifiers.
What is an OpAmp
Operational amplifiers, or OpAmps, are electronic components that contain a chunk of doped silicon comprised of several transistors, resistors, and capacitors, hidden within their package. They feature two power pins, two input signal pins, and one output pin. Unlike regular differential amplifiers, OpAmps exhibit very high gain and fast response time, making them suitable for various applications beyond their apparent purpose. These components are configured in a way that results in the output pin producing the voltage difference between the two input pins, multiplied by a significant factor. However, their high gain makes them unsuitable as a differential amplifier.
How it works
OpAmps have two input pins, called inverting (-) and noninverting (+), which should not be confused with the power supply pins. The power supply pins are the positive and negative supply pins, which may be labeled with + and - signs or V+ and V-, and are used to power the OpAmp. OpAmps also have an output pin, and some chips may have additional connections for offset voltage compensation.
It is important to note that the negative supply pin of an OpAmp is not meant to be connected to ground, and the positive supply pin is not meant to be connected to the supply voltage. Instead, OpAmps are typically connected between a positive and negative voltage, with the negative voltage being below ground potential, such as the -4 V pin on the Red Pitaya.
The output pin of an OpAmp is equal to the difference between the noninverting and inverting inputs, multiplied by a large gain factor known as the āopen loop gainā (A_OL), which can be as high as 100,000.
Such a large gain means, that output would exceed supply voltage for even a very small difference between input voltages; even some noise, that gets coupled to inputs, may send the output into saturation. What is saturation? Saturation is what happens when OpAmpās output hits the limits of how far it can go. And how far is it? Usually from a few volts above negative supply voltage up to a few volts below positive supply voltage. There are some OpAmps whoās output can swing from negative to positive supply voltage. Those are called rail-to-rail OpAmps. And just to make it clear: when OpAmp hits saturation, output gets clamped.
The symbol
OpAmps are available in a variety of package types, but their symbols have been standardized for conveying their functions and for creating electrical schematics for PCB production. The symbol for functional representation does not include power pins, while the schematic representation does. There are additional pins for offset compensation, differential outputs, and other features that are not discussed in this introductory article. It is worth noting that the symbols for OpAmps and comparators are nearly identical, as the two components have similar construction and functions.
Now that weāve discussed the symbol, it is time to take a look at what can what functions an OpAmp can be used for.
Voltage follower
Letās make a thought experiment. If we connected OpAmps output to its inverting input, and noninverting input to some arbitrary voltage. What would the output voltage be?
In the previous chapter, we discussed the instability issues when using a comparator instead of an OpAmp. When the output of a comparator is above U+, it hits negative saturation, and when it is below U+, it hits positive saturation. This behavior is not suitable for applications that require stability. In contrast, OpAmps have a slower response time, making them more resistant to becoming unstable. In most OpAmp circuits, when working within voltage limits, the output is equal to the input voltage.
The usefulness of this feature comes from the fact that OpAmps have a large input impedance and a small output impedance. This property allows us to connect OpAmp inputs to any node in a circuit without affecting it, as long as the nodeās voltage is within the OpAmpās safe operating range. Additionally, we can connect the OpAmp output to any load, as long as the current draw doesnāt exceed the OpAmpās rating. This feature is especially helpful in applications such as analog filters, where we want to connect a load to a circuit without affecting it.
An amplifier
Suppose that you desired to amplify the input voltage by a smaller factor, rather than the tens or hundreds of thousands commonly achieved by OpAmps. How would you approach this task?
Letās analyze why this circuit works. Assuming the OpAmp is not saturating, the inverting and noninverting inputs will be at the same potential, which is indicated by a dashed line. It should be noted that the inputs are not physically connected. Now, letās examine the equations:
Resistors 1 and 2 form a resistive voltage divider for output voltage. Obviously Output voltage will have to be greater than input, otherwise original assumption, that both inputs are at the same potential, would be false. If we flip around the equation to express exactly what output voltage should be, we get:
Given the equation for the amplifier circuit, it is clear that the output voltage cannot be less than the input voltage if the OpAmp is not hitting saturation. To verify this claim, we can analyze the circuit and confirm that the voltage gain is always greater than or equal to 1.
An inverting amplifier
Given that an OpAmp can be used for signal amplification and has an input called the āinverting input,ā it follows that there exists a specific circuit configuration called the āinverting amplifier.ā This configuration is widely used in electronics and serves to amplify an input signal with an amplification factor that is determined by the ratio of two resistors in the circuit. The inverting amplifier is a type of operational amplifier circuit that produces an output that is proportional to the negative of its input.
Once again, starting assumption is that both inputs are at the same voltage. I trust you would be able to derive the formula for output voltage as the approach is the same as before, but if youāll want to verify your calculations, here is the setup:
And if we express output voltage as a function of input voltage:
In this configuration, output voltage will always have an inverse sign than input, but its absolute value may be amplified or attenuated. Now that we went through all basic OpAmp circuits, letās verify that the amplifiers actually behave the way I described.
Conclusion
If you read through the entire article, you are now familiar with the four most common (or at least beginner-friendly) applications for operational amplifiers: comparator, voltage follower and two types of amplifiers. If you also followed along with the experiments, you may have gotten a feeling for distortions you will encounter when amplifier is operating close to or beyond saturation. In any case I hope You found this article both interesting and fun. The question I would like to leave you with is: how would you build a noninverting amplifier with attenuation (gain between 0 and 1)?
Written by Luka PogaÄnik Edited by Andraž Pirc
This teaching material was created byĀ Red PitayaĀ &Ā Zavod 404Ā in the scope of theĀ Smart4AllĀ innovation project.