Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Sensors

Study notes on Sensors for IoT: definitions, sensor characteristics, transduction principles, signal conditioning (Wheatstone bridge, ADC, sampling), dynamic response (first-order), worked numerical examples, common exam mistakes and quick checks.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Sensors are the primary interface between the physical world and an IoT system. An engineer uses sensors to convert a physical quantity (temperature, pressure, motion, light, gas concentration) into an electrical signal that can be conditioned, digitised and transmitted to cloud or edge systems for monitoring, control and analytics.

Key ideas

  • Sensitivity: sensitivity S is the rate of change of sensor output with respect to the measurand, defined exactly as S = d(output)/d(measurand). Units: output units per unit measurand (e.g., mV/°C). For linear sensors this is constant.
  • Range: the interval of measurand values for which the sensor is specified to operate correctly.
  • Resolution: the smallest change in measurand that causes a detectable change in the output. If a digital system uses an ADC of N bits and reference Vref, resolution (LSB) is the voltage step corresponding to one count (see Formulas).
  • Accuracy: closeness of the measured value to the true value. Often expressed as ±% of full scale or ± absolute units.
  • Precision (Repeatability): degree to which repeated measurements under unchanged conditions give the same result.
  • Linearity: the degree to which the real transfer curve follows a straight line. Linearity error is often given as maximum deviation from an ideal straight-line fit, expressed in % of full scale.
  • Hysteresis: difference in output when the measurand approaches a value from increasing direction vs decreasing direction.
  • Noise: random variations in sensor output not caused by the measurand. Characterised by RMS voltage or power spectral density.
  • Transfer function: for linear sensors (or linearised around an operating point) we model the relation between input measurand u(t) and output y(t) by a transfer function G(s) in Laplace domain. For many sensors a first-order model is adequate: G(s) = K / (τ s + 1) where K is the steady-state gain (sensitivity) and τ is the time constant (seconds).
  • Dynamic behaviour: sensors have a time response. A first-order sensor to a step input u0 has output y(t) = K·u0·(1 − e^{−t/τ}). Draw a plot: time on x-axis, output on y-axis showing exponential rise from 0 to K·u0 asymptoting with time constant τ. Label t = τ where output reaches 63.2%.
  • Wheatstone bridge: common arrangement to measure small resistance changes (strain gauges, RTDs, thermistors). Draw exactly: a diamond with four resistors R1 (top-left), R2 (top-right), R3 (bottom-left), R4 (bottom-right). Apply excitation voltage Vex between top node (+) and bottom node (−). Measure output Vout between left mid node and right mid node (define Vout = V_right − V_left so that an increase ΔR at R1 gives positive Vout). For small changes in one resistor, output is proportional to change; see derivation in Worked examples.
  • Instrumentation amplifier: used to amplify small differential voltages (bridge outputs) while rejecting common-mode voltage.
  • ADC (Analog-to-Digital Converter): converts conditioned analog voltage to digital code. Important parameters: number of bits N, input range (0..Vref or ±Vref), sampling rate fs, and quantization step (LSB).
  • Sampling theorem (Nyquist): for a band-limited signal with highest frequency fmax, perfect reconstruction requires fs ≥ 2·fmax. In practice, to avoid aliasing, choose fs > 2·fmax and use an anti-aliasing filter (low-pass) before sampling.
  • Signal conditioning: includes amplification, filtering, linearisation (for nonlinear sensors), and compensation (temperature, offset). Many IoT sensors include onboard conditioning (e.g., MEMS IMUs with internal ADC and digital interface).

Assumptions typically used in derivations below: sensors are linear or linearised around operating point; small-signal approximations (ΔR << R) when applied; noise is zero-mean and small compared to signal for SNR approximations.

Formulas

S = dV_out/dM — S is sensitivity (V per unit measurand). M = measurand in its units. Applies for linear sensors.

G(s) = K / (τ s + 1) — transfer function of a first-order sensor. K is steady-state gain (output per unit input), τ is time constant in seconds.

y(t) = K·u0·(1 - exp(-t/τ)) — step response for a first-order sensor to step input u0 applied at t=0. K in output units per input unit, t and τ in seconds.

V_out_bridge = Vex · ΔR / (4 R + 2 ΔR) — exact output of a Wheatstone bridge when R1 = R + ΔR, R2 = R, R3 = R, R4 = R, with excitation Vex. Approximation for small ΔR: V_out_bridge ≈ Vex · ΔR / (4 R) when ΔR << R.

LSB ≈ Vref / (2^N) — approximate voltage resolution per ADC count for N-bit ADC with reference Vref. (Some conventions use Vref/(2^N - 1); check ADC datasheet.)

Quantization error ≈ ± (1/2) LSB — maximum rounding error introduced by ideal uniform quantizer.

f_s ≥ 2·f_max — Nyquist condition for perfect reconstruction of a band-limited signal; in practice choose f_s > 2·f_max and use an anti-aliasing filter.

For each symbol: Vout in volts (V), Vex in volts (V), R and ΔR in ohms (Ω), K in (output units)/(input units), τ in seconds (s), N is integer bits, Vref in volts (V), fs and fmax in hertz (Hz).

Worked examples

  1. Wheatstone bridge small-change output (numerical) Problem: A strain gauge replaces R1 in a bridge. R = 120 Ω, excitation Vex = 5.00 V, the gauge resistance increases by ΔR = 0.24 Ω. Compute Vout (use small-ΔR approximation and the exact formula). Step 1 (exact formula): Vout = Vex * ΔR / (4 R + 2 ΔR) Step 2 (numbers): numerator = 5.00 V * 0.24 Ω = 1.20 V·Ω. Denominator = 4120 Ω + 20.24 Ω = 480 + 0.48 = 480.48 Ω. Step 3: Vout = 1.20 / 480.48 = 0.002498 V = 2.498 mV. Step 4 (approx): Vout ≈ Vex * ΔR / (4 R) = 5.00 * 0.24 / (4*120) = (1.20) / 480 = 0.0025 V = 2.50 mV. Answer: Vout ≈ 2.50 mV (exact: 2.498 mV). Note approximation error negligible here.

  2. First-order time response (numerical) Problem: A temperature sensor modelled as first-order has τ = 5.0 s and steady-state sensitivity K = 0.010 V/°C. Step change: temperature steps from 20 °C to 70 °C at t=0 (u0 = 50 °C step). Find sensor output at t = 5 s. Step 1: steady-state output K·u0 = 0.010 V/°C * 50 °C = 0.50 V. Step 2: use y(t) = K·u0·(1 − e^{−t/τ}). Put t = τ = 5 s: y(5) = 0.50*(1 − e^{−1}) = 0.50*(1 − 0.367879) = 0.50*(0.632121) = 0.316060 V. Answer: 0.316 V after 5.0 s (about 63.2% of final value).

  3. ADC resolution and quantization error Problem: 12-bit ADC, Vref = 3.3 V. Find LSB and maximum quantization error. Step 1: LSB ≈ Vref / 2^N = 3.3 / 4096 = 0.000805664 V = 0.8057 mV. Step 2: maximum quantization error ≈ ±(1/2) LSB = ±0.4028 mV. Answer: LSB ≈ 0.8057 mV; quantization error ≈ ±0.4028 mV.

Common mistakes

  • Ignoring the need for an anti-aliasing filter: sampling a signal with frequency content above half the sampling rate causes aliasing that cannot be corrected digitally.
  • Applying the small-ΔR bridge approximation when ΔR is not << R; check using the exact formula.
  • Forgetting units (Ω, V, s); always include units in intermediate steps in exam numericals.
  • Mixing up time constant τ and settling time; τ is time to reach 63.2% of final value, settling time (to within 2% or 5%) is several τ (≈4τ to 5τ).

For your exam

Kinds of questions: definitions (define sensitivity, resolution, hysteresis), short notes (compare thermistor vs RTD), derivations (derive Wheatstone bridge output for small ΔR), numericals (bridge output, ADC resolution, first-order response), diagram tasks (draw and label Wheatstone bridge and step response graph), and design/selection questions (choose sensor and conditioning for given measurand and constraints).

What a full-marks answer includes:

  • Precise definitions with bold terms when asked (or clear definitions in sentence form).
  • Correct labelled diagram where required: for Wheatstone bridge include 4 resistors, excitation terminals, output terminals, label R1..R4 and Vex and Vout.
  • All assumptions stated (linearisation, small-signal, ideal ADC unless stated otherwise).
  • Step-by-step derivation with algebraic simplification and units carried through for numericals.
  • Final numerical answer boxed or highlighted, with correct SI units and sensible significant figures.

Quick check

  1. Define sensitivity in one sentence.
  2. For a 10-bit ADC with Vref = 5.0 V, what is the approximate LSB?
  3. For a first-order sensor with τ = 2 s and K·u0 = 1.0 V, what fraction of final value is reached at t = 2 s?

Answers: 1) Sensitivity is the derivative of sensor output with respect to the measurand (d(output)/d(measurand)). 2) LSB ≈ 5.0 / 1024 ≈ 4.88 mV. 3) 63.2% (i.e., 0.632 of final value).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?