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.
Experiment in the video:
OpAmp Non-Inverting AmplifierOpAmp Inverting AmplifierExperiments related to Opamps
Experiments & Lessons
Gallery view
OpAmp Non-Inverting Amplifier
Statements and Loops in Verilog
Calculate gain Using SCPI commands in Python
Measuring Capacitance
Transistors
Diodes
Full Wave Rectifier
Other Gates
Signal Modulation
Cascading Filters
RC Transfer Function with Bode Analyzer
Frequency Response of LTI Systems
Signal Modulation Experiment
Binary Weighted DAC
Function Generators
Calculate Gain of OpAmp and Find -3dB point in Jupyter Notebooks
Measuring the OpAmp board Gain using Oscilloscope application
FIR vs. IIR Filters
Subtraction with OpAmps
Common Emitter Transistor Amplifier
Digital to Analog Converter
Measuring external waveforms
Measuring External Waveforms with Red Pitaya
Driving an LED with Analog PWM
Moving average on Red Pitaya
Digital Filtering
Resistor Voltage Divider DAC
Comparator & Schmitt Triggers
Simple LED blinker
Karnaugh Map
Single stage High Pass circuit
Cascading Filters with Variable Stages
OpAmp Triangular Wave Generator
Pulse Width Modulation
Data Types and Values in Verilog
Modifying a comparator
Digital Filters
Inverting and noninverting Schmitt Trigger
OpAmp Sine Wave Generator
Installation of Vivado 2020.1
Vivado Project Setup
Smoothing a PWM Signal using an RC Filter
Half Bridge Rectifier
Frequency Counter
Diode Experiment
Introduction to Verilog
Calculate gain, phase and turn on LEDs in Jupyter Notebooks
Measuring Frequency
Measuring Uncertainty in Voltage Measurement
Addition with OpAmps
Boolean Algebra
Properties of periodic waveforms
Programming the FPGA
Transformer-Based Full Wave Rectification
A Brief Tour of Linear Systems
Band-Pass Filter
Digital Information and Numerical Bases
Measuring Inductance using the Impedance Measurement Method
Running Sum Filter
Resonant Filter
Boolean Functions
Superposition
An OpAmp multivibrator
Resistor Voltage Divider
OpAmp Inverting Amplifier
Full Wave Rectifiers and Transformers
Active Filters
Generate, acquire and plot a signal in Jupyter Notebooks
Knight Rider
Transformer-Based Full Wave Rectification
Ping Pong
Measurements in Time Domain
LED Counter
Transient Response
Single stage Low Pass circuit
Resistors in Superposition
Resistor circuits
Measuring Inductance
RC Circuit Response
Operators in Verilog
Tasks and Functions in Verilog
Measuring Uncertainty
Assignments in Verilog
Stopwatch
OpAmp-Controlled LED Circuit
R-2R DAC
Mathematical Operations with the Binary Base
Simple Calculator
Measuring the Oscillating Frequency of RLC Circuits
OpAmp Multivibrator
Analog Filters
Driving an LED with a PWM Signal
Analog Addition and Subtraction
Measuring Capacitance using the Rise/Fall Time Method
Operational Amplifiers