digital signal conditioning (adc

74
Digital signal conditioning (ADC/DAC)

Upload: mohd-fazli

Post on 26-Mar-2015

1.322 views

Category:

Documents


10 download

DESCRIPTION

notes ADC/DAC

TRANSCRIPT

Page 1: Digital Signal Conditioning (ADC

Digital signal conditioning (ADC/DAC)

Page 2: Digital Signal Conditioning (ADC

Data Handling Systems

• Both data about the physical world and control signals sent to interact with the physical world are typically "analog" or continuously varying quantities.

• In order to use the power of digital electronics, one must convert from analog to digital form on the experimental measurement end and convert from digital to analog form on the control or output end of a laboratory system.

Page 3: Digital Signal Conditioning (ADC

Data Collection and Control

Page 4: Digital Signal Conditioning (ADC

Data Acquisition System

Analog Signal

Signal Conditioner

ADC

Digital Processing

Communication

Page 5: Digital Signal Conditioning (ADC

Analog vs. Digital Signal

• Analog signals: – Continuous, expressed in decimal system

– No limitation on the maximum/minimum value

– Can not be processed by computer

• Digital signals: binary number system– All numbers are expressed by a combination of 1

& 0

– The maximum value is limited by # of bits available

Page 6: Digital Signal Conditioning (ADC

Types of data

• Analog data (All values on the time and amplitude are allowed).

• Digital data (Only a few amplitude levels are allowed).

Page 7: Digital Signal Conditioning (ADC

Review

• Ex 1 : Find the base 10 equivalent of the binary number 00101112

Page 8: Digital Signal Conditioning (ADC

review

• Ex : octal & hexadecimal number???

• (3 binary digit) 0002 = ?? 8• (3 binary digit) 1112 = ?? 8• 4 binary digit 00002 = ??? 16 Hex

• 4 binary digit 11112 = ??? 16 Hex

Page 9: Digital Signal Conditioning (ADC

Fractional binary number

• N10 = b1 2-1 + b2 2-2 + …….+ bm 2-m

Where N10 = base number less than 1

b1 b2 … bm-1 bm = base 2 number less than 1

m = number of digits in base 2 numbers

Page 10: Digital Signal Conditioning (ADC

• Ex: Find the base 10 equivalent of the binary number 0.110102

Page 11: Digital Signal Conditioning (ADC

ADC - Analog Representations of Sound

Magnified phonograph grooves, viewed from above:

The shape of the grooves encodes the continuously varying audio signal.

Page 12: Digital Signal Conditioning (ADC

Analog to Digital Recording Chain

ADC

Continuously varying electrical energy is an analogof the sound pressure wave.

Microphone converts acoustic to electrical energy. It’s a transducer.

ADC (Analog to Digital Converter) converts analog to digital electrical signal.

Digital signal transmits binary numbers.

DAC (Digital to Analog Converter) converts digital signal in computer to analog for your headphones.

Page 13: Digital Signal Conditioning (ADC

Analog to Digital Conversion

Instantaneous amplitudes of continuous analog signal, measured at equally spaced points in time.

A series of “snapshots”

Page 14: Digital Signal Conditioning (ADC

[a.k.a. “sample word length,” “bit depth”]Precision of numbers used for measurement: the more bits, the higher the resolution.

Example: 16 bit

Analog to Digital Overview

Sampling Rate

How often analog signal is measured

Sampling Resolution

[samples per second, Hz]

Example: 44,100 Hz

Page 15: Digital Signal Conditioning (ADC

Sampling Rate

Nyquist Theorem:

Sampling rate must be at least twice as high as the highest frequency you want to represent.

Determines the highest frequency that you can represent with a digital signal.

Capturing just the crest and trough of a sine wave will represent the wave exactly.

Page 16: Digital Signal Conditioning (ADC

Aliasing

What happens if sampling rate not high enough?

A high frequency signal

sampled at too low a rate

looks like …

… a lower frequency signal.

That’s called aliasing or foldover. An ADC has a low-pass anti-aliasing filter to prevent this.

Synthesis software can cause aliasing.

Page 17: Digital Signal Conditioning (ADC

Common Sampling Rates

Sampling Rate Uses

44.1 kHz (44100) CD, DAT

48 kHz (48000) DAT, DV, DVD-Video

96 kHz (96000) DVD-Audio

22.05 kHz (22050) Old samplers

Most software can handle all these rates.

Which rates can represent the range of frequencies audible by (fresh) ears?

Page 18: Digital Signal Conditioning (ADC

3-bit Quantization

A 3-bit binary (base 2) number has 23 = 8 values.

0

1

2

3

4

5

6

7

A rough approximation

Am

plit

ud

e

Time — measure amp. at each tick of sample clock

Page 19: Digital Signal Conditioning (ADC

4-bit Quantization

A 4-bit binary number has 24 = 16 values.

0

2

4

6

8

10

12

14

Am

plit

ud

e

A better approximation

Time — measure amp. at each tick of sample clock

Page 20: Digital Signal Conditioning (ADC

Quantization Noise

Round-off error: difference between actual signal and quantization to integer values…

Random errors: sounds like low-amplitude noise

Page 21: Digital Signal Conditioning (ADC

Chap 0 21

Analog Input Signal

• Typically, Differential or Single-ended input signal of a single polarity

– Typical Input Range• 0 ~ 10V and 0 ~ 5V

– If Actual input signal does not span Full Input range• Some of the converter output

code never used

• Waste of converter dynamic range

• Greater relative effects of the converter errors on output

• Matching input signal and input range

– Prescaling input signal using OP Amp

• In a final stage of preconditioning circuit

– By proportionally scaling down the reference signal

• If reference signal is adjustable

Page 22: Digital Signal Conditioning (ADC

Chap 0 22

Converting bipolar to unipolar

• Using unipolar converter when input signal is bipolar

– Scaling down the input– Adding an offset

• Bipolar Converter

– If polarity information in output is desired

– Bipolar input range• Typically, 0 ~ 5V

– Bipolar Output• 2’s Complement• Offset Binary• Sign Magnitude• …

• Input signal is scaled and an offset is added

scaled

Addoffset

Page 23: Digital Signal Conditioning (ADC

Introduction to MechatronicsStudent Lecture – 10/23/06

Introduction DAC

A DAC is a Digital to Analog converter. It converts a binary digital number into an analog representation, most commonly voltage though current is also used sometimes.

0101

0011

0111

1001

1001

1010

1011 DAC

Page 24: Digital Signal Conditioning (ADC

Introduction to MechatronicsStudent Lecture – 10/23/06

IntroductionEach binary number sampled by the DAC corresponds to

a different output level.

10111001 10100111 10000110010101000011001000010000Digital Input Signal

An

alo

g O

utp

ut

Sign

al

Page 25: Digital Signal Conditioning (ADC

Introduction to MechatronicsStudent Lecture – 10/23/06

Ideally Sampled Signal Output typical of a real, practical DAC due to sample & hold

Typical OutputDACs capture and hold a number, convert it to a physical signal, and hold that value for a given sample interval. This is known as a zero-order hold and results in a piecewise constant output.

DAC

Page 26: Digital Signal Conditioning (ADC
Page 27: Digital Signal Conditioning (ADC
Page 28: Digital Signal Conditioning (ADC
Page 29: Digital Signal Conditioning (ADC
Page 30: Digital Signal Conditioning (ADC
Page 31: Digital Signal Conditioning (ADC
Page 32: Digital Signal Conditioning (ADC
Page 33: Digital Signal Conditioning (ADC
Page 34: Digital Signal Conditioning (ADC
Page 35: Digital Signal Conditioning (ADC
Page 36: Digital Signal Conditioning (ADC
Page 37: Digital Signal Conditioning (ADC
Page 38: Digital Signal Conditioning (ADC
Page 39: Digital Signal Conditioning (ADC
Page 40: Digital Signal Conditioning (ADC
Page 41: Digital Signal Conditioning (ADC
Page 42: Digital Signal Conditioning (ADC
Page 43: Digital Signal Conditioning (ADC
Page 44: Digital Signal Conditioning (ADC

• Ex: What is the output voltage of a 10-bit DAC with a 10V reference if the input is

• a) 00101101012 b) 20F H

• What input is needed to get a 6.5 V output?

Page 45: Digital Signal Conditioning (ADC

Bipolar DAC

• Some DACs are designed to output a voltage that ranges from plus to minus some maximum when the input binary ranges over the counting states.

• Although computers frequently use 2s complement to represent negative numbers, this is not common with DACs.

• Instead a simple offset-binary is frequently used wherein the output is simply biased by half the reference voltage equation

Page 46: Digital Signal Conditioning (ADC

• The bipolar DAC relationship is then given by

• Vout = (N/ 2n ) VR – ½ VR

• If N =0 ,, V out (min) = - VR /2

The max value for N is equal to (2n – 1) so that the

Vout (max) = [(2n – 1)/ 2n ] VR – ½ VR

= ½ VR - (VR / 2n )

Page 47: Digital Signal Conditioning (ADC

• Ex: A bipolar DAC has 10 bits and a reference of 5V. What outputs will results from inputs of 04F H and 2A4 H?

• What digital input gives a zero output voltage?

Page 48: Digital Signal Conditioning (ADC

Conversion resolution

• The conversion resolution is a function of the reference voltage and the number of bits in the word.

• The more bits, the smaller the change in analog output for a bit change in a binary mode and hence the better resolution.

Page 49: Digital Signal Conditioning (ADC

Introduction to MechatronicsStudent Lecture – 10/23/06

Resolution

• The change in output voltage for a change of the LSB.

• Related to the size of the binary representation of the voltage. (8-bit)

• Higher resolution results in smaller steps between voltage values

n

refV

2 Resolution

Page 50: Digital Signal Conditioning (ADC

• Ex: Find Δvout of a DAC with a 10v reference?

• Ex : Determine how many bits a DAC must have to provide output increments of 0.04V or less. The reference is 10V.

Page 51: Digital Signal Conditioning (ADC

FIGURE 3.11 A generic DAC diagram, showing typical input and output signals.

Curtis JohnsonProcess Control Instrumentation Technology, 8e]

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 52: Digital Signal Conditioning (ADC

• Ex : A control valve has a linear variation of opening as the input voltage varies from 0 to 10V . A microcomputer outputs an 8 bit word to control the valve opening using an 8 bit DAC to generate the valve voltage.

• a) Find the reference voltage required to obtain a full open valve (10V)

• b) Find the percentage of valve opening for a 1 bit change in the input word.

Page 53: Digital Signal Conditioning (ADC

A typical DAC is often implemented using a ladder network of resistors

Page 54: Digital Signal Conditioning (ADC

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.

Page 55: Digital Signal Conditioning (ADC

ADC Various Approaches

• 3 Basic Types

• Digital-Ramp ADC

• Successive Approximation ADC

• Flash ADC

Page 56: Digital Signal Conditioning (ADC

Digital-Ramp ADC

• Conversion from analog to digital form inherently involves comparator action where the value of the analog voltage at some point in time is compared with some standard.

• A common way to do that is to apply the analog voltage to one terminal of a comparator and trigger a binary counter which drives a DAC.

Page 57: Digital Signal Conditioning (ADC

Digital-Ramp ADC

Page 58: Digital Signal Conditioning (ADC

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.

Page 59: Digital Signal Conditioning (ADC

Successive approximation ADC

Illustration of 4-bit SAC with 1 volt step size

Page 60: Digital Signal Conditioning (ADC

Successive approximation ADC

• Much faster than the digital ramp ADC because it uses digital logic to converge on the value closest to the input voltage.

• A comparator and a DAC are used in the process.

Page 61: Digital Signal Conditioning (ADC

Flash ADC

• It is the fastest type of ADC available, but requires a comparator for each value of output.

(63 for 6-bit, 255 for 8-bit, etc.)

• Such ADCs are available in IC form up to 8-bit and 10-bit flash ADCs (1023 comparators) are planned.

• The encoder logic executes a truth table to convert the ladder of inputs to the binary number output.

Illustrated is a 3-bit flash ADC with resolution 1 volt

Page 62: Digital Signal Conditioning (ADC

Flash ADC

• The resistor net and comparators provide an input to the combinational logic circuit, so the conversion time is just the propagation delay through the network - it is not limited by the clock rate or some convergence sequence.

Page 63: Digital Signal Conditioning (ADC

• Ex : Find the successive approximation Adco/p for a 4 bit converter to a 3.217V input if the reference is 5V.

Page 64: Digital Signal Conditioning (ADC

ADC formula

• The ADC will find a fractional binary number that gives the closest approximation to the fraction formed by the input voltage and reference .

• b12-1 + b22-2 +…+bn2-n ≤ Vin/VR ……1

• Where b1 b2…bn = n- bit digital output

• Vin = analog input voltage

• VR = analog reference voltage

• Uncertainty in the input voltage

• ΔV = VR2-n

Page 65: Digital Signal Conditioning (ADC

• Ex : Temperature is measured by a sensor with an o/p of 0.02V/°C . Determine the required ADC reference and word size to measure 0° to 100°C with 0.1°C resolution.

Page 66: Digital Signal Conditioning (ADC

• Eqn 1 can be written in a simpler fashion

• N = INT [(Vin/VR )2n ]

• Where INT () means to take the integer part of the quantity in the bracket

• Bipolar

• N = INT [((Vin/VR )+ ½ )2n ]

Page 67: Digital Signal Conditioning (ADC

FIGURE 3.13 A generic ADC diagram, showing typical input and output signals and noting the conversion time.

Curtis JohnsonProcess Control Instrumentation Technology, 8e]

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 68: Digital Signal Conditioning (ADC

• Ex : What are the hex and binary o/p of a bipolar 8 bit ADC with a 5 V reference for inputs of -0.85V and + 1.5V? What input voltage would cause an output of 72H?

Page 69: Digital Signal Conditioning (ADC

Other signal conditioning circuit

**Buffer, comparator.

• Buffer (follower)

• Picture..

Page 70: Digital Signal Conditioning (ADC

• Ex:

• A Process control system specifies that temperature should never exceed 160°C if the pressure also exceeds 10Kpa. Design an alarm system to detect this condition using temperature and pressure transducers with transfer function of 2.2mV/°C and o.2V/Kparespectively.

Page 71: Digital Signal Conditioning (ADC

Guideline for Design : Model for measurement and signal-conditioning objectives.

Curtis JohnsonProcess Control Instrumentation Technology, 8e]

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

DESIGN GUIDELINE

Page 72: Digital Signal Conditioning (ADC

Design Guideline

• Ex: A sensor outputs a voltage ranging from -2.4 to -1.1 V. For interface to an analog to digital converter, this needs to be 0 to 2.5V. Develop the required signal conditioning.

Page 73: Digital Signal Conditioning (ADC

• Ex: A measurement of temperature using a sensor that outputs 6.5mV/°C must measure to 100°C . A 6 bit ADC with a 10V reference is used.

• A) Develop a circuit to interface the sensor and the ADC

• B) Find the temperature resolution

Page 74: Digital Signal Conditioning (ADC

• Ex: A sensor outputs a range of 20 to 250mV as a variable varies over its range.

• Develop signal conditioning so that this becomes 0 to 5V. The circuit must have very high impedance.