Electronics Design AU
SensorsAnalog

Sensor Signal Conditioning Basics

Last updated 27 June 2026 · 10 min read

Direct Answer

Signal conditioning is the electronic processing between a sensor and an ADC that converts the sensor's raw output into a voltage range the ADC can accurately measure. The main operations are: amplification (gain) — scaling a small sensor signal (e.g. 10 mV from a thermocouple) to the ADC's full input range (3.3 V); offset shifting — moving the sensor's zero point to the ADC's minimum input voltage; filtering — the anti-aliasing low-pass filter prevents high-frequency noise from aliasing into the measurement band (cutoff = fs/2 by Nyquist); and input protection — clamping diodes and series resistance prevent voltages outside the ADC's absolute maximum rating from damaging it. For most sensor interfaces, the signal conditioning chain is: sensor → gain stage → offset shift → anti-aliasing filter → ADC.

Detailed Explanation

Every sensor produces a raw electrical output: a resistance that changes with temperature, a voltage that changes with pressure, a current proportional to light intensity, or a differential voltage from a bridge circuit. Almost none of these outputs are directly suitable for an MCU's ADC — they may be too small (millivolts), at the wrong common-mode level, riding on noise, or capable of exceeding the ADC's maximum input voltage. Signal conditioning transforms the sensor output into a clean, properly scaled voltage that the ADC can digitise accurately.

Sensor Output Types

Understanding the sensor's output type is the first step in designing the signal conditioning chain:

Output typeExample sensorsSignal conditioning needed
ResistiveNTC thermistor, PT100/RTD, strain gaugeExcitation source + voltage divider or bridge circuit
Ratiometric voltagePotentiometer position sensor, MEMS pressure sensorPossibly gain/offset; referenced to supply so ratio is naturally ADC-compatible
Absolute voltageHall effect sensor, piezoelectricGain and offset to match ADC range; possibly differential buffer
Differential voltageThermocouple, load cell bridgeInstrumentation amplifier (high CMRR)
Current (4-20 mA)Industrial pressure, flow, level transmittersShunt resistor to convert current to voltage
Digital (I2C/SPI)DS18B20, MPU-6050, MCP9808No analog signal conditioning — interface is digital

Sensors with digital output (covered in how to interface a digital temperature sensor and accelerometer and IMU) require no analog signal conditioning — the signal processing is handled in the sensor IC itself.


Stage 1: Gain (Amplification)

Sensors often produce signals much smaller than the ADC's full-scale input range. An op-amp gain stage scales the signal up.

Non-inverting amplifier (for positive signals):

         Rf
Vin ──┤ +  ├──── Vout = Vin × (1 + Rf/Rin)
     │ OA  │
     │  −  │
     Rin   │
     GND   ─── Feedback

Gain = 1 + Rf/Rin (always ≥ 1, non-inverting, input impedance = op-amp input impedance which is typically > 1 MΩ for FET input types).

Example: A pressure sensor outputs 0–50 mV for 0–100 kPa. ADC input range = 0–3.3 V. Required gain = 3.3 V / 0.050 V = 66 V/V.

Non-inverting amplifier: Gain = 1 + Rf/Rin = 66. Choose Rin = 1 kΩ, Rf = 65 kΩ (use 66.5 kΩ from E96 series for closest match). Actual gain = 1 + 66.5/1 = 67.5 (2.3% high — acceptable, calibrate out in firmware).

For the relationship between gain and bandwidth, see what is an op-amp? — the gain-bandwidth product limits how much gain is achievable at a given signal frequency.

For differential sensors, use an instrumentation amplifier in place of a simple non-inverting amplifier.


Stage 2: Offset Shifting

Many sensors do not have a zero output at zero stimulus, or the amplified signal's minimum value may not be 0 V. An offset circuit shifts the output range.

Summing amplifier for offset shift:

Vsensor ──── Rin1 ──┐
                    │ Rf
Voffset ──── Rin2 ──┤ ──── OA −  ──── Vout = −(Vsensor × Rf/Rin1 + Voffset × Rf/Rin2)
                    │
                    GND

The offset voltage Voffset can come from a voltage divider on the supply, a precision voltage reference IC, or a DAC output.

Practical alternative: Use Texas Instruments' free "Single-Supply Op Amp Design Tool" (SLOA097) to automatically calculate resistor values for any gain and offset combination with a single op-amp stage.

Example (4-20 mA current loop to 0–3.3 V):

A 4-20 mA loop with a 250 Ω shunt produces 1.0–5.0 V. To map this to 0–3.3 V:

  • Required gain = 3.3/(5.0−1.0) = 0.825 (attenuation)
  • Required offset shift = −0.825 × 1.0 V = −0.825 V at the output

A single op-amp stage with: inverting gain = −0.825, then invert (or use a two-stage design) will produce the correct result. Alternatively, use a resistor voltage divider (R1 = 15 kΩ, R2 = 100 kΩ) to bring 5.0 V down to ~3.3 V and the 1.0 V minimum down to ~0.65 V, then use a comparator-style clamping for the 0–3.3 V full-scale mapping.


Stage 3: Anti-Aliasing Filter

Before the conditioned signal reaches the ADC, a low-pass filter removes frequency content above the Nyquist frequency (half the sample rate) to prevent aliasing. This is not optional — without it, high-frequency noise folds back into the measurement band and corrupts every sample.

First-order passive RC filter:

Vin ──── R ────┬──── Vout (to ADC)
               │
               C
               │
              GND

Cutoff frequency: fc = 1 / (2π × R × C)

This is the simplest anti-aliasing filter and is adequate for slow sampling rates (< 1 kHz). The RC network has 1 pole → −20 dB/decade rolloff beyond fc. For a 100 Hz sample rate with fc = 20 Hz: the filter attenuates the Nyquist frequency (50 Hz) by 20 × log10(50/20) = 8 dB — not enough for a 12-bit ADC. To achieve adequate attenuation (> 72 dB at Nyquist), use a higher-order filter.

Second-order active Sallen-Key low-pass filter:

A two-pole (−40 dB/decade) Sallen-Key filter provides much better attenuation. For detailed filter design including component selection and Butterworth vs Bessel approximations, see how to design active filters.

Practical rule for RC filter sizing:

For a 12-bit ADC sampled at fs:

  • Set first-order RC filter cutoff at fc = fs/5 (adequate for simple monitoring)
  • Use a second-order Sallen-Key at fc = fs/3 for better transition band if noise is a concern

For a 1 kHz sample rate, fc = 200–333 Hz. R = 10 kΩ, C = 47 nF → fc = 338 Hz. Adjust component values to target.

ADC source impedance constraint: The RC filter's output impedance at the ADC input is R (at low frequency). For SAR ADCs (typical in MCUs), the input must settle to < 0.5 LSB within the acquisition time. If R is too large (> 5–10 kΩ for a fast SAR), the RC charging time is too slow. Use a buffer op-amp (unity-gain follower) after the filter to drive the ADC input from a low-impedance source. See what is an ADC? for SAR ADC acquisition time details.


Stage 4: Input Protection

The ADC's input pins can be damaged if the voltage at the pin exceeds the supply voltage (Vdd) or goes below GND. This can happen from:

  • Sensor powering on before the MCU
  • Cable disconnection with the sensor held high
  • Inductive transients from long sensor cables

Clamping diodes: Most MCUs have internal protection diodes from every I/O and ADC pin to Vdd and GND. These clamp inputs to approximately Vdd + 0.3 V and GND − 0.3 V. However, they can only absorb a few milliamps before damage — they are not designed to handle sustained out-of-range voltages.

Series resistor for protection: Adding a 1–10 kΩ series resistor at the ADC input limits the current through the internal clamping diodes: I = (Voverrange − Vdd) / R_series. With R = 10 kΩ and a 5 V sensor connected to a 3.3 V ADC pin: I = (5 − 3.3) / 10,000 = 170 µA — safe for most MCU internal diodes (typically rated 10 mA continuous).

External TVS or clamping diodes: For interfaces exposed to ESD or large transients (external connectors, sensors on long cables), add dedicated TVS diodes or BAT54 Schottky diode clamps to limit peak voltage at the ADC input. Place these as close as possible to the PCB connector where the cable attaches.


Stage 5: Calibration

Even with a well-designed signal conditioning circuit, manufacturing tolerances in resistors, op-amps, and sensor elements introduce gain and offset errors. Two-point calibration corrects these:

  1. Apply a known low stimulus (e.g. 0°C for a temperature sensor) and record the ADC output: ADC_low
  2. Apply a known high stimulus (e.g. 100°C) and record: ADC_high
  3. Compute calibration coefficients:
    • Gain correction: k = (Stim_high − Stim_low) / (ADC_high − ADC_low)
    • Offset correction: b = Stim_low − k × ADC_low
  4. At runtime: Measurement = k × ADC_reading + b

Store k and b in MCU flash or EEPROM. For the highest accuracy, perform this calibration at the operating temperature (not just room temperature), since op-amp offset and resistor values drift with temperature.

For a complete sensor product development engagement including signal conditioning circuit design, PCB layout, and calibration firmware, Zeus Design's engineering team supports all stages from sensor selection through to production.

Design Considerations

  • Choose rail-to-rail op-amps for single-supply designs: When the signal conditioning circuit runs from a single 3.3 V supply and the sensor signal may be close to 0 V or 3.3 V, the op-amp must swing its output all the way to the supply rails. Standard op-amps (LM741, TL071) cannot swing within 1–2 V of the supply rail on a single supply. Use a rail-to-rail output op-amp (OPA314, MCP6001, LMV321) to maintain linearity across the full ADC input range.
  • Buffer the voltage reference: If the signal conditioning circuit uses the MCU's AVCC or an on-chip voltage reference as an excitation source for the sensor (e.g. thermistor voltage divider), decoupling AVCC adequately is critical. Switching regulator noise on AVCC appears directly as ratiometric error in the measurement. Add a ferrite bead + 100 nF + 10 µF between the main supply and the sensor excitation line, or use a dedicated voltage reference IC.
  • Limit the gain bandwidth product requirement: A non-inverting op-amp with gain 100 at signal frequencies up to 1 kHz needs a GBW of at least 100 kHz. Most general-purpose op-amps (OPA2134, TL072, MCP6002) have GBW of 1–10 MHz, far exceeding this. The GBW constraint becomes relevant only at high gains (> 100 V/V) combined with high signal frequencies (> 10 kHz) — rare in sensor measurement applications.

Common Mistakes

  • Placing the anti-aliasing filter after the ADC: Some designs omit the anti-aliasing filter and apply a digital filter (FIR or IIR) in firmware. A digital filter can remove noise that is already within the measurement band, but it cannot undo aliasing — once a 60 Hz signal has been aliased down to 5 Hz by a 65 Hz sample rate, no digital filter can distinguish it from a real 5 Hz signal. The anti-aliasing filter must always be analog, before the ADC.
  • Ignoring the op-amp's output current limitation: Op-amps are not power devices — a general-purpose op-amp sources only 10–40 mA. If the signal conditioning output drives a low-impedance load (< 1 kΩ), the op-amp may enter current limiting and distort the output. Check the datasheet for short-circuit current and design the load impedance (including the ADC input network) to stay well within limits.
  • Forgetting that the RC filter forms a loaded voltage divider: The series resistor R in the ADC input RC filter forms a voltage divider with the ADC's internal sampling capacitor. If R = 10 kΩ and the ADC's input capacitance is 20 pF, the time constant for the ADC to settle to < 0.5 LSB at 12 bits is τ = R × C × ln(2^13) ≈ 10,000 × 20×10⁻¹² × 9.01 ≈ 1.8 µs. If the ADC acquisition time is only 1 µs, the reading will be settled less than the required 0.5 LSB — increase acquisition time in the MCU ADC configuration or reduce R.

Frequently Asked Questions

What is a 4-20 mA current loop and how do I interface it to a microcontroller?
A 4-20 mA current loop is an industrial sensor interface standard where the sensor transmits its measurement as a current signal: 4 mA represents the minimum measured value (0%) and 20 mA represents the maximum (100%). The current loop is immune to voltage drops over long cable runs (unlike voltage signals), making it suitable for sensors hundreds of metres from the controller. To interface a 4-20 mA sensor to a microcontroller ADC: place a precision shunt resistor (typically 250 Ω) between the loop and ground. The current creates a voltage: at 4 mA, V = 4 mA × 250 Ω = 1.0 V; at 20 mA, V = 20 mA × 250 Ω = 5.0 V. For a 3.3 V ADC, use a 165 Ω shunt (4 mA → 0.66 V, 20 mA → 3.3 V) or use a 250 Ω shunt and a voltage divider/op-amp attenuator to scale 1–5 V to 0–3.3 V. An alternative is to use a dedicated 4-20 mA receiver IC (e.g. INA105, RCV420) that converts the loop current to a 0–5 V output directly.
When do I need an instrumentation amplifier versus a regular op-amp for a sensor?
Use an instrumentation amplifier when the sensor produces a differential output (a small voltage across two signal lines, both of which may be at an elevated common-mode voltage) and CMRR matters. Examples: Wheatstone bridge strain gauge (differential output of tens of mV riding on Vexcitation/2 ≈ 1.5–2.5 V common mode), thermocouple amplification at high common-mode voltage, INA219 shunt sensing. A regular op-amp in inverting or non-inverting configuration has one signal input and one reference input — it cannot reject a high common-mode voltage cleanly. An instrumentation amplifier like the INA128 or AD8221 uses a three-op-amp topology with high input impedance on both differential inputs and high CMRR (80–100 dB) regardless of gain. For single-ended sensors (one signal line + ground), a standard non-inverting op-amp amplifier is appropriate and simpler.
What is the relationship between anti-aliasing filter cutoff frequency and ADC sample rate?
By the Nyquist theorem, any frequency component above half the sample rate (the Nyquist frequency, fs/2) cannot be reconstructed and aliases — it folds back into the measurement band as a false lower-frequency signal. An anti-aliasing low-pass filter must attenuate all energy above fs/2 to the level of the ADC's noise floor. For a 12-bit ADC sampled at 1 kHz (Nyquist = 500 Hz), any signal content above 500 Hz must be attenuated to below 1/4096 of full scale (about 74 dB) before reaching the ADC. In practice, a simpler rule: set the anti-aliasing filter cutoff at approximately 1/3 to 1/5 of the sample rate. This provides a transition band for the filter to roll off to adequate attenuation before the Nyquist frequency. For an ADC sampled at 100 Hz (typical for a slow temperature or pressure loop), set the anti-aliasing filter at 20–33 Hz.

References

Related Questions

Related Forum Discussions