An operational amplifier (op-amp) is a high-gain, differential voltage amplifier with two inputs and one output, used to mathematically manipulate analog signals by amplifying, filtering, or comparing voltages. If you are asking what is an operational amplifier used for, the practical answer is signal conditioning: taking a weak, noisy, or mismatched voltage from a sensor, microphone, or DAC, and shaping it into a robust, low-impedance signal that a microcontroller ADC, power stage, or speaker can actually process without distortion.
The Core Job: What an Op-Amp Actually Changes in a Circuit
When you insert an op-amp into a signal path, you are fundamentally changing the impedance relationship between your source and your load. Raw sensors (like thermocouples or piezo pickups) have high output impedance; if you connect them directly to a microcontroller's ADC, the ADC's sampling capacitor will drag the voltage down, causing massive reading errors.
An op-amp solves this by providing incredibly high input impedance (often >100 MΩ) and very low output impedance (typically <100 Ω). Think of the op-amp's differential input stage like a flexible diaphragm between two water pipes: the output valve opens proportionally to the difference in pressure between the non-inverting (+) and inverting (-) pipes, not the absolute pressure in either one. This allows the op-amp to 'read' a fragile voltage without drawing meaningful current from it, and then 'repack' that voltage with enough current-drive to push through long cables or charge capacitive loads.
Where You Meet This in Practice: 4 Common Topologies
You will rarely see an op-amp running 'open-loop' (without feedback) in linear applications because its raw open-loop gain is around 100,000 to 1,000,000 V/V, making it instantly saturate. Instead, we use negative feedback to force the op-amp to behave predictably. Here is where you meet this in practice on the workbench:
| Topology | Gain Formula | Primary Use Case | Common Part Number |
|---|---|---|---|
| Voltage Follower (Buffer) | 1 (Unity) | Isolating high-impedance sensors from ADCs | TL072, OPA2134 |
| Non-Inverting Amplifier | 1 + (Rf / Ri) | Boosting sensor signals while maintaining phase | LM358, MCP6002 |
| Inverting Amplifier | -(Rf / Ri) | Audio mixing, DAC scaling, phase inversion | NE5532, LM4562 |
| Differential Amplifier | Rf / Ri (matched) | Reading shunt resistors, rejecting common-mode noise | INA128, AD620 |
Worked Numeric Example: Sizing a Non-Inverting Amplifier
Let's design a preamp stage for an electret microphone. The mic outputs a maximum of 10mV RMS, but our Arduino Uno's ADC needs a 500mV RMS signal to maximize resolution without clipping.
- Calculate Required Gain: 500mV / 10mV = 50 V/V.
- Select the Formula: For a non-inverting topology, Gain = 1 + (Rf / Ri).
- Choose Resistor Values: We need Rf / Ri = 49. To avoid loading the op-amp output or drawing excessive current, we keep resistors in the 1kΩ to 100kΩ range. Let's set Ri = 1.00 kΩ (1% tolerance).
- Solve for Rf: Rf = 49 * 1.00 kΩ = 49.0 kΩ.
- Select Standard E96 Value: The closest 1% standard resistor is 49.9 kΩ.
- Verify Final Gain: 1 + (49.9 / 1.0) = 50.9 V/V. Output will be 509mV RMS, which is perfectly safe for a 5V ADC (peak voltage will be ~720mV, well below the 5V rail).
For this audio application, we would select a low-noise, audio-grade op-amp like the TL072 or NE5532, powered by a dual ±9V supply to allow the AC audio signal to swing cleanly above and below 0V.
Bench Scenario Walkthrough: When the Output Clips
Understanding what an op-amp is used for theoretically is easy; debugging it on the bench is where mistakes happen. Here is a real-world scenario from a recent current-monitoring build.
The Setup: I needed to measure DC current for a 12V solar charge controller using an Arduino Uno (5V ADC). I placed a 0.025 Ω shunt resistor in the ground path. At the maximum expected current of 2.0A, the shunt develops 50mV. I needed to amplify this 0-50mV signal to 0-5V for the Arduino.
The Numbers: Required gain = 5V / 0.05V = 100 V/V. I wired up an LM358 dual op-amp in a non-inverting configuration with Ri = 1kΩ and Rf = 99kΩ, powering the LM358 from the Arduino's 5V pin (single-supply mode).
The Outcome: As the solar panel current climbed past 1.4A (70mV shunt voltage), the Arduino ADC maxed out at a reading of 1023 (5V). However, when I probed the op-amp output with my oscilloscope, the voltage flatlined at exactly 3.6V. The microcontroller was reading phantom voltages due to ADC internal leakage, while the op-amp was hard-clipping.
What Went Wrong: The LM358 is a legacy, non-rail-to-rail output part. On a single 5V supply, its output high voltage ($V_{OH}$) can only swing to about Vcc - 1.5V (which is 3.5V to 3.8V depending on load). It physically cannot output 5V when powered by 5V.
Common Confusions: Op-Amps vs. Comparators vs. Audio Amps
When sourcing parts, beginners frequently confuse general-purpose op-amps with specialized ICs that share similar pinouts or naming conventions.
- Op-Amp vs. Comparator (e.g., LM358 vs. LM393): An op-amp is designed to operate in its linear region using negative feedback. A comparator is designed to run open-loop, slamming its output to the positive or negative rail based on which input is higher. Comparators like the LM393 have open-collector outputs (requiring a pull-up resistor) and lack internal phase-compensation capacitors. If you use an op-amp as a comparator, it will be slow to recover from saturation; if you use a comparator as a linear amplifier, it will likely oscillate wildly.
- Op-Amp vs. Audio Power Amplifier (e.g., TL072 vs. LM386): An op-amp outputs voltage (typically max 20mA). An audio power amplifier like the LM386 is designed to output current to drive low-impedance speakers (4Ω to 8Ω). You use an op-amp for the preamp/tone-control stage, and a power amp for the final speaker drive stage.
- Op-Amp vs. Instrumentation Amplifier (e.g., LM358 vs. INA128): While you can build a differential amplifier with three standard op-amps, an instrumentation amp (in-amp) integrates matched, laser-trimmed internal resistors to provide massive Common-Mode Rejection Ratio (CMRR). Use in-amps for medical ECG sensors or high-side current shunts where noise rejection is critical.
FAQ: Operational Amplifier Edge Cases
Q: Can I power an op-amp with a single battery instead of a dual positive/negative supply?
A: Yes, this is called single-supply operation. However, you must bias the non-inverting input to a mid-rail voltage (e.g., Vcc/2) using a voltage divider so the AC signal has room to swing both up and down without hitting the 0V ground rail. Ensure your chosen op-amp specifies 'single-supply' or 'rail-to-rail input' in its datasheet.
Q: Why does my op-amp output oscillate when I connect a long coaxial cable to it?
A: Coaxial cables have high parasitic capacitance (often 30pF per foot). This capacitance interacts with the op-amp's output impedance, introducing a phase lag that destroys the phase margin of the internal compensation network, causing high-frequency ringing. Fix this by placing a small series resistor (typically 22Ω to 100Ω) directly at the op-amp output pin, before the cable.
Q: What is 'slew rate' and why does it matter?
A: Slew rate is the maximum speed at which the op-amp's output voltage can change, measured in Volts per microsecond (V/µs). If you try to amplify a 100kHz square wave with an LM358 (slew rate ~0.3 V/µs), the output will look like a triangle wave because the IC physically cannot change voltage fast enough. For high-frequency or fast transient signals, choose a high-speed op-amp like the OPA350 (9.5 V/µs).






