EN1803 Sensors
EN1803 Sensors
Samiru Gayan
Department of Electronic and Telecommunication Engineering
University of Moratuwa
Semester 3, 2022
1 / 47
You will learn
Learning Objectives
• Describe and define performance criteria for sensors (e.g. linearity, sensitivity, resolution,
noise)
• Explain the operation of some of the common internet of things (IoT) transducers and
sensors (strain gage, accelerometer, gyros, temperature, pressure sensors )
• Interpret a specification sheet and extrapolate missing performance data
2 / 47
Introduction
3 / 47
What is a Sensor?
4 / 47
Generic Sensing Application
Sensor
Sensor Probe
Sensor Body Interface Data
Electronics Acquisition
Environment
5 / 47
Sensor as a Transducer
• Transducer: Any device by which variations in one physical quantity (e.g. pressure,
brightness) are quantitatively converted into variations in another (e.g. voltage, position)
OR
6 / 47
Models of Sensors and Actuators
• Many sensors can be approximately modeled by an affine function.
• Let the physical quantity at time t be x (t) and the sensor output at time t be f (x (t)),
where f : R → R is a function.
• The function f is linear if there exists a proportionality constant a ∈ R such that for all
x (t) ∈ R
f (x (t)) = ax (t)
.
• The function f is an affine function if there exists a proportionality constant a ∈ R and a
bias b ∈ R such that
f (x (t)) = ax (t) + b
.
• Every linear function is an affine function (with b = 0), but not vice versa.
7 / 47
Models of Sensors and Actuators
8 / 47
The Ideal Sensor
Sensor
Sensor output
Sensor Probe
Sensor Body Sensitivity
Environment
Measurand
Figure: The ideal sensor
9 / 47
Non-ideal Sensors
Sensor
Sensor output
Sensor Probe
Sensor Body
Environment
Measurand
Figure: Non-ideal sensor
10 / 47
Sensor Terminology
11 / 47
Range / Span
• The range of a sensor is the set of values of a physical quantity that it can measure.
• Outside that range, an affine function model is no longer valid.
• Physical quantities outside this range will typically saturate, meaning that they yield a
maximum or a minimum reading outside their range.
• The sensor model can be modified as
aL + b x (t) < L
f (x (t)) = ax (t) + b L ≤ x (t) ≤ H
aH + b x (t) > H
where L, H ∈ R, L < H are the low and high end of the sensor range, respectively.
12 / 47
Range / Span
Sensor output
Linear Saturation
Measurand
Figure: Range of a sensor
13 / 47
Range / Span
• A relation between a physical quantity x (t) and a measurement f (x (t)) is not an affine
relation (it is, however, piecewise affine).
Sensor output
Slope 1
Slope A
Slope B
Measurand
• This is a simple form of nonlinearity that is shared by all sensors.
• The sensor is reasonably modeled by an affine function within an operating range [L, H],
but outside that operating range, its behavior is distinctly different.
14 / 47
Dynamic Range
• Digital sensors are unable to distinguish between two closely-spaced values of the physical
quantity.
• The precision p of a sensor is the smallest absolute difference between two values of a
physical quantity whose sensor readings are distinguishable.
• Then the dynamic range D of a digital sensor is given as
H −L
D= .
p
• Dynamic range is usually measured in decibels as
H −L
DdB = 20log10 .
p
15 / 47
Hysteresis
• Hysteresis is the dependence of the state of a system on its history.
• Hysteresis is the maximum difference in sensor output at a pressure when that pressure is
first approached with pressure increasing and then approached with pressure decreasing
during a full span pressure cycle. 16 / 47
Repetability
• Repeatability is defined as how constant a sensor is against itself.
• It can be used to describe the ability of a sensor to provide the same result under the
same circumstances over and over again.
• Non-Repeatability is the maximum difference in output when the same pressure is applied,
consecutively, under the same conditions and approaching from the same direction. 17 / 47
Drift
• All senors – no matter what they are made of, how expensive they are, or how accurate –
are susceptible to drift over time.
• Pressure sensor drift is a gradual degradation of the sensor and other components that
can make readings offset from the original calibrated state. 18 / 47
Specifying Non-Linearity
19 / 47
Sensor Dynamics - Step Response
20 / 47
Sensor Dynamics
21 / 47
Bandwidth
22 / 47
Overall Error (Error Band)
23 / 47
Accuracy vs. Precision
24 / 47
Resistive Sensor in a Half Bridge
Rsense
Vout = Vin
Rsense + R
25 / 47
Noise
• If we want to measure x (t) at time t, but we actually measure x ′ (t), then the noise is
the difference,
n (t) = x ′ (t) − x (t)
.
• The actual measurement is x ′ (t) = x (t) + n (t).
• It is useful to be able to characterize how much noise there is in a measurement.
• The root mean square (RMS) of noise (N) is a measure of noise power.
s Z T
1
N = lim n2 (t) dt
T →∞ 2T −T
• The signal to noise ratio (SNR), is defined in terms of RMS noise,
X
SNRdB = 20 log10
N
where X is the RMS value of the input signal x.
26 / 47
Electronic Noise Sources
• EMF - capacitive and inductive pickup
• Johnson noise
• All resistors and dissipative systems
• Thermal/Brownian random molecular interactions
p
VJ = 4kB TR
• 1/f noise (shot, flicker, Hooge)
• Semiconductor based electronics, amplifiers, instruments
• Semiconductor resistors, Hooge noise
r
αVR2
VH =
Nf
• Drift
• Accumulated offset errors
• Very low frequency fluctuations
27 / 47
Electronic Noise Sources
• Shot noise
• Associated with p-n junctions
Sn (f ) = 2qe IDC
KIDC
Sn (f ) = 2qe IDC +
f
• Amplifier noise
• Multiple factors, depends on op-amp type √
• Example: AD624 instrumentation amplifiers have less than 4 nV/ Hz voltage noise 1 kHz.
28 / 47
Resolution
• Smallest signal the transducer can resolve or produce for a particular set of operating
conditions.
• Noise has some frequency distribution
Noise Density
Resolution =
Sensitivity
Figure: Caption
29 / 47
Quantization
• A digital sensor represents a physical quantity using an n-bit number, where n is a small
integer.
• Therefore, a sensor can produce only 2n distinct measurements.
• The sensor must pick one of the 2n numbers to represent the actual physical quantity.
• This process is called quantization.
• For an ideal digital sensor, two physical quantities that differ by the precision p will be
represented by digital quantities that differ by one bit, so precision and quantization
become intertwined.
30 / 47
Quantization
H −L
p=
2n
DdB = 20log10 (2n ) ≈ 6n dB
Example:
Consider a 3-bit digital sensor that can measure a voltage between zero and one volt.
Graphically illustrate the sensor distortion function. What is the dynamic range of the sensor?
31 / 47
Sampling
• A digital sensor will sample the physical quantity at particular points in time to create a
discrete signal.
• In uniform sampling, there is a fixed time interval T between samples. T is called the
sampling interval.
• The resulting signal may be modeled as a function s : Z → R defined as follows
s (n) = f (x (nT )) ,
32 / 47
Reading a Specification Sheet
33 / 47
Reading a Spec Sheet
https://www.yumpu.com/en/document/read/36906722/
kxsc7-1050-specifications-rev-6pdf-kionix
34 / 47
Reading a Spec Sheet
35 / 47
Common Sensors
36 / 47
Measuring Tilt and Acceleration
• An accelerometer is a sensor that measures proper acceleration, which is the acceleration
of an object as observed by an observer in free fall.
• Gravitational force is indistinguishable from acceleration, and therefore an accelerometer
measures not just acceleration, but also gravitational force.
38 / 47
Measuring Tilt and Acceleration
• If the assembly is instead aligned vertically, then gravitational force will compress the
spring and displace the mass.
• An accelerometer, therefore, can measure the tilt (relative to gravity) of the fixed frame.
• Any acceleration experienced by the fixed frame will add or subtract from this
measurement.
• It can be challenging to separate these two effects, gravity and acceleration. The
combination of the two is what we call proper acceleration.
39 / 47
Measuring Position and Velocity
• If there is a non-zero bias in the measurement of acceleration, then p(t) will have an error
that grows proportionally to t 2 .
• Such an error is called drift, and it makes using an accelerometer alone to determine
position not very useful.
40 / 47
Global Positioning System (GPS)
41 / 47
Measuring Rotation
42 / 47
Picking Sensors: Example
Automotive Applications:
• What might you want to measure for each?
• What sensors might you use?
• How will you use the data?
1. Seat occupancy
2. Airbag deployment
3. Tire pressure monitoring system
4. Cruise control
43 / 47
Actuators
44 / 47
Actuators
• As with sensors, the variety of available actuators is enormous.
• We discuss two common examples, Light-Emitting Diodes (LEDs) and motor control.
LED
• Very few actuators can be driven directly from the digital I/O pins (GPIO pins) of a
microcontroller.
• One exception is LEDs, which when put in series with a resistor, can often be connected
directly to a GPIO pin.
• This provides a convenient way for an embedded system to provide a visual indication of
some activity.
Motor Control
• A motor applies a torque (angular force) to a load proportional to the current through the
motor windings.
45 / 47
References
46 / 47
The End
47 / 47