Overview

Readings Alexander & Sadiku, Ch 5

An operational amplifier (op amp) takes the difference between the voltages on its two inputs, multiplies it by a really large gain, and puts that out. Add some resistors for negative feedback and you can build amplifiers, summers, buffers and a lot more out of it.

Worked examples sit right after the concept they use. Problems marked (T) are tutorial problems, so try each one on paper before reading the solution.

Components

TerminalNameWhat it does
Inverting inputThe signal here gets subtracted, so raising pushes down. This is usually where the feedback connects.
Non-inverting inputThe signal here gets added, so raising pushes up.
Positive supplyPowers the op amp and sets the upper limit of .
Negative supplyPowers the op amp and sets the lower limit of .
OutputThe amplified difference , cut off at the supply rails.

Try it: pick a terminal to see what it does, then move the sliders. Crank up to like a real op amp and watch the output slam into a rail unless the two inputs are almost equal.

Interactive op amp diagram (open this page on the site to use it).

Circuit diagrams usually leave the supply pins out, but they're still there, and they're the reason the output saturates.

How it amplifies

What you're learning

  • About: What’s physically inside an op amp, and where the output’s extra energy comes from.
  • Goal: Explain why only matters, why the gain is so large, why the inputs draw no current, and why the output can’t go past the supplies.
  • Connects to: The ideal rules later in this chapter, and MOSFET amplifiers for the transistor-level detail.

The input signal doesn’t get “made bigger”. It controls how much of the supply reaches the output, and the extra energy comes from the supply pins. Think of a big water reservoir (the supply) with a valve whose handle takes almost no effort to turn (the inputs): a tiny twist swings a large flow.

Inside, three stages do the work:

  1. Differential pair: two matched transistors share one fixed current. If it splits 50/50, and if one input is higher it steers more current down that side. That’s why only the difference matters.
  2. Gain stage(s): the current imbalance flows through a large load and becomes a big voltage. Stacked stages multiply, which reaches .
  3. Output stage: buffers the result so it can drive a load (the small ). It can’t pull past the supplies, which is saturation.

The input transistors are voltage-sensed, so they draw almost no current. That’s the physical reason for the ideal rule . For the transistor-level detail, with equations and a worked example, see MOSFET: using it as an amplifier.

Notes

Open Loop

What you're learning

  • About: An op amp on its own, with nothing fed back from the output to the inputs.
  • Goal: See why open loop slams the output into a supply rail almost immediately, and why its gain is too unreliable to amplify with. That makes it a comparator, not an amplifier.
  • Connects to: from the section above. It sets up why feedback is needed.

Open loop means the op amp is on its own, with nothing connecting the output back to either input (Figure 5.1). The output is simply:

Figure 5.1: An open-loop op amp (left) and its output vs. the input difference (right). Figure 5.1: An open-loop op amp (left) and its output vs. the input difference (right).

That’s not much use as an amplifier, for two reasons:

  • It saturates almost right away. is huge (around ), so with supplies the output hits a rail as soon as the inputs differ by more than . Real signals are bigger than that, so the output just sits at or .
  • The gain isn’t reliable. changes from chip to chip, with temperature, and with frequency, so even a tiny signal wouldn’t get a predictable gain.

Picture a seesaw with a hair trigger: if is even slightly above the output slams to the positive rail, and slightly below sends it to the negative rail. A quick sign check before you calculate: bigger means a negative output, bigger means a positive output. The usual slip is dropping the minus sign when .

Open loop is still good for a comparator. The output tells you which input is bigger (high rail if , low rail if ).

Example 5.1: Comparator or amplifier?

An open-loop op amp has and supplies of . Find for:

  • (a) ,
  • (b) ,
  • (c) ,
Show answerHide answer

Apply Eq. (5.1), then clip to the rails.

  • (a) , so . That is inside , so .
  • (b) , so . That is past the rail, so .
  • (c) , so . The output saturates at .

Only inputs within about of each other give an output between the rails. Anything bigger just says which input is larger, which is what a comparator does.

Negative Feedback

What you're learning

  • About: Feeding the output back to the inverting input so the op amp corrects itself.
  • Goal: Explain the self-correcting loop, use the virtual short to analyse amplifiers, and see why the gain is set by the resistors instead of by .
  • Connects to: It fixes both open-loop problems, and it’s the only case where the ideal op amp’s virtual short applies.

Negative feedback fixes the open-loop problem by connecting the output back to the inverting input (), through a resistor or just a wire, like the buffer in Figure 5.2.

Figure 5.2: A buffer, the simplest negative feedback circuit. The output is wired straight back to v_-. Figure 5.2: A buffer, the simplest negative feedback circuit. The output is wired straight back to .

Why it works: the op amp corrects itself

  1. Say is a bit too high, which happens when is too large.
  2. Some of gets fed back to , so goes up too.
  3. That shrinks , so pulls back down.
  4. If is too low, the same thing happens in reverse.

The output settles at whatever voltage makes almost exactly equal to . That’s where the virtual short () comes from.

Why it's safe to say : the leftover gap is tiny compared to the signal. In the buffer example below the gap is about on a signal, roughly a hundred-thousandth of it. It isn't exactly zero, but it's small enough to ignore.

Buffer with and

The output is wired straight to , so : The inputs only differ by , so in practice .

The resistors set the gain, not

If a fraction of the output gets fed back to , the gain of the whole circuit is:

  • : closed-loop gain, for the whole circuit with feedback connected
  • : open-loop gain of the op amp itself
  • : feedback factor, the fraction of that reaches . For a non-inverting amp,

For the non-inverting amp, , which is exactly its gain formula, Eq. (5.5). drops out, and that’s the whole point. varies a lot between chips and with temperature, but resistor values are precise and stable.

Two different gains show up from here on, so keep them straight:

GainSymbolWhat it isTypical value
Open-loopThe bare op amp with no feedback, , huge but unreliable
Closed-loopThe finished circuit with feedback connected, Small (like 20), set by the resistors

Feedback trades a huge, sloppy gain for a smaller, precise one.

Example 5.2: How much does the gain depend on ?

A non-inverting amp has and . Find when , and again when a poorer chip has .

Show answerHide answer

The feedback factor is , so the ideal gain is . From Eq. (5.2):

dropped by a factor of 10, yet the closed-loop gain moved by only about . The gain is set by the resistors.

Positive Feedback

What you're learning

  • About: Feeding the output back to the non-inverting input, so the op amp runs away to a rail.
  • Goal: Explain why the output is always , why the virtual short fails, and analyse a Schmitt trigger.
  • Connects to: The opposite of negative feedback. The same runaway is what oscillators and latches use.

Positive feedback connects the output back to the non-inverting input () instead. Now the feedback pushes the output in the direction it’s already going, so the op amp runs away instead of correcting itself:

  1. Say goes up a little.
  2. Some of gets fed back to , so goes up too.
  3. That makes bigger, so pushes up even more.
  4. This keeps going until hits the supply rail, and then it stays there.

So the output is never in between. It’s always at or , and the virtual short () doesn’t apply. That makes positive feedback no good for amplifying, but handy for switching circuits.

Where it’s used: the Schmitt trigger

A Schmitt trigger is a comparator with positive feedback added. The input goes to , and and feed part of the output back to (Figure 5.3):

Figure 5.3: An inverting Schmitt trigger (left) and its hysteresis loop (right). Figure 5.3: An inverting Schmitt trigger (left) and its hysteresis loop (right).

No current flows into , so and act as a voltage divider off the output:

  • : voltage at the non-inverting input, which acts as the switching threshold
  • : output voltage, either or
  • : fraction of the output fed back to
  • : resistor from to ground
  • : feedback resistor, from the output to

can only be , so there are two thresholds, and . With , and supplies, , so the thresholds are :

  • While , . The output doesn’t flip to until goes above .
  • While , . The output doesn’t flip back until drops below .

The gap between the two thresholds is called hysteresis (the loop in Figure 5.3), and it’s the reason you’d use one of these. A noisy signal wobbling around a single threshold would make a plain comparator flip back and forth like crazy, but a Schmitt trigger ignores any wobble smaller than the gap.

Only one threshold is active at a time, and which one depends on the current output:

Current Active threshold ()Output flips when…Flips to
rises above it
falls below it

Each flip moves the active threshold to the other side, and that’s the circuit’s memory. The same can give either output depending on which way it got there, and the hysteresis is wide ( in the example above).

Don't assume the upper threshold sends the output to the upper rail. That's true for a non-inverting Schmitt trigger, but here is on the inverting pin, so crossing the upper threshold sends the output down, and crossing the lower threshold sends it up. The thresholds are named by the input level.

To trace a Schmitt trigger: (1) find the current output, (2) read off the active threshold, (3) ask which way has to move to cross it. If moves the other way, nothing happens.

Example 5.3: Designing and tracing a Schmitt trigger

An inverting Schmitt trigger (Figure 5.3) runs from and must switch at . (a) Choose and . (b) The output starts at and goes . What does do?

Show answerHide answer

(a) The thresholds are , so . That gives . Choose and .

(b) Track the threshold, which depends on the current output:

  • , so . While rises from to , it stays below and stays at .
  • reaches , which is above , so flips to . Now .
  • falls back to . That is still above , so stays at . The old threshold of no longer applies.
  • reaches , below , so flips back to .

The hysteresis is wide, so a wobble of less than that around can’t toggle the output.

Spotting the Feedback Type

What you're learning

  • About: Telling at a glance whether a circuit is open loop, negative feedback or positive feedback.
  • Goal: Trace the feedback path and decide which rules apply (virtual short or saturation) before doing any math.
  • Connects to: The three sections above.

Figure 5.4: The three possibilities. The feedback path, if there is one, is highlighted. Figure 5.4: The three possibilities. The feedback path, if there is one, is highlighted.

Output connects back to…FeedbackWhat happensCan you use ?
(inverting input)NegativeOutput settles at a stable valueYes
(non-inverting input)PositiveOutput runs away to a supply railNo
Nothing (open loop)NoneOutput saturates (comparator)No

The feedback type depends on where the output connects, not on where the input signal enters. The inverting amplifier has coming in at (through ) and still uses negative feedback, because connects the output back to .

Every amplifier circuit in this chapter uses negative feedback. If you can't find a path from the output back to , don't assume the virtual short.

Ideal Op Amp Model

What you're learning

  • About: The simplified op amp (, , ) used for almost all circuit analysis.
  • Goal: Solve op amp circuits with two rules, no current into the inputs and , plus KCL at the inverting node.
  • Connects to: Negative feedback, since the virtual short only holds there.

An ideal op amp is a lot easier to work with. You assume , , , which gives two rules:

  1. No current into the inputs:
  2. The inputs are at the same voltage (virtual short): (only valid with negative feedback)

My solving method: use the two ideal rules, then do KCL at the inverting node. Don't write KCL at the output node, since the op amp supplies some unknown current there.

Getting the signs right in KCL at : write every current as (higher-voltage end − lower-voltage end) / R, in the direction it actually flows. The source current comes in through and has to leave through toward , so the current is for an inverting amp (and for a non-inverting amp, where sits above ). Then check the sign of the answer against the circuit: signal into gives the same sign out, signal into through gives the opposite sign. Compare the sign as well as the size when you check against a gain formula.

Rule 1 only covers the inputs. The output current is not zero: the output stage supplies whatever the load and feedback path need, drawn from the supply pins (like the in Example 5.11). A real op amp has a maximum output current, often a few tens of mA, and past that the output sags even though the voltage is inside the rails.

Example 5.4: Sources connected directly to the inputs

Determine in the op amp circuit of Figure 5.5.

Figure 5.5: Circuit for Example 5.4. Figure 5.5: Circuit for Example 5.4.

Show answerHide answer
  1. is fixed by the voltage source: , so too.
  2. No current goes into the op amp, so all 2 mA from the current source has to leave the node through the 5 kΩ resistor:

Real Op Amp Model

What you're learning

  • About: The equivalent circuit with finite input resistance, output resistance and gain.
  • Goal: Analyse a circuit with the full model, and see the ideal rules appear as the limits of large and and small .
  • Connects to: The ideal model, as a check on when it’s accurate.
  • It’s modeled as an input resistance between the inputs, plus a dependent source in series with an output resistance .
  • Typical values: –, –, –.
  • Saturation: the output can’t go past the supplies, so .

Three voltages to keep apart: is the input difference (the voltage across , tiny, often microvolts). is the voltage of the dependent source inside the model. is the voltage at the output pin. The path is lose some across .

A load is outside the op amp (it connects from to ground), and and form a divider: . For example, , and gives . Keep if you want . Also, across draws only , which is why is a safe assumption.

Try it: pick each part of the model, then switch to the ideal op amp to see where the two ideal rules come from.

Interactive op amp model (open this page on the site to use it).

Example 5.5: Op amp equivalent model

The equivalent model of an op amp is shown in Figure 5.6. Determine (a) the input resistance, (b) the output resistance, and (c) the voltage gain in dB.

Figure 5.6: Equivalent model for Example 5.5. Figure 5.6: Equivalent model for Example 5.5.

Show answerHide answer

Everything can be read right off the diagram:

  • (a) The resistance between the input terminals is
  • (b) The resistance in series with the output is
  • (c) The open-loop gain is the number in front of , so . In decibels:

Example 5.6: Non-ideal voltage follower

The op amp in Figure 5.7 has an open-loop gain of 50,000, an input resistance of 20 kΩ, and an output resistance of 50 Ω. Find the voltage gain using the non-ideal model.

Figure 5.7: Voltage follower for Example 5.6. Figure 5.7: Voltage follower for Example 5.6.

Show answerHide answer
  1. Swap the op amp for its model. sits between and , and the output is in series with , where
  2. KCL at the output node. The current through (from to ) plus the current through (from the source to ) has to add up to zero, since nothing else is connected:
  3. Multiply through by and solve:

The ideal answer is exactly 1. The non-ideal model is only worth the algebra when the question asks for it, like this one does.

Key formulas

General

  • : output voltage
  • : open-loop gain (the op amp’s own gain, with no feedback)
  • : differential input voltage,
  • : voltage at the non-inverting input
  • : voltage at the inverting input

Inverting amplifier

  • : output voltage
  • : input voltage, fed through into the inverting input
  • : input resistor, from to the inverting input
  • : feedback resistor, from the output back to the inverting input

Why is needed: negative feedback works by adjusting , so can’t be held rigidly by something else. If an ideal voltage source were wired straight to , it would force , the loop couldn’t pull toward , the virtual short would break, and the output would saturate. isolates the source so is free to move, and it turns into a current that flows on through . (A current source on is fine, as in Example 5.4, because it doesn’t fix the node’s voltage.)

Input resistance: the inverting amp’s source sees just (since is a virtual ground). The non-inverting amp’s source sees only an op amp input, which draws almost no current, so its input resistance is very large.

Example 5.7: Inverting gain and saturation

An inverting amp has , and supplies. Find for and for .

Show answerHide answer

The gain from Eq. (5.4) is .

  • : , inside the rails.
  • : the formula says , but the output can’t go below . So (saturated).

Equation (5.4) only holds while the output stays between the rails.

Example 5.8: Find with a resistor network on the input

Determine in the circuit of Figure 5.8.

Figure 5.8: Circuit for Example 5.8. Figure 5.8: Circuit for Example 5.8.

Show answerHide answer
  1. Replace everything left of the 2 kΩ with its Thévenin equivalent (1.5 V source, 3 kΩ, 6 kΩ):
  2. Now it’s just an inverting amp with an input resistance of . By Eq. (5.4):
  3. flows down through the 4 kΩ load:

So 0.5 mA actually flows up through the load, into the op amp’s output.

Thévenin works here because the 2 kΩ connects to the virtual ground, so the circuit on its left always sees the same load. You could skip Thévenin and do KCL at the 6 kΩ node instead, and you'd get the same answer.

Example 5.9: T-network in the feedback (T)

(a) Determine the ratio for the circuit in Figure 5.9. (b) Evaluate it for , , .

Figure 5.9: Circuit for Example 5.9. Call the middle node of the T v_m. Figure 5.9: Circuit for Example 5.9. Call the middle node of the T .

Show answerHide answer

(a)

  1. . All of flows from the node through to :
  2. KCL at (in through = out through + out through ):
  3. Solve for and substitute :

(b)

The ratio is in ohms because it's volts out per amp in. The T-network gets a large gain (70 kΩ) without needing one big resistor.

Example 5.10: Non-ideal inverting amplifier (T)

The op amp in Figure 5.10 has , , and . Find the differential voltage and the output voltage .

Figure 5.10: Inverting amplifier for Example 5.10. Figure 5.10: Inverting amplifier for Example 5.10.

Show answerHide answer

Call the inverting-input node . Since , , and the op amp’s output source is .

  1. KCL at (in through 20 kΩ = out through to ground + out through 100 kΩ): Multiplying by 200k:
  2. KCL at (in through 100 kΩ = out through into the source): Multiplying by 100k:
  3. Substitute into step 1:
  4. Then , so

Quick check: the ideal answer is , and is tiny, so the virtual short works really well here.

Non-inverting amplifier

  • : output voltage
  • : input voltage, applied directly to the non-inverting input
  • : resistor from the inverting input to ground
  • : feedback resistor, from the output back to the inverting input

Example 5.11: Find and

Find and in the circuit of Figure 5.11.

Figure 5.11: Circuit for Example 5.11. Figure 5.11: Circuit for Example 5.11.

Show answerHide answer
  1. from the divider (no current into , so the divider is unloaded):
  2. Non-inverting gain, Eq. (5.5):
  3. is the op amp’s output current. It splits between the 12 kΩ load and the feedback path (40 kΩ, then 10 kΩ to ground):

The feedback path counts as a load too. Forgetting that is the most common mistake on questions.

Example 5.12: Current source on the input, and power

Refer to the op amp circuit in Figure 5.12. Calculate and the power absorbed by the 6 kΩ load.

Figure 5.12: Circuit for Example 5.12. Figure 5.12: Circuit for Example 5.12.

Show answerHide answer
  1. : no current goes into the op amp, so all 1.5 mA flows through the 6 kΩ and 3 kΩ in parallel:
  2. Non-inverting gain, Eq. (5.5):
  3. Current and power in the load:

Voltage follower (buffer)

  • : output voltage (the output is wired straight to the inverting input)
  • : input voltage, applied to the non-inverting input

Example 5.13: Why use a buffer?

A source has a series resistance and drives a load. Find the load voltage (a) connected directly, and (b) through a voltage follower.

Show answerHide answer

(a) Directly: the source resistance and the load form a divider:

(b) With the buffer: no current flows into , so there is no drop across the and . By Eq. (5.6), . The op amp’s output supplies the the load needs, so the source never has to.

The buffer has gain 1, but it stops the load from loading down the source.

Summing amplifier (inverting)

  • : output voltage
  • : input voltages being summed
  • : input resistors, one per input, each going to the inverting input
  • : feedback resistor, from the output back to the inverting input

Why the inputs don't interfere: is a virtual ground (0 V), so each input sees only its own resistor to 0 V and pushes in a current that depends on that input alone. The currents add at the node and, since nothing enters the op amp, all leave through . KCL: , which rearranges to Eq. (5.7).

Any current direction is fine in KCL as long as the equation matches it. If an arrow points out of the node, put it on the "out" side (). If it points in, it goes on the "in" side (). Writing an in-current equal to another in-current flips the sign of the answer.

Example 5.14: Summing amplifier, find an unknown input

For the circuit in Figure 5.13, determine the value of that makes .

Figure 5.13: Summing amplifier for Example 5.14. Figure 5.13: Summing amplifier for Example 5.14.

Show answerHide answer
  1. Write Eq. (5.7) with :
  2. Set it equal to the target:

Difference amplifier (general)

Difference amplifier (when )

  • : output voltage
  • : input voltage on the inverting side
  • : input voltage on the non-inverting side
  • : input resistor, from to the inverting input
  • : feedback resistor, from the output back to the inverting input
  • : input resistor, from to the non-inverting input
  • : resistor from the non-inverting input to ground

Eq. (5.8) is just superposition. The term is an inverting amp, and the term is a voltage divider (, ) followed by a non-inverting amp. Eq. (5.9) is what you get when the ratios match.

Solving order for a difference amp: KCL at . No current enters , so and are an unloaded divider and nothing on the side can change . But sets , so , and all change (making smaller in Example 5.15 would drop ).

Don't divide and to find as if went to ground. Its far end is at , which isn't known yet. If you want a divider there, it runs between the two end voltages: . That works while nothing else connects to . Otherwise use KCL.

Example 5.15: Difference amplifier with mismatched resistors

The circuit in Figure 5.14 is a difference amplifier. Find given and .

Figure 5.14: Difference amplifier for Example 5.15. Figure 5.14: Difference amplifier for Example 5.15.

Show answerHide answer
  1. Check the ratios first. but . They don’t match, so the shortcut Eq. (5.9) doesn’t apply.
  2. from the divider:
  3. KCL at :
  4. Check with Eq. (5.8): ✓

The shortcut would give here, which is wrong. Always check the ratios first.

Example 5.16: Design problem

Design an op amp circuit to perform . All resistances must be ≤ 100 kΩ.

Show answerHide answer
  1. Pick the circuit. One input is subtracted and one is added, so a difference amplifier is the one to use. The subtracted input () goes on the inverting side and on the non-inverting side, so and are swapped compared with Eq. (5.8).
  2. Match the inverting term using Eq. (5.8). We need , so choose and .
  3. Match the non-inverting term. The non-inverting gain is , but we only want 2, so the divider has to cut in half first: Choose .
  4. Check: ✓, and every resistor is ≤ 100 kΩ ✓.

Figure 5.15: One possible design for Example 5.16. Lots of other resistor values work too. Figure 5.15: One possible design for Example 5.16. Lots of other resistor values work too.

Design questions have many right answers. Pick one resistor to be whatever you want (here ), then solve for the rest from the gains.

Cascaded stages

  • : overall gain of the chain (final output ÷ first input)
  • : closed-loop gain of each individual stage

Example 5.17: Cascaded stages (T)

In the circuit of Figure 5.16, determine the voltage gain . Take .

Figure 5.16: Two cascaded stages for Example 5.17. Figure 5.16: Two cascaded stages for Example 5.17.

Show answerHide answer
  1. Stage 1 is non-inverting ( on , to ground, feedback). By Eq. (5.5):
  2. Stage 2 is inverting ( in, feedback). By Eq. (5.4):
  3. Multiply, Eq. (5.10):

cancels out of every ratio, so its value () doesn't change the answer. Stage 1 can feed stage 2 directly because an op amp output acts like an ideal voltage source.

The product only holds while every stage stays inside its rails. Check each stage's output in order. For example, with stage gains of and , rails and : is fine, but stage 2 would want , so , not . A saturated stage's virtual short no longer holds.

Common mistakes

  • Writing KCL at the output node instead of the inverting input
  • Assuming when there’s no negative feedback (comparators, for example)
  • Forgetting the minus sign on inverting and summing amps
  • Forgetting about saturation. A “gain of 100” on 1 V with ±15 V rails gives 15 V, not 100 V
  • Mixing up and in the non-inverting gain (, not )