Instrumentation Amplifiers and Sensor Signal Conditioning
A kitchen-scale load cell is a Wheatstone bridge of four strain gauges. Excited with , it gives at most at full load, and that tiny signal rides on of common mode, because both output nodes sit halfway up the bridge. The microcontroller's ADC wants to . You need a gain of a few hundred, applied only to the difference, with a CMRR well above , and you cannot load the bridge. The difference amplifier fails on two counts: its input resistance is only , and with 1 % resistors its CMRR is about . The instrumentation amplifier (INA) fixes both. This lesson builds one from three op-amps, designs a complete load-cell interface (the roadmap's "precision sensor interface" lab) and covers the other conditioning tricks: reference pins for level shifting, ratiometric measurement and transimpedance amplifiers.
The three-op-amp instrumentation amplifier
Input stage. and are non-inverting amplifiers whose inverting inputs are joined through one gain resistor . By the golden rules, and , so the current through is , and it also flows through and . The outputs are therefore
The differential signal is amplified by , but the common mode passes with gain exactly 1, whatever is, and whatever the mismatch of and (a mismatch only changes the differential gain slightly). Both inputs go straight into op-amp non-inverting inputs: the input resistance is gigaohms, so the bridge is not loaded.
Difference stage. with four equal resistors subtracts, . Its own CMRR is still set by resistor matching, but now the differential signal arriving at it is times larger while the common mode is not, so
One resistor sets the gain, and high gain improves the CMRR. Integrated INAs trim the difference-stage resistors on the die to reach to at high gain, and specify by a formula that differs between parts: (internal ) for the AD620 and INA129, but for the INA128 and for the INA333; always take it from your part's datasheet.
Reference pin. does not have to go to ground. Whatever voltage drives it is added to the output: this is how an INA level-shifts a bipolar signal into a single-supply ADC's range. Drive it from a low-impedance source (a buffer), because any resistance in series with unbalances the difference stage.
Sensor signal conditioning in four steps
- Excite the sensor: a voltage for bridges, a current for RTDs (a Pt100 is at and rises about , IEC 60751:2022), a bias for photodiodes.
- Amplify the difference with an INA, so the full-scale signal nearly fills the ADC range.
- Shift the output with the reference pin to leave headroom at both ends.
- Filter before the ADC, at least a first-order anti-alias RC (Active Filters for more).
Make the measurement ratiometric when you can: feed the bridge and the ADC reference from the same voltage. The bridge output is proportional to and the ADC code is proportional to , so a drift of the supply cancels in the code.
A photodiode is the other common sensor: it is a current source. A transimpedance amplifier (an inverting amplifier without ) holds the diode at on the virtual ground and gives ; into is . A small capacitor across is needed for stability (LEDs and Photodiodes, Stability and Compensation).
Worked example: load-cell interface
Given: a load cell, at full load, four arms, . A three-op-amp INA with and a unity-gain difference stage of 1 % resistors, rail-to-rail op-amps on a single supply. A 12-bit ADC with a to range. The output should run from about (no load) to (full load).
Find: , the real output span, the worst-case CMRR and its effect, and the resolution.
Solve:
Check: the input-stage outputs swing to , inside a to rail-to-rail op-amp. The worst-case common-mode error of at the output is constant, because the bridge's common mode is fixed at , so the usual "tare" (zero) calibration removes it; it would matter if the excitation changed.
In Python: design and error budget
import math
Vex, S, Rf = 5.0, 2e-3, 10e3
vd_fs = S * Vex
G_need = (3.0 - 0.3) / vd_fs
RG = 75.0
G = 1 + 2 * Rf / RG
print(f"full-scale input {vd_fs*1e3:.1f} mV, gain needed {G_need:.1f}")
print(f"RG = {2*Rf/(G_need-1):.2f} Ohm -> {RG:.0f} Ohm, G = {G:.2f}")
print(f"output: {0.3:.3f} V at no load, {0.3 + G*vd_fs:.3f} V at full load")
for t in [0.01, 0.001]:
cmrr = G * 2 / (4 * t)
shift = 2.5 * 2 * t # CM gain of a unity difference stage, worst case 2t
print(f"diff stage {t*100:.1f} %: CMRR {cmrr:6.0f} = {20*math.log10(cmrr):.1f} dB,"
f" output shift from 2.5 V CM {shift*1e3:.1f} mV")
lsb = 3.3 / 4096
print(f"ADC LSB {lsb*1e3:.3f} mV, counts over full load {G*vd_fs/lsb:.0f}")
for name, vex_ref in [("fixed 3.3 V reference", False), ("ratiometric", True)]:
for drift in [0.0, -0.02]:
vex = Vex * (1 + drift)
vref = 3.3 * (1 + drift) if vex_ref else 3.3
code = (0.3 + G * S * vex) / vref * 4096
print(f"{name:22s} Vex {vex:.2f} V: full-load code {code:.0f}")full-scale input 10.0 mV, gain needed 270.0
RG = 74.35 Ohm -> 75 Ohm, G = 267.67
output: 0.300 V at no load, 2.977 V at full load
diff stage 1.0 %: CMRR 13383 = 82.5 dB, output shift from 2.5 V CM 50.0 mV
diff stage 0.1 %: CMRR 133833 = 102.5 dB, output shift from 2.5 V CM 5.0 mV
ADC LSB 0.806 mV, counts over full load 3322
fixed 3.3 V reference Vex 5.00 V: full-load code 3695
fixed 3.3 V reference Vex 4.90 V: full-load code 3628
ratiometric Vex 5.00 V: full-load code 3695
ratiometric Vex 4.90 V: full-load code 3702
With a fixed ADC reference, a 2 % sag of the excitation moves the full-load reading by about 2 % of span; with the reference tied to the excitation the reading moves only by the small part due to the fixed offset. (A real ratiometric design derives the offset from the excitation too.)
Cross-check with SPICE
The deck draws the circuit of the figure with the op-amp macro-model written for this course (, ). The first op is the unloaded cell; then alter changes the four arms by , the full-load imbalance of a cell.
cat > ina.cir <<'EOF'
* load-cell bridge + three-op-amp instrumentation amplifier, G = 1 + 2Rf/RG
.subckt OA inp inn out
G1 0 n1 inp inn 1m
R1 n1 0 100meg
C1 n1 0 159.2p
E1 out 0 n1 0 1
.ends
Vex ex 0 5
Rb1 ex a 350
Rb2 a 0 350
Rb3 ex b 350
Rb4 b 0 350
X1 a n1 o1 OA
X2 b n2 o2 OA
Rf1 o1 n1 10k
RG n1 n2 75
Rf2 o2 n2 10k
Vref ref 0 0.3
R3 o1 m 10k
R4 m out 10k
R5 o2 p 10k
R6 p ref 10k
X3 p m out OA
.control
op
print v(a) v(o1) v(o2) v(out)
alter Rb1 = 350.7
alter Rb2 = 349.3
alter Rb3 = 349.3
alter Rb4 = 350.7
op
print v(b)-v(a) v(o1) v(o2) v(out)
.endc
.end
EOF
ngspice -b ina.cir 2>&1 | grep -E '^v'v(a) = 2.500000e+00
v(o1) = 2.499975e+00
v(o2) = 2.499975e+00
v(out) = 2.999940e-01
v(b)-v(a) = 1.000000e-02
v(o1) = 1.165214e+00
v(o2) = 3.834736e+00
v(out) = 2.969462e+00
The common mode passes through the input stage untouched () and the output rests at the reference. At full load the output is about below the ideal : the noise gain of 268 against costs 0.27 %, which the calibration absorbs.
Interactive: squeeze the strain gauge
The netlist uses controlled sources E1, E2, E3 (gain ) as the three op-amps, because ee-netlist has no op-amp element, and grounds the reference pin to stay within the lab's ten-node limit. The slider is one bridge arm, : a quarter-bridge change.
At the lab shows , : one arm changed by 0.2 % gives a quarter of the full-bridge signal, . Notice and spread symmetrically around .
Guided lab: a precision bridge interface
Hand calculation. As in the worked example; for a bench bridge without a load cell, use four 0.1 % resistors with a potentiometer in series with one arm (about adjustment, so of imbalance at ).
Simulation. The Python budget, the SPICE deck (change the arms to your values) and the lab.
What you would measure. Build the INA from a quad op-amp (rail-to-rail input and output, single supply from a current-limited bench supply at about , at the pins) or use an integrated INA with its datasheet gain formula. Measure the bridge difference with a DMM on its range (resolution on a 3½-digit meter, on a 4½-digit one) and the output on its range. Expect the output to equal within about of span ( tolerance dominates) plus a zero offset of up to tens of millivolts. Then tie both INA inputs together, connect them to a peak, sine from the generator offset to , and read the output ripple to estimate the CMRR.
Hazards and safe setup. from a current-limited supply. Do not let the generator drive an input outside the op-amp's rails (keep the offset sine within to ). A real load cell must never be overloaded mechanically beyond its rated capacity.
Pitfalls
- Ignoring the input common-mode range. An INA's internal nodes have their own limits; a single-supply INA may not work with inputs near ground at high gain. Datasheets give a "diamond plot" of allowed output against common mode.
- Driving the reference pin from a divider. The divider's resistance unbalances the difference stage and destroys the CMRR; buffer it.
- No path for the input bias current. A floating sensor (a thermocouple, a capacitively coupled source) needs a resistor from each input to a reference voltage.
- Long sensor leads without filtering. They pick up radio-frequency interference, which the INA rectifies into a DC error (Grounding and Layout).
Practice
- With , what gives ?
- A Pt100 is excited by . What voltage change does a rise give, and what INA gain maps to onto a span?
- Why does raising the input-stage gain improve the CMRR of a three-op-amp INA?
Answer
- .
- ; over that is , so (the at is removed with a reference resistor in a bridge or by the INA reference pin).
- The input stage multiplies the differential signal by but passes the common mode with gain 1, so the difference stage's common-mode error is times smaller relative to the signal.
Test yourself
In a three-op-amp INA with and (unity difference stage), the gain is…
What gain does the input stage of a three-op-amp INA give to the common-mode voltage?
- 0
- 1
A measurement is ratiometric when…
- the gain is set by a ratio of resistors
- the sensor excitation and the ADC reference come from the same voltage
- the bridge has four equal arms
- the INA output is referred to mid-supply
Why should the INA reference pin be driven from a low-impedance source?
- To reduce noise only
- Its series resistance adds to and unbalances the difference stage, degrading CMRR and gain
- Because the pin is an output
- To set the input bias current