---
title: Sensors and signal conditioning
heading: From a physical quantity to a clean voltage for the ADC
eyebrow: C11 · Lesson 23 · Sensors and signal conditioning
xp: 40
---

::: hook
Most sensors produce tiny, awkward signals. A strain gauge changes its resistance by a fraction of a percent; a thermocouple produces about 40 µV per degree; a platinum thermometer changes by 0.4% per degree. Before an ADC can read them, they need **signal conditioning**: excitation, a bridge to turn small resistance changes into a voltage centered on zero, an instrumentation amplifier to raise it to the converter's range while rejecting common-mode noise, and a filter to stop aliasing. Each stage is a short calculation, and getting the gain right is what decides how many of the converter's bits are actually used.
:::

::: play
- A strain gauge with gauge factor GF sits in one arm of a bridge excited by $V_\text{ex}$; the other three arms are fixed resistors. The curve is the bridge output against strain, in microstrain (µε).
- For small strains the output is close to the straight line $V_\text{ex}\,\text{GF}\,\varepsilon/4$ (dashed). At large strains the exact output bends away: a quarter bridge is slightly nonlinear.
- The readout gives the output at 1000 µε and the gain needed to bring it to a 3.3 V converter's full scale.
:::
:::

```sim plot
view: graph
x: e = 0..5000 µε
y: v = 0..14 mV
slider: Vex = 1..10 = 5 step 0.5 V
slider: GF = 1.8..2.2 = 2 step 0.05
plot: Vex*(GF*e*1e-6/4)/(1 + GF*e*1e-6/2)*1000 | label: exact
plot: Vex*GF*e*1e-6/4*1000 | dashed | label: linear
readout: output at 1000 µε, mV = Vex*GF*1000e-6/4*1000 | digits: 4
readout: gain for 3.3 V at 1000 µε = 3.3/(Vex*GF*1000e-6/4) | digits: 4
```

::: predict
## A quarter-bridge strain gauge (GF = 2) with 5 V excitation sees 1000 µε. About what voltage does the bridge produce?

- [ ] 5 V
- [ ] 10 mV
- [x] 2.5 mV
- [ ] 2.5 µV

::: reveal
2.5 mV: $V_\text{ex}\,\text{GF}\,\varepsilon/4 = 5 \times 2 \times 10^{-3}/4$. A large strain for steel gives a signal smaller than the hum on a typical lab bench, which is why bridges use instrumentation amplifiers with high common-mode rejection.
:::
:::

::: nameit
## Common sensors

| Sensor | Response | Typical sensitivity |
|---|---|---|
| strain gauge | $\Delta R/R = \text{GF}\,\varepsilon$ | GF ≈ 2 |
| thermocouple (type K) | $V \approx S\,\Delta T$ between hot and cold junctions | S ≈ 41 µV/°C |
| platinum RTD (Pt100) | $R = R_0(1 + \alpha T)$ | $R_0$ = 100 Ω, α = 0.00385 /°C |
| thermistor | $R = R_0e^{B(1/T - 1/T_0)}$ | −4%/°C near room temperature |

A thermocouple measures the difference between its hot junction and the **cold junction** where it meets copper, so the cold junction's temperature must be measured separately and added: **cold-junction compensation**.

## The Wheatstone bridge

Four resistors, excited across one diagonal and read across the other, output zero at balance. One active gauge (a **quarter bridge**) gives

$$V_\text{out} \approx \frac{V_\text{ex}\,\text{GF}\,\varepsilon}{4}$$

Two or four active gauges (half and full bridges) double or quadruple that and cancel temperature effects.

## The conditioning chain

Excitation → bridge → instrumentation amplifier → anti-aliasing filter → ADC. Choose the gain so the largest expected signal nearly fills the converter's range:

$$G = \frac{\text{full scale}}{\text{largest sensor output}}$$

and watch for **self-heating**: a current I through a sensor of resistance R dissipates $I^2R$, warming it by that power times its thermal resistance.
:::

::: example
## A Pt100 RTD reads 100 °C. What is its resistance, and how much does a 1 mA excitation heat it?

::: solution
1. **Resistance at 100 °C.**
   $$\begin{aligned} R &= 100(1 + 0.00385 \times 100)\ \Omega \\ &= 138.5\ \Omega \end{aligned}$$
2. **Power dissipated.**
   $$\begin{aligned} P &= I^2R \\ &= (10^{-3})^2 \times 138.5\ \text{W} \\ &= 0.14\ \text{mW} \end{aligned}$$
3. **Self-heating.** With a typical 0.2 °C/mW in still air, that's a 0.03 °C error.

**Answer:** 138.5 Ω, and the excitation heats it by about 0.03 °C.
:::
:::

::: example
## A quarter bridge (5 V, GF = 2) must give a 3.3 V ADC full scale at 2000 µε. What gain is needed?

::: solution
1. **Bridge output at 2000 µε.**
   $$\begin{aligned} V &= \frac{5 \times 2 \times 2 \times 10^{-3}}{4}\ \text{V} \\ &= 5\ \text{mV} \end{aligned}$$
2. **Gain.**
   $$\begin{aligned} G &= \frac{3.3}{0.005} \\ &= 660 \end{aligned}$$
3. **Building it.** An instrumentation amplifier with a gain resistor sets that in one stage.

**Answer:** a gain of 660.
:::
:::

::: example
## A type K thermocouple (about 41 µV/°C) reads 1.00 mV, and its cold junction is at 25 °C. What is the hot junction's temperature?

::: solution
1. **Temperature difference.** The voltage measures the difference between the junctions:
   $$\frac{1000\ \mu\text{V}}{41\ \mu\text{V/°C}} = 24.4\ \text{°C}$$
2. **Add the cold junction.**
   $$24.4 + 25 = 49.4\ \text{°C}$$
3. **Without compensation.** Forgetting cold-junction compensation would read 24.4 °C, wrong by exactly the room temperature.

**Answer:** the hot junction is at 49.4 °C.
:::
:::

::: check
given: R = 120 | 350 | 1000; GF = 2 | 2.1; e = 500 | 2000
answer: R*GF*e*1e-6*1000
unit: mΩ
tolerance: 0.5%

## A {R} Ω strain gauge with GF = {GF} is strained by {e} µε. By how many milliohms does its resistance change?

::: right
Right. $R\,\text{GF}\,\varepsilon$ = {answer} mΩ.
:::

::: misses
- [any] Not yet. $\Delta R = R \cdot \text{GF} \cdot \varepsilon$.
:::
:::

::: check
given: Vex = 2.5 | 5 | 10; GF = 2 | 2.1; e = 100 | 1000 | 3000
answer: Vex*GF*e*1e-6/4*1000
unit: mV
tolerance: 1%

## A quarter bridge is excited by {Vex} V, with a GF = {GF} gauge at {e} µε. About what is its output?

::: right
Right. $V_\text{ex}\,\text{GF}\,\varepsilon/4$ = {answer} mV.
:::

::: misses
- [Vex*GF*e*1e-6*1000] A quarter bridge gives a quarter of that.
- [any] Not yet. $V_\text{ex}\,\text{GF}\,\varepsilon/4$.
:::
:::

::: check
given: FS = 2.5 | 3.3 | 5; Vmax = 2 | 10 | 50
answer: FS/(Vmax*1e-3)
tolerance: 0.5%

## A sensor's largest output is {Vmax} mV and the ADC's full scale is {FS} V. What gain fills the range?

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

::: misses
- [any] Not yet. Full scale over the largest signal.
:::
:::

::: check
given: dT = 25 | 100 | 400; S = 41 | 52
answer: S*dT/1000
unit: mV
tolerance: 0.5%

## A thermocouple with a sensitivity of {S} µV/°C has its hot junction {dT} °C above its cold junction. What voltage does it produce?

::: right
Right. $S\,\Delta T$ = {answer} mV.
:::

::: misses
- [any] Not yet. Sensitivity times temperature difference.
:::
:::

::: check
given: T = -40 | 25 | 100 | 250
answer: 100*(1 + 0.00385*T)
unit: Ω
tolerance: 0.5%

## What is a Pt100 RTD's resistance at {T} °C (α = 0.00385)?

::: right
Right. $100(1 + \alpha T)$ = {answer} Ω.
:::

::: misses
- [100*0.00385*T] That's only the change; add the 100 Ω at 0 °C.
- [any] Not yet. $R_0(1 + \alpha T)$.
:::
:::

::: check
given: I = 0.5 | 1 | 5; R = 100 | 1000; th = 0.1 | 0.5
answer: (I*1e-3)^2*R*1000*th
unit: °C
tolerance: 0.5%

## A {R} Ω sensor carries {I} mA and has a thermal resistance of {th} °C/mW. How much does it heat itself?

::: right
Right. $I^2R \times \theta$ = {answer} °C.
:::

::: misses
- [I*1e-3*R*1000*th] Power is $I^2R$, not IR.
- [any] Not yet. Power times thermal resistance.
:::
:::

::: check
kind: choice

## A thermocouple reads 2.05 mV (41 µV/°C) with its connector at 25 °C. What is the hot junction's temperature?

- [ ] 50 °C
- [x] 75 °C
- [ ] 25 °C
- [ ] 2.05 °C

::: misses
- [1] That's only the difference from the cold junction.
- [3] That's the connector.
- [4] The voltage has to be divided by the sensitivity.
:::
:::

::: check
kind: parts
given: T = 0 | 50 | 150; I = 0.5 | 1 | 2; k = 2 | 5

## A Pt100 RTD (α = 0.00385/°C) is at {T} °C, excited with {I} mA; its self-heating is {k} mW/°C.

::: part
answer: 100*(1 + 0.00385*T)
unit: Ω
tolerance: 0.5%

### What is its resistance?

::: misses
- [any] $R_0(1 + \alpha T)$.
:::
:::

::: part
answer: (I*1e-3)^2*100*(1 + 0.00385*T)*1000/k
unit: °C
tolerance: 0.5%

### How much does the excitation heat it?

::: misses
- [any] $I^2R$ over the dissipation constant.
:::
:::
:::

::: check
kind: parts
given: V = 3 | 5 | 10; e = 500 | 1000 | 2000; F = 2 | 2.1

## A quarter bridge with {V} V excitation and gauge factor {F} sees {e} µε.

::: part
answer: V*F*e*1e-6/4*1e3
unit: mV
tolerance: 0.5%

### What is its output?

::: misses
- [any] $V \cdot GF \cdot \varepsilon/4$.
:::
:::

::: part
answer: 3.3/(V*F*e*1e-6/4)
tolerance: 0.5%

### What gain brings it to 3.3 V?

::: misses
- [any] 3.3 V over the output.
:::
:::
:::

::: explain
## Why are strain gauges almost always read in a bridge instead of by measuring their resistance directly?

::: model
A strain gauge's resistance changes by tiny fractions: resolving one microstrain on a 350 Ω gauge means seeing a 0.7 mΩ change, two parts per million, on top of a large value, which needs extraordinary accuracy. A bridge subtracts the large unchanging part by comparing the gauge with fixed resistors, so its output is zero at rest and proportional to the change alone. That small voltage can then be amplified with high gain without saturating, and the bridge's differential output lets an instrumentation amplifier reject the common-mode noise picked up by the wiring.
:::
:::

::: practice

::: check
given: Vex = 3.3 | 10; e = 500 | 1500
answer: Vex*2*e*1e-6/4*1000
unit: mV
tolerance: 1%

## Quarter-bridge output at {Vex} V, GF = 2, {e} µε?

::: misses
- [any] $V_\text{ex}\,\text{GF}\,\varepsilon/4$.
:::
:::

::: check
given: T = -20 | 25 | 50 | 75 | 100 | 150 | 200
answer: 100*(1 + 0.00385*T)
unit: Ω
tolerance: 0.5%

## Pt100 at {T} °C?

::: misses
- [any] $100(1 + 0.00385T)$.
:::
:::

::: check
given: FS = 3.3; Vmax = 2 | 4 | 10 | 25 | 50 | 100
answer: FS/(Vmax*1e-3)
tolerance: 0.5%

## Gain to map {Vmax} mV to {FS} V?

::: misses
- [any] FS/Vmax.
:::
:::
:::
