Introduction to Analog and Digital Sensors
Ahmet Onat 2019
- nat@sabanciuniv.edu
Introduction to Analog and Digital Sensors Ahmet Onat 2019 - - PowerPoint PPT Presentation
Introduction to Analog and Digital Sensors Ahmet Onat 2019 onat@sabanciuniv.edu Layout of the Lecture Analog interfacing to sensors: Signal conditioning Sampling and quantization Bridge circuits and instrumentation amplifiers
Analog interfacing to sensors:
Signal conditioning Sampling and quantization Bridge circuits and instrumentation amplifiers Linearization
Digital interfacing to sensors
Properties Communication
Sensor reading equal to the measured quantity Suitable:
accuracy, precision, range, sensitivity → gain resolution, etc.
Low noise Linearity
Accuracy:
Precision:
Range:
Sensitivity: For a given change in input, the
Resolution: Smallest amount of measurable change Repeatability: Under the same conditions,
How are accuracy and precision related? Inaccurate but precise?
Metal ruler on a hot day: Same precision bad accuracy
Generally high sensitivity sounds good. However, high sensitivity restricts range. Deliberately→nonlinear sensor can be used. 1mV precision;
8bit: 256mV range 12bit: 4,096mV
Physics Electronics Information →Pysics will not be treated.
Low power electrical signal → Wide frequency bandwidth
Aliasing during sampling
Offset voltage
Prevents use of full quantizer range
Voltage source with impedance OR
Extract largest amount of power from signal or, Draw the least amount of current. Matched impedance circuit Low noise High gain
Draw the least amount of current:
Susceptibility to ESD increases.
17Ω
The information content is confined to
Amplification will not allow
Difference amplifier. V
f
“A bandlimited function can be completely determined by
It is necessary to limit the bandwidth of the signal for:
Sampling Noise suppression
Filter characteristic:
Passband ripple must be
Bandwidth limit frequency
What order filter?
Signal is amplified to the
Simple non-inverting amplifier circuit. Ideal gain (A≈∞): Actual gain: Error for A=50,000, R1=1kΩ, R2=9kΩ, Vi=0.500V: For 5V, 12bit:
Ideal sampling requires
zero duration and infinite currents.
Actual sampling uses a transistor… The body resistance of the transistor
Time constant of a 1st order RC filter: Must continue sampling for at least
Microprocessors allow adjustment of the charging period. Higher precision ADC requires longer charge times:
It is not possible to exceed for sampling.
How to sample several signals at the same instant: Several ADC can be used. More commonly, synchronous
In specialized applications
Fourier transform of a time signal: When a signal is sampled by fs, its frequency spectrum
−∞ ∞
−2π f tdt
k =−∞ ∞
X ( ƒ) ƒ B −B
Source of figures: Wikipedia.org
However, if low sampling frequency is used: There are overlaps:
Original signal is lost.
Source of figures: Wikipedia.org
k =−∞ ∞
Analog to digital conversion (ADC) is a search operation. Precision is limited to finite value, Information about input is lost. Time consuming OR complex operation.
N V in
N
Ideal, normalized, 3 bit quantizer.
Source of figures: D.H. Sheingold, Analog Digital Conversion Handbook, 1986
Vin is unknown→ Quantization can be modeled as additive noise.
Vin is not known→ Quantization can be modeled as additive noise.
Gain not unity: Does not start from zero: Step change voltages are not uniform: Each can be corrected in software
Source of figures: D.H. Sheingold, Analog Digital Conversion Handbook, 1986
The output of an ADC contains noise.
How many of the bits are above noise threshold? Experimentally measure the SNR of the ADC: SNRM The ADC precision is efgectively: ENOB.
Low latency High
Bad linearity
Higher latency. Low complexity. Good linearity.
Source of figures: D.H. Sheingold, Analog Digital Conversion Handbook, 1986
The final stage is digital signal processing.
Higher precision than available in quantizer is possible:
Signal is sampled at much higher rate than Shannon. After ADC, DSP low pass filter is applied. Low order anti-aliasing filter is sufficient. Increase in precision is obtained due to averaging.
Sampling rate is much higher than required by Shannon
Quantization noise power is constant, regardless of
Signal spectrum
Signal occupies less
Downsampling by OSR brings the signal
Oversampling increases the ADC precision. OSR= →w
For 4 bit increase: OSR= =256 times oversampling. 44.1KSPS → 11.3MSPS: too much! Oversampling can be augmented with noise shaping
4
Quantization noise is injected during ADC. The feedback system causes the
low at low frequencies. Higher at high frequencies.
The feedback loop has different gains for
quantization noise and Signal.
Quantization noise is
For 4 bit increase: OSR=8 is sufficient
Changes in Vref have the same effect as changing the
Vref must be stable against:
Temperature Manufacturing tolerances
N V in
N
LM336A-2.5: 2.5V reference diode. 2.44 ~ 2.54V at 25o. 8 bit ADC, Vin=1V: How to calibrate?
Microprocessor with daughterboard
GND shared between
Daughterboard electronics Sensor voltage
Connection cables have 1Ω resistance. Daughterboard draws 50mA current. ADC reads 20% more: 300mV
Connection cables have 1Ω resistance. Daughterboard draws 50mA current. Ground of the sensor is separated. Single ground distribution point.
Electrical component values may change in response to a
Change is small; 0.1% or less. Straightforward measurement of value:
May have large offset error. May depend on other variables (temperature etc.) Require high precision.
Balanced bridge circuits. Output voltage derived from
No bias. → Large gain can be used.
Bridge may consist of 1, 2, 4 elements. More elements → better sensitivity. Vo depends on Vb → Stable supply. Measurement load must be zero.
Strain gage measures bending strain. R1 and R2 change in opposite directions. Stretch measurement eliminated.
V BRIDGE UNBALANCED (-) (+) R R#1 R#2 R STRAIN GAGE #1 STRAIN GAGE #2 FORCE
+
Instrumentation amplifier is used. High input impedance High CMRR Gain is set by external resistor R
Many good chips exist
The sensor output is generally not:
Linear Calibrated
Determine inverse function to obtain
Calibrate the sensor to
Sensor linear offset and gain correction Calibration measurements: Calculate constants: During runtime: Periodic calibrations may be needed:
Extreme nonlinearities. Wasteful of memory:
If multiple sensors must be fused,
In a certain range of readings,
Smaller memory footprint More run-time computation Worse error
With several sensors, curve fitting can be performed. Coefficients:
Calculated before shipment By operator, using calibrated measurement samples Automatic, periodic calibrations
2+c22a2 2+c23 a1a2+...
MP5611 barometric pressure sensor.
Accurate to 1ft of absolute altitude. 24bit ADC: Δ≈3.3V/17,000,000 (Δ≈200nV) Discrete implementation requires expensive
High precision applications require
Many modern sensors are offered integrated:
Sensor + Signal conditioning + Power management + Subsystem control packages
User connects the sensor over
No need to know electronics, simplified connection Calibration, quality control and EMC: Responsibility of others Communication interface simplified through libraries Abstraction of design concepts Cost (?)
SW selectable:
Sensitivity Sampling rate
Power down modes
asdf
Sensor configuration, Communication speed etc.
bus =I2C(scl=Pin(4),sda=Pin(5),f=10000) bmp180 =BMP180(bus) write(bmp180_addr, reg1, 0xd5) read (bmp180_addr, reg3) i2c_generate_start() i2c_set direction_write() i2c_write_addr(bmp180_addr) ...etc.
Master-slave. Slave selection by address Synchronous 2 lines:
Bidirectional data: SDA Master generated clock: SCL
Master-slave. Slave selection by wiring. Synchronous 4 lines:
Uni-directional data: MISO, MOSI Master generated clock: SCLK Master generated slave select: SS
Point to point Asynchronous 2 lines:
Transmit data: Tx Receive data: Rx
Master-slave. Slave selection by address Asynchronous 2 lines:
Bidirectional data: D+, D-
Sabanci University, Istanbul, Turkey Mail: onat@sabanciuniv.edu Web: http://people.sabanciuniv.edu/onat
I am carrying out projects in
See:
Enthusiastic students are welcome to help!
Vertical linear motor design Project funded by
2007-2013 450kg payload, 1000m length Prototype, patents, publications Magnetic, electronic,
A passive optical device That can create
Haptic feedback for
Modeling of underwarter autonomous vehicles (IoT)
A novel method for control over networks
with unpredictable delay & data loss
Stability analysis, simulation & prototype Tolerant of large amounts of delay Also wireless Ethernet application Publications & prototype control systems
NETWORK
Plant Controller Node Actuator Node Sensor Node Plant