EngineerPlay

Op-amp circuits practice

An ideal op-amp takes no current into its inputs, and with feedback it holds its two inputs at the same voltage. So an inverting amplifier has A_v = −R_f ÷ R_in, a non-inverting one A_v = 1 + R_f ÷ R_g, and the output can never pass its supply rails.

The gain of inverting and non-inverting amplifiers, and a voltage follower fed from a divider.

The op-amp is ideal and runs on ±15 V. What is V_out, in V? Give your answer to 3 significant figures.

An op-amp voltage follower fed from a divider R₁ and R₂Labels shown, in drawing order: +, −, +15 V, −15 V, V_s, R₁ = 3.3 kΩ, R₂ = 15 kΩ, V_out, V_s = 12 V, V_out = ?.+−+15 V−15 VV_sR₁ = 3.3 kΩR₂ = 15 kΩV_outV_s = 12 VV_out = ?

How to solve these

The two rules. An ideal op-amp draws no current into its inputs, and with negative feedback (a path from the output back to the − input) it drives its output until the − input sits at the same voltage as the + input: the virtual short.

Inverting. The + input is grounded, so the − input sits at 0 V (a virtual earth). The current V_in ÷ R_in flows on through R_f, so A_v = −R_f ÷ R_in: 47 kΩ and 10 kΩ give −4.7, and 0.5 V in gives −2.35 V out.

Non-inverting and follower. The input goes to the + input and R_f with R_g divide the output down to it: A_v = 1 + R_f ÷ R_g, 22 kΩ and 10 kΩ give 3.2. Wire the output straight to the − input and the gain is 1: a voltage follower copies its input.

Summing and difference. Several inputs into one virtual earth add their currents: V_out = −R_f × (V₁ ÷ R₁ + V₂ ÷ R₂). With R₃ = R₁ and R₄ = R₂ the difference amplifier gives V_out = R₂ ÷ R₁ × (V₂ − V₁). Stages in a row multiply their gains.

Decibels and saturation. A voltage gain in dB is 20 × log₁₀(A): 10 is 20 dB, 100 is 40 dB. The output cannot pass its supply; here it swings to within 1.5 V of each rail, so on ±15 V it stops at ±13.5 V. With no feedback the op-amp is a comparator: its output jumps to +V_sat or −V_sat.

Worked example

The op-amp is ideal and runs on ±15 V. What is V_out, in V?

An inverting op-amp amplifier: R_in into the − input and R_f from the output back to itLabels shown, in drawing order: −, +, +15 V, −15 V, V_in, R_in = 10 kΩ, R_f = 100 kΩ, V_out, V_in = 1.2 V, V_out = ?.−++15 V−15 VV_inR_in = 10 kΩR_f = 100 kΩV_outV_in = 1.2 VV_out = ?
Show the working
  1. Write down what is given: R_f = 100 kΩ, R_in = 10 kΩ, V_in = 1.2 V.
  2. The inverting gain is −R_f ÷ R_in, and the output is the gain times the input: V_out = −R_f ÷ R_in × V_in.
  3. Work it out: V_out = −100 kΩ ÷ 10 kΩ × 1.2 V = −12 V.
  4. Check: the output is the input turned upside down and made bigger. Answer: −12 V.
Why not the others?
  • 12 V Has the wrong sign; an inverting stage turns the signal upside down, a minus sign in its gain.
  • 13.2 V Uses the non-inverting rule 1 + R_f ÷ R_in; the input goes into the − input, so the gain is −R_f ÷ R_in.

Remember: Inverting amplifier: A_v = −R_f ÷ R_in (the − input is a virtual earth and takes no current). Formula sheet

Questions

How do you calculate the gain of an inverting amplifier?

Divide the feedback resistor by the input resistor and put a minus sign in front: 47 kΩ and 10 kΩ give A_v = −47 ÷ 10 = −4.7, so 0.5 V in gives −2.35 V out.

What is the gain of a non-inverting amplifier?

A_v = 1 + R_f ÷ R_g: 22 kΩ over 10 kΩ gives 3.2, and the output has the same sign as the input. With the output wired straight back to the − input (a voltage follower) the gain is 1.

What happens when an op-amp saturates?

Its output cannot pass its supply rails, and many op-amps stop about 1.5 V short. On ±15 V, a gain of −20 with 1 V in asks for −20 V, but the output stops at −13.5 V.

How are these answers checked?

Each question is generated fresh and its answer computed by code. A separate test rebuilds the circuit from the drawing, reads which input is − and which is +, and solves it by nodal analysis with each op-amp holding its two inputs at the same voltage.