0% found this document useful (0 votes)
55 views

Part 4 Data Acquisition and Signal Processing

Uploaded by

abrar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Part 4 Data Acquisition and Signal Processing

Uploaded by

abrar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Part 4

Data Acquisition and Signal Processing

Dr. Mohammad Ahsan Habib


Associate Professor
Department of Mechanical and Chemical Engineering (MCE)
Room: 103, Level 1, First Academic Building
E-mail: [email protected]

Islamic University of Technology (IUT)


‫اﻟﺟﺎﻣﻌﺔ اﻹﺳﻼﻣﯾﺔ ﻟﻠﺗﻛﻧوﻟوﺟﯾﺎ‬
Université Islamique de Technologie
ORGANISATION OF ISLAMIC COOPERATION (OIC)
MCE 4407 Instrumentation and Measurements

Data Acquisition System


 The purpose of any data acquisition system is to acquire analog
signals and present them to the MCU in a form that can be
manipulated.
 The main components of any general data acquisition system
consists of the following:
1. Transducers (sensors)
2. Analog Multiplexer
3. Signal Conditioning (Amplification, Filtering, ..)
4. Sample and Hold Circuit
5. Analog to Digital Converter
6. Microcomputer System
7. Digital to Analog Converter
8. Actuator 2
© Dr. Mohammad Ahsan Habib
MCE 4407 Instrumentation and Measurements

Data Acquisition Components


 Transducers (sensors) convert variable processes such as pressure,
temperature into electrical signals such as voltage or current.
 Multiplexer (MUX) - A switching device that sequentially
connects multiple inputs or outputs in order to process several
signal channels with a single A/D or D/A converter.
 Signal conditioning:
1. Isolation & buffering: protection from dangerous voltages (i.e. interfacing
an MCU to a 110V or 220V)
2. Amplification: Need full scale signal for conversion (transducers usually
provide very small signals millivolts)
3. Bandwidth limiting: Low pass filter to limit range (noise)
 Sample and Hold: used to keep signals constant while converting
an analog signal to digital
 A/D and D/A are interfaces to the MCU to the outside world
 Actuators: interfaces to activate motors, switches, e.t.c
© Dr. Mohammad Ahsan Habib 3
MCE 4407 Instrumentation and Measurements

Signal Paths of a DAS

Humidity
Temp Real Signal
Pressure Transducer Analog
World Conditioning
…… (sensors) Mux
Measure

D/A A/D Sample and


Actuator MCU
Conv Conv Hold Circuit

© Dr. Mohammad Ahsan Habib 4


MCE 4407 Instrumentation and Measurements

Signals
 Signals are physical quantities that are functions of an
independent variable (such as time) and contain information
about a natural phenomenon
 Two types of signals may be defined; digital and analogue.
Digital signals provide information regarding
the voltage state (typically hi or low) and/or
the rate of change of these states
An analogue signal typically provides voltage
level, shape or frequency content information.

© Dr. Mohammad Ahsan Habib 5


MCE 4407 Instrumentation and Measurements

Signal types and classes


 Two types of Digital signals: (1) On-Off (2) Pulse train
 Three types of analogue: (1) DC (2) AC (3) frequency domain
 Total of 5 signal classes

ADC - analogue to digital converter, which converts the analogue signal into a
digital signal which can be read by a computer
DAC - digital to analogue converter, which converts a digital signal to an analogue
signal
TTL - transistor to transistor logic
© Dr. Mohammad Ahsan Habib 6
MCE 4407 Instrumentation and Measurements

Signal Conditioning
Transducer output is usually computer ready and must be
conditioned, either using hardware or software:

 Transducer excitation – use of an external voltage or current to


excite the transducer (ex: strain gauges)
 Linearization – creation of a linear relationship between the
transducer output and the physical phenomenon being measured
 Isolation - isolation of the transducer signal from the computer
and other transducers
 Filtering - conditioning of a signal to reduce unwanted
components (i.e., noise, high or low frequency components, etc.)
 Amplification - increase of the output signal of the transducer to
increase accuracy and signal to noise ratio
© Dr. Mohammad Ahsan Habib 7
MCE 4407 Instrumentation and Measurements

LABVIEW SCXI :Signal Conditioning


 SCXI (Signal Conditioning Xtensions for Instrumentation) is a
hardware device designed to condition low level signals in a noisy
environment within an external chassis located near the sensor.
 Some signal conditioning, such as linearization and filtering, can
often be performed using software, and LabVIEW provides several
VIs for these purposes.

Signal Grounding
 Two types of signal sources
Grounded: signals which are referenced to a system ground
ex:110V outlets, signal generators, power supplies
Floating: signals which are not connected to an absolute reference
ex: battery powered sources, thermocouples transformers

© Dr. Mohammad Ahsan Habib 8


MCE 4407 Instrumentation and Measurements

Signal Conditioning: OP-Amp


 The OP-Amp has Single Output and Two Inputs:
1. Non-inverting input [+]: output is in phase with input.
2. Inverting input [−]: output is 180o out of phase with input.
Introduction to Operational Amplifier- Characteristics of Ideal Op-Amp
https://www.youtube.com/watch?v=kiiA6WTCQn0

CMRR (Common Mode Rejection Ratio) Explained (with example)

LM 741

© Dr. Mohammad Ahsan Habib 9


MCE 4407 Instrumentation and Measurements

OP-Amp: Equivalent Circuit

© Dr. Mohammad Ahsan Habib 10


MCE 4407 Instrumentation and Measurements

Inverting Amplifier

 Applying Kirchhoff’s current law at node C and utilizing assumption 1, that no


current can flow into the inputs of the op amp, 𝒊𝒊𝒊𝒊𝒊𝒊 = −𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 ………(1)
 Also, because the two inputs are assumed to be shorted in the ideal model, C is
effectively at ground potential: 𝑽𝑽𝑪𝑪 = 𝟎𝟎
 Because the voltage across resistor R is 𝑽𝑽𝒊𝒊𝒊𝒊 − 𝑽𝑽𝑪𝑪 = 𝒊𝒊𝒊𝒊𝒊𝒊 𝑹𝑹 , from Ohm’s law,
𝑽𝑽𝒊𝒊𝒊𝒊 = 𝒊𝒊𝒊𝒊𝒊𝒊 𝑹𝑹 ………(2)
 The voltage across resistor RF is 𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 − 𝑽𝑽𝑪𝑪 = 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭 , 𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭 ………(3)
𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭
 Equating equation (1), (2) and (3) =−
𝑽𝑽𝒊𝒊𝒊𝒊 𝑹𝑹

© Dr. Mohammad Ahsan Habib 11


MCE 4407 Instrumentation and Measurements

Non-inverting Amplifier

 The voltage at node C is Vin because the inverting and non-inverting inputs are
at the same voltage. Therefore, applying Ohm’s law to resistor R,
−𝑽𝑽𝒊𝒊𝒊𝒊
𝒊𝒊𝒊𝒊𝒊𝒊 = ⇒ 𝑽𝑽𝒊𝒊𝒊𝒊 = 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹 (KCL at node C 𝒊𝒊𝒊𝒊𝒊𝒊 = −𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 )
𝑹𝑹
𝑽𝑽 −𝑽𝑽
 Applying it to resistor RF, 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 = 𝒐𝒐𝒐𝒐𝒐𝒐 𝒊𝒊𝒊𝒊 ⇒ 𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭 + 𝑽𝑽𝒊𝒊𝒊𝒊
𝑹𝑹𝑭𝑭
𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭 + 𝑽𝑽𝒊𝒊𝒊𝒊 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹𝑭𝑭 + 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹 𝑹𝑹𝑭𝑭
= = = 𝟏𝟏 +
𝑽𝑽𝒊𝒊𝒊𝒊 𝑽𝑽𝒊𝒊𝒊𝒊 𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 𝑹𝑹 𝑹𝑹

© Dr. Mohammad Ahsan Habib 12


MCE 4407 Instrumentation and Measurements

Summer

 Applying Ohm’s law to both resistors gives


𝑽𝑽𝟏𝟏 𝑽𝑽𝟐𝟐
𝒊𝒊𝟏𝟏 = 𝒂𝒂𝒂𝒂𝒂𝒂 𝒊𝒊𝟐𝟐 =
𝑹𝑹𝟏𝟏 𝑹𝑹𝟐𝟐
 From KCL
𝒊𝒊𝒐𝒐𝒐𝒐𝒐𝒐 = 𝒊𝒊𝑭𝑭 = − 𝒊𝒊𝟏𝟏 + 𝒊𝒊𝟐𝟐
 Since 𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = 𝒊𝒊𝑭𝑭 𝑹𝑹𝑭𝑭
𝑽𝑽𝟏𝟏 𝑽𝑽𝟐𝟐
𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = −𝑹𝑹𝑭𝑭 +
𝑹𝑹𝟏𝟏 𝑹𝑹𝟐𝟐

© Dr. Mohammad Ahsan Habib 13


MCE 4407 Instrumentation and Measurements

Summing Amplifier: Application

 Example: Interface circuit for an air conditioning system


when the sum of the voltages of temperature and humidity sensors goes
above 1.0 V, &
a threshold circuit in air conditioner require 5.0 V.

© Dr. Mohammad Ahsan Habib 14


MCE 4407 Instrumentation and Measurements

Buffer or Follower

Figure 1 Figure 2

 If we let RF = 0 and R = ∞ in the non-inverting op amp circuit in


Figure 1 , the resulting circuit can be represented as shown in Figure
2 . This circuit is known as a buffer or follower because Vout = Vin.
 It has a high input impedance and low output impedance. This circuit
is useful in applications where you need to couple to a voltage signal
without loading the source of the voltage.
 The high input impedance of the op amp effectively isolates the
source from the rest of the circuit.
© Dr. Mohammad Ahsan Habib 15
MCE 4407 Instrumentation and Measurements

Difference Amplifier

e-

e+

 The output voltage is given by


− +
𝑹𝑹𝑭𝑭 𝑹𝑹𝟏𝟏 𝑹𝑹𝑭𝑭
𝒆𝒆 = 𝒆𝒆 ⇒ 𝑽𝑽𝟏𝟏 + 𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = 𝑽𝑽𝟐𝟐 + 𝟎𝟎
𝑹𝑹𝟏𝟏 + 𝑹𝑹𝑭𝑭 𝑹𝑹𝟏𝟏 + 𝑹𝑹𝑭𝑭 𝑹𝑹𝟐𝟐 + 𝑹𝑹𝑭𝑭
𝑹𝑹𝑭𝑭 𝑹𝑹𝑭𝑭 𝑹𝑹𝑭𝑭
𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = − 𝑽𝑽 + 𝟏𝟏 + 𝑽𝑽
𝑹𝑹𝟏𝟏 𝟏𝟏 𝑹𝑹𝟏𝟏 𝑹𝑹𝟐𝟐 + 𝑹𝑹𝑭𝑭 𝟐𝟐
When 𝑅𝑅1 = 𝑅𝑅2 = 𝑅𝑅
𝑹𝑹𝑭𝑭
𝑽𝑽𝒐𝒐𝒐𝒐𝒐𝒐 = (𝑽𝑽 − 𝑽𝑽𝟏𝟏)
© Dr. Mohammad Ahsan Habib 𝑹𝑹 𝟐𝟐 16
MCE 4407 Instrumentation and Measurements

Instrument Amplifier
 If the input signals are very low level and include noise, the difference
amplifier is unable to extract a satisfactory difference signal.
 The solution to this problem is the instrumentation amplifier. It has the
following characteristics:
Very high input impedance
Large common mode rejection ratio (CMRR). The CMRR is the ratio of
the difference mode gain to the common mode gain (𝐴𝐴𝑑𝑑�𝐴𝐴𝐶𝐶𝐶𝐶).
The difference mode gain is the amplification factor for the difference between the
input signals
The common mode gain is the amplification factor for the average of the input
signals
Capability to amplify low-level signals in a noisy environment, often a
requirement in differential-output sensor signal-conditioning applications.
Consistent bandwidth over a large range of gains.
Instrumentation Amplifier Explained
© Dr. Mohammad Ahsan Habib 17
MCE 4407 Instrumentation and Measurements

Instrument Amplifier (Cont. …)


𝑽𝑽𝑶𝑶𝟏𝟏 Voltage Difference
From Ohm ' s Law i=
Total Registance
VO1 − VO 2
=
R1 + Rg + R1
V1 − V2 VO1 − VO 2
⇒ =
Rg 2 R1 + Rg
2 R1
𝑽𝑽𝑶𝑶𝟐𝟐 ⇒ VO 2 − VO1 =(1 + ) (V2 − V1 ) .................(2)
Rg
Buffer Circuit Difference Circuit
R 2R
Vout =3 (1 + 1 ) (V2 − V1 )
R3 R2 Rg
Vout
= (VO 2 − VO1 ).................(1)
R2 VOut R 2R
Assume V1 > V2 Gain
= = 3 (1 + 1 )
(V2 − V1 ) R2 Rg
V1 − V2 Normally Rg is variable resistance,
i=
Rg
if, Rg is small → Gain large, and Rg is large → Gain small
© Dr. Mohammad Ahsan Habib 18
MCE 4407 Instrumentation and Measurements

Integrator
 If the feedback resistor of the inverting op amp circuit is replaced
by a capacitor, the result is an integrator circuit.

The resistor Rs placed across the feedback capacitor


is called a shunt resistor. Its purpose is to limit the
Improved integrator low-frequency gain of the circuit.
© Dr. Mohammad Ahsan Habib 19
MCE 4407 Instrumentation and Measurements

Differentiator
 If the input resistor of the inverting op amp circuit is replaced by a
capacitor, the result is a differentiator circuit.

© Dr. Mohammad Ahsan Habib 20


MCE 4407 Instrumentation and Measurements

Output of an Integrator and


Differentiator Circuit 𝑹𝑹𝑹𝑹 = 𝟏𝟏

Integrator Differentiator
© Dr. Mohammad Ahsan Habib 21
MCE 4407 Instrumentation and Measurements
OP-Amp: Differentiator &
Integrator

© Dr. Mohammad Ahsan Habib 22


MCE 4407 Instrumentation and Measurements

OP-Amp: PID Controller

© Dr. Mohammad Ahsan Habib 23


MCE 4407 Instrumentation and Measurements

Voltage Comparator

 In comparator circuit, there is no negative feedback, hence the


circuit exhibits infinite gain and the op-amps will saturate, i.e. the
output remains at the most positive or most negative output value.
Hence,

© Dr. Mohammad Ahsan Habib 24


MCE 4407 Instrumentation and Measurements

Comparator Circuit: Application


 Chatter is a practical problem, output voltage oscillates back-and-
forth when input voltage is near to the threshold.

© Dr. Mohammad Ahsan Habib 25


MCE 4407 Instrumentation and Measurements

Filters: Basic idea


 The Four common types of filters are low-pass, high-pass, band-
pass and notch. Each filter responds to the frequency of the signal
entering it in a very different way.

© Dr. Mohammad Ahsan Habib 26


MCE 4407 Instrumentation and Measurements

Low-Pass Filter Circuit

© Dr. Mohammad Ahsan Habib 27


MCE 4407 Instrumentation and Measurements

High-Pass Filter Circuit

© Dr. Mohammad Ahsan Habib 28


MCE 4407 Instrumentation and Measurements

Band-Pass/Band-Reject (Notch) Filter


Circuits
 Band-Pass Filter - A band-pass filter can be built by cascading a
low-pass filter and a high-pass filter together. The cut-off frequency
of the low-pass filter must be higher than the cut-off frequency of the
high-pass filter.
 Band-Reject Filter (Notch)-

© Dr. Mohammad Ahsan Habib 29


MCE 4407 Instrumentation and Measurements

Digital to Analog Conversion


Binary Weighted DAC
 The binary weighted DAC is the simplest converter.
 This DAC creates currents that are proportional to the weight of each
code bit.
 The inverting OP AMP can produce an output voltage which is linear
combination of several input voltages.

© Dr. Mohammad Ahsan Habib 30


MCE 4407 Instrumentation and Measurements

Binary Weighted DAC


 By using input resistors which scale by a factor of 2, a summing
Op Amp can produce an output which follows a binary pattern.

© Dr. Mohammad Ahsan Habib 31


MCE 4407 Instrumentation and Measurements

Binary Weighted DAC


 By using switches on the input resistors, a summing Op Amp can
produce an output which is a binary number (representing which
switches are closed) times a reference voltage.

Conversion
Factor
© Dr. Mohammad Ahsan Habib 32
MCE 4407 Instrumentation and Measurements

Binary Weighted DAC: Example


 CF = - (RF/R0)Vref is called the conversion factor or quantum interval.
 The quantum Interval is defined as the change in output signal for a unit
change of input code, 0000, 0001, 0010
 The largest voltage that can be produced by an n-bit binary DAC is
Vmax = (2n-1)CF
 NOTE: CF will be set to the maximum allowable value which is limited
by the maximum output of the OP-AMP (Vmax)
 The largest conversion factor is calculated as
CFMAX = (Vmax)/(2n-1)

© Dr. Mohammad Ahsan Habib 33


MCE 4407 Instrumentation and Measurements

Binary Weighted DAC: Example


 A 4-bit binary weighted DAC has values of RF = 10K,
R0=360K
1. What is the value of R1, R2, R3
2. Calculate
(a) the conversion factor when Vref = -8V
(b) and the maximum output of the system.
 Solution:
1. R0 = 2R1 = 4R2 = 8R3, So
R1 = 180K, R2 = 90K, R3 = 45K
2. (a) CF = (-RF x Vref)/R0 = -(10)(-8)/360 = 0.222
2. (b) Maximum output of this system
Vmax = (2n-1) x CF = 15 x 0.222 = 3.33V

© Dr. Mohammad Ahsan Habib 34


MCE 4407 Instrumentation and Measurements

Analogue to Digital Conversion


Considerations
 The quality of the analogue to digital conversion is dependent on
the following four parameters:
 Resolution
 Device range
 Signal input range
 Sampling rate

 A/D conversion processes pose two primary challenges:


Quantization - refers to uncertainty introduced upon conversion of an
analog voltage to a digital number. (shaded region)
Sampling - refers to acquiring data only at discrete intervals, with no
information in between.
© Dr. Mohammad Ahsan Habib 35
MCE 4407 Instrumentation and Measurements

Resolution
 Resolution: The number of bits used to represent the analogue signal

 The above example shows the difference between 3 (23 =8 divisions)


and 16 bit (216 = 65,536 divisions) resolution
 0 to 1.25 volt000, 1.25 to 2.50 volt001, …, 8.75 to 10 volt  111.
© Dr. Mohammad Ahsan Habib 36
MCE 4407 Instrumentation and Measurements

Device Range
 device range: minimum and maximum analogue signal levels that the ADC
can convert.
 The device range should be matched to the range of the analogue input
signal to best take advantage of the available resolution!
 Example: If a 3-bit ADC (having 8 divisions) is used over a range of 0 to 10 volts,
voltage changes of 1.25V can be measured.
 However, if the range is increased to -10 to 10V, then the smallest voltage change
which can be measured rises to 2.5V

© Dr. Mohammad Ahsan Habib 37


MCE 4407 Instrumentation and Measurements

Signal Input Range


 signal input range: the maximum and minimum value of the signal
being measured.
 The closer the signal input range is to the incoming analogue signal max
and min, the more digital divisions will be available to the ADC to
represent the signal

© Dr. Mohammad Ahsan Habib 38


MCE 4407 Instrumentation and Measurements

Smallest detectable voltage change


 Determined by the resolution and range of a DAQ device and the signal
input range.
 This change in voltage represents 1 least significant bit (LSB) of the
digital value and is often called the code width.
 This smallest code width, Vcw is calculated as follows
 (Where the resolution is given in bits)

 Example: a 12 bit DAQ device with a 0 to 10V range can detect a 2.4 mV
change.
Unipolar signals range from 0 to a positive value
Bipolar signals range from a negative to a positive value.

© Dr. Mohammad Ahsan Habib 39


MCE 4407 Instrumentation and Measurements

Range of Values of Digital Quantities

© Dr. Mohammad Ahsan Habib 40


MCE 4407 Instrumentation and Measurements

Sampling Rate
 Sampling rate: the rate at which the DAQ device samples an incoming
analogue signal
 Determines how often an analogue to digital conversion takes place.
 Computing the proper sampling rate requires knowledge of the max
frequency of the incoming signal and the accuracy required for digital
representation.
 In general, a fast sampling rate acquires more points per unit time and
results in a better representation of the incoming signal.

© Dr. Mohammad Ahsan Habib 41


MCE 4407 Instrumentation and Measurements

Shanon’s Sampling Theorem


 In order to represent the analog signal, sampling frequency 𝑓𝑓𝑠𝑠 such that
must be greater than Nyquist frequency, 𝑓𝑓𝑁𝑁 :
𝑓𝑓𝑠𝑠 > 𝑓𝑓𝑁𝑁 ≡ 2𝑓𝑓𝑚𝑚𝑚𝑚𝑚𝑚
1
 Time interval between the digital samples is ∆𝑡𝑡 =
𝑓𝑓𝑠𝑠
 If 𝑓𝑓𝑠𝑠 < 𝑓𝑓𝑁𝑁 , aliasing can result and totally non-existent frequencies may be
indicated.

© Dr. Mohammad Ahsan Habib 42


MCE 4407 Instrumentation and Measurements

Example: Effect of Sampling Rate

© Dr. Mohammad Ahsan Habib 43


MCE 4407 Instrumentation and Measurements

A Simple A/D Converter


 Components: (a) Counter (b) D/A (c) Comparator (d) Latch (meaning: Finalize)
I. The counter counts from 0 to 2n-1
II. The counter drives the input of the D/A converter
III. The output of the D/A is compared to the input voltage vin
IV. When the output of the comparator switches logic this means that the generated
voltage of D/A passed the input voltage.
V. The comparator then latches the counter output to the latch.
 Problem with Slope A/D?
 it takes 2n clock cycles for conversion

© Dr. Mohammad Ahsan Habib 44


MCE 4407 Instrumentation and Measurements

Recall: Staircase A/D Converter


 Problem with Slope A/D  it takes 2nclock cycles for
conversion
 Can we do better!

© Dr. Mohammad Ahsan Habib 45


MCE 4407 Instrumentation and Measurements

Tracking Converter
 Is an improved version of the staircase ADC
 If VA increases over previously converted value the counter will
count up
 If VA decreases over previously converted value the counter
will count down
 Conversion time is Not Constant

© Dr. Mohammad Ahsan Habib 46


MCE 4407 Instrumentation and Measurements

Successive Approximation A/D


 Is based on intelligent trial-and-error method
 When start signal is asserted the controller instructs the sequencer to
 Place a `1’ in MSB position of Register.
 All other bits remain at `0’ level
 A comparator compares two voltage values on its two inputs.
 If guess is low then the next MSB is set to `1’
 If guess is high then that bit is set to `0’ and the next MSB is set to `1’
 Requires N clock periods for N-bit converter.

© Dr. Mohammad Ahsan Habib 47


MCE 4407 Instrumentation and Measurements

Successive-Approximation Example
 6-bit A/D with range
0V – 5V
 Step Size =
5/26 =
0.078

© Dr. Mohammad Ahsan Habib 48


MCE 4407 Instrumentation and Measurements

Successive-Approximation Example

Digital output is 110101

Error =
4.16 – 4.141 = 0.019

© Dr. Mohammad Ahsan Habib 49


MCE 4407 Instrumentation and Measurements

Sample and Hold Circuit


 A Successive Approximation A/D can give the wrong output if the
voltage changes during a conversion
 A Track/Hold or Sample/Hold circuit is needed to hold the input
voltage constant during conversion.

© Dr. Mohammad Ahsan Habib 50


MCE 4407 Instrumentation and Measurements

Sample and Hold Circuit


 Circuit  Capacitor & Switch
 It works by charging the capacitor to the input voltage, then
disconnecting the capacitor from the input voltage during
conversion.

© Dr. Mohammad Ahsan Habib 51


MCE 4407 Instrumentation and Measurements

Concepts and Terminology


Definitions :Assume an analog signal ranges from 0V-5V, and
number of bits used in A/D converter is 3
1. Offset  Minimum Analog Value  0V
2. Span  Max to Min Analog Value  5V-0V = 5V
3. Step Size, Quantum Interval  Span/2n
4. Resolution  Refers to the number of bits in ADC and also to
smallest analog change corresponding to a change in a bit in the
digital number.
5. Conversion:
 Analog Number = (Digital Number x Step Size) + Offset
 Digital Number = (Analog Number – Offset)/Step Size
6. Dynamic Range (DR) = (Range or Span)/Resolution = 2n
The dynamic range determines the required word size of an ADC.

© Dr. Mohammad Ahsan Habib 52


MCE 4407 Instrumentation and Measurements

Example
A 6-bit DAC has an analog output range of -2.5 to 5.0V.
Calculate the analog output when input is 010101 (i.e. decimal
21)
Solution:
1. Offset = -2.5
2. Span = 5 – (-2.5) = 7.5V
3. Step Size = 7.5V/26 = 0.1172V
4. Analog Output = (digital number x step size) + offset
= (21 x 0.1172) – 2.5V = -0.039V

© Dr. Mohammad Ahsan Habib 53


MCE 4407 Instrumentation and Measurements

Example
A temperature sensor has a measurement range of -10⁰C to 140⁰C.
The output range is -2.5 to +5mv. It has a resolution of 0.5⁰C.
1. Determine the # of bits in ADC?
2. What is the reading of the ADC when the output of the sensor is
-1.0 mv?
Solution:
1. Span = 140 – (-10) = 150⁰C (or) 5 – (-2.5mv) = 7.5mv
Dynamic Range = 150⁰C / 0.5⁰C = 300
DR = 300 = 2n  n = log2 (300) = 8.22  9 bits

2. Step Size = Span /2n = 7.5mv/(29) = 0.01464


Digital Number = (Analog Number – Offset)/Step Size
= (-1.0mv – (-2.5mv))/0.01464
= (102)10 = (001100110)2
© Dr. Mohammad Ahsan Habib 54
MCE 4407 Instrumentation and Measurements

Example
Given an analog signal with range -5V to +5V and an 8-bit
ADC
Determine: Offset, Span, Step Size, %Resolution
Solution:
1. Offset = -5V
2. Span = 5 – (-5) = 10V
3. Step Size = 10V/28 = 10/256 = 39.1mv
4. % Resolution = 0.391%

© Dr. Mohammad Ahsan Habib 55


MCE 4407 Instrumentation and Measurements

A Study on DAS and Signal Processing


Low Cost Data Acquisition and
Control using Arduino Prototyping
Platform and LabVIEW

© Dr. Mohammad Ahsan Habib 56

You might also like