---
title: Single-supply op-amp circuits
heading: Biasing signals at mid-supply when there's no negative rail
eyebrow: C6 · Lesson 20 · Single-supply op-amp circuits
xp: 40
---

::: hook
Textbook op-amp circuits run from ±15 V, so a signal can swing either side of ground. A battery, a USB port or a microcontroller board gives one supply and ground. With nothing below ground, an AC signal has to ride on a bias, usually half the supply, and every node in the circuit has to stay inside the op amp's input and output ranges. This lesson is the handful of habits that make single-supply circuits work.

::: play
- The curve is an amplifier's output on a single 5 V supply that can swing from 0.1 V to 4.9 V. The input is a sine riding on a bias.
- With the bias at 2.5 V the output swings cleanly. Move the bias toward ground: one half of the wave flattens against the rail.
- Raise the gain or the amplitude. Where does the output clip on both sides at once?
:::
:::

```sim plot
view: graph
x: t = 0..2m s
y: v = 0..5 V
slider: b = 0..5 step 0.05 = 2.5 V
slider: G = 1..50 step 1 = 20
slider: a = 0..0.2 step 0.005 = 0.05 V
plot: 0.1 + (b + G*a*sin(2*pi*1000*t) - 0.1)*step(b + G*a*sin(2*pi*1000*t) - 0.1) - (b + G*a*sin(2*pi*1000*t) - 4.9)*step(b + G*a*sin(2*pi*1000*t) - 4.9) | label: output | samples: 400
readout: peak swing asked for, V = G*a | digits: 3
readout: room below the bias, V = b - 0.1 | digits: 3
```

::: predict
## A single 5 V op amp amplifies a ±50 mV signal by 20, with the signal applied directly to its non-inverting input and the gain resistor to ground. What comes out?

- [ ] A ±1 V sine centered on 2.5 V
- [x] Only the positive half-cycles, up to 1 V; the negative halves are flat at the bottom rail
- [ ] Nothing at all
- [ ] A ±1 V sine centered on 0 V

::: reveal
The output can't go below the lower rail, about 0 V, so the negative half-cycles, which would need −1 V, are clipped flat: the amplifier acts as a half-wave rectifier. The signal has to be lifted onto a bias near mid-supply first, so the output can swing both ways around it.
:::
:::

::: nameit
## Mid-supply bias

Make $V_\text{mid} = V_S/2$ with a resistor divider and a bypass capacitor (or a buffered reference), couple the AC signal in through a capacitor, and return the input to $V_\text{mid}$ through a resistor $R_B$. The input coupling forms a high-pass corner at $\frac{1}{2\pi R_BC_\text{in}}$.

## The non-inverting AC amplifier

Return the gain resistor $R_g$ to ground through a capacitor $C_g$. At DC the capacitor is open, so the gain is 1 and the output sits at $V_\text{mid}$; at signal frequencies the gain is $1 + \frac{R_f}{R_g}$, above a corner at $\frac{1}{2\pi R_gC_g}$. Returning $R_g$ straight to ground would multiply the bias by the gain and slam the output into the rail.

## The inverting amplifier

Put the non-inverting input at the bias and couple the signal in through a capacitor: the output rests at the bias and swings around it. Or, to level-shift a ground-referenced signal, set the non-inverting input to $V_x$; the output is then $V_x\left(1 + \frac{R_f}{R_\text{in}}\right) - \frac{R_f}{R_\text{in}}v_\text{in}$, and $V_x$ can be chosen to center the output.

## Ranges and ripple

- The output can swing only from $V_{OL}$ to $V_{OH}$, within tens of millivolts of the rails for **rail-to-rail** parts, a volt or more for older ones. The inputs must stay within the input common-mode range.
- Any ripple on $V_\text{mid}$ is a signal at the non-inverting input and is amplified by the AC gain. The divider's bypass capacitor filters it with a corner at $\frac{1}{2\pi R_\text{TH}C}$.
:::

::: example
## Design a gain-20 microphone preamp on 5 V: input coupling to a 100 kΩ, 100 kΩ bias divider through 1 µF, and $R_g$ = 1 kΩ. What are the input corner, the capacitor in series with $R_g$, and the largest input it can take with a rail-to-rail output (0.1 V margin)?

::: solution
1. **Input corner.** The input sees the divider's 50 kΩ:
   $$\begin{aligned} f &= \frac{1}{2\pi \times 50\ \text{k}\Omega \times 1\ \mu\text{F}} \\ &= 3.2\ \text{Hz} \end{aligned}$$
2. **Feedback resistor.** For gain 20, $R_f$ = 19 kΩ.
3. **Capacitor on the gain leg.** For a 20 Hz corner,
   $$\begin{aligned} C_g &= \frac{1}{2\pi \times 1\ \text{k}\Omega \times 20\ \text{Hz}} \\ &= 8.0\ \mu\text{F} \end{aligned}$$
   Use 10 µF, giving 16 Hz.
4. **Largest input.** The output rests at 2.5 V and can swing ±2.4 V, so before clipping the input can reach
   $$\frac{2.4\ \text{V}}{20} = 120\ \text{mV peak}$$

**Answer:** the input corner is 3.2 Hz, the gain leg takes 10 µF (8.0 µF for exactly 20 Hz), and the largest input is 120 mV peak.
:::
:::

::: example
## The 5 V supply in that preamp carries 50 mV of 100 Hz ripple. How much reaches the output, with and without a 10 µF bypass on the divider?

::: solution
1. **Without the bypass.** $V_\text{mid}$ carries half the ripple, 25 mV, straight to the non-inverting input, and the AC gain of 20 makes it
   $$25\ \text{mV} \times 20 = 500\ \text{mV}$$
   at the output: louder than most of the signal.
2. **The bypass corner.** With 10 µF across the lower resistor, the divider's 50 kΩ Thévenin resistance makes a corner at
   $$\begin{aligned} f &= \frac{1}{2\pi \times 50\ \text{k}\Omega \times 10\ \mu\text{F}} \\ &= 0.32\ \text{Hz} \end{aligned}$$
3. **With the bypass.** That cuts 100 Hz by about 314: 0.080 mV at $V_\text{mid}$ and 1.6 mV at the output.
4. **What this shows.** The bias divider is part of the signal path.

**Answer:** 500 mV of ripple reaches the output without the bypass, and 1.6 mV with it.
:::
:::

::: example
## A ground-referenced sensor gives ±1 V. Fit it into a 0 to 3.3 V converter centered at 1.65 V with an inverting amplifier of gain −1.5 on 3.3 V. What voltage goes on the non-inverting input?

::: solution
1. **Output in terms of $V_x$.**
   $$v_o = V_x(1 + 1.5) - 1.5v_\text{in}$$
2. **Center it.** For $v_\text{in}$ = 0 to give 1.65 V,
   $$\begin{aligned} V_x &= \frac{1.65}{2.5} \\ &= 0.66\ \text{V} \end{aligned}$$
3. **Check the range.** The output runs from 1.65 − 1.5 = 0.15 V to 3.15 V as the sensor goes from +1 to −1 V: inverted, but inside the converter's range with 0.15 V to spare at each end. Firmware flips the sign.

**Answer:** 0.66 V goes on the non-inverting input.
:::
:::

::: check
given: R = 47 | 100 | 470; C = 0.1 | 1 | 4.7
answer: 1/(2*pi*R/2*1000*C*1e-6)
unit: Hz
tolerance: 0.5%

## An AC-coupled single-supply input is biased by two {R} kΩ resistors through a {C} µF capacitor. Where's its corner?

::: right
Right. The capacitor sees the divider's $R/2$: {answer}.
:::

::: misses
- [1/(2*pi*R*1000*C*1e-6)] The two resistors are in parallel as seen by the capacitor.
- [any] $\frac{1}{2\pi(R \parallel R)C}$.
:::
:::

::: check
kind: parts
given: Rg = 0.47 | 1 | 4.7; f = 10 | 20 | 50; G = 11 | 21 | 101

## A single-supply non-inverting amplifier has $R_g$ = {Rg} kΩ returned to ground through a capacitor, and an AC gain of {G}.

::: part
answer: 1/(2*pi*Rg*1000*f)*1e6
unit: µF
tolerance: 0.5%

### What capacitor puts the gain leg's corner at {f} Hz?

::: misses
- [any] $C_g = \frac{1}{2\pi R_gf}$.
:::
:::

::: part
answer: (G - 1)*Rg
unit: kΩ
tolerance: 0.5%

### What feedback resistor?

::: misses
- [G*Rg] The non-inverting gain is $1 + R_f/R_g$.
- [any] $R_f = (G - 1)R_g$.
:::
:::
:::

::: check
given: V = 3.3 | 5 | 12; m = 0.05 | 0.1 | 1; G = 10 | 50
answer: (V/2 - m)/G*1000
unit: mV
tolerance: 0.5%

## A single {V} V amplifier biased at mid-supply has gain {G} and an output that reaches within {m} V of each rail. What's the largest input peak?

::: right
Right. $\frac{V_S/2 - V_\text{margin}}{G}$ = {answer}.
:::

::: misses
- [(V - m)/G*1000] The output starts at mid-supply, so it has only half the supply to swing each way.
- [any] $\frac{V_S/2 - V_\text{margin}}{G}$.
:::
:::

::: check
kind: parts
given: r = 10 | 50 | 100; R = 47 | 100; C = 1 | 10; f = 100 | 120; G = 10 | 20

## A supply with {r} mV of {f} Hz ripple feeds a bias divider of two {R} kΩ resistors with {C} µF across the lower one; the stage's AC gain is {G}.

::: part
answer: r/2/sqrt(1 + (f*2*pi*R/2*1000*C*1e-6)^2)*1000
unit: µV
tolerance: 1%

### How much ripple reaches the bias node?

::: misses
- [r/2*1000] The bypass capacitor filters the divider.
- [any] Half the ripple, filtered by the divider's Thévenin resistance and C.
:::
:::

::: part
answer: G*r/2/sqrt(1 + (f*2*pi*R/2*1000*C*1e-6)^2)*1000
unit: µV
tolerance: 1%

### How much reaches the output?

::: misses
- [any] Multiply by the AC gain.
:::
:::
:::

::: check
kind: parts
given: G = 1 | 1.5 | 2; Vc = 1.25 | 1.65 | 2.5

## An inverting amplifier with gain −{G} must center a ground-referenced input at {Vc} V.

::: part
answer: Vc/(1 + G)
unit: V
tolerance: 0.5%

### What voltage goes on its non-inverting input?

::: misses
- [Vc] The non-inverting input's voltage is amplified by the noise gain, $1 + R_f/R_\text{in}$.
- [any] $V_x = \frac{V_c}{1 + G}$.
:::
:::

::: part
answer: Vc - G*0.5
unit: V
tolerance: 0.5%

### Where's the output for +0.5 V in?

::: misses
- [Vc + G*0.5] An inverting amplifier moves down for a positive input.
- [any] $V_c - Gv_\text{in}$.
:::
:::
:::

::: check
kind: choice

## Why does a single-supply non-inverting amplifier return its gain resistor to ground through a capacitor?

- [ ] To block noise from the ground
- [x] So the DC gain is 1 and the output rests at the bias instead of the bias times the gain
- [ ] To set the high-frequency corner
- [ ] To make the input resistance larger

::: right
Right. At DC the capacitor is open, so the bias passes at unity gain; at signal frequencies the full gain applies.
:::

::: misses
- [1] Ground noise isn't the issue; the bias is.
- [3] It sets the low-frequency corner, not the high one.
- [4] The input resistance is set by the bias network.
:::
:::

::: check
kind: derivation
vars: V = 1.8..24, R = 1000..1000000, C = 0.0000001..0.0001, f = 10..1000, G = 1..100

## A single-supply stage on V biases at mid-supply with two R resistors and a bypass C; ripple at f on the supply; AC gain G.

::: step
answer: V/2

### What's the bias?
:::

::: step
answer: 1/(2*pi*R/2*C)

### What's the bypass filter's corner?
:::

::: step
answer: G/2/sqrt(1 + (2*pi*f*R/2*C)^2)

### What fraction of the supply ripple reaches the output?
:::

::: right
Right. The bias node's ripple is amplified like any signal.
:::
:::

::: explain
## Why must the signal in a single-supply op-amp circuit be biased at mid-supply?

::: model
With one supply, the op amp's output can only move between ground and the supply. An AC signal swings both above and below its resting value, so if it rested at ground, every negative half-cycle would try to go below ground and be clipped flat. Biasing the signal at half the supply puts its resting point in the middle of the available range, so it has equal room to swing up and down. The bias has to be applied without the gain multiplying it, which is why the gain resistor returns through a capacitor, and it has to be clean, because any ripple on the bias is amplified along with the signal.
:::
:::

::: practice

::: check
given: R = 22 | 220; C = 0.47 | 2.2
answer: 1/(2*pi*R/2*1000*C*1e-6)
unit: Hz
tolerance: 0.5%

## Bias: two {R} kΩ resistors; coupling {C} µF. Corner?

::: misses
- [any] $\frac{1}{2\pi(R/2)C}$.
:::
:::

::: check
given: V = 3.3 | 9; m = 0.02 | 0.5; G = 5 | 30
answer: (V/2 - m)/G*1000
unit: mV
tolerance: 0.5%

## {V} V, gain {G}, {m} V from the rails. Largest input peak?

::: misses
- [any] $\frac{V_S/2 - V_\text{margin}}{G}$.
:::
:::
:::
