Electric Circuits & Networks · Chapter 5

Operational Amplifiers

Part 1 · DC Circuits — an amplifier whose own gain is enormous, poorly controlled and temperature-dependent, tamed by feedback into circuits whose behaviour depends on nothing but a ratio of two resistors.

Prof. Mithun Mondal Engineering Devotion Digital Textbook
i Learning Objectives
  • Identify the five terminals of an operational amplifier and state the meaning of open-loop gain.
  • State the ideal op-amp assumptions and derive the two golden rules from them.
  • Explain why negative feedback is essential, and what the virtual short and virtual ground mean.
  • Derive and apply the gain of the inverting and non-inverting amplifiers.
  • Recognise the voltage follower and explain why buffering matters.
  • Design summing and difference amplifiers to a specification.
  • Analyse cascaded stages and check every node against the saturation limits.
  • Explain how an op amp forms a digital-to-analogue converter and an instrumentation amplifier.
Section 5-1

Introduction

Every element in this book so far has been passive or a source. The operational amplifier is neither: it is an integrated circuit containing dozens of transistors, and yet for the purposes of circuit analysis it reduces to a single dependent source of the kind introduced in Section 1.6. That reduction is what makes it belong in this chapter rather than in an electronics course.

The name is historical. Op amps were developed in the 1940s to perform mathematical operations — addition, subtraction, integration, differentiation — in analogue computers. The computers are long obsolete; the amplifier turned out to be far more useful than the machine it was built for, and it is now the most widely used analogue building block in existence.

The central idea of this chapter is worth stating before any circuit appears. An op amp taken by itself is a bad amplifier: its gain is enormous but unpredictable, varying by a factor of three between devices and drifting with temperature. Wrapped in negative feedback, it becomes an excellent one, with a gain set precisely by two resistors and almost entirely independent of the amplifier itself. Understanding how that transformation works is the point of everything that follows.

Section 5-2

The Operational Amplifier

An op amp is a differential amplifier: it amplifies the difference between its two input voltages, ignoring — ideally — whatever they have in common. It has five terminals that matter:

  • The inverting input, marked \(-\), at potential \(v_{1}\).

  • The non-inverting input, marked \(+\), at potential \(v_{2}\).

  • The output, at potential \(v_{o}\).

  • Two power supply terminals, \(+V_{CC}\) and \(-V_{CC}\).

The supply terminals are almost always omitted from circuit diagrams, which causes endless confusion. They are not decoration: all the energy delivered at the output comes from them. An op amp does not create power, it controls the flow of power from the supply, and the output can never leave the range between the two supply rails.

+ + v₁ v₂ v_o +V_CC −V_CC R_i A v_d R_o v_o v_d CIRCUIT SYMBOL EQUIVALENT CIRCUIT MODEL
The op amp symbol and its equivalent circuit — a voltage-controlled voltage source with input and output resistance.

The equivalent circuit is nothing more than a VCVS from Section 1.6, with a resistance at each side. Defining the differential input voltage

\[v_{d} = v_{2} - v_{1}\]

the output of the model is

\[v_{o} = A v_{d} = A\left(v_{2}-v_{1}\right)\]

where \(A\) is the open-loop voltage gain — the gain of the amplifier with no feedback applied. Typical values for a general-purpose device such as the 741:

ParameterSymbolTypical valueIdeal value
Open-loop gain\(A\)\(10^{5}\) to \(10^{8}\)\(\infty\)
Input resistance\(R_{i}\)\(10^{6}\) to \(10^{13}~\Omega\)\(\infty\)
Output resistance\(R_{o}\)10 to 100 \(\Omega\)0
Supply voltage\(V_{CC}\)5 to 24 V
Bandwidth\(f_{c}\)1 MHz (unity gain)\(\infty\)

Look at what an open-loop gain of \(10^{5}\) implies. With a 15 V supply, the largest possible output is about 15 V, so the largest differential input the amplifier can accept before running out of range is \(15/10^{5} = 150~\mu\mathrm{V}\). Any larger input drives the output hard against a supply rail. An op amp used without feedback is not an amplifier at all — it is a comparator, and its output is either fully positive or fully negative. To use it as an amplifier, feedback is not optional.

Voltage Saturation

The output is confined to the range set by the supplies:

\[-V_{CC} \le v_{o} \le +V_{CC}\]

Within this band the op amp operates in its linear region and all the results of this chapter apply. Outside it the device saturates, the output sticks at a rail, and every formula here becomes false. Real devices saturate a volt or two short of the rail; an ideal analysis takes the limits as exactly \(\pm V_{CC}\).

This is not a footnote. Checking that every output in a circuit lies within the rails is part of solving the problem, not an afterthought — and it is the step most often skipped. A design that calls for 40 V from a device on a 15 V supply is simply wrong, however clean the algebra.

Section 5-3

The Ideal Op Amp

Analysing every circuit with the full model would be tedious and pointless, because the parameters are so extreme that simplification costs almost nothing in accuracy. The ideal op amp takes the three main parameters to their limits:

\[A \to \infty, \qquad R_{i} \to \infty, \qquad R_{o} \to 0\]

From these three assumptions, together with the presence of negative feedback, follow the two rules on which every op-amp circuit in this book is solved.

Golden Rule 1 — The Virtual Short

Rearranging the model equation for the differential input voltage,

\[v_{d} = v_{2} - v_{1} = \frac{v_{o}}{A}\]

Now the crucial observation. In a working amplifier the output \(v_{o}\) is a finite quantity — a few volts, limited by the supply rails. As \(A \to \infty\) with \(v_{o}\) finite, the ratio must go to zero:

\[\boxed{v_{1} = v_{2}}\]

The two input terminals sit at the same potential, even though no current flows between them and they are not connected. This is the virtual short. When the non-inverting input is grounded, the inverting input is forced to 0 V and is called a virtual ground — a node held at zero volts by the amplifier's action, not by a wire.

The argument depends entirely on \(v_o\) being finite, which in turn depends on negative feedback holding the amplifier in its linear region. Without negative feedback there is no virtual short, and applying the rule to a comparator gives nonsense.

Golden Rule 2 — No Input Current

The current entering either input terminal is the differential voltage divided by the input resistance:

\[i_{1} = i_{2} = \frac{v_{d}}{R_{i}} \to 0 \qquad \text{as } R_{i} \to \infty\]
\[\boxed{i_{1} = i_{2} = 0}\]

No current flows into either input. Note carefully what this does not say: current certainly flows out of the output terminal, supplied from the power rails. The rule applies to the two input terminals only.

How to Use the Two Rules

Together they reduce almost every op-amp circuit to two lines of algebra. The procedure is always the same:

  1. Confirm negative feedback exists — there must be a path from the output back to the inverting input. If the feedback goes to the non-inverting input, the rules do not apply.

  2. Set the two input voltages equal (Rule 1). Usually one of them is known immediately.

  3. Write KCL at the inverting input, taking no current into the terminal itself (Rule 2).

  4. Solve, then check saturation against the supply rails.

Step 1 deserves emphasis. Negative feedback is self-correcting: if the output rises too far, the fed-back signal raises the inverting input, which reduces the difference and pulls the output back down. Positive feedback does the opposite and drives the output to a rail. The distinction is which terminal the feedback returns to.

1 Worked Example 5.1 — How Good Is the Ideal Approximation?

Problem. An op amp with \(A = 2\times10^{5}\) and \(R_{i} = 2~\mathrm{M}\Omega\) operates with an output of 12 V. Find the actual differential input voltage and the actual input current, and comment on the ideal assumptions.

Solution. From the model,

\[v_{d} = \frac{v_{o}}{A} = \frac{12}{2\times10^{5}} = 60\times10^{-6}~\mathrm{V} = 60~\mu\mathrm{V}\]

and the input current is that voltage across the input resistance:

\[i = \frac{v_{d}}{R_{i}} = \frac{60\times10^{-6}}{2\times10^{6}} = 30\times10^{-12}~\mathrm{A} = 30~\mathrm{pA}\]

A 60 microvolt difference between terminals that are nominally at the same potential, and a current of thirty picoamperes into a circuit carrying milliamperes. Treating both as zero introduces an error of a few parts per million — far smaller than the tolerance of the resistors around the amplifier. The ideal model is not a crude approximation; it is an extremely good one.

Section 5-4

The Inverting Amplifier

The input signal is applied through \(R_{1}\) to the inverting terminal, the non-inverting terminal is grounded, and \(R_{f}\) provides feedback from output to inverting input.

+ v_i R₁ R_f v_o virtual ground 0 V
The inverting amplifier. The node at the inverting input is held at zero volts by the feedback.

Derivation. The non-inverting terminal is wired to ground, so \(v_{2} = 0\). By Rule 1 the inverting terminal follows it:

\[v_{1} = v_{2} = 0\]

This is the virtual ground. The current through \(R_{1}\) is therefore fixed entirely by the input voltage:

\[i_{1} = \frac{v_{i} - v_{1}}{R_{1}} = \frac{v_{i} - 0}{R_{1}} = \frac{v_{i}}{R_{1}}\]

By Rule 2 none of this current enters the amplifier, so all of it must continue through \(R_{f}\). Applying KCL at the inverting node:

\[i_{1} = i_{f} \quad\Longrightarrow\quad \frac{v_{i}}{R_{1}} = \frac{v_{1} - v_{o}}{R_{f}} = \frac{0 - v_{o}}{R_{f}}\]

Rearranging gives the closed-loop gain:

\[\boxed{\frac{v_{o}}{v_{i}} = -\frac{R_{f}}{R_{1}}}\]

Three things deserve comment.

  • The gain depends only on a ratio of resistors. The open-loop gain \(A\) has vanished entirely. This is the whole purpose of negative feedback: an unpredictable device parameter has been traded for two components you can buy to 1 % tolerance.

  • The minus sign is real. The output is inverted — a positive input gives a negative output. For a sinusoid this is a 180° phase shift.

  • The input resistance seen by the source is exactly \(R_{1}\), because the far end of \(R_{1}\) is a virtual ground. This is often a drawback: a low-gain design needs a large \(R_1\) to avoid loading the source, which forces an even larger \(R_f\).

2 Worked Example 5.2 — Inverting Amplifier

Problem. An inverting amplifier has \(R_{1} = 10~\mathrm{k}\Omega\) and \(R_{f} = 50~\mathrm{k}\Omega\), with supplies of \(\pm15~\mathrm{V}\). Find the output for \(v_{i} = 0.4~\mathrm{V}\), the current drawn from the source, and the input resistance. Then find the largest input the circuit can handle.

Solution.

\[\frac{v_{o}}{v_{i}} = -\frac{50}{10} = -5 \quad\Longrightarrow\quad v_{o} = -5(0.4) = -2.000~\mathrm{V}\]

Well inside the \(\pm15\) V rails, so the linear analysis holds. The source current flows into a virtual ground:

\[i_{1} = \frac{v_{i}}{R_{1}} = \frac{0.4}{10\times10^{3}} = 40\times10^{-6}~\mathrm{A} = 40~\mu\mathrm{A}\]
\[R_{\text{in}} = R_{1} = 10~\mathrm{k}\Omega\]

For the saturation limit, set the output to the rail:

\[\left|v_{i,\max}\right| = \frac{15}{5} = 3.000~\mathrm{V}\]

Any input beyond 3 V drives the output into a rail and the gain formula stops applying — the output simply clips at \(\mp15\) V.

Section 5-5

The Non-Inverting Amplifier

Now the input is applied directly to the non-inverting terminal, and the feedback network runs from the output through \(R_{f}\) to the inverting terminal, with \(R_{1}\) from that node to ground.

+ v_i R_f R₁ v_o v₁ = v_i
The non-inverting amplifier. The feedback network is a voltage divider from the output.

Derivation. The input is connected straight to the non-inverting terminal, so \(v_{2} = v_{i}\), and by Rule 1

\[v_{1} = v_{2} = v_{i}\]

By Rule 2 no current enters the inverting terminal, so \(R_{1}\) and \(R_{f}\) form an unloaded voltage divider across the output. The voltage at their junction is

\[v_{1} = \frac{R_{1}}{R_{1}+R_{f}}\,v_{o}\]

Equating the two expressions for \(v_{1}\):

\[v_{i} = \frac{R_{1}}{R_{1}+R_{f}}\,v_{o} \quad\Longrightarrow\quad v_{o} = \frac{R_{1}+R_{f}}{R_{1}}\,v_{i}\]
\[\boxed{\frac{v_{o}}{v_{i}} = 1 + \frac{R_{f}}{R_{1}}}\]

Compare this with the inverting case. The gain is positive — no phase inversion — and it can never be less than unity, since \(R_f/R_1\) is non-negative. Most importantly, the input current is zero by Rule 2, so the input resistance is ideally infinite. The source is not loaded at all. Where the inverting configuration presents a finite \(R_1\) to the source, this one presents nothing.

The Voltage Follower

Set \(R_{f} = 0\) (a plain wire from output to inverting input) and let \(R_{1} \to \infty\) (leave it out). The gain becomes

\[\frac{v_{o}}{v_{i}} = 1 + 0 = 1 \quad\Longrightarrow\quad v_{o} = v_{i}\]

An amplifier of gain one appears useless until you ask what it is for. It has infinite input resistance and zero output resistance, so it draws nothing from the source and can drive any load without drooping. It is a buffer, and its job is to break the loading interaction between two stages.

Recall the problem from Section 4.9: a voltage divider designed to give 9 V collapses as soon as a real load is attached. A follower inserted between divider and load solves it completely — the divider sees an open circuit, the load sees an ideal source. This single trick is one of the most common uses of an op amp in practice.

3 Worked Example 5.3 — Non-Inverting Amplifier

Problem. A non-inverting amplifier has \(R_{1} = 10~\mathrm{k}\Omega\) and \(R_{f} = 40~\mathrm{k}\Omega\). Find \(v_{o}\) for \(v_{i} = 2~\mathrm{V}\), and verify by computing the current in the feedback network.

Solution.

\[\frac{v_{o}}{v_{i}} = 1 + \frac{40}{10} = 5 \quad\Longrightarrow\quad v_{o} = 5(2) = 10.00~\mathrm{V}\]

Verification. By the virtual short, the inverting node sits at \(v_{1} = v_{i} = 2\) V. The current down through \(R_{1}\) to ground is

\[i = \frac{2}{10\times10^{3}} = 0.2~\mathrm{mA}\]

All of it comes through \(R_{f}\), since none enters the amplifier, so the drop across \(R_{f}\) is

\[v_{Rf} = (0.2\times10^{-3})(40\times10^{3}) = 8~\mathrm{V}\]
\[v_{o} = v_{1} + v_{Rf} = 2 + 8 = 10.00~\mathrm{V} \;\checkmark\]

Note that this circuit draws no current from the signal source, whereas the inverting amplifier of Example 5.2 drew 40 μA. When the source is a high-impedance sensor, that difference decides which configuration you can use.

Section 5-6

The Summing Amplifier

The virtual ground has a property that makes addition almost trivial: because the inverting node is held at 0 V regardless of what is connected to it, several input branches can be attached without any of them affecting the others. Each contributes its own current, and the currents simply add.

+ v₁ v₂ v₃ R₁ R₂ R₃ R_f v_o 0 V
The summing amplifier. Each input contributes an independent current into the virtual ground.

Derivation. The inverting node is a virtual ground at 0 V, so each input branch carries

\[i_{1} = \frac{v_{1}}{R_{1}}, \qquad i_{2} = \frac{v_{2}}{R_{2}}, \qquad i_{3} = \frac{v_{3}}{R_{3}}\]

None of this current enters the amplifier, so KCL at the node gives

\[i_{f} = i_{1}+i_{2}+i_{3} = \frac{0 - v_{o}}{R_{f}}\]

and therefore

\[\boxed{v_{o} = -\left(\frac{R_{f}}{R_{1}}v_{1} + \frac{R_{f}}{R_{2}}v_{2} + \frac{R_{f}}{R_{3}}v_{3}\right)}\]

A weighted sum, with each weight set independently by its own input resistor. This is the circuit that gave op amps their name. Note that the inputs do not interact: changing \(v_1\) alters neither \(i_2\) nor \(i_3\), because the node they all share never moves from 0 V. Attempting the same thing with a passive resistor network fails precisely because the common node does move.

If all input resistors are equal to \(R\) and \(R_f = R\), the circuit becomes an inverting adder, \(v_o = -(v_1+v_2+v_3)\).

4 Worked Example 5.4 — Summing Amplifier

Problem. A summing amplifier has \(R_{f} = 60~\mathrm{k}\Omega\), with \(R_{1} = 10~\mathrm{k}\Omega\), \(R_{2} = 20~\mathrm{k}\Omega\) and \(R_{3} = 30~\mathrm{k}\Omega\). The inputs are \(v_{1} = 1~\mathrm{V}\), \(v_{2} = 2~\mathrm{V}\) and \(v_{3} = -3~\mathrm{V}\). Find \(v_{o}\).

Solution. The three weights are

\[\frac{R_{f}}{R_{1}} = \frac{60}{10} = 6, \qquad \frac{R_{f}}{R_{2}} = \frac{60}{20} = 3, \qquad \frac{R_{f}}{R_{3}} = \frac{60}{30} = 2\]
\[v_{o} = -\left[6(1) + 3(2) + 2(-3)\right] = -\left[6 + 6 - 6\right] = -6.000~\mathrm{V}\]

Check by currents. With the node at 0 V,

\[i_{1} = \frac{1}{10\mathrm{k}} = 0.1~\mathrm{mA}, \qquad i_{2} = \frac{2}{20\mathrm{k}} = 0.1~\mathrm{mA}, \qquad i_{3} = \frac{-3}{30\mathrm{k}} = -0.1~\mathrm{mA}\]
\[i_{f} = 0.1+0.1-0.1 = 0.1~\mathrm{mA}, \qquad v_{o} = -i_{f}R_{f} = -(0.1\times10^{-3})(60\times10^{3}) = -6.000~\mathrm{V} \;\checkmark\]

The third input, being negative, subtracts. A summing amplifier handles signals of either sign without any change to the circuit.

Section 5-7

The Difference Amplifier

A summing amplifier adds. To subtract, both inputs must be used — one signal to each terminal.

+ v₁ v₂ R₁ R₃ R₂ R₄ v_o
The difference amplifier. The output responds to the difference between the inputs and, when balanced, ignores what they share.

Derivation. Since the circuit is linear, superposition (Section 4.3) is the cleanest route.

With \(v_{2} = 0\), the non-inverting terminal is grounded through \(R_{3}\) and \(R_{4}\), which carry no current, so it sits at 0 V. The circuit is a plain inverting amplifier:

\[v_{o}' = -\frac{R_{2}}{R_{1}}\,v_{1}\]

With \(v_{1} = 0\), the input \(v_{2}\) reaches the non-inverting terminal through the divider formed by \(R_{3}\) and \(R_{4}\), and the circuit acts as a non-inverting amplifier on that reduced voltage:

\[v_{+} = \frac{R_{4}}{R_{3}+R_{4}}\,v_{2}, \qquad v_{o}'' = \left(1+\frac{R_{2}}{R_{1}}\right)v_{+} = \left(1+\frac{R_{2}}{R_{1}}\right)\frac{R_{4}}{R_{3}+R_{4}}\,v_{2}\]

Adding the two contributions gives the general result:

\[v_{o} = \left(1+\frac{R_{2}}{R_{1}}\right)\frac{R_{4}}{R_{3}+R_{4}}\,v_{2} \;-\; \frac{R_{2}}{R_{1}}\,v_{1}\]

This is a difference amplifier only if the two coefficients are equal in magnitude, which requires the bridge to be balanced:

\[\boxed{\frac{R_{1}}{R_{2}} = \frac{R_{3}}{R_{4}} \quad\Longrightarrow\quad v_{o} = \frac{R_{2}}{R_{1}}\left(v_{2}-v_{1}\right)}\]
Common-Mode Rejection

The balance condition matters far more than it looks. Suppose both inputs carry the same unwanted signal — mains hum picked up on a long cable, say — superimposed on the small difference you actually want to measure. Write

\[v_{1} = v_{cm} + \tfrac{1}{2}v_{diff}\ \text{(reversed)}, \qquad v_{2} = v_{cm} + \tfrac{1}{2}v_{diff}\]

A perfectly balanced difference amplifier cancels \(v_{cm}\) exactly, because the output depends only on \(v_2 - v_1\). The interference disappears and the wanted signal survives. This is common-mode rejection, and it is the reason nearly every instrument that measures a small voltage in an electrically noisy environment uses a difference amplifier at its front end.

Real resistors have tolerances, so the balance is never exact and the rejection is never perfect. The quality of the cancellation is quoted as the common-mode rejection ratio, the ratio of differential gain to common-mode gain, usually in decibels:

\[\mathrm{CMRR} = 20\log_{10}\left|\frac{A_{d}}{A_{cm}}\right|~\mathrm{dB}\]

A good instrumentation amplifier achieves 100 dB or more — a common-mode signal is attenuated by a factor of \(10^{5}\) relative to the difference. Matched resistor networks, laser-trimmed on a single chip, are what make that possible.

5 Worked Example 5.5 — Difference Amplifier

Problem. A difference amplifier has \(R_{1} = R_{3} = 10~\mathrm{k}\Omega\) and \(R_{2} = R_{4} = 50~\mathrm{k}\Omega\). Find \(v_{o}\) for (a) \(v_{1} = 1~\mathrm{V}\), \(v_{2} = 1.2~\mathrm{V}\); and (b) \(v_{1} = v_{2} = 5~\mathrm{V}\).

Solution. First check the balance condition:

\[\frac{R_{1}}{R_{2}} = \frac{10}{50} = 0.2, \qquad \frac{R_{3}}{R_{4}} = \frac{10}{50} = 0.2 \;\checkmark\]

Balanced, so the simple form applies with a differential gain of \(R_{2}/R_{1} = 5\).

(a)

\[v_{o} = 5\left(1.2 - 1.0\right) = 5(0.2) = 1.000~\mathrm{V}\]

(b)

\[v_{o} = 5\left(5 - 5\right) = 0~\mathrm{V}\]

Part (b) is the whole point. Five volts common to both inputs produces nothing at the output, while a 200 mV difference riding on top of it produces a full volt. The amplifier extracts a small difference from a large common background — exactly what is needed to read a strain-gauge bridge or an ECG electrode pair.

Section 5-8

Cascaded Op Amp Circuits

A single stage rarely provides everything a design needs. Stages are therefore cascaded — the output of one feeding the input of the next.

This works cleanly for one reason: an ideal op-amp output has zero output resistance and, in the non-inverting configuration, infinite input resistance. No stage loads the one before it, so the overall gain is simply the product of the individual gains:

\[\boxed{A = A_{1} \times A_{2} \times \cdots \times A_{n}}\]

This is emphatically not true of cascaded passive networks, where each stage loads the previous one and the overall response is not the product of the separate responses. Buffering by the op amp is what makes the simple multiplication legitimate.

A₁A₂A₃ v_i A₁v_i A₁A₂v_i v_o v_o = A₁ A₂ A₃ v_i
Cascaded stages. Because each op amp buffers the next, the gains simply multiply.

One warning. The saturation limit applies at every stage, not merely the last. An intermediate output that exceeds the supply rail clips, and the distortion it introduces cannot be undone downstream. When checking a cascade, compute the voltage at every internal node and confirm each lies within the rails.

6 Worked Example 5.6 — Three-Stage Cascade

Problem. Three stages are cascaded, all on \(\pm15~\mathrm{V}\) supplies: a non-inverting amplifier with \(R_{1} = 10~\mathrm{k}\Omega\), \(R_{f} = 20~\mathrm{k}\Omega\); then an inverting amplifier with \(R_{1} = 10~\mathrm{k}\Omega\), \(R_{f} = 40~\mathrm{k}\Omega\); then a voltage follower. Find the overall gain and the output for \(v_{i} = 0.5~\mathrm{V}\), checking every stage for saturation.

Solution. Stage by stage:

\[A_{1} = 1 + \frac{20}{10} = 3, \qquad A_{2} = -\frac{40}{10} = -4, \qquad A_{3} = 1\]
\[A = A_{1}A_{2}A_{3} = (3)(-4)(1) = -12\]
\[v_{o} = -12(0.5) = -6.000~\mathrm{V}\]

Saturation check at every node:

\[v_{1} = 3(0.5) = 1.5~\mathrm{V}, \qquad v_{2} = -4(1.5) = -6~\mathrm{V}, \qquad v_{3} = -6~\mathrm{V}\]

All three lie comfortably within \(\pm15\) V, so the linear analysis is valid throughout.

Now consider raising the input to 2 V. The overall gain would predict \(-24\) V, which is impossible. Working forward: stage 1 gives 6 V (fine), stage 2 would demand \(-24\) V and instead clips at \(-15\) V, and the follower passes that clipped value through. The output is \(-15\) V, not \(-24\) V — and the waveform is distorted. This is why the check is done stage by stage rather than only at the end.

Section 5-9

Practical Engineering Applications

The Digital-to-Analogue Converter

Every digital system that produces sound, drives a motor or displays a waveform must convert numbers into voltages. The binary-weighted DAC is a summing amplifier whose input resistors are scaled in powers of two, so that each bit contributes exactly twice the weight of the bit below it.

With a four-bit word \(V_{1}V_{2}V_{3}V_{4}\), where \(V_{1}\) is the most significant bit and each line is at either 0 V or a logic level \(V_{L}\), choose \(R_{1} = R\), \(R_{2} = 2R\), \(R_{3} = 4R\), \(R_{4} = 8R\) with \(R_{f} = R\). The summing-amplifier result gives

\[-v_{o} = V_{1} + \frac{V_{2}}{2} + \frac{V_{3}}{4} + \frac{V_{4}}{8}\]

Each successive bit contributes half as much as the one before, which is precisely the meaning of binary place value. The analogue output is proportional to the number the bits represent.

The binary-weighted design is easy to understand and poor to build: an eight-bit converter needs resistors spanning a range of 128 to 1, and the largest must be accurate to better than the smallest bit — a demand that becomes impossible past ten bits or so. Practical converters use the R-2R ladder, which achieves the same weighting with only two resistor values.

7 Worked Example 5.7 — Four-Bit Digital-to-Analogue Converter

Problem. A four-bit binary-weighted DAC uses \(R_{f} = 10~\mathrm{k}\Omega\) with input resistors of 10, 20, 40 and 80 \(\mathrm{k}\Omega\). A logic 1 is 8 V and a logic 0 is 0 V. Find the output for the input word 1011, and the resolution of the converter.

Solution. The four weights are

\[\frac{R_{f}}{R_{1}} = 1, \qquad \frac{R_{f}}{R_{2}} = 0.5, \qquad \frac{R_{f}}{R_{3}} = 0.25, \qquad \frac{R_{f}}{R_{4}} = 0.125\]

For the word 1011 the bit voltages are \(V_{1} = 8\), \(V_{2} = 0\), \(V_{3} = 8\), \(V_{4} = 8\) V:

\[-v_{o} = 1(8) + 0.5(0) + 0.25(8) + 0.125(8) = 8 + 0 + 2 + 1 = 11~\mathrm{V}\]
\[v_{o} = -11.00~\mathrm{V}\]

The binary number 1011 is 11 in decimal, and the output is 11 V in magnitude. With this choice of components the converter delivers exactly 1 V per least-significant bit, which is its resolution. The full-scale output, for the word 1111, is

\[-v_{o,\max} = 8 + 4 + 2 + 1 = 15~\mathrm{V}\]

so a four-bit converter distinguishes sixteen levels from 0 to \(-15\) V. Note that this already sits at the supply rail — a practical design would use a smaller \(R_f\) to leave headroom.

The Instrumentation Amplifier

The difference amplifier of Section 5.7 has two defects for precision measurement: its input resistance is finite and unequal at the two terminals, and its gain cannot be changed without disturbing the matched resistor ratios that provide common-mode rejection.

The instrumentation amplifier fixes both by placing a buffer stage in front. Two non-inverting amplifiers present infinite input resistance to each source, and their gain is set by a single resistor \(R_{G}\); a conventional difference amplifier then follows. The overall gain is

\[\boxed{v_{o} = \left(1 + \frac{2R}{R_{G}}\right)\frac{R_{2}}{R_{1}}\left(v_{2}-v_{1}\right)}\]

The elegance is that \(R_{G}\) appears in the gain but not in any matched pair, so the gain can be varied over a wide range — often by a single external resistor or a switch — without degrading the common-mode rejection at all. This is the standard front end for strain gauges, thermocouples, load cells and biomedical electrodes.

8 Worked Example 5.8 — Instrumentation Amplifier

Problem. An instrumentation amplifier has \(R = 25~\mathrm{k}\Omega\), \(R_{G} = 500~\Omega\) and \(R_{2}/R_{1} = 1\). A strain-gauge bridge delivers a differential signal of 10 mV sitting on a 2.5 V common-mode level. Find the gain and the output.

Solution.

\[A = \left(1 + \frac{2(25\,000)}{500}\right)(1) = 1 + 100 = 101\]
\[v_{o} = 101\left(10\times10^{-3}\right) = 1.010~\mathrm{V}\]

The 2.5 V common-mode level contributes nothing, being rejected by the difference stage. A signal of ten millivolts — far too small to digitise directly — has become a comfortable volt, and the interference riding equally on both leads has been removed. To change the gain to 501, only \(R_{G}\) need be altered, to 100 \(\Omega\).

Simulation Note

Op-amp circuits are worth simulating, because the departures from ideal behaviour — finite gain-bandwidth product, slew-rate limiting, input offset voltage — are exactly the things hand analysis omits. In SPICE, an ideal op amp is modelled directly as a voltage-controlled voltage source between the input node pair and the output:

\[\texttt{E1 out 0 noninv inv 1e6}\]

Comparing that result against a manufacturer's macromodel for a real device is the fastest way to see where the ideal assumptions stop holding.

Section 5-10

Summary and Key Formulas

Summary
  • An op amp is a differential amplifier, modelled as a VCVS with \(v_{o} = A(v_{2}-v_{1})\), input resistance \(R_{i}\) and output resistance \(R_{o}\).

  • The output is confined between the supply rails; outside that range the device saturates and every formula in this chapter fails.

  • The ideal op amp takes \(A \to \infty\), \(R_{i} \to \infty\), \(R_{o} \to 0\).

  • With negative feedback, the two golden rules follow: \(v_{1} = v_{2}\) (virtual short) and \(i_{1} = i_{2} = 0\).

  • The inverting amplifier gives \(-R_{f}/R_{1}\) with input resistance \(R_{1}\); the non-inverting gives \(1 + R_{f}/R_{1}\) with infinite input resistance.

  • The voltage follower has unity gain and exists solely to buffer one stage from another.

  • The summing amplifier forms a weighted sum through a virtual ground; the difference amplifier subtracts and, when balanced, rejects common-mode signals.

  • Cascaded gains multiply, because each stage buffers the next — but saturation must be checked at every stage.

  • A binary-weighted summing amplifier forms a DAC; a buffered difference amplifier forms an instrumentation amplifier with gain set by a single resistor.

Key Formulas
CircuitResultNotes
Op-amp model\(v_o = A(v_2 - v_1)\)open loop
Golden rule 1\(v_1 = v_2\)needs negative feedback
Golden rule 2\(i_1 = i_2 = 0\)input terminals only
Saturation\(-V_{CC} \le v_o \le +V_{CC}\)check every stage
Inverting\(\dfrac{v_o}{v_i} = -\dfrac{R_f}{R_1}\)\(R_{\text{in}} = R_1\)
Non-inverting\(\dfrac{v_o}{v_i} = 1 + \dfrac{R_f}{R_1}\)\(R_{\text{in}} \to \infty\), gain \(\ge 1\)
Voltage follower\(v_o = v_i\)buffer
Summing\(v_o = -R_f\left(\dfrac{v_1}{R_1}+\dfrac{v_2}{R_2}+\dfrac{v_3}{R_3}\right)\)inputs independent
Difference (balanced)\(v_o = \dfrac{R_2}{R_1}(v_2-v_1)\)needs \(R_1/R_2 = R_3/R_4\)
CMRR\(20\log_{10}\left|A_d/A_{cm}\right|\)in decibels
Cascade\(A = A_1A_2\cdots A_n\)no inter-stage loading
Binary-weighted DAC\(-v_o = V_1 + \dfrac{V_2}{2} + \dfrac{V_3}{4} + \dfrac{V_4}{8}\)\(R, 2R, 4R, 8R\) with \(R_f = R\)
Instrumentation amp\(v_o = \left(1+\dfrac{2R}{R_G}\right)\dfrac{R_2}{R_1}(v_2-v_1)\)gain set by \(R_G\) alone
Section 5-11

Common Mistakes

  • Forgetting to check saturation. The most frequent error in this chapter. A gain formula that predicts 40 V from a device on a 15 V supply has not been solved — it has been misapplied.

  • Checking saturation only at the final output. An intermediate stage can clip while the last stage looks healthy. Compute every internal node.

  • Applying the golden rules without negative feedback. The virtual short depends on \(v_o\) being finite. With feedback to the non-inverting terminal, or with no feedback at all, the device is a comparator and the rules are false.

  • Assuming no current flows out of the output. Rule 2 applies to the two input terminals. The output supplies whatever the load demands, drawn from the supply rails.

  • Treating the virtual ground as a real ground. It is at 0 V but it is not connected to ground, so no current flows from it into the earth. All the current arriving there continues through the feedback resistor.

  • Dropping the minus sign on the inverting amplifier. Inversion is a real property of the circuit, not a bookkeeping artefact.

  • Believing a non-inverting amplifier can have a gain below one. Since \(R_f/R_1 \ge 0\), the gain is at least unity. Attenuation needs a divider ahead of the amplifier.

  • Using the simple difference formula on an unbalanced circuit. Verify \(R_1/R_2 = R_3/R_4\) first; otherwise the general two-term expression is required.

  • Ignoring the power supply in an energy argument. An op amp appears to create power because the supply terminals are not drawn. They are always there.

  • Assuming the ideal model always holds. At high frequencies the finite gain-bandwidth product matters, and for fast large signals the slew rate limits the output. Both are outside the scope of this chapter but neither is negligible in practice.

Section 5-12

Chapter Review

Practice Problems

Work these before opening the answers. Assume ideal op amps on \(\pm15~\mathrm{V}\) supplies unless stated otherwise, and check saturation every time.

  1. P5.1 An op amp with \(A = 10^{6}\) produces an output of 5 V. Find the differential input voltage.

    Show answer
    \[v_d = \frac{5}{10^{6}} = 5\times10^{-6}~\mathrm{V} = 5~\mu\mathrm{V}\]
    Five microvolts across terminals we treat as being at the same potential — the approximation is excellent.
  2. P5.2 An inverting amplifier has \(R_{1} = 5~\mathrm{k}\Omega\) and \(R_{f} = 25~\mathrm{k}\Omega\). Find \(v_{o}\) for \(v_{i} = -0.2~\mathrm{V}\).

    Show answer
    \[v_o = -\frac{25}{5}(-0.2) = -5(-0.2) = 1.000~\mathrm{V}\]
    A negative input gives a positive output — the inversion works both ways.
  3. P5.3 Design a non-inverting amplifier of gain 11 using \(R_{1} = 2~\mathrm{k}\Omega\).

    Show answer
    \[1 + \frac{R_f}{R_1} = 11 \;\Longrightarrow\; \frac{R_f}{2\mathrm{k}} = 10 \;\Longrightarrow\; R_f = 20~\mathrm{k}\Omega\]
  4. P5.4 A summing amplifier has \(R_{f} = 100~\mathrm{k}\Omega\), \(R_{1} = 25~\mathrm{k}\Omega\) with \(v_{1} = 2~\mathrm{V}\), and \(R_{2} = 50~\mathrm{k}\Omega\) with \(v_{2} = -1~\mathrm{V}\). Find \(v_{o}\).

    Show answer
    \[v_o = -\left[\frac{100}{25}(2) + \frac{100}{50}(-1)\right] = -\left[8 - 2\right] = -6.000~\mathrm{V}\]
  5. P5.5 A difference amplifier has \(R_{1} = R_{3} = 20~\mathrm{k}\Omega\) and \(R_{2} = R_{4} = 100~\mathrm{k}\Omega\). Find \(v_{o}\) for \(v_{1} = 2~\mathrm{V}\) and \(v_{2} = 2.5~\mathrm{V}\).

    Show answer
    Balance check: \(20/100 = 20/100\) \(\checkmark\)
    \[v_o = \frac{100}{20}\left(2.5 - 2\right) = 5(0.5) = 2.500~\mathrm{V}\]
  6. P5.6 Two inverting stages are cascaded, with gains \(-5\) and \(-4\). Find the overall gain and the output for \(v_{i} = 0.3~\mathrm{V}\).

    Show answer
    \[A = (-5)(-4) = +20, \qquad v_o = 20(0.3) = 6.000~\mathrm{V}\]
    Two inversions restore the original polarity. The intermediate node sits at \(-5(0.3) = -1.5\) V, well within the rails.
  7. P5.7 An inverting amplifier of gain \(-10\) on \(\pm15~\mathrm{V}\) supplies is driven with \(v_{i} = 2~\mathrm{V}\). What is the output?

    Show answer
    The formula predicts \(-20\) V, which the supply cannot provide. The output saturates at \(-15~\mathrm{V}\). The largest input for linear operation is \(15/10 = 1.5\) V.
  8. P5.8 For the DAC of Worked Example 5.7, find the output for the input word 0110.

    Show answer
    \[-v_o = 1(0) + 0.5(8) + 0.25(8) + 0.125(0) = 0 + 4 + 2 + 0 = 6~\mathrm{V}\]
    \[v_o = -6.000~\mathrm{V}\]
    Binary 0110 is 6 in decimal, and the output is 6 V in magnitude, confirming 1 V per bit.
  9. P5.9 A sensor of open-circuit voltage 10 V and internal resistance 100 \(\mathrm{k}\Omega\) drives a 10 \(\mathrm{k}\Omega\) load. Find the load voltage with and without a voltage follower between them.

    Show answer
    Without a buffer, the sensor and load form a divider:
    \[v_L = 10 \times \frac{10}{100+10} = \frac{100}{110} = 0.9091~\mathrm{V}\]
    With a follower, the sensor is unloaded and the load is driven from zero output resistance:
    \[v_L = 10.00~\mathrm{V}\]
    The buffer recovers a factor of eleven — and the reading is now independent of the load.
  10. P5.10 An instrumentation amplifier has \(R = 50~\mathrm{k}\Omega\) and \(R_{2}/R_{1} = 5\). Find \(R_{G}\) for an overall gain of 500.

    Show answer
    \[\left(1+\frac{2R}{R_G}\right)(5) = 500 \;\Longrightarrow\; 1+\frac{100\,000}{R_G} = 100\]
    \[\frac{100\,000}{R_G} = 99 \;\Longrightarrow\; R_G = 1010~\Omega\]
    A single resistor sets the gain, leaving the matched pairs untouched.
Multiple-Choice Questions
  1. MCQ 1. For an ideal op amp, the input resistance and output resistance are respectively:
    (a) 0 and \(\infty\)   (b) \(\infty\) and 0   (c) both 0   (d) both \(\infty\)

    Show answer
    (b) \(\infty\) and 0. Infinite input resistance means no input current; zero output resistance means no droop under load.
  2. MCQ 2. The virtual short depends on:
    (a) infinite gain and negative feedback   (b) infinite input resistance   (c) the supply voltage   (d) zero output resistance

    Show answer
    (a). \(v_d = v_o/A \to 0\) requires both an infinite \(A\) and a finite \(v_o\), and the latter needs negative feedback.
  3. MCQ 3. An inverting amplifier with \(R_{1} = 4~\mathrm{k}\Omega\) and \(R_{f} = 32~\mathrm{k}\Omega\) has a gain of:
    (a) 8   (b) \(-8\)   (c) 9   (d) \(-9\)

    Show answer
    (b) \(-8\). Option (d) applies the non-inverting formula by mistake.
  4. MCQ 4. The input resistance of an inverting amplifier is:
    (a) infinite   (b) \(R_f\)   (c) \(R_1\)   (d) zero

    Show answer
    (c) \(R_1\), because its far end is a virtual ground.
  5. MCQ 5. The minimum possible gain of a non-inverting amplifier is:
    (a) 0   (b) 1   (c) \(-1\)   (d) unlimited below zero

    Show answer
    (b) 1, reached when \(R_f = 0\) — the voltage follower.
  6. MCQ 6. A voltage follower is used chiefly to:
    (a) amplify   (b) invert   (c) buffer between stages   (d) add signals

    Show answer
    (c) buffer. Its unity gain is incidental; its infinite input and zero output resistance are the point.
  7. MCQ 7. In a summing amplifier, the inputs do not interact because:
    (a) the resistors are equal   (b) the summing node is held at 0 V   (c) the gain is negative   (d) the op amp saturates

    Show answer
    (b). The virtual ground never moves, so each branch current is set by its own source alone.
  8. MCQ 8. A difference amplifier rejects common-mode signals only if:
    (a) the gain is high   (b) \(R_1/R_2 = R_3/R_4\)   (c) the supplies are symmetric   (d) the inputs are grounded

    Show answer
    (b). Rejection is a consequence of the resistor ratios being matched, which is why tolerance limits real CMRR.
  9. MCQ 9. Three stages of gain 2, \(-3\) and 4 are cascaded. The overall gain is:
    (a) 3   (b) 24   (c) \(-24\)   (d) \(-9\)

    Show answer
    (c) \(-24\). Gains multiply: \((2)(-3)(4)\). Option (a) wrongly adds them.
  10. MCQ 10. An op amp on \(\pm12~\mathrm{V}\) supplies with a closed-loop gain of \(-6\) is driven by 3 V. The output is:
    (a) \(-18\) V   (b) \(-12\) V   (c) \(-6\) V   (d) 18 V

    Show answer
    (b) \(-12\) V. The formula predicts \(-18\) V, but the output saturates at the negative rail. Option (a) is the trap.
Conceptual Questions
  1. An op amp has a gain of \(10^{5}\) that varies by a factor of three between devices, yet a circuit built from it has a gain accurate to 1 %. Explain how feedback achieves this, and what is given up in exchange.

  2. Why is the virtual short not a real short? Describe an experiment that would distinguish the two.

  3. The non-inverting amplifier has infinite input resistance and the inverting amplifier has \(R_1\). Why, then, is the inverting configuration used at all?

  4. Explain why three passive resistors cannot form a summing circuit whose inputs are independent, and what the op amp supplies that they lack.

  5. A cascade of two stages has an overall gain of 100. Would you prefer gains of 10 and 10, or 100 and 1? Consider bandwidth, saturation and noise in your answer.

  6. An op amp appears to deliver more power at its output than arrives at its inputs. Reconcile this with conservation of energy from Chapter 1.

Looking Ahead

Part 1 has been entirely resistive. Every equation you have written since Chapter 2 has been algebraic, every circuit has responded instantaneously, and time has never appeared as a variable.

Chapter 6 changes that. The capacitor and the inductor store energy rather than dissipating it, and their voltage–current relations involve a derivative and an integral instead of a simple ratio. A circuit containing them has memory: what it does now depends on what happened before. The algebraic equations become differential equations, and the response takes time to settle — which is the subject of Chapters 7 and 8.

The op amp will return almost immediately. Replace the feedback resistor of this chapter's inverting amplifier with a capacitor and you have an integrator; put the capacitor at the input instead and you have a differentiator. The two golden rules carry over unchanged.