2026-04-19
If digital circuits are built on logic gates, analog circuits are built on operational amplifiers (op-amps). Originally designed for analog computers to perform mathematical "operations" (hence the name), op-amps are now the workhorse IC in signal conditioning, filtering, and sensor interfacing — exactly the places where the physical world meets your software.
An op-amp has two inputs — inverting (−) and non-inverting (+) — and one output. Its open-loop gain is enormous (typically 100,000× or more), which makes it useless on its own. The magic comes from negative feedback: you route part of the output back to the inverting input, which tames the gain into something precise and controllable.
Two configurations you'll see everywhere:
Real-world example: A load cell on an industrial scale outputs only 2 mV per volt of excitation — maybe 20 mV full-scale. Your ADC expects 0–3.3 V. You need a gain of about 165×. Using a non-inverting configuration: pick R₁ = 1 kΩ, then R_f = (165 − 1) × 1 kΩ = 164 kΩ (use a standard 162 kΩ resistor, or a 150 kΩ + trimmer for calibration). That single op-amp stage brings the signal into your ADC's usable range.
Two ideal op-amp rules that let you analyze any feedback circuit on a napkin:
Apply these two rules and you can derive the gain formula for any configuration — inverting, non-inverting, differential, summing, integrating — in under a minute.
Practical selection tips: For general-purpose work, the LM358 (dual, single-supply) or TL072 (low-noise, dual-supply) are solid defaults. If you need rail-to-rail output on 3.3 V logic, look at the MCP6002. Key datasheet specs to check: gain-bandwidth product (sets your maximum usable frequency), input offset voltage (matters for DC precision), and slew rate (how fast the output can change).
