CHAPTER FOUR
Analog And Digital
Instrumentation Processes
                            1
LECTURE OVERVIEW
   INTRODUCTION
   ADC
   DAC
   MULTIPLEXER
                   2
             1:- INTRODUCTION
•   Signals are time-varying “quantities” which convey some sort of
    information.
•   Signals are passed between devices in order to send and receive
    information, which might be video, audio, or some sort of encoded
    data.
•   Usually the signals are transmitted through wires, but they could
    also pass through the air via radio frequency (RF) waves.
•   Audio signals, for example might be transferred between your
    computer’s audio card and speakers, while data signals might be
    passed through the air between a tablet and a Wi-Fi router.
                                                                        3
                      Analog Signal
 Continuous-time signals
 It is 'continuous' in that it is present at all times
 Continuous does not mean that it goes on for ever
X(t)
                                                                  t
                                                                      4
                                                 Analog signals
                 Digital signals
 Digital signals have a finite set of possible values.
 Most commonly digital signals will be one of two
    values – like either 0V or 5V.
 Timing graphs of these signals look like square waves.
Discrete-time signals
Are defined at particular or discrete instants only- they are
usually sampled signals.
                                                            5
       Digital signals cont.…
X(t)
                                                  t
                                Digital signals
                                                      6
  2:- Analog to digital conversion(ADC)
• What is ADC(Analog to Digital Converter?
• Why ADC is needed?
• Application of ADC
• A/D conversion process
                                             7
     2.1. What is ADC ?
¥ An electronic integrated circuit which transforms
  a signal from analog (continuous) to digital
  (discrete) form.
¥ Analog signals are directly measurable
  quantities.
¥ Digital signals only have two states. For digital
  computer, we refer to binary states, 0 and 1.
                                                      8
              2.2. Why ADC is needed ?
 Microprocessors can only perform complex processing on
   digitized signals.
 When signals are in digital form they are less susceptible to
   the deleterious(causing harm or damage) effects of
   additive(a substance added to improve ) noise.
 ADC Provides a link between the analog world of
   transducers and the digital world of signal processing and
   data handling.
                                                                  9
         2.3. Application of ADC
• ADC are used virtually everywhere where an
  analog signal has to be processed, stored, or
  transported in digital form.
• Some examples of ADC usage are digital volt
  meters, call phone, thermocouples, and digital
  oscilloscope.
                                                   10
             2.4. Conversion process
3 steps:
   Sampling and Holding
   Quantification
   Coding
These operations are all performed in a same element: the A to D Converter
                                                                         11
              Conversion process: Sampling
 Sampling is the process of taking a sufficient number of discrete values at points
  on a waveform that will define a waveform.
 Sampling converts an analog signal into a series of impulses, each representing the
  amplitude of the signal at a given instant in time.
 Digital system works with discrete states
 The sampling times are proportional to the sampling period (Ts)
                                                 x(t)
                        Ts                       xs(t)
              x(t)                  xs(t=k*Ts)
                                                                                t   12
                                                         Ts
                              Cont…
 A clock supplies regular time signal pulses to the ADC and every time it
  receives a pulse it samples the analog signal.
 A sample and hold unit is used to hold each sampled value until the next pulse
  occurs.
 It is used b/se the ADC requires a finite amount of time, termed conversion
  time, to convert the analog signal into a digital one.
                                                                                   13
                                           Cont…
 The electronic switch, S, is closed,
    causing the capacitor to charge to the
    current value of the input voltage.
 After a brief time interval the switch is
    reopened, so keeping the sampled
    voltage across the capacitor constant
    while   the     ADC    carries   out   its
    conversion...
   Sample= When switch is closed
   Hold = When switch is open
                                                   14
       Conversion process: Quantification
Quantizing : discretization of the sampled signal amplitude.
• In practice, because the quantization process takes a
  finite amount of time, the sampled signal amplitude has
  to be held constant during this time.
• The signal can only take determined values belonging to
   a range of conversion (Vr)
                                                          15
         Conversion process: Quantification
 Resolution: The smallest change in analog signal that will result in a
  change in the digital output.
                                      Vr             V full scale
                                  V  2           R n
                                      2               2
 Vr = Reference voltage range
 n = Number of bits in digital output.
 2n = Number of states.
 ∆V = Resolution
                         xs(t)
                         xq(t)
                        ΔV
                                                                Vr
                                                            t              16
                                  Ts
Example-1
 A sensor gives a maximum analog output of 5V. What word length is
  required for an analog-to-digital converter if there is to be a resolution of
  10mV.
Solution      Resolution = (Vmax – Vmin) / N
              10 mV=5V/2n
              2n = 5/0.01 = 500
              n = 8.97,      Thus, a 9 bit word length is required.
                Conversion process: Coding
 Assigning a unique digital word to each sample
 Matching the digital word to the input signal
                  xq(t)
                  N-1
                  N-2
                                                       Q   ΔVr
                   2
                   1
                   0
                                                   t
                          Ts
                                                                 18
         ANALOGUE TO DIGITAL CONVERSION
 Converting analogue signals to binary words.
 Fig below shows the basic elements of AD conversion
                                                        19
20
 i. Before we proceed to the process of ADC we must
     understand some basic parameters.
                                         Decimal Code Binary Code
 1. Binary system                             0           0000
                                                            1    0001
 Based on two symbols or states 0 and 1(binary digits
                                                            2    0010
  or bits).                                                 3    0011
 When a number is represented by this system, the          4    0100
                                                            5    0101
  digit position in the number indicates the weight
                                                            6    0110
  attached to each digit increases by a factor of 2 as we   7    0111
  proceed from right to left.                               8    1000
                                                            9    1001
 Bit 0- Least Significant Bit(LSB)                         10   1010
                                                            11   1011
 The highest bit 1- the Most Significant Bit (MSB)
                                                            12   1100
 Word:-combination of bits to represent a number           13   1101
                                                            14   1110
 Byte-a group of 8 bits
                                                            15   1111
                                                                        21
2. Accuracy of A/D Conversion
There are two ways to best improve the accuracy of A/D
conversion:
• Increasing the resolution which improves the accuracy
   in measuring the amplitude of the analog signal.
• Increasing the sampling rate which increases the
   maximum frequency that can be measured.
                                                          22
                              Accuracy
                 xq(t)
                                                 t
                         Ts
        Higher Sampling rate                 Higher Resolution
xq(t)                                xq(t)
                                 t                               t
        Ts                                                           23
       3. Sampling Theorem
 How often should an analog signal be sampled(closed) in order
  to give an output which is representative of the analog signal?
 Nyquist criterion: the sampling rate must be at least twice that of
  the highest frequency in the analog signal.
 Too slow sampling rate (low frequency) leads to an error called
  Aliasing( the misidentification of a signal frequency).
 Too fast sampling rate(high frequency) may create error due to
  high level noises.
                                                                        24
                               Cont..
 A signal will not usually have a single frequency but will consist of a
  very wide range of frequencies.
 A low pass filter has the job of removing signal frequencies greater
  than fs/2, where fs is the sampling frequency. This is the role of the
  anti-aliasing filter.
 An anti-aliasing filter is a low pass filter with a cut-off frequency of
  fs/2. The important frequency of fs/2 is usually called the Nyquist
  frequency.
                                                                           25
Types of ADCs
  There are two types
  Indirect type
     Dual slope converter
     Single slope converter
  Direct type
     Flash ADC
     Sigma-delta ADC
     Successive approximation converter
                                           26
                       2.4.1 Flash ADC
 Fundamental Components (For N bit Flash A/D)
   2N-1 Comparators
   2N Resistors
   Control Logic
                                                 27
                     Flash ADC
 Provides a fast conversion time because of the “Parallel A/D”
  process
 Uses a series of comparators
 Each comparator compares Vin to a different reference voltage
  Comparator is one use of an Op-Amp
    VIN                          If         Output
            +        VOUT        VIN > VREF High
    VREF    -
                                 VIN < VREF Low
                                                             28
                     How does it work
   Uses the 2N resistors to form a ladder voltage divider, which
    divides the reference voltage into 2N equal intervals.
   Uses the 2N-1 comparators to determine in which of these 2N
    voltage intervals the input voltage Vin lies.
   The Combinational logic then translates the information
    provided by the output of the comparators.
   This ADC does not require a clock so the conversion time is
    essentially set by the settling time of the comparators and the
    propagation time of the combinational logic.
                                                                  29
        2.4.2. Successive Approximation
• A regular sequence of pulses is generated by a clock and is registered in binary
   manner
• Voltage rises in steps and will be converted to analogue signal using DAC
• Will be compared with analogue input signal from sensor
• If voltage from clock passes voltage from input, gate closes
• The output from the counter at that time is then a digital representation of the
   analogue voltage.
                                                                                     30
 Sets MSB
 Converts MSB to analog using DAC
 Compares guess to input
 Set bit
 Test next bit
                                 31
           Successive Approximation
      Advantages               Disadvantages
• Capable of high speed     Higher resolution
• Medium accuracy            successive approximation
  compared to other ADC      ADCs will be slower
  types                     Speed limited ~5Msps
• Good tradeoff between
  speed and cost
                                                  32
    Example
              33
    Cont…
            34
    Cont…
            35
    Cont…
            36
                    ADC Types Comparison
                    ADC Resolution Comparison
       Dual Slope
            Flash
Successive Approx
     Sigma-Delta
                    0       5      10        15      20      25
                                 Resolution (Bits)
         Type                    Speed (relative) Cost (relative)
         Dual Slope              Slow                 Med
         Flash                   Very Fast            High
         Successive Appox        Medium – Fast        Low
         Sigma-Delta             Slow                 Low
                                                                    37
      3. Digital to Analogue Conversion
INTRODUCTION
•    A digital-to-analog converter (DAC or D-to-A) is a device for converting
    a digital (usually binary) code to an analog signal (current, voltage or
    charges).
•   Digital-to-Analog Converters are the interface between the abstract digital
    world and the analog real life.
•   Simple switches, a network of resistors, current sources or capacitors may
    implement this conversion.
                                                                                  38
39
      Cont..
 This converts the processed digital value back to an equivalent
  analogue voltage.
   Output is an analogue signal that represents the weighted sum
    of the non-zero bits represented by the word.
 Input: Binary word
 Output: Analogue signal
                                                                    40
      Types of Digital to Analogue Converters
1.Weighted-resistor Network
      Uses a summing amplifier
      Electronic switches respond to binary 1
      Resistor from LSB being halved
      Sum of the voltages is a weighted sum of the non zero bits in the input
     word.
      Accurate resistances have to be used(very difficult).
                                                                                 41
       Cont.
                            Rf=
                  MSB
                                              LSB
                       V1 V2 V3     Vn 
Vout     IRf   Rf           n -1 
                       R 2R 4R     2 R
        n=1, 2,3……                                  42
  Binary Weighted Resistor cont..
 If Rf=R/2
                   V1 V2 V3 Vn 
Vout     IRf       n 
                  2 4 8     2 
For example, a 4-Bit converter yields
                1      1    1     1
Vout    Vref  b3  b2  b1  b0 
                2      4    8    16 
 Where b3 corresponds to Bit-3, b2 to Bit-2, etc.
                                                    43
Example
          44
              2.R-2R ladder Network
   It is a resistor ladder network connected to an inverting summer op-amp
    circuit
   It requires only two precision resistance values (R and 2R) and resolves the
    problems of the binary-weighted resistor network
   Output voltage is generated by switching sections of the ladder to either Vs or
    0V according to whether there is a 1 or 0 in the digital input.
                                                               4 Bit Converter
                                                                                   45
   R-2R Ladder cont.…
• Each bit corresponds to a switch:
• If the bit is high, the corresponding switch is connected to the inverting input of the op-
  amp.
• If the bit is low, the corresponding switch is connected to ground.
   Vref
     Bit: 0     0    0   0
                                                       Vout
              4-Bit Converter
                                                                             46
  R-2R Ladder
Vref   V1   V2   V3                           V3
                      Ideal Op-amp
                                      2R           2R
                                     Req 
                                           2 R 2 R 
                                                        R
                                           2 R  2 R 
                                                         47
       R-2R Ladder
Vref     V1   V2   V3                 V2           V3
                                               R        R
                                         R      1
                                   V3      2
                                             V     V2
                                        RR     2
                        I
                                   Likewise,
                                          1
                                    V2  V1
                                          2
                            Vout          1
                                    V1  Vref
                                          2
                                    Vout   IR
                                                            48
       R-2R Ladder
                                            Results:
Vref     V1   V2   V3                         1           1           1
                                          V3  Vref , V2  Vref , V1  Vref
                                              8           4           2
                                     Vref      Vref      Vref      Vref 
                        Vout     R b3    b2       b1       b0      
                                     2R        4R        8R        16R 
                                            Where b3 corresponds to bit 3,
                                            b2 to bit 2, etc.
                                   Vout
                                            If bit n is set, bn=1
                                            If bit n is clear, bn=0
                                                                              49
     R-2R Ladder
  For a 4-Bit R-2R Ladder
                 1      1    1      1 
 Vout    Vref  b3  b2  b1  b0    
                 2      4    8     16 
For general n-Bit R-2R Ladder or Binary Weighted Resister DAC
                                       n
                                                     1
            Vout  Vref  bn i                       i
                                      i 1           2
                                                                50
51
52
53
54
55
                        Multiplexer
                                                            m control signals
• Also called as Data Selector.            n i/p signals
• Multiplex means Many into one.                                                1 o/p signal
                                                             Multiplexer
•   It is a combinational logic circuit
•   Multiplexer is a circuit with many inputs and only one output.
•   i.e. it accepts several data inputs and allows only one of them AT A TIME to get
    through to the output
•   The routing of desired data input to output is controlled by SELECT
    (CONTROL) LINES.                                                                    56
57
 Above diagram is of n:1 multiplexer with n input lines, m
  control lines and 1 output line. Here
  2m = n
 So we can have
       2:1 MUX      ;with 1 control line
       4:1 MUX      ;with 2 control line
       8:1 MUX      ;with 3 control line
       16:1 MUX     ;with 4 control line
                                                              58
    2:1 Multiplexer                               Circuit Diag.
                                                      Inputs
• Here the 2: 1 MUX has two I/P lines D0 and D1                   Output
                                                      S0
   and one select (control) line S0
                                                      0           D0
• When S0 =0 then output= D0
                                                      1           D1
• When S0 =1 then output= D1
                                                                           59
    Demultiplexer
                                                     m control signals
• Also called as Data distributor.
• Demultiplex means one to Many.
                                     1 i/p signals                                n o/p
                                                     Demultiplexer                signal
•   Demultiplexer is a circuit with one input and many outputs.
•   i.e. it accepts one data input and steer the input signal to one of the output line.
•   The routing of data input to one of the output is controlled by CONTROL
    SIGNALS.
•   The circuit has one i/p signal, m control signals & n o/p signals
                                                                                           60
 Demultiplexer is exactly reverse of multiplexer.
 Above diagram is of 1:n demultiplexer. Relationship b/n m & n is given
  by
                           2m = n
  where m = no. of control lines, n = no. of output lines
 So we can have
         1:2 DEMUX ;with 1 control line
         1:4 DEMUX ;with 2 control line
         1:8 DEMUX ;with 3 control line
        1:16 DEMUX ;with 4 control line
                                                                           61
    1:2 Demultiplexer
           Circuit Diagram.
• Here the 1:2 DEMUX has 2 O/P lines Y0 and Y1 and one select (control) line S0
• When S0 =0 then output= Y0
• When S0 =1 then output= Y1
                                                                              62
              Quze-2
A 4-bit successive-approximation is used in ADC. If the input voltage is 5.5v
and the DAC has Vout =8v for 23 bit (MSB) and Vout =1v for 20 bit(LSB). What
is the equivalent binary representation of the input voltage?
             Vin
64