---
title: Function generators and power supplies
heading: Sources that behave the way their front panels say, mostly
eyebrow: C11 · Lesson 10 · Function generators and power supplies
xp: 40
---

::: hook
Set a function generator to 1 V peak-to-peak, connect it to a scope, and the scope shows 2 V. Nothing is broken: the generator has a 50 Ω output and assumes it's driving a 50 Ω load, so its display shows what a matched load would see. Bench power supplies have their own surprises: set to 12 V with a 0.5 A limit, a supply becomes a 0.5 A current source the moment the load wants more, and its voltage drops to whatever that current gives. Knowing how a source is built tells you what it will actually deliver.
:::

::: play
- A generator set to "1 V amplitude into 50 Ω" is really a 2 V source behind 50 Ω. The load $R_L$ is adjustable; the meter shows the amplitude the load actually gets.
- At $R_L$ = 50 Ω the load sees the 1 V the panel promises. At high impedance (like a scope's 1 MΩ input) it sees 2 V.
- Generators often have a "High Z" setting that just doubles the displayed number; the output itself is the same.
:::
:::

```sim circuit
V1 emf 0 sine 2 V 1k Hz   @ 0,0 down
RS emf out 50             @ 0,0 right
RL out 0 50               @ 2,0 down
slider: RL 5..1M log
scope: v(out)
time: 0..3m s
meter: v(out)
```

::: predict
## A generator is set to 1 Vpp (its default 50 Ω load setting) and connected straight to a scope with a 1 MΩ input. What does the scope show?

- [ ] 0.5 Vpp
- [ ] 1 Vpp
- [x] 2 Vpp
- [ ] 20 Vpp

::: reveal
2 Vpp. Internally it's a 2 Vpp source behind 50 Ω, set up so that a 50 Ω load gets half, the 1 Vpp displayed. A 1 MΩ load takes almost none of the drop, so it sees nearly the full 2 Vpp.
:::
:::

::: nameit
## Function generators

A generator is a voltage source $V_s$ (the open-circuit EMF) behind a 50 Ω output resistance. Its displayed amplitude assumes a 50 Ω load, so the EMF is twice the display, and a load $R_L$ gets

$$V_L = 2V_\text{set}\frac{R_L}{R_L + 50}$$

Amplitudes appear as peak-to-peak, RMS, or dBm. dBm is power into 50 Ω: $P = 10^{\text{dBm}/10}$ mW, $V_\text{rms} = \sqrt{50P}$, and for a sine $V_\text{pp} = 2\sqrt2V_\text{rms}$; 0 dBm is 0.632 Vpp and 10 dBm is 2 Vpp. Use 50 Ω cable and terminations at high frequencies so the generator sees the load it expects.

## Power supplies

A lab supply has two settings, a voltage $V_\text{set}$ and a current limit $I_\text{set}$, and works in whichever mode the load requires:

- **constant voltage** when the load draws less than $I_\text{set}$: the output is $V_\text{set}$;
- **constant current** when the load would draw more: the output is $I_\text{set}$, and the voltage falls to $I_\text{set}R_L$.

The crossover is at $R_L = V_\text{set}/I_\text{set}$. Set the limit just above what the circuit should draw, so a fault produces a current-limited supply instead of smoke.

**Remote sensing** uses a second pair of wires to measure the voltage at the load, so the supply corrects for the drop $2IR_\text{lead}$ in its output leads.
:::

::: example
## A generator set to 2 Vpp (50 Ω mode) drives a 100 Ω load. What does the load get?

::: solution
1. **The EMF.** In 50 Ω mode the display shows half the EMF, so the EMF is 4 Vpp.
2. **Divide into 100 Ω.**
   $$\begin{aligned} V_L &= 4 \times \frac{100}{150}\ \text{Vpp} \\ &= 2.67\ \text{Vpp} \end{aligned}$$

**Answer:** the load gets 2.67 Vpp, neither the displayed 2 V nor the open-circuit 4 V.
:::
:::

::: example
## A supply is set to 12 V and 0.5 A. What does it deliver into 100 Ω, and into 10 Ω?

::: solution
1. **Crossover.**
   $$\begin{aligned} R &= \frac{12\ \text{V}}{0.5\ \text{A}} \\ &= 24\ \Omega \end{aligned}$$
2. **Into 100 Ω.** It stays in constant voltage:
   $$\frac{12\ \text{V}}{100\ \Omega} = 0.12\ \text{A}$$
3. **Into 10 Ω.** It limits the current at 0.5 A:
   $$0.5\ \text{A} \times 10\ \Omega = 5\ \text{V}$$

**Answer:** into 100 Ω it delivers 12 V and 0.12 A; into 10 Ω it limits at 0.5 A, 5 V.
:::
:::

::: example
## A generator in 50 Ω mode is set to 1 Vpp and connected to a scope's 1 MΩ input. What does the scope show?

::: solution
1. **Open-circuit output.** The generator's display assumes a 50 Ω load, so its open-circuit output is 2 Vpp.
2. **Into 1 MΩ.** Almost none of it drops across the source resistance:
   $$\begin{aligned} V &= 2 \times \frac{10^6}{10^6 + 50}\ \text{Vpp} \\ &= 2.0\ \text{Vpp} \end{aligned}$$
3. **The fix.** Either set the generator to high-impedance mode or terminate the scope input in 50 Ω.

**Answer:** the scope shows 2.0 Vpp.
:::
:::

::: check
given: V = 0.5 | 1 | 2.5; RL = 25 | 100 | 1e6
answer: 2*V*RL/(RL + 50)
unit: V
tolerance: 0.5%

## A generator is set to {V} V amplitude for a 50 Ω load. What amplitude does a {RL} Ω load actually get?

::: right
Right. $2V_\text{set}R_L/(R_L + 50)$ = {answer} V.
:::

::: misses
- [V] That's only true into exactly 50 Ω.
- [V*RL/(RL + 50)] The internal EMF is twice the displayed amplitude.
- [any] Not yet. The EMF is $2V_\text{set}$, divided by 50 Ω and $R_L$.
:::
:::

::: check
given: dBm = -10 | 0 | 10 | 13
answer: 2*sqrt(2)*sqrt(50*10^(dBm/10)*1e-3)
unit: V
tolerance: 0.5%

## A generator outputs a {dBm} dBm sine into 50 Ω. What is its peak-to-peak voltage?

::: right
Right. $V_\text{pp} = 2\sqrt2\sqrt{50P}$ = {answer} V.
:::

::: misses
- [sqrt(50*10^(dBm/10)*1e-3)] That's the RMS voltage; multiply by $2\sqrt2$ for peak-to-peak.
- [any] Not yet. Power, then RMS, then peak-to-peak.
:::
:::

::: check
kind: parts
given: V = 5 | 12 | 24; I = 0.1 | 0.5 | 2; R = 10 | 100

## A supply is set to {V} V with a {I} A limit, driving a {R} Ω load.

::: part
answer: V/I
unit: Ω
tolerance: 0.5%

### At what load resistance does it switch between modes?

::: misses
- [any] $V_\text{set}/I_\text{set}$.
:::
:::

::: part
answer: (V + I*R - abs(V - I*R))/2
unit: V
tolerance: 0.5%

### What voltage does the {R} Ω load get?

::: misses
- [any] Not yet. The smaller of $V_\text{set}$ and $I_\text{set}R$.
:::
:::
:::

::: check
given: I = 1 | 3 | 10; R = 0.02 | 0.05
answer: 2*I*R
unit: V
tolerance: 0.5%

## A supply delivers {I} A through leads of {R} Ω each. How much voltage is lost in the leads, which remote sensing would correct?

::: right
Right. Both leads: $2IR$ = {answer} V.
:::

::: misses
- [I*R] Count the return lead too.
- [any] Not yet. $2IR_\text{lead}$.
:::
:::

::: check
given: Vpp = 0.632 | 2 | 6.32
answer: 10*log(((Vpp/(2*sqrt(2)))^2/50)/1e-3)
unit: dBm
tolerance: 0.5%

## A sine of {Vpp} Vpp is delivered into 50 Ω. What power is that in dBm?

::: right
Right. {answer} dBm.
:::

::: misses
- [any] Not yet. $V_\text{rms} = V_\text{pp}/2\sqrt2$, $P = V_\text{rms}^2/50$, then dBm.
:::
:::

::: check
kind: choice

## A circuit should draw 80 mA from a 5 V supply. Where should the current limit be set?

- [ ] At the supply's maximum, so the circuit always gets what it needs
- [x] A little above 80 mA, say 100 to 120 mA
- [ ] Exactly 80 mA
- [ ] At zero, until the circuit is verified

::: misses
- [1] Then a short circuit would draw amps and burn parts.
- [3] Normal variation would push the supply into current limit and drop its voltage.
- [4] Then the circuit can't power up at all.
:::
:::

::: check
kind: parts
given: V = 1 | 2 | 5; RL = 25 | 100 | 1000000

## A generator in 50 Ω mode is set to {V} Vpp and drives {RL} Ω.

::: part
answer: 2*V*RL/(RL + 50)
unit: V
tolerance: 0.5%

### What peak-to-peak voltage does the load get?

::: misses
- [V] The display assumes a 50 Ω load.
- [any] $2V \cdot R_L/(R_L + 50)$.
:::
:::

::: part
answer: 2*V
unit: V
tolerance: 0.5%

### What is the generator's open-circuit voltage?

::: misses
- [any] Twice the setting.
:::
:::
:::

::: check
kind: parts
given: V = 5 | 12 | 24; I = 0.1 | 0.5 | 2; R = 5 | 50 | 500

## A supply is set to {V} V with a {I} A current limit and drives {R} Ω.

::: part
answer: V/I
unit: Ω
tolerance: 0.5%

### At what load resistance does it cross from voltage to current limiting?

::: misses
- [any] V/I.
:::
:::

::: part
answer: V/R - (V/R - I)*step(V/R - I)
unit: A
tolerance: 0.5%

### What current flows into {R} Ω?

::: misses
- [any] V/R, unless that exceeds the limit.
:::
:::
:::

::: explain
## Why does a function generator's display show half its open-circuit voltage?

::: model
At high frequencies the generator drives 50 Ω cables that should be terminated in 50 Ω to avoid reflections, so its designers assume that load. A 50 Ω load and the generator's internal 50 Ω form a divider that halves the internal voltage, and the display shows that halved value, what a properly terminated load actually receives. Connected to a high-impedance input instead, almost nothing drops across the internal resistor, and the load sees the full internal voltage, twice what's displayed.
:::
:::

::: practice

::: check
given: V = 1 | 3; RL = 50 | 1e6
answer: 2*V*RL/(RL + 50)
unit: V
tolerance: 0.5%

## Set {V} V (50 Ω mode), load {RL} Ω: what does it get?

::: misses
- [any] $2V_\text{set}R_L/(R_L + 50)$.
:::
:::

::: check
given: V = 9 | 15; I = 0.3 | 1
answer: V/I
unit: Ω
tolerance: 0.5%

## Crossover resistance for {V} V and {I} A?

::: misses
- [any] $V/I$.
:::
:::

::: check
given: dBm = -10 | 0 | 3 | 10 | 13 | 20
answer: 2*sqrt(2)*sqrt(50*10^(dBm/10)*1e-3)
unit: V
tolerance: 0.5%

## Vpp for {dBm} dBm into 50 Ω?

::: misses
- [any] $2\sqrt2\sqrt{50P}$.
:::
:::
:::
