CHAPTER 7:
DATA ACQUISITION
                  SYSTEM
                Nor Farhani Zakaria
EMT 478 INSTRUMENTATION 2020/21
       Chapter Outline
• Data Acquisition System (DAS) Overview
• Multichannel DAS
• Computer Based DAS
• Digital to Analog and Analog to Digital
  Converters
• Data Loggers
           DAS Overview
• Data Acquisition = process of sampling signals that measure real
  world conditions and converting them to a data readable by a
  system
• gathering of information in system or process.
• Parameter information (i.e temperature,
  pressure or flow) gathered by sensors →
  convert the information into electrical signals.
• The sensors signals transferred to instrument
  using medium (i.e wire, optical fiber or
  wireless link)
       Objective of DAS
• Acquire necessary data, at correct speed and
  time
• Monitor complete plant operation to maintain on
  line and safe operations
• Must be able to collect, summarize and store
  data for diagnosis of operation and record
  purpose
• Must be able to compute unit performance
  indices on-line, real time data
• Must be reliable, easy to operate and user
  friendly
Data Acquisition System (DAS) Elements:
➢ Signals
➢ Transducers :Sense physical variables
➢ Signal-conditioning hardware: to make it readable by an A/D
  board
➢ DAQ device or module :Convert the signal into a digital format
  acceptable by a computer
➢ Application software :Process, analyze, store, and display the
  acquired data
DAS Block Diagram
Microprocessor/
                  RF measurement
Microcontroller
                    and display
                        Types of DAS
                                         DAS
                           Serial
                      Communication            USB Data
                      Data Acquisition     Acquisition Systems
                          Systems
  Wireless Data                                                  Data Acquisition
Acquisition Systems                                               Plug-in Boards
          Considering the configuration and
                sub-systems of DAS
❑ Numbers of channel to be monitored – single/multi channel
❑ Analog or digital signal :
  → Digital signals : information regarding the voltage state (hi/low)
  and/or the rate of change of these states
 → Analogue signal: provides voltage level, shape or frequency
  content information.
❑ Sampling rate per channel - the rate at which the DAQ device samples
   an incoming analogue signal
❑ accuracy & resolution : the number of bits used to represent the
  analogue signal
❑ Signal conditioning requirements of each channel (i. e. : linearization,
  isolation, filtering, amplification )
❑ Cost
     Single channel DAS
-Common DAS
-Consist of signal conditioner followed by analog to digital ADC
converter
         Multi-Channel DAS
• multiplexed system = timely
  shared of various sub systems of
  the data acquisition from two or
  more sources
           Multiplexing
Why multiplex?
 Several types of multiplexing system used in multiple channels data
 acquisition;
    • Multi-Channel Analog Multiplexed System
    • Multiplexing the Outputs of Sample-Holds
    • Multiplexing after ADC
    • Multiplexing Low-level Data
 i) Multi-Channel Analog Multiplexed System
• Individual signal applied directly or after
  signal conditioning if necessary
• Multiplexer controlled by logic circuit
  seeks the next channel to be converted.
• Previous data stored in Sample Hold(S/H)
  before convert to digital forms.
• After conversion is complete status line
  from converter causes S/H to return to
  sample mode and acquire signal
• On completion of acquisition, the S/H
  switched to hold mode & conversion
  begins again.
• Slow but low cost.
• Sufficient accuracy achieved
  ii) Multiplexing the Outputs of S/H
• Used to monitor large number of channels at the same time
  but moderate speeds.
• Individual S/H assigned to each channel is updated
  synchronously by logic.
• Application: radar and fire alarm system, wind-tunnel
  measurement
         iii) Multiplexing After ADC
• ADC is employed for each analog input and multiplexed digital outputs
• As ADC is assigned to an individual channel, the conversion rate must be
  as fast as is needed for that channel, it would need a higher conversion
  rate if it were used in a multichannel multiplexed system
• Provides additional advantages to large plant areas where many sensors
  :LVDT, gauges, thermocouples are used
• Since analog signal digitized at the source, digital transmission of data to data
  centre provides enhanced immunity against line frequency and interferences
         Computer Based DAS
• In DAS, it utilizes a computer driven visual as an operator aid for
  displaying and measuring purpose.
• This DAS aids operates in the following manner.
  1. Display understandable information
  2. Display visual of plant subsystems
  3. Display vital parameters, eliminating the need of others
     instrumentation
  4. Display alarms indicating abnormal plant operating condition
  5. Provide recording of sequence events, in case of emergency
• Can used programmable software i.e. C++/ Visual C++, Fortran or DAS
  software packages i.e. LabView, MATLAB etc
Digital to Analog Converter (DAC)
Purpose:
 • To convert digital information into equivalent analog
   information
 • Performs inverse operation of the Analog-to-Digital
   Converter (ADC)
 • VOUT  Digital Value
                 Reference Voltage
 Digital Value        DAC              Analog Voltage
 100101…
         Types of DACs
–   Binary Weighted Resistor
–   R-2R Ladder Network
–   DAC using Op-Amp
–   Weighted Converter using Transistor Switches
   i) Binary Weighted Resistor
• Utilizes a summing op-amp circuit
• Weighted resistors are used to distinguish each bit from the
  most significant to the least significant
• Transistors are used to switch between Vref and ground (bit
  high or low)
                                          I   i
                                                   Rf = R
                 R     2R     4R     8R                     Vo
           MSB
                                                   LSB
        -VREF
               Binary Representation
                                              Rf = R
                                     I   i
                  R   2R   4R   8R                              Vo
Most
Significant Bit
                                              Least
                                              Significant Bit
       -VREF
Consider the truth table for 3 bit binary signal:
  - there are 8 possible states of digital
  signals (23)
  - Say 000 = 0 V and 111=+7V
  - The least significant bit (LSB) weight
  (increment change): 1/(2n-1)= 1/7
  - Output = 1/7 x 7 V = 1 V
→ Resistive divider is designed to be 1 in 20
  position
EXAMPLE 1 (textbook p. 640)
 Binary Representation
                            SET       CLEARED
Most
Significant Bit
                                                   Least
  -VREF                                            Significant Bit
                  ( 1   1         1    1 )2 = ( 15 )10
       Milman’s Theorem
• “the voltage appearing at any node in a
  resistive network is equal to the summation
  of the current entering the node (assuming
  the node voltage is zero) divided by the
  summation of the conductance connected to
  the mode“
• Mathematically,
                                                             Rf = R
                                                 I   i
• “Weighted
                                                                         Vo
  Resistors”
  based on bit            R    2R     4R    8R
• Reduces             MSB
  current by a
  factor of 2 for      -VREF                              LSB
  each bit
                        B3 B2 B1 B0 
             I = VREF  R + 2R + 4R + 8R 
                                                          Bi = Value of bit i
                                 B2 B1 B0 
   VOUT   = I  R f = VREF  B3 +   + + 
                                 2  4 8 
• More Generally:
                               Bi
           VOUT = VREF        n −i −1
                           2
  Bi = Value of Bit i
  n = Number of Bits
Drawbacks of Binary Weighted Resistor
 • Resistors used in the network have a wide range of values, so
   it is very difficult to ensure the absolute accuracy and stability
   of all the resistors.
 • It is very difficult to match the temperature coefficients of all
   the resistors. This factor is specially important in D/A
   converters operation over a wide temperature range.
 • When n is so large, the resistance corresponding to LBS can
   assume a large value, which may be comparable with the
   input resistance of the amplifier. This leads to erroneous
   results.
   ii) R-2R Ladder Network
VREF
         MSB            Each bit corresponds
                        to a switch:
                        If the bit is high,
                        the corresponding
   LSB
                        switch is connected to
                        the inverting input of
                        the op-amp.
                        If the bit is low, the
                        corresponding switch
                        is connected to ground.
• Same input switch setup as Binary Weighted
  Resistor DAC
• All bits pass through resistance of 2R
         VREF
  MSB
   LSB
• The less significant the bit, the more resistors must pass
  through before reaching the op-amp
• The current is divided by a factor of 2 at each node
               LSB            MSB
                                                                             V
    • Analysis for current from (001)2 :
                      𝐼𝑅𝐸𝐹         𝐼𝑅𝐸𝐹           𝐼𝑅𝐸𝐹            2R                2R
                        2            4              8
           R                 R              R            2R
R                     2R            2R            2R
                                                           ∑I      Req =
                                                                           (2 R )(2 R ) = R
                                                                           (2 R + 2 R )
              IREF
                                                         Op-Amp input
         VREF                B1             B2
                                                         “Ground”
                                               𝑉𝑅𝐸𝐹       𝑉𝑅𝐸𝐹
         B0                       𝐼𝑅𝐸𝐹   =              =
                                           2𝑅 + (2𝑅ԡ2𝑅)    3𝑅
                        VREF  B2 B1 B0  VREF                        Bi
                     I=       + + =
                         3R  2   4  8    3R
                                                                    2 n −i
• Output voltage:
                  VREF         Bi             Bi = Value of Bit i
               I=
                   3R
                             2 n −i
                            Rf        Bi
       VOUT        =R f I =    VREF  n −i
                            3R       2
                                                          Rf
         R               R         R         2R
 R                  2R        2R        2R
                                                     ∑I
            𝐼𝑅𝐸𝐹
                                                  Op-Amp input
       VREF              B1        B2
                                                  “Ground”
       B0
• If Rf = 6R, VOUT :
                 Rf   B2 B1 B0 
       VOUT   = VREF  + + 
               3R     2 4 8
                                                        Bi = Value of Bit i
                                Bi
           VOUT = VREF         n −i −1
                            2
             Equal to Binary weighted resistor type DAC VOUT:
                                              Bi
                       VOUT = VREF           n −i −1
                                          2
            EXAMPLE 2
      Figure below shows a R-2R ladder network. Given
     Input = (101)2 ,VREF = 10 V, R = 2 Ω, Rf = 2R. Evaluate:
i) Refence current                               B0 B1 B2
ii) Output current through op-amp                (1 0 1 )2 = 5
iii) Output voltage
                R           R              R          2R
        R              2R            2R          2R
                𝐼𝑅𝐸𝐹                      𝐼𝑅𝐸𝐹
                                                      Op-Amp input
              VREF                        VREF
                                                      “Ground”
                                B1
               B0                         B2
                                                                38
                                                                           V
                             Solution:
                  𝐼𝑅𝐸𝐹       𝐼𝑅𝐸𝐹          𝐼𝑅𝐸𝐹
                                                               2R                  2R
                    2          4             8
           R             R          R           2R
R                  2R        2R            2R
           𝐼𝑅𝐸𝐹                     𝐼𝑅𝐸𝐹
                                                               Req =
                                                                       (2 R )(2 R ) = R
                                                Op-Amp input           (2 R + 2 R )
       VREF                       VREF
                                                “Ground”
           B0                     B2
                −𝑉𝑅𝐸𝐹      −𝑉𝑅𝐸𝐹
    𝐼𝑅𝐸𝐹   =             =       = −1.67 mA
             2𝑅 + 2𝑅 ԡ2𝑅    3𝑅
       𝐼𝑅𝐸𝐹 𝐼𝑅𝐸𝐹
    𝐼=     +     = −1.04 mA
         8    2
      VOUT = − IR f = 4.17 V
EXAMPLE 3
                   Pros & Cons
         Binary Weighted                  R-2R
                              Only 2 resistor values
                              Easier implementation
Pros   Easily understood
                              Easier to manufacture
                              Faster response time
       Limited to ~ 8 bits
       Large # of resistors
Cons   Susceptible to noise   More confusing analysis
       Expensive
       Greater Error
        Chapter Outline
•   Data Acquisition System (DAS) Overview
•   Multichannel DAS
•   Computer Based DAS
•   Digital to Analog Converters
•   Analog to Digital Converters
•   Data Loggers
ANALOG DIGITAL CONVERTER (ADC)
 • Converts analog signals into binary words
  Examples of A/D Applications
• Microphones - take your voice varying pressure waves in the air
  and convert them into varying electrical signals
• Strain Gauges - determines the amount of strain (change in
  dimensions) when a stress is applied
• Thermocouple – temperature measuring device converts
  thermal energy to electric energy
• Voltmeters
• Digital Multimeter
          Why ADC is important?
•   All microcontrollers store information using digital logic
•   Compress information to digital form for efficient storage
•   Medium for storing digital data is more robust
•   Digital data transfer is more efficient
•   Digital data is easily reproducible
•   Provides a link between real-world signals and data storage
         ADC Basic Principle
• The basic principle of operation is to use the
  comparator principle to determine whether
  or not to turn on a particular bit of the
  binary number output.
• It is typical for an ADC to use a digital-to-
  analog converter (DAC) to determine one of
  the inputs to the comparator.
   Elements of a Flash A/D Converter
Encoder
 Comparator
            ADC Types
3 Basic Types:
• Digital-Ramp ADC (Tracking ADC)
• Successive Approximation ADC
• Flash ADC
Others:
• Dual-slope ADC
• Delta-Sigma ADC
           Digital-Ramp ADC
• Using comparator : value of the analog
  voltage at some point in time is compared
  with some standard.
• Apply analog voltage to one terminal of a
  comparator and trigger a binary counter
  which drives a DAC.
Digital-Ramp ADC
• The output of the DAC is applied to the other
  terminal of the comparator.
• Since the output of the DAC is increasing
  with the counter, it will trigger the
  comparator at some point when its voltage
  exceeds the analog input.
• The transition of the comparator stops the
  binary counter, which at that point holds the
  digital value corresponding to the analog
  voltage.
• Since the counter's output continuously
  tracks the input (rather than counting to
  meet the input and then resetting back to
  zero), the binary output is legitimately
  updated with every clock pulse.
     Successive approximation ADC
• The only change in this design is a very special counter circuit
  known as a successive-approximation register.
• Instead of counting up in binary sequence, this register counts
  by trying all values of bits starting with the most-significant bit
  and finishing at the least-significant bit
• Throughout the count process, the register monitors the
  comparator's output to see if the binary count is less than or
  greater than the analog signal input.
     Successive approximation ADC
– VIN goes into comparator
– the successive approximation    end of conversion
  register (SAR) counter
  increments each clock
  as long as it is enabled by
  the comparator
– the output of the SAR is fed
  to a DAC that generates a
  voltage for comparison with
  VIN
– when the output of the DAC =
  VIN the value of SAR is the
  digital representation of VIN
 Successive approximation ADC
Illustration of 4-bit SAC with 1 volt step size
                        Bit Weight
                                    Digital Bit   Bit Weight (V)
Each bit is weighted with an
analog value, such that a 1 in          7         Vref/21=10/2 =
that bit position adds its analog                 5
value to the total analog value         6         10/4 = 2.5
represented by the digital
encoding.                               5         10/8 = 1.25
                                        4         10/16 = 0.625
Example: 10 V analog range, n=8
                                        3         10/32 = 0.313
                                        2         10/64 = 0.157
                                        1         10/128 = 0.078
                                        0         10/256 = 0.039
       Successive Approximation
                Example
• 10 bit resolution or
  0.0009765625V of Vref
• Vin= 0.6 volts
• Vref=1volts
• Find the digital value of
  Vin
Successive Approximation
• MSB (bit 9)
  – Divided Vref by 2 (1V/2)
  – Compare Vref /2 (V=0.5 V) with Vin (0.6 V)
  – If Vin is greater than Vref /2 , turn MSB on (1)
  – If Vin is less than Vref /2 , turn MSB off (0)
  – Vin =0.6V and V=0.5
  – Since Vin>V, MSB = 1 (on)
Successive Approximation
• Next Calculate MSB-1 (bit 8)
   – Compare Vin=0.6 V to V=Vref/2 + Vref/4= 0.5+0.25 =0.75V
   – Since 0.6<0.75, MSB is turned off
• Calculate MSB-2 (bit 7)
   – Go back to the last voltage that caused it to be turned on (Bit 9)
     and add it to Vref/8, and compare with Vin
   – Compare Vin with (0.5+Vref/8)=0.625
   – Since 0.6<0.625, MSB is turned off
Successive Approximation
• Calculate the state of MSB-3 (bit 6)
  – Go to the last bit that caused it to be turned on (In
    this case MSB-1) and add it to Vref/16, and
    compare it to Vin
  – Compare Vin to V= 0.5 + Vref/16= 0.5625
  – Since 0.6>0.5625, MSB-3=1 (turned on)
Successive Approximation
• This process continues for all the remaining
  bits.
                   Flash ADC
• the fastest type of ADC available, but
  requires a comparator for each value of
  output.
  (63 for 6-bit, 255 for 8-bit, etc.)
• available in IC form up to 8-bit ADC
• The encoder logic executes a truth
  table to convert the ladder of inputs to
  the binary number output.
• The resistor net and comparators
  provide an input to the combinational
  logic circuit→conversion time is just the
  propagation delay through the network
  - not limited by the clock rate
                                                23-1 = 7 Comparators
                                      3-bit flash ADC with resolution 1 volt
                  Flash ADC
        Advantages                 Disadvantages
• Simplest in terms of       •Each additional bit of
  operational theory         resolution requires twice
                             the number of
•Simple operational          comparators
theory                       •Expensive
• Speed is limited only by   • Prone to produce
gate and comparator          glitches in the output
propagation delay
             Data Loggers
•   Introduction
•   Instumentation Protocols
•   Types
•   Choosing a Data Logger
•   Applications
•   Data logging versus data
    acquisition
                     Introduction
• A data logger (also data recorder) = electronic device that
  records data over time or in relation to location either with a
  built in or via external instruments and sensors
• available in various shapes, sizes, range from simple
  economical single channel fixed function loggers to more
  powerful programmable devices capable of handling
  hundreds of inputs.
Types of Data Loggers
     Choosing a Data Logger
•   Input Signal
•   Number of Inputs
•   Size
•   Speed/Memory
•   Real Time Operation
      Examples of data logger
•   A flight data recorder (FDR),
•   An event data recorder (EDR),
•   A voyage data recorder (VDR),
•   Ultra Wideband Data Recorder,
•   A Depth Recorder
                 Applications
• Unattended weather station recording (such as
  wind speed / direction, temperature, relative
  humidity, solar radiation).
• Unattended hydrographic recording (such as
  water level, water depth, water flow, water pH,
  water conductivity).
• Unattended soil moisture level recording.
• Unattended gas pressure recording.
• Offshore buoys for recording a variety of
  environmental conditions.
• Road traffic counting.
• Environmental monitoring.
• Vehicle Testing
• Monitoring of relay status in railway signalling.
  Data logging VS data acquisition
 Data logging                     Data acquisition
• Data logger is a data           • Data acquisition system is not
  acquisition system                necessarily a data logger.
• Typically have slower           • Typically have fast sample
  sample rates.                     rates.
• Data loggers are implicitly     • Data acquisition system must
  stand-alone devices               remain tethered to a
                                    computer to acquire data.
• Data loggers used magnetic      • Data acquisition used Static
  tape , punched paper tape         RAM, flash memory, EEPROM.
  ,directly viewable recorders
  Such as strip chart recorders