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
Shown with this lesson’s starting values. In the simulation the numbers change as you move the sliders.
- Output voltage (V · volt)
- Non-inverting input voltage (V · volt) : The voltage on the op-amp’s + input.
- Input impedance (Ω · ohm) : How much an input loads whatever drives it. Bigger is gentler.
- Output impedance (Ω · ohm) : How much an output sags when loaded. Smaller is stiffer.
- Voltage from the divider (V · volt)
- 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
- Next lesson: 4.1 Pull-Up Resistors & Button Debounce Explained
- Related components: Op-amp & comparator