Electrical & Electronics Engineering Laboratory

Chapter 11
Sensors, Instrumentation and Data Acquisition

Bachelors Program in Electrical Engineering
Electrical & Electronics Engineering Laboratory   •   Bachelor

Sensors, Instrumentation and Data Acquisition

Introduction

Modern electrical systems rarely act on electrical quantities alone. They measure temperature, force, displacement, speed, illumination, pressure, current, and other physical variables, then convert these measurements into electrical signals suitable for display, control, protection, or digital analysis. A complete measurement system therefore includes more than a sensor: it requires excitation, signal conditioning, isolation, analogue-to-digital conversion, software, calibration, and often a digital-to-analogue output and actuator.

This chapter develops the principles and laboratory practice needed to construct computer-based measurement systems. Particular attention is given to bridges, amplifiers, filters, sampling, ADC/DAC interfaces, uncertainty, grounding, and safe operation.

Learning objectives

By the end of this chapter, a student should be able to:

  1. Explain the operating principles and practical limitations of temperature, force, position, speed, light, and current sensors.
  2. Select and interface sensors using voltage dividers, Wheatstone bridges, amplifiers, and protection circuits.
  3. Design basic signal-conditioning circuits for offset, gain, filtering, and isolation.
  4. Apply a consistent ADC model, calculate resolution and quantisation error, and choose an appropriate sampling rate.
  5. Explain DAC operation, scaling, reconstruction filtering, and actuator interfacing.
  6. Calibrate a computer-based measurement system and evaluate accuracy, repeatability, hysteresis, and uncertainty.
  7. Diagnose common wiring, grounding, aliasing, saturation, and noise problems.

1. Measurement-system architecture

A measurement chain converts a measurand (the physical quantity being measured) into useful information:

Measurement and control architecture Physicalprocess SensorsT, F, x, speed, light, I Signalconditioning ADCsampling Computer DAC Driver /actuator Control signal applied to the process
Measurement and control architecture showing sensors into signal conditioning, ADC, computer, DAC, actuator, and physical process feedback
Figure: Measurement and control architecture showing sensors into signal conditioning, ADC, computer, DAC, actuator, and physical process feedback

Figure: Corrected measurement and control architecture. Computer output passes through a DAC and driver/actuator before affecting the physical process.

The sensor may be passive, such as a resistance whose value changes with temperature, or active, such as a photodiode producing current. Signal conditioning may provide excitation, amplification, linearisation, filtering, protection, and isolation. The ADC converts the conditioned voltage into a code. Software applies calibration and computes engineering units. For control, the reverse path requires a DAC or pulse-width-modulated output, a power driver, and an actuator.

Important specifications include range, sensitivity, offset, linearity, hysteresis, repeatability, response time, bandwidth, loading, resolution, accuracy, and environmental stability.

2. Sensors and their interfaces

2.1 Temperature sensors

A resistance temperature detector (RTD), commonly platinum, has a resistance that increases approximately with temperature. Over a restricted range, a linear approximation is useful:

R(T) ≈ R₀[1 + α(T − T₀)]

Here, R(T) is resistance in ohms, R₀ is resistance at reference temperature T₀, α is the temperature coefficient in °C⁻¹, and T is temperature in °C. The approximation is not adequate over all temperature ranges; the standard RTD polynomial should be used when higher accuracy is required. Lead resistance is important, so three-wire or four-wire connections are preferred.

A thermistor is a temperature-sensitive resistor with strong, nonlinear behaviour. A common model is

R(T) = R₀ exp[β(1/T − 1/T₀)]

where T and T₀ are absolute temperatures in kelvin and β is in kelvin. A thermistor can be read in a voltage divider, but self-heating and nonlinear calibration must be considered.

A thermocouple generates a small voltage related to the temperature difference between its measuring and reference junctions. It requires low-noise amplification, cold-junction compensation, and careful attention to thermoelectric junctions.

2.2 Force and strain

A strain gauge changes resistance when stretched. In a quarter-bridge with one active arm and small strain ε, the bridge output is approximately

Vₒ/Vₑ ≈ (GF ε)/4

where Vₒ is differential output, Vₑ is bridge excitation, and GF is the gauge factor. This is a small signal, so an instrumentation amplifier with high common-mode rejection is normally used. A full bridge improves sensitivity and can compensate for some temperature effects.

For a Wheatstone bridge with arms R₁, R₂, R₃, and R₄, supplied by Vₑ, the open-circuit differential output is

Vₒ = Vₑ[R₂/(R₁ + R₂) − R₄/(R₃ + R₄)]

The sign depends on which bridge node is designated positive. At balance, the two ratios are equal and Vₒ = 0. The equation assumes negligible loading by the amplifier input.

Load cells usually contain four strain gauges in a full bridge and are specified in mV/V. A 2 mV/V load cell excited at 5 V produces 10 mV at rated load, requiring low-noise amplification.

2.3 Position and displacement

A potentiometric sensor provides a voltage proportional to shaft or slider position, provided the load connected to it is sufficiently high. A linear potentiometer of total resistance R supplied by Vₑ gives approximately

Vₒ ≈ Vₑ x/L

where x is displacement and L is total travel. Contact wear, loading, and dead zones limit accuracy.

Linear variable differential transformers (LVDTs) provide contactless displacement measurement but require AC excitation and demodulation. Optical encoders provide digital position: incremental encoders generate pulses, whereas absolute encoders output a code representing position.

2.4 Speed sensors

For an incremental encoder producing P pulses per revolution, measured over a gate time Δt, the rotational speed in revolutions per minute is

n = 60C/(PΔt)

where C is the counted number of pulses. The formula assumes every pulse is counted once and that speed is approximately constant during the gate interval. Reciprocal period measurement can provide better resolution at low speed, but it becomes sensitive to timing jitter.

Hall-effect sensors and magnetic pickups are useful where a rotating target contains magnets or teeth. Debouncing, hysteresis, shielding, and threshold design are essential.

2.5 Light sensors

Photodiodes generate photocurrent approximately proportional to incident optical power over their operating range. A transimpedance amplifier converts current to voltage:

Vₒ = −Iₚ Rf

where Iₚ is photodiode current and R_f is feedback resistance. The sign and bandwidth depend on the circuit configuration. Phototransistors provide greater output current but generally have slower response and less linearity. Light-dependent resistors are inexpensive but slow, nonlinear, and strongly temperature-dependent.

2.6 Current sensors

A shunt resistor produces a voltage

Vₛ = I Rₛ

The power dissipated is P = I²Rₛ, so the resistor rating and thermal rise must be checked. A differential or current-sense amplifier is required when the shunt is not at ground potential. Hall-effect current sensors provide galvanic isolation and low insertion loss, but have offset, drift, and bandwidth limitations. Never connect a current sensor input directly to a circuit whose voltage exceeds its common-mode or isolation rating.

3. Bridges and signal conditioning

A practical front end usually performs several functions:

  • sensor excitation and stable reference generation;
  • differential amplification and common-mode rejection;
  • offset removal or controlled biasing;
  • low-pass or anti-alias filtering;
  • overvoltage, surge, and reverse-polarity protection;
  • galvanic isolation when hazardous or ground-referenced voltages are present.

An instrumentation amplifier is particularly suitable for bridge sensors because it offers high input impedance and adjustable gain. For a representative two-resistor gain configuration, the gain may be written as G = 1 + K/Rg, where K depends on the specific amplifier topology and internal resistor values. The manufacturer’s circuit equation must be used for the selected device rather than assuming all instrumentation amplifiers share the same resistor relationship.

If a sensor output spans Vmin to Vmax and the ADC input range is 0 to Vref, a linear conditioner can be designed as

VADC = G(Vs − Vmin)

with

G = Vref/(Vmax − Vmin)

This ideal mapping assumes the amplifier can generate the required output swing and that Vmin is accurately known. In practice, headroom, offset, tolerance, and saturation must be checked.

A first-order RC low-pass filter has cutoff frequency

fc = 1/(2πRC)

Its magnitude response is

|H(f)| = 1/√[1 + (f/fc)²]

The filter attenuates high-frequency interference but introduces phase shift and settling time. For sampled systems, an analogue anti-alias filter must be placed before the ADC.

Isolation can be achieved with isolation amplifiers, isolated ADCs, transformers for suitable AC signals, or optically/magnetically isolated digital links. Isolation is not the same as insulation alone: creepage, clearance, working voltage, transient rating, and protective earth arrangements must all be considered.

4. ADCs, sampling, and quantisation

4.1 A consistent ADC convention

Consider an ideal unipolar N-bit ADC with input range 0 ≤ Vin ≤ Vref and 2ᴺ output codes. Let q be the nominal code-bin width:

q = Vref/2ᴺ

Use the following transfer convention throughout this chapter:

Code(Vin) = 0, Vin ≤ 0
Code(Vin) = floor(2ᴺ Vin/Vref), 0 < Vin < Vref
Code(Vin) = 2ᴺ − 1, Vin ≥ Vref

The output is therefore saturated at the lowest and highest available codes. Interior code k represents the input interval kq ≤ Vin < (k + 1)q, except that the final code includes all inputs from (2ᴺ − 1)q through and above Vref. This convention makes the endpoint behaviour explicit and avoids silently combining incompatible definitions.

For an ideal ADC, the quantisation uncertainty for an unsaturated interior measurement is commonly bounded by ±q/2 if the reconstructed value is assigned to the bin centre. Quantisation is not the same as total measurement error: reference error, gain error, offset, noise, nonlinearity, and sensor error may dominate.

4.2 Sampling and aliasing

If a continuous signal contains frequency components above half the sampling frequency, they can appear as false lower-frequency components. The Nyquist frequency is fs/2, where fs is the sampling frequency. The practical rule is to limit the signal bandwidth well below fs/2 using an anti-alias filter. Sampling exactly at twice a sinusoid frequency is not a safe design because phase and filter imperfections leave no margin.

A sampled record also has finite duration. The frequency resolution of a simple discrete Fourier transform is approximately Δf = fs/M, where M is the number of samples, assuming a rectangular record and ignoring window effects. Windowing reduces spectral leakage but changes amplitude interpretation.

4.3 Worked ADC example

An 8-bit ADC has Vref = 5.00 V. The nominal bin width is

q = 5.00/256 = 0.01953125 V = 19.53125 mV.

For Vin = 2.00 V,

2⁸Vin/Vref = 256 × 2/5 = 102.4,

so Code = floor(102.4) = 102. The bin represented by code 102 begins at 102q = 1.9921875 V and ends below 103q = 2.01171875 V. Since 2.00 V lies in that interval, the result is consistent with the stated convention. At Vin = 5.00 V, the output is saturated at code 255, not 256.

5. DACs and analogue output

A DAC converts a digital code into an analogue voltage or current. In an ideal unipolar voltage DAC with N bits, reference Vref, and code D from 0 to 2ᴺ − 1, a useful endpoint-scaled model is

Vo = Vref D/(2ᴺ − 1)

This convention maps code 0 to 0 V and the maximum code to Vref. Other DAC data sheets use a binary-weighted convention with a full-scale output one LSB below Vref; the data-sheet transfer function must therefore be identified before design calculations. ADC and DAC conventions need not be identical, but each device must be modelled consistently.

Common DAC architectures include binary-weighted resistor, R–2R ladder, current-steering, and sigma-delta converters. Practical specifications include integral and differential nonlinearity, settling time, output drive, glitch impulse, reference accuracy, monotonicity, and update rate.

DAC interfacing and scaling

A computer output should not directly drive a motor, valve, heater, or solenoid. The normal chain is computer interface → DAC → voltage/current buffer → power driver → actuator. Scaling may be required. Suppose a DAC with Vref = 10 V must command a heater controller requiring 4–20 mA. If code D produces

V_D = 10D/(2ᴺ − 1),

then a linear current interface can be designed to satisfy

Icmd = 4 mA + (16 mA)(VD/10 V)

Thus D = 0 commands 4 mA and D = 2ᴺ − 1 commands 20 mA. The current loop must be powered and isolated as required by the industrial equipment; a voltage output alone is not a substitute for a compliant current transmitter.

Reconstruction filtering

A DAC output is often held constant between updates, producing a zero-order-hold waveform with steps and spectral images at multiples of the update frequency. A low-pass reconstruction filter smooths these steps. Its cutoff must pass the desired control or signal bandwidth while attenuating images. For a slowly varying actuator command, a first-order filter may be adequate; audio, precision waveform generation, or fast control may require a higher-order filter and a defined phase response.

Worked DAC example

For a 12-bit endpoint-scaled DAC with Vref = 3.3 V and D = 2048,

Vout = 3.3 × 2048/(4095) ≈ 1.6504 V.

If an actuator driver requires 0–5 V, a non-inverting gain of approximately 5/3.3 = 1.515 is required, provided the amplifier has sufficient output swing and current capability. The driver, not the DAC pin, must supply actuator current.

6. Calibration and uncertainty

Calibration establishes the relationship between indicated output and a reference quantity. A two-point linear calibration can be written

y = a x + b

where x is the raw measured value, y is the estimated engineering quantity, a is scale factor, and b is offset. With reference points (x₁, y₁) and (x₂, y₂),

a = (y₂ − y₁)/(x₂ − x₁), b = y₁ − ax₁

The reference instruments must have traceable accuracy appropriate to the intended claim. Calibration should use several points when nonlinearity is suspected. Record increasing and decreasing sequences to reveal hysteresis.

Repeatability describes spread under repeated conditions; reproducibility includes changed conditions such as operator or instrument. Resolution is the smallest displayed or digitised increment, whereas accuracy describes closeness to the reference. These terms must not be used interchangeably.

For independent standard uncertainties u₁, u₂, …, uₙ and a result formed by a sum or difference, the combined standard uncertainty is often estimated by

uc = √(u₁² + u₂² + … + uₙ²)

This root-sum-square expression assumes independence and is not valid without modification when errors are correlated. Expanded uncertainty is commonly U = ku_c, where k is a chosen coverage factor, often near 2 for approximately 95% coverage under suitable statistical assumptions.

7. Laboratory implementation and software

A robust laboratory procedure is:

  1. Define the measurand, range, required bandwidth, accuracy, and electrical safety limits.
  2. Read the sensor and interface data sheets, including excitation, common-mode range, loading, and polarity.
  3. Select gain so the largest expected signal remains below ADC full scale with margin.
  4. Add input protection and an anti-alias filter.
  5. Verify grounding and shielding before connecting the computer.
  6. Test the circuit with a known source before applying the physical measurand.
  7. Sample at a rate appropriate to the signal bandwidth and store time stamps.
  8. Apply calibration, range checks, fault detection, and units conversion in software.
  9. Compare results with an independent reference and document uncertainty.

Software should identify sensor disconnection, impossible values, ADC saturation, stale data, and communication failure. A moving-average filter reduces random noise but delays changes; an exponentially weighted filter,

y[k] = αx[k] + (1 − α)y[k − 1]

with 0 < α ≤ 1, provides adjustable smoothing but also introduces dynamic lag. Filtering must not conceal unsafe excursions in a protection system.

8. Illustrative case: computer-based load-cell weighing system

Background

A laboratory needs to measure masses up to 20 kg using a 2 mV/V load cell, a 5.00 V excitation supply, and a 12-bit ADC with a 0–3.3 V input range.

Problem

At full load the bridge output is only 10 mV. Direct connection to the ADC wastes most of its range and makes noise and offset significant.

Analysis

The required full-scale gain is approximately 3.3 V/0.010 V = 330. A gain of 300 is selected to allow headroom. The full-scale conditioned signal is then 3.00 V. A differential instrumentation amplifier is used, followed by a low-pass filter whose bandwidth is selected according to the weighing update rate. A 3.3 V precision reference is used by the ADC, and the bridge excitation is monitored because sensitivity is proportional to excitation voltage.

Approach and solution

The system uses a four-wire bridge connection, shielded twisted-pair differential sensing, an instrumentation amplifier, input protection, and an analogue low-pass filter. Calibration is performed at zero load and at certified 5 kg, 10 kg, 15 kg, and 20 kg loads. Software fits a line initially, then checks residuals for nonlinearity and hysteresis. The system rejects readings when the ADC is saturated or when the bridge excitation is outside tolerance.

Outcome

The amplified signal uses much more of the ADC range, improving effective resolution. However, the final accuracy is still limited by load-cell nonlinearity, creep, temperature drift, amplifier offset, excitation stability, and mechanical installation. A calibration certificate and uncertainty budget are necessary before the system is described as a weighing instrument.

Learning points

High gain alone does not create accuracy. Sensor excitation, mechanical design, analogue noise, calibration references, ADC range, and software validation must be treated as one measurement system.

9. Challenges, safety, and contemporary practice

Common faults include reversed bridge polarity, inadequate common-mode range, ground loops, unshielded high-impedance nodes, sensor self-heating, ADC clipping, aliasing, and incorrect units. Mains-connected current and voltage measurements require suitably rated probes, fuses, isolation, creepage, clearance, and safe laboratory procedures. Students must never assume that a computer ground is safe to connect to a power circuit.

Industrial systems increasingly use smart sensors, isolated digital interfaces, condition monitoring, and edge processing. Machine-learning methods can assist anomaly detection, but they do not replace sensor calibration, traceability, electrical safety, or a physically valid measurement model. Data governance should address time synchronisation, access control, retention, privacy where human activity is measured, and auditability of calibration changes.

Chapter Summary

Sensors convert physical variables into electrical signals, but reliable measurement requires excitation, conditioning, filtering, conversion, calibration, and uncertainty evaluation. RTDs, thermistors, thermocouples, strain bridges, encoders, photodiodes, shunts, and Hall sensors each have characteristic ranges and limitations. Wheatstone bridges and instrumentation amplifiers are central to low-level differential measurements. Sampling requires bandwidth limitation and anti-alias filtering. The ADC convention used here defines q = Vref/2ᴺ, uses floor(2ᴺVin/Vref) for interior inputs, and explicitly saturates at codes 0 and 2ᴺ − 1. DAC systems require a transfer convention, scaling, buffering, reconstruction filtering, and a power driver before an actuator can be controlled. Calibration and uncertainty determine whether a numerical reading is merely an indication or a defensible engineering measurement.

Key Terms

Sensor: Device that responds to a physical measurand.

Measurand: Quantity intended to be measured.

Signal conditioning: Amplification, filtering, protection, isolation, or conversion applied to a sensor signal.

Wheatstone bridge: Four-resistor network used to measure resistance changes differentially.

Instrumentation amplifier: High-input-impedance differential amplifier with high common-mode rejection.

Sensitivity: Change in output per unit change in input.

ADC: Analogue-to-digital converter.

DAC: Digital-to-analogue converter.

Quantisation: Mapping of a continuous amplitude to discrete digital codes.

LSB: Least significant bit; the smallest digital code increment.

Aliasing: False low-frequency representation caused by insufficient sampling.

Anti-alias filter: Analogue filter placed before an ADC.

Reconstruction filter: Filter used after a DAC to suppress update images and smooth output.

Galvanic isolation: Transfer of signal or power without a direct conductive path.

Calibration: Comparison with a reference to establish measurement relationship.

Hysteresis: Different output for the same input depending on input direction or history.

Repeatability: Agreement under repeated, unchanged conditions.

Uncertainty: Quantified doubt associated with a measurement result.

Actuator: Device that applies energy or force to a physical process.

Review Questions

Short Answer Questions

  1. Distinguish a sensor from a signal-conditioning circuit.
  2. Why is a four-wire connection useful for precision RTD measurement?
  3. State two practical causes of error in a load-cell bridge.
  4. What is the purpose of an anti-alias filter?
  5. Why must a DAC output normally be followed by a driver when controlling a motor?

Long Answer Questions

  1. Explain the complete architecture of a computer-based measurement and control system.
  2. Derive the small-strain quarter-bridge relationship and state its assumptions.
  3. Compare RTDs, thermistors, and thermocouples for laboratory temperature measurement.
  4. Explain ADC quantisation, endpoint saturation, sampling, and aliasing using equations.
  5. Describe a practical calibration and uncertainty procedure for a force measurement system.

Analytical / Application Questions

  1. A 10-bit, 0–2.5 V ADC uses the convention defined in this chapter. Determine q and the code for Vin = 1.250 V.
  2. An encoder produces 600 pulses per revolution. If 1500 pulses are counted in 0.5 s, calculate rotational speed in rpm.
  3. Design a measurement chain for a 0–20 mA current sensor connected to a 0–3.3 V ADC. Specify scaling, protection, filtering, and one calibration method.

Multiple Choice Questions with Answers

Question 1

An 8-bit ADC has Vref = 5.00 V and uses the chapter's transfer convention. What code results for Vin = 2.00 V?

A. 102

B. 103

C. 128

D. 255

Correct Answer: A. 102

Question 2

For an ideal 12-bit ADC with a 0–4.096 V input range, the nominal code-bin width is:

A. 0.1 mV

B. 1 mV

C. 4 mV

D. 12 mV

Correct Answer: B. 1 mV

Question 3

A load cell rated at 2 mV/V is excited with 5 V. Its ideal full-scale bridge output is:

A. 2 mV

B. 5 mV

C. 10 mV

D. 25 mV

Correct Answer: C. 10 mV

Question 4

An encoder produces 600 pulses per revolution. Counting 1500 pulses in 0.5 s gives a speed of:

A. 5 rpm

B. 300 rpm

C. 600 rpm

D. 3000 rpm

Correct Answer: D. 3000 rpm

Question 5

Which component is normally placed before an ADC to reduce aliasing?

A. Anti-alias low-pass filter

B. Power transistor

C. Reconstruction filter

D. Mechanical relay

Correct Answer: A. Anti-alias low-pass filter

Question 6

For an endpoint-scaled 12-bit DAC with Vref = 3.3 V, code D = 4095 produces:

A. 0 V

B. 1.65 V

C. 3.3 V

D. 4.095 V

Correct Answer: C. 3.3 V

Question 7

The main advantage of an instrumentation amplifier for a strain-gauge bridge is:

A. High common-mode rejection and high input impedance

B. High actuator power output

C. Frequency multiplication

D. Galvanic connection to mains

Correct Answer: A. High common-mode rejection and high input impedance

Question 8

A photodiode transimpedance amplifier primarily converts:

A. Voltage into temperature

B. Current into voltage

C. Frequency into resistance

D. Position into force

Correct Answer: B. Current into voltage

Question 9

For a first-order RC low-pass filter, increasing R while keeping C constant will:

A. Increase the cutoff frequency

B. Leave the cutoff frequency unchanged

C. Decrease the cutoff frequency

D. Make the filter a high-pass filter

Correct Answer: C. Decrease the cutoff frequency

Question 10

Which statement about a DAC-controlled actuator is correct?

A. The computer should drive a motor directly through its data port

B. A DAC and suitable power driver are normally required

C. A reconstruction filter is never useful

D. The actuator current is always equal to the DAC reference current

Correct Answer: B. A DAC and suitable power driver are normally required

Electrical & Electronics Engineering Laboratory
Chapter 11 of 15