Op-Amp Series – Part 2: Inverting Operational Amplifier

Inverting Operational Amplifier

In this post we explore another important op-amp configuration: the inverting amplifier. Before building the circuit, we’ll look at the theory, understand the equations, and explain every term clearly.

This circuit is perfect for learning how op-amps control current, how virtual ground works, and how gain is set using just two resistors.

Inverting Op-Amp

Theory of the Inverting Amplifier

The inverting amplifier does two main things:

  • It inverts the input signal.
  • It scales that signal by a gain set by two resistors.

The key concept is virtual ground.

  • The non-inverting input (+) is connected to ground (0V)
  • The op-amp adjusts its output so the inverting input (–) also sits at 0V, even though it isn't physically connected to it.

Because the op-amp inputs draw almost no current:

  • All current entering through the input resistor Rin must flow through the feedback resistor Rf.
  • This gives us a simple and powerful relationship that leads to the gain formula.

The Maths

Input current through Rin

I_in = (Vin - Vnode) / Rin

Where:

  • I_in = current entering the inverting input node
  • Vin = input signal
  • Vnode = voltage at the inverting input ("virtual ground")
  • Rin = input resistor

Since the non-inverting input is grounded:

Vnode = 0 V

So the equation becomes:

I_in = Vin / Rin

Output current through Rf

I_f = (Vnode - Vout) / Rf

Where:

  • I_f = current through the feedback resistor

  • Rf = feedback resistor

  • Vout = op-amp output voltage

Again, since Vnode = 0 V:

I_f = -Vout / Rf

Currents must match

Because the op-amp input draws (almost) no current:

I_in = I_f

Substitute the expressions:

(Vin / Rin) = (-Vout / Rf)

Rearranging gives the key formula:

Vout = -(Rf / Rin) * Vin

Understanding the gain

Av = Vout / Vin = -(Rf / Rin)

Where:

  • Av = voltage gain
  • The minus sign means the output is inverted
  • The gain magnitude depends only on the resistor ratio

Example Calculation

Lets choose the following values:

  • Rin = 10k

  • Rf = 100k

  • Vin = 0.88 V (from a voltage divider)

Step 1: Calculate Gain

Av = -(Rf / Rin)
Av = -(100k / 10k) = -10

Meaning the output would ideally be 10 times larger and inverted.

Step 2: Determine the expected output

Vout = Av * Vin 

Vout = -10 * 0.88 = -8.8 V

Step 3: Real-world behaviour

If the LM358 is supplied with +5 V and 0 V. It cannot output -8.8 V.
It will simply hit 0 V (negative rail) and clip.

This demonstrates an important point:

Single-supply op-amps cannot produce negative voltages unless the reference is shifted.

Building Circuit 1

Lets build the circuit we have just described in theory.

Parts list: -

  • LM358
  • Resistors
  • Breadboard
  • Wires
  • Bench power supply
  • Multimeter
  • Oscilloscope (optional)

Circuit Diagram

Circuit Diagram 1


Power the LM358
Power the LM358

Connect the following: -

  • Pin 8 → +5 V
  • Pin 4 → GND

Create a DC input using a voltage divider

Voltage Divider

To create the voltage input to the op-amp we can use the resistor values:

  • R1 = 47k
  • R2 = 10k

Connection:
5V → R1 → node → R2 → GND
Vin is taken from the node.

Voltage divider formula:

Vin = 5V * (R2 / (R1 + R2)) ≈ 0.88 V

Wire the inverting amplifier

Voltage divider to Pin 2
  • Vin → Rin 10k → pin 2 (inverting input)
    Pin 3 to GND
  • Pin 3 (non-inverting input) → GND
100K resistor between Pin 1 and 2
  • Rf 100k between pin 2 and pin 1
  • Output is pin 1

Testing the Circuit

Using a Multimeter measure Vin it should be around Vin ≈ 0.88 V
Since the theoretical output (-8.8 V) is impossible on +5 V / 0 V supply:

  • Output saturates around 0 V
  • You will see clipping caused by rail limits
Output from Pin 1

What This Teaches

You are observing:

  • The inversion behaviour predicted by theory
  • The effect of power supply limits
  • Why many AC op-amp circuits use mid-supply biasing

This is exactly how real op-amps behave.

Building Circuit 2 — A Working Inverting Amplifier

Circuit 1 showed the theory correctly, but it also demonstrated why a single-supply op-amp cannot output negative voltages.

To build an inverting amplifier that actually produces a measurable output, we must shift the op-amp’s reference voltage.

This is the standard method used in audio circuits, sensors, filters, and active electronics that run from a single supply.

How the Biased Inverting Amplifier Works

When we raise the non-inverting input to 2.5 V:

  • The inverting input (–) is forced to sit at 2.5 V, not 0 V
  • Signals now swing above and below 2.5 V, while staying inside 0–5 V
  • The op-amp can now produce an inverted output that never requires negative voltage

So the maths stays the same, but everything is shifted around a new midpoint.

Parts List

  • LM358
  • Breadboard
  • Resistors (10 k, 10 k, 22 k, 47 k or any workable pair)
  • Wires
  • 5 V supply
  • Multimeter
  • Oscilloscope (optional)

Circuit Diagram 

Circuit Diagram 2

Building the circuit

Bias Network (mid-supply reference):

Voltage Divider

  • 5 V → 10 k → node → 10 k → GND
  • Node = 2.5 V reference

Connections:

22K resistor to Pin 2

  • Inverting input (–, pin 2) → Rin (22 k) → Vin

47K Resistor between Pin 1 and 2
  • Feedback resistor Rf (47 k) between pin 1 and pin 2

Voltage divider node to Pin 3
  • Non-inverting input (+, pin 3) → 2.5 V

  • Output = pin 1

Example Working Input and Output

For the biased inverting amplifier, the output voltage is given by:

Vout = Vref − (Rf / Rin) × (Vin − Vref)

Where:

  • Vref = mid-supply reference voltage (2.5 V)
  • Vin = input voltage from the divider
  • Rin = input resistor
  • Rf = feedback resistor

This equation describes what you will actually measure on a single-supply op-amp.

Values used in this circuit

Rin = 22 kΩ
Rf = 47 kΩ
Vref ≈ 2.5 V (from a 10 k / 10 k divider)

Gain magnitude:

Rf / Rin = 47k / 22k ≈ 2.14

Case 1 — Vin equals the reference (sanity check)

Use a voltage divider:

5 V → 10k → node → 10 k → GND

Vin = 5 V × (10k / (10k + 10k))
Vin = 2.5 V

Substitute into the equation:

Vout = 2.5 − 2.14 × (2.5 − 2.5)
Vout = 2.5 − 0
Vout = 2.5 V
Input
Output








So when Vin equals Vref, the output sits at mid-supply.
This confirms the circuit is biased correctly.

Case 2 — Vin above the reference (inversion)

Build a divider that gives Vin ≈ 3.0 V:

Top resistor = 10 k
Bottom resistor = 15 k

Vin = 5 V × (15k / (10k + 15k))
Vin = 5 V × 0.6
Vin = 3.0 V

Now calculate the output:

Vout = 2.5 − 2.14 × (3.0 − 2.5)
Vout = 2.5 − 2.14 × 0.5
Vout = 2.5 − 1.07
Vout ≈ 1.43 V

Measured result (approximately):

  • Vin ≈ 3.0 V
  • Vout ≈ 1.4 V
Output

Input








The output moves downward when the input moves upward, this is inversion.

Case 3 — Vin below the reference (inversion the other way)

Swap the divider resistors:

Top resistor = 15 k
Bottom resistor = 10 k

Vin = 5 V × (10k / (15k + 10k))
Vin = 5 V × 0.4
Vin = 2.0 V

Now calculate the output:

Vout = 2.5 − 2.14 × (2.0 − 2.5)
Vout = 2.5 − 2.14 × (−0.5)
Vout = 2.5 + 1.07
Vout ≈ 3.57 V

Measured result (approximately):

  • Vin ≈ 2.0 V
  • Vout ≈ 3.6 V

Input
Output
When the input goes below the reference, the output goes above it.

What Circuit 2 Demonstrates

  • A working, measurable inverted output
  • The importance of biasing when using single-supply op-amps
  • Why practically all audio and signal circuits use a virtual ground
  • Identical mathematics to the classic inverting amplifier
  • Real-world behaviour fully matching theory once the reference is corrected

Summary of What You Learned

Circuit 1 — The pure theoretical inverting amplifier (shows clipping)
Circuit 2 — A real, functioning inverting amplifier that produces valid output
  • The inverting amplifier creates a virtual ground at the inverting input
  • Gain is simply: -(Rf / Rin)
  • Every symbol in the formula has a clear meaning
  • Single-supply op-amps cannot output negative voltages
  • Your circuit demonstrates both theory and real-world limitations

This sets you up for:

  • Summing amplifiers
  • Differential amplifiers
  • Filters
  • Audio circuits using biasing

YouTube Video

The video below shows all the circuits been built and tested.

Next Up: Part 3 — Non-Inverting Operational Amplifier

In the next post, we’ll explore the non-inverting amplifier, introduce controlled gain, and work through your first proper op-amp voltage calculation.

Hope you have enjoyed this post and visit again.
Thanks for reading,
Matty


Comments

Popular posts from this blog

6502 - Part 2 Reset and Clock Circuit

Math Behind Logic Gates

Building a 6502 NOP Test