Skip to main content
Back to module
Power, Electronics & Signals · Electronics

Op-amps

Reading35mLesson 2 of 3 in this module

Design inverting and non-inverting op-amp stages, and check output swing and bandwidth limits.

Why it matters

Operational amplifiers (op-amps) are the most reused analog part there is. They scale sensor signals to fit an ADC, buffer high-impedance sources, build active filters, sum and subtract signals, and close control loops. Two resistors and an op-amp give you a gain you can set to within 1%, as long as you respect the part's limits.

The ideal op-amp and its two rules

An op-amp has two inputs (+ non-inverting and - inverting) and one output, with a huge open-loop gain (often 10^5 or more). With negative feedback (output connected back to the - input), two rules let you analyse almost any circuit:

  1. No current flows into the inputs.
  2. The output adjusts so the two input voltages are equal (the "virtual short").

The inverting amplifier

Input through R_in into the - input, feedback resistor R_f from output to -, and + to ground. The - input sits at 0 V (a virtual ground), so the input current V_in / R_in must all flow through R_f:

V_out = -(R_f / R_in) * V_in
input impedance = R_in

Worked example. A sensor gives up to 0.5 V and you want about -2.35 V. Choose R_in = 10 kΩ (input impedance) and R_f = 47 kΩ (a standard E12 value): gain = -4.7, so 0.5 V becomes -2.35 V.

The non-inverting amplifier

Signal into +; R_f from output to - and R_g from - to ground:

V_out = (1 + R_f / R_g) * V_in
input impedance: very high

With R_f = 100 kΩ and R_g = 10 kΩ, the gain is 11. With R_f = 0 and no R_g, the gain is 1: the voltage follower, used to buffer a source that can't drive a load.

A summing amplifier adds several inputs, each through its own resistor into the virtual ground: V_out = -R_f (V1/R1 + V2/R2 + ...).

Real limits

  • Output swing. The output can't go beyond the supply rails, and many op-amps stop a volt or two short. With ±12 V supplies and a gain of -4.7, an input of 3 V asks for -14.1 V; the output clips at about -12 V (or less). "Rail-to-rail output" parts get within tens of millivolts.
  • Gain-bandwidth product (GBW). Open-loop gain falls with frequency. For a typical voltage-feedback op-amp, the closed-loop bandwidth is about GBW / noise gain, where the noise gain is 1 + R_f / R_g for both configurations. For a 1 MHz part, a non-inverting gain of 11 gives about 91 kHz. The inverting gain of -4.7 has a noise gain of 5.7, so about 175 kHz.
  • Slew rate. The output can only change so fast. For a sine of peak V_p, the full-power bandwidth is SR / (2 pi V_p): a classic 741 at 0.5 V/µs manages only about 8 kHz at 10 V peak.
  • Input offset and bias currents add DC errors; precision parts specify them in microvolts and picoamps.
  • Supply and common-mode range: check that the input voltages stay inside the allowed range for your supply.

Simulate it

Falstad (https://www.falstad.com/circuit/) has an op-amp model; LTspice includes models of real parts. Drive an inverting stage with a sine, increase the amplitude until it clips, and raise the frequency until the gain falls. Seeing the limits in a simulator is safer and faster than finding them on a bench.

Common mistakes

  • Positive feedback by accident (feedback to the + input), which makes a comparator or oscillator instead of an amplifier.
  • Ignoring the rails and expecting gains that the supply can't deliver.
  • Using the signal gain instead of the noise gain for bandwidth.
  • Very large resistors (MΩ) that add noise and offset; very small ones that load the output. 1 kΩ to 100 kΩ is a comfortable range.
  • No decoupling capacitor near the supply pins (100 nF is typical), which can make the stage oscillate.

Recap

  • With negative feedback: no input current, equal input voltages.
  • Inverting: -R_f / R_in. Non-inverting: 1 + R_f / R_g. Follower: 1.
  • Check output swing, bandwidth (GBW / noise gain) and slew rate before trusting a design.

Try it

Open the Do tab to write an op-amp design helper that computes gains, clips to the rails and estimates bandwidth.

Also in this lesson: