Lesson 3.3 · Module 3: Semiconductors & Active Switching

Op-Amp Basics: Buffer, Comparator & Amplifier

The op-amp is a tiny amplifier chip. Here it is used as a buffer, a comparator and an amplifier — three jobs you find in nearly every sensor circuit.

The live, interactive simulation for this lesson opens here when JavaScript is on.

Key ideas

  • An op-amp compares its + and − inputs and drives its output to make them equal.
  • As a buffer it copies a voltage without loading it — fixing the divider problem from lesson 2.1.
  • With two resistors (R_f and R_g) it amplifies: gain = 1 + R_f ÷ R_g.

Try this in the simulation

  • In Buffer mode, toggle the bypass and see the divider sag without the op-amp.
  • In Comparator mode, move the input past U_ref and watch the output snap between low and high.
  • In Non-inverting mode, set R_f nine times R_g for a gain of 10.

What does an op-amp do?

An op-amp is a tiny amplifier chip with two inputs and one output. It adjusts its output until the two inputs are at the same voltage. Used as a buffer, it copies a voltage without loading the circuit that supplies it, which cures the loading effect of a voltage divider. Used as a comparator it tells you which of two voltages is bigger. With two resistors in feedback it amplifies a signal by a set gain.

What you’ll learn

  • The op-amp rule: with feedback, the output works to make both inputs equal.
  • How a unity-gain buffer fixes the loading problem of a divider.
  • How a comparator turns an analogue voltage into a high or low output.
  • How to set the gain of a non-inverting amplifier: 1 + R_f ÷ R_g.

The formula, letter by letter

Uout=U+(gain 1,  Zin→∞,  Zout→0)Udiv=2.50 V  →  Uload=0.00 V\begin{aligned}\htmlClass{mv mv-v_out}{\htmlStyle{font-size:1.00em}{\htmlData{sym=U_out}{U_{\mathrm{out}}}}} &= \htmlClass{mv mv-v_p}{\htmlStyle{font-size:1.00em}{\htmlData{sym=U_+}{U_{\mathrm{+}}}}}\quad(\text{gain }1,\; \htmlData{sym=Z_in}{Z_{\mathrm{in}}}\to\infty,\; \htmlData{sym=Z_out}{Z_{\mathrm{out}}}\to 0)\\ \htmlData{sym=U_div}{U_{\mathrm{div}}} &= \htmlData{funit=V,v=2.5}{\text{2.50 V}}\;\to\; \htmlData{sym=U_load}{U_{\mathrm{load}}} = \htmlData{funit=V,v=0}{\text{0.00 V}}\end{aligned}

Shown with this lesson’s starting values. In the simulation the numbers change as you move the sliders.

UoutU_{\mathrm{out}}
Output voltage (V · volt)
U+U_{\mathrm{+}}
Non-inverting input voltage (V · volt) : The voltage on the op-amp’s + input.
ZinZ_{\mathrm{in}}
Input impedance (Ω · ohm) : How much an input loads whatever drives it. Bigger is gentler.
ZoutZ_{\mathrm{out}}
Output impedance (Ω · ohm) : How much an output sags when loaded. Smaller is stiffer.
UdivU_{\mathrm{div}}
Voltage from the divider (V · volt)
UloadU_{\mathrm{load}}
Voltage at the load (V · volt)

Common questions

What is an op-amp buffer used for?

It copies a voltage with almost no current drawn from the source, then supplies that voltage from its own output. It lets a weak source, like a divider or sensor, drive a heavier load without sagging.

How is a comparator different from an amplifier?

An amplifier uses feedback to produce a proportional output. A comparator has no feedback, so its output simply snaps high or low depending on which input is larger.

How do I set the gain of a non-inverting amplifier?

Gain = 1 + R_f ÷ R_g. With R_f nine times R_g, the gain is 10: a 0.1 V input becomes 1 V at the output, as long as the supply allows.

Keep going

Words used in this lesson

Parts in this lesson

All lessons · How components work · Glossary