Sensors and Signal Conditioning

Thermistors, RTDs, thermocouples, strain gauges and load cells, photodiodes, 4-20 mA loops: how each works and how to amplify, filter and read it.

The measurement chain

A sensor turns a physical quantity (temperature, force, light, position) into an electrical one, usually a small, non-linear or noisy voltage, current or resistance. Signal conditioning turns that into something a microcontroller or a PLC can read accurately: it excites the sensor, amplifies and filters the signal, scales it to the ADC range, and converts and linearizes it in software. Every stage adds error, so work through the chain in order and put the effort where the biggest error is.

StageWhat it doesTypical parts
1. SensorConverts the quantity to a resistance, voltage or currentNTC, RTD, thermocouple, strain gauge, photodiode
2. ExcitationSupplies a current or voltage the sensor needsDivider, constant current source, bridge supply
3. AmplificationBrings millivolts up to the ADC rangeOp-amp, instrumentation amplifier
4. FilteringRemoves noise and aliasingRC low-pass, active filter (see Capacitors)
5. ConversionTurns the voltage into a numberADC (see Microcontroller Electronics)
6. SoftwareScales, linearizes, calibrates and averagesBeta equation, lookup table, polynomial, offset and gain

Sensor types at a glance

QuantitySensorOutputConditioningTypical accuracy
TemperatureNTC thermistorResistance, 33 kΩ to 0.7 kΩ (10 kΩ NTC, 0–100 °C)Divider and ADC; beta equation0.5–2 °C
TemperatureRTD (Pt100, Pt1000)Resistance, 0.385 Ω/°C (Pt100)Constant current, 3- or 4-wire, amplifier0.1–0.5 °C
TemperatureThermocouple (K, J, T)41 µV/°C (K), needs cold-junction compensationThermocouple amplifier chip1–2 °C
TemperatureDigital IC (DS18B20, TMP117, LM75)I2C or 1-Wire numbersNone0.1–0.5 °C
Force, weightStrain gauge, load cell2 mV/V at full loadBridge, instrumentation amplifier or an ADC like the HX7110.05–0.5 percent
PressureBridge pressure sensor, or a 0.5–4.5 V ratiometric oneMillivolts or voltsAmplifier or direct to the ADC0.25–1 percent
LightPhotodiode, phototransistor, LDRMicroamperes or resistanceTransimpedance amplifier or dividerVaries
DistanceUltrasonic, time-of-flight (laser), IR triangulationPulse width or digitalTimer capture or I2C1–3 mm to 1 cm
Position, anglePotentiometer, Hall sensor, encoderVoltage or pulsesADC or counterVaries
CurrentShunt resistor, Hall sensorMillivolts or a voltage around mid-supplyCurrent-sense amplifier or direct0.5–2 percent
Industrial process variableAny, with a transmitter4–20 mA or 0–10 VBurden resistor or an input cardPer transmitter

Thermistors (NTC)

An NTC thermistor is a resistor whose resistance falls steeply as temperature rises. It is cheap, sensitive and fast, but strongly non-linear. The beta equation models it between two temperatures: R = R0 × eB × (1/T − 1/T0), with temperatures in kelvin, R0 the resistance at T0 (25 °C = 298.15 K) and B (often 3 380–4 000 K) from the datasheet.

NTC thermistor 10 kΩ, beta 3950: resistance and divider output on 3.3 V0 °C20 °C40 °C60 °C80 °C100 °Cresistance (33 kΩ at 0 °C, 10 kΩ at 25 °C, 3.6 kΩ at 50 °C, 0.7 kΩ at 100 °C)divider voltage (0 to 3.3 V)The response is strongly non-linear. The divider is steepest where the NTC equals the fixed resistor (25 °C here),so choose a fixed resistor equal to the NTC at the middle of your temperature range.
A 10 kΩ NTC thermistor: resistance against temperature, and the output of a divider with a 10 kΩ resistor on 3.3 V.
TemperatureNTC resistanceDivider voltage (10 kΩ to 3.3 V)12-bit ADC counts
0 °C33 621 Ω2.54 V3 157
25 °C10 000 Ω1.65 V2 048
50 °C3 588 Ω0.87 V1 082
100 °C698 Ω0.22 V267

Worked example: reading the temperature from the ADC

  • The NTC is the lower resistor of a divider with a 10 kΩ fixed resistor on 3.3 V. A 12-bit ADC reads 2500, so the voltage is 2500 ÷ 4096 × 3.3 = 2.014 V.
  • The NTC resistance is R = Rfixed × V ÷ (3.3 − V) = 10 000 × 2.014 ÷ 1.286 = 15 664 Ω.
  • Invert the beta equation: 1/T = 1/T0 + ln(R ÷ R0) ÷ B = 1 ÷ 298.15 + ln(1.566) ÷ 3950, so T = 288.4 K = 15.2 °C.
  • The sensitivity near 25 °C is about −4 percent per °C, so the 0.8 mV ADC step corresponds to roughly 0.1 °C there; at 100 °C the sensitivity is smaller and the resolution coarser.
  • Self-heating: the current heats the thermistor. In the 10 kΩ/10 kΩ divider at 25 °C each carries 3.3 V ÷ 20 kΩ = 165 µA, dissipating 0.27 mW: with a dissipation constant of 1 mW/°C that is a 0.27 °C error. Use a bigger fixed resistor or power the divider only when measuring.
  • Tolerance and beta tolerance (1 percent R, 1 percent B) limit accuracy away from 25 °C; for better, use the three-coefficient Steinhart–Hart equation, or calibrate at two points.
  • Linearizing: in software use the beta equation or a lookup table with interpolation.
  • Leads and mounting: thermistors are small and quick, which also makes them noisy and sensitive to how they are mounted (thermal paste, epoxy, probe housing).
  • PTC thermistors (resistance rises with temperature) are used as resettable fuses and heaters, not for measurement.

RTDs (Pt100 and Pt1000)

A resistance temperature detector is a platinum element whose resistance rises almost linearly with temperature. A Pt100 is 100.00 Ω at 0 °C, with a temperature coefficient of 0.00385 per °C (IEC 60751), giving about 0.385 Ω/°C; a Pt1000 is ten times that. It is accurate, stable and standardized, but the signal is a small change in a small resistance, so the wiring and the excitation matter.

Worked example: Pt100 signal and lead error

  • At 100 °C a Pt100 is 100 × (1 + 0.00385 × 100) = 138.5 Ω (the more exact IEC curve gives 138.51 Ω).
  • With a 1 mA excitation current, the voltage is 1 mA × 138.5 Ω = 138.5 mV, and a change of 1 °C changes it by only 0.385 mV: a good low-noise amplifier is needed.
  • Self-heating: I² × R = 0.139 mW. At 1 mA this is small; at 5 mA it is 25 times as much.
  • Lead resistance: in a 2-wire connection the two leads add to the reading. Leads of 2 Ω each add 4 Ω, an error of 4 ÷ 0.385 = 10.4 °C. A 3-wire connection measures a lead pair separately and cancels most of it; a 4-wire connection (separate current and sense leads) removes it entirely.
  • Use a constant current source (0.25–1 mA) or a ratiometric bridge with an ADC that uses the same reference.
  • Use an RTD interface chip (MAX31865, ADS1220, and similar) that does the excitation, 3/4-wire and conversion for you.
  • Keep it short and shielded in noisy places.

Thermocouples

A thermocouple is two different metals joined at one end. The temperature difference between the joined end (hot junction) and the open ends (cold junction) produces a small voltage, about 41 µV per °C for a type K (nickel–chromium and nickel–aluminum). It works to high temperatures (1 000 °C and more), is rugged and cheap, but the voltage is tiny and depends on the difference, so the temperature of the connection to your circuit must be measured and added: cold-junction compensation.

Worked example: the signal from a K thermocouple

  • The hot junction is at 100 °C and the cold junction (the board terminals) at 25 °C: the voltage is about 41 µV × (100 − 25) = 3.08 mV.
  • Amplified by a gain of 100 this is 0.308 V, comfortable for a 3.3 V ADC. The thermocouple’s output at 0 °C difference is zero, so the amplifier must handle both positive and negative voltages or be biased up.
  • To get the true temperature, add the cold-junction temperature (read with a thermistor, an IC sensor or a thermocouple amplifier’s built-in sensor): 25 °C + 75 °C = 100 °C. Ignoring it gives a 25 °C error.
  • The Seebeck coefficient is not constant (41 µV/°C is typical near room temperature); use the standard polynomial or tables (NIST ITS-90) for accuracy.
  • Use a thermocouple amplifier chip (MAX31855, MAX31856, AD8495): cold-junction compensation, linearization and fault detection are built in.
  • Use thermocouple wire and connectors of the right type all the way to the cold junction. A copper wire joined to the thermocouple adds new junctions and errors.
  • Grounded and ungrounded probes. A grounded tip is fast but can pick up ground noise; an ungrounded one is isolated and slower.
  • Open-circuit detection: a broken thermocouple reads an arbitrary value; amplifier chips flag it.

Strain gauges, load cells and bridges

A strain gauge is a thin metal foil that stretches with the surface it is bonded to, changing resistance by a tiny amount. Its sensitivity is the gauge factor GF (about 2): ΔR ÷ R = GF × ε, where ε is the strain. To measure such small changes it is connected in a Wheatstone bridge, which gives zero output when balanced and a small differential voltage when a gauge changes. A load cell is a metal block with gauges already bonded and wired as a bridge, rated in mV per volt of excitation at full load.

Quarter bridge with a strain gauge and an instrumentation amplifier350 Ω350 Ω350 Ωgauge+5 V excitation0 VV−V++−INAto ADCBridge output ≈ Vex × GF × ε ÷ 4 = 5 × 2 × 0.001 ÷ 4 = 2.5 mV for 1000 microstrain (GF = gauge factor, ε = strain).A balanced bridge gives 0 V; strain unbalances it by millivolts, so the amplifier needs high gain,high common-mode rejection and low noise.
A quarter bridge with one active strain gauge, followed by an instrumentation amplifier.

Worked example: a quarter-bridge strain measurement

  • A 350 Ω gauge with GF = 2 strained by 1 000 µε (0.1 percent): ΔR = 350 × 2 × 0.001 = 0.7 Ω.
  • On a 5 V bridge, the output is Vex × GF × ε ÷ 4 = 5 × 2 × 0.001 ÷ 4 = 2.5 mV.
  • Gain of 500 brings it to 1.25 V. With a 12-bit ADC on 3.3 V one step is 0.81 mV, so one step at the amplifier output corresponds to 1.61 µV at the bridge, or about 0.6 µε (microstrain).
  • A full bridge with four active gauges gives four times the output of the quarter bridge for the same strain and cancels temperature drift.
  • A 2 mV/V load cell on 5 V excitation gives 2 × 5 = 10 mV at full load; a gain of 200 brings that to 2.00 V.
  • Use an instrumentation amplifier (INA125, AD620) or a bridge ADC chip (HX711, ADS1232, NAU7802) with a high gain, high common-mode rejection and low offset drift.
  • Excitation stability matters: any change in the bridge supply changes the output. Use a ratiometric measurement (ADC reference = bridge supply) or a precision reference.
  • Temperature: gauges drift; use a half or full bridge, matched gauges on the same material, and a dummy gauge for compensation.
  • Shielded, twisted cable and a 6-wire connection (with sense lines) for long cables.
  • Zero (tare) and span: calibrate with known weights.

4–20 mA loops and 0–10 V signals

Industrial transmitters send the measurement as a 4–20 mA current (or sometimes 0–10 V). A current loop is immune to wire resistance and voltage drop, so it works over long cables, and the 4 mA “live zero” tells a broken wire (0 mA) from a zero reading. To read it with an ADC, pass it through a precision burden resistor: V = I × R.

Worked example: reading a 4–20 mA signal

  • A 250 Ω burden resistor (0.1 percent) turns 4 mA into 4 × 0.25 = 1.0 V and 20 mA into 5.0 V: a 1 to 5 V signal that a scaled ADC can read (a divider of 0.66 brings 5 V into a 3.3 V ADC).
  • At 12 mA the signal is (12 − 4) ÷ 16 = 50 percent of the span; the voltage is 3.0 V.
  • Scaled by 3.3 ÷ 5 = 0.66 with a divider, 4 mA becomes 0.66 V and 20 mA becomes 3.30 V, a span of 2.64 V. A 12-bit, 3.3 V ADC gives 3 277 counts over the 16 mA span, about 4.9 µA per count.
  • Below about 3.6 mA the transmitter is reporting a fault (NAMUR NE 43); a reading near 0 mA means a broken wire or no power.
  • Two-wire loop-powered transmitters take their power from the loop (12–30 V supply); a 250 Ω burden adds 5 V of drop at 20 mA: check the loop voltage budget.
  • Protect the input with a TVS diode and a series resistor; an input card or an isolated converter adds isolation.
  • Scale in software: engineering value = low + (mA − 4) ÷ 16 × span. See the Analog Scaling Tool and I/O Wiring and Signals.
  • HART signals ride on the same loop: see Fieldbuses and Device Networks.

Photodiodes, light sensors and ultrasonics

SensorSignalReading circuit
PhotodiodeCurrent proportional to light, nanoamperes to microamperesA transimpedance amplifier: an op-amp with a feedback resistor turns current into voltage (V = I × Rf)
PhototransistorLarger current, slower and less linearA pull-up resistor to a digital input or an ADC
Light-dependent resistor (LDR)Resistance falls with light, slowA divider into an ADC; coarse and slow
Ambient light ICs (BH1750, VEML7700)Digital lux valuesI2C; no analog design needed
Ultrasonic distance (HC-SR04)An echo pulse whose width is the time of flightTimer capture; measures a pulse in microseconds
Laser time-of-flight (VL53L1X)Digital distanceI2C

Worked examples: a photodiode and an ultrasonic echo

  • Transimpedance gain: a photodiode current of 1 µA through a feedback resistor of 1 MΩ gives 1.0E-6 × 1 000 000 = 1 V. A 10 pF feedback capacitor limits the bandwidth to 1 ÷ (2π × 1 MΩ × 10 pF) = 15.9 kHz and stabilizes the amplifier.
  • Ultrasonic distance: sound travels at about 343 m/s in air at 20 °C, and the echo pulse measures the round trip. An echo of 5.83 ms gives a distance of 343 × 0.01 ÷ 2 = 1.00 m.
  • The speed of sound changes by about 0.6 m/s per °C, so a 20 °C change shifts the reading by about 3.5 percent: compensate with a temperature sensor for accuracy.

Digital sensors

Many modern sensors contain the conditioning and the converter and speak a digital bus (I2C, SPI, 1-Wire, UART): temperature, humidity, pressure, accelerometers, gyros, magnetometers, light and color sensors. They are the easiest to use and a good first choice when accuracy and range are adequate. Check the address (I2C), the supply voltage and logic level, the update rate and the pull-up resistors (see Microcontroller Electronics). Their limits are the range, the speed and the fixed accuracy: a custom analog front end can still be better for special cases.

  • Hall-effect current sensors (ACS712, ACS758) give an output of about mid-supply plus a few tens of millivolts per ampere: with a sensitivity of 100.0 mV/A, 10 A gives 2.5 + 0.1 × 10 = 3.5 V.
  • Accelerometers and gyros need filtering and calibration of offsets; vibration and mounting dominate accuracy.
  • Humidity and gas sensors drift: recalibrate and consider warm-up time.
  • Encoders and quadrature sensors produce pulses: use a timer or interrupt and, on long cables, differential line drivers (see Sensors).

Amplifying small signals

Millivolt signals need an amplifier with low offset, low noise and, for bridges and thermocouples, a differential input. An instrumentation amplifier (three op-amps in one package) has a very high input resistance, a high common-mode rejection ratio (CMRR) and a gain set by one resistor: G = 1 + 49.4 kΩ ÷ RG for the AD620 family.

Worked example: setting an instrumentation amplifier

  • With RG = 100 Ω the gain is 1 + 49 400 ÷ 100 = 495. A 2.5 mV bridge signal becomes 1.24 V.
  • The amplifier’s offset voltage and its drift are amplified by the same gain: an offset of 50 µV becomes 24.8 mV at the output, a large error against a 1.2 V signal if not corrected: choose a low-offset part or measure and subtract the zero.
  • The output must stay inside the amplifier’s swing and the ADC range (usually 0.1–3.2 V on a 3.3 V single supply): add an offset reference if the signal is bipolar.
  • For a single supply, use a rail-to-rail part and bias the reference pin to mid-supply.
  • Common-mode rejection matters because long sensor leads pick up the same noise on both wires: a good instrumentation amplifier cancels it. Keep the two inputs balanced.
  • Chopper and zero-drift amplifiers have microvolt offsets with no drift: ideal for thermocouples and bridges.
  • Protect the inputs with series resistors and diodes where cables run outdoors or near motors.
  • Amplifier circuits are described in Op-amps and Integrated Circuits.

Filtering, noise and the ADC

  • Filter before the ADC. A low-pass with a cutoff at about a third of the sampling rate (or lower) removes noise and prevents aliasing: high-frequency noise folding into the band. A simple RC works for slow signals (see the RC Time Constant and Filter Calculator).
  • Average in software. Averaging N independent samples reduces random noise by √N.
  • Match the resolution to the need. A 12-bit ADC with 5 mV of noise is effectively a 9–10 bit ADC; more bits will not help unless the noise falls.
  • Reference and ground. Use a quiet reference, a separate analog ground return and short wires.
  • Avoid ground loops between sensor and board: use differential inputs, isolation or a floating sensor.
  • 50/60 Hz hum: an integration time of one or more full mains cycles (20 ms or 16.7 ms) averages it away; many converters offer a 50/60 Hz rejection mode.

Worked example: how much does averaging help?

A reading has random noise of 5.0 mV (rms). Averaging 64 samples reduces it to 5.0 ÷ √64 = 0.63 mV, a factor of 8. Each factor of four in the number of samples gives about one extra bit of resolution, provided the noise is random and the signal does not change while you average: slow sensors such as thermistors are good candidates, fast ones are not.

Calibration

MethodWhat it correctsHow
One-point (offset)A constant errorMeasure at one known value (for example an ice bath at 0 °C); subtract the error
Two-point (offset and gain)Offset and slopeMeasure at two known values (0 °C and 100 °C); compute value = gain × reading + offset
Multi-point or polynomialNon-linearitySeveral points; fit a curve or a lookup table
Ratiometric measurementSupply and reference variationsUse the same reference for the sensor and the ADC
Zero (tare) at power-upDrift and mounting offsetsRead with no load and store the offset

Calibrate against a reference better than the accuracy you want: an ice and boiling water bath for temperature (check the boiling point against your altitude), certified weights for force, a precision voltage source or multimeter for voltages. Store the constants in non-volatile memory and note the date.

Common faults

SymptomLikely causeTry
Temperature reads far too high or lowWrong resistor value, beta or divider orientation; NTC and fixed resistor swappedCheck the divider wiring and the beta equation with a known resistor in place of the sensor
Reading jumps aroundNoise, no filter, a floating input, a poor groundAdd an RC filter, average, check the shield and routing
Reading driftsSelf-heating, supply or reference drift, temperature of the amplifierReduce the excitation, use a reference, warm up, use a zero-drift amplifier
Thermocouple reads room temperature or an offsetNo cold-junction compensation, the wrong thermocouple type, extension wire not matchedUse a thermocouple amplifier; check the type and the wire
RTD reads highLead resistance in a 2-wire connectionUse 3- or 4-wire; subtract the lead resistance
Load cell reads wrong or driftsExcitation not stable, a mechanical load path error, temperature, a damaged cableCheck the supply, the mounting and the zero; apply known weights
4–20 mA reads zero or off-scaleBroken loop, wrong burden, no loop power, wrong polarityBreak the loop and measure the current with a meter; check the supply
Signal saturates the amplifierGain too high, offset not removed, supply too lowLower the gain, add offset correction, check the rails
Digital sensor not foundWrong I2C address, missing pull-ups, wrong voltage levelScan the bus; check pull-ups and the supply
Mains hum on the readingGround loop or poor shieldingDifferential input, shielded twisted pair, a 50/60 Hz notch or averaging over a mains cycle

Related

FAQ

Which temperature sensor should I choose?

A digital IC (DS18B20, TMP117) is easiest for −50 to 125 °C. An NTC thermistor is cheap and sensitive over a narrow range. A Pt100 or Pt1000 is accurate and stable. A thermocouple covers very high temperatures and rugged probes. Match the range, accuracy, cost and size.

Do I need an instrumentation amplifier?

For millivolt signals from bridges, thermocouples and long cables, yes (or a dedicated converter chip). For a thermistor in a divider or a 0–10 V signal, a plain divider and the ADC are enough.

Why is my 12-bit ADC only accurate to a few counts?

Noise, reference error and source impedance reduce the usable resolution. Filter, average, use a good reference and a buffer, and calibrate.

How do I read a thermistor without self-heating it?

Use a larger fixed resistor, apply the voltage only while measuring, and use a small excitation current (below the datasheet’s limit for a 0.1 °C error).

What is ratiometric measurement?

The sensor’s output is proportional to its supply, and the ADC uses the same supply as its reference, so the supply variations cancel. Many bridge and potentiometer sensors are designed for it.

References

  • IEC 60751, Industrial platinum resistance thermometers and platinum temperature sensors; ASTM E1137.
  • NIST, ITS-90 Thermocouple Database (reference functions and tables).
  • Vishay and TDK NTC thermistor datasheets (beta values and tolerances); Maxim, Thermocouple and RTD measurement application notes.
  • Texas Instruments and Analog Devices application notes on bridge sensors, instrumentation amplifiers and transimpedance amplifiers.
  • Horowitz, P. and Hill, W., The Art of Electronics, 3rd ed., Cambridge University Press: chapters on op-amps and precision circuits.

Last reviewed: October 2026. Values are typical: check the datasheets of the parts you use.