filters dac and adc

30
Filters, DAC, and ADC Dr. Ashraf Saleem

Upload: rendy-ardiwinata

Post on 27-Jun-2015

770 views

Category:

Education


13 download

TRANSCRIPT

Page 1: Filters DAC and ADC

Filters, DAC, and ADC

Dr. Ashraf Saleem

Page 2: Filters DAC and ADC

Outlines of FiltersOutlines of Filters

Filterinput output

Filtering: Certain desirable features are retainedOther undesirable features are suppressed

Dr. Ashraf Saleem 2

Other undesirable features are suppressed

Page 3: Filters DAC and ADC

Classification of FiltersClassification of Filters

Signal Filter

A l Filt Di it l FiltAnalog Filter Digital Filter

Element Type Frequency Band

Active Passive Low-Pass

High-Pass

Band-Pass

Band-Reject

All-Pass

Dr. Ashraf Saleem 3

Page 4: Filters DAC and ADC

Classification of FiltersClassification of Filters

Filter classification according to gimplementationActive filters include RC networks and op-amps

Suitable for low frequency, small signalActive filters are preferred since avoid the bulk and non-linearity of inductors. However, active filters require a power supply, q p pp y

Passive filters consist of RCL networksSimple, more suitable for frequencies above audio range, where

i fil li i d b h b d id hactive filters are limited by the op-amp bandwidth

Digital filters

Dr. Ashraf Saleem 4

Page 5: Filters DAC and ADC

Classification of FiltersClassification of Filters

Filter classification according to frequency responseL filtLow-pass filterHigh-pass filterBand-pass filterBand pass filterBand-stop (Notch) filter

Dr. Ashraf Saleem 5

Page 6: Filters DAC and ADC

StateState--variable filtersvariable filters

Also known as a Universal Active FilterC i t f lifi d t i t tConsists of one amplifier and two integratorsHigh-pass, low-pass and band-pass in the same ICExample below: Burr Brown UAF42p

Dr. Ashraf Saleem 6

Page 7: Filters DAC and ADC

Low Pass RC FiltersLow Pass RC Filters

The critical frequency (fc): is the frequency for which q y ( c) q ythe ratio of the to the input voltage is approximately 0.707. in terms of the resistor and capacitor, the critical frequency is given by:critical frequency is given by:

RCfc π2

1=

The output-input voltage ratio can be computed by: RCπ2

1V2)/(1

1

cin

out

ffVV

+=

Dr. Ashraf Saleem 7

Page 8: Filters DAC and ADC

Example: p

A measurement signal has a frequency < 1A measurement signal has a frequency < 1 kHz, but there is unwanted noise at about 1 MHz Design a low-pass filterabout 1 MHz. Design a low pass filter that attenuates the noise to 1%. What is the effect on the measurement signal atthe effect on the measurement signal at its maximum of 1 kHz?

Dr. Ashraf Saleem 8

Page 9: Filters DAC and ADC

High Pass RC FiltersHigh Pass RC Filters

High pass filter passes high frequencies and blocks g p p g qlow frequencies.

1

The output input voltage ratio can be computed by:

RCfc π2

1=

The output-input voltage ratio can be computed by:

( )/ ffV ( )2)/(1

/

c

c

in

out

ffff

VV

+=

Dr. Ashraf Saleem 9

Page 10: Filters DAC and ADC

Example: p

Pulses for stepping motor are beingPulses for stepping motor are being transmitted at 2000 Hz. Design a filter to reduce 60-Hz noise but reduce thereduce 60 Hz noise but reduce the pulses by no more than 3 dB

Dr. Ashraf Saleem 10

Page 11: Filters DAC and ADC

Band Pass RC FiltersBand Pass RC Filters

Band pass filter blocks frequencies below a low limit p qand above a high limit while passing frequencies between the limits.

1 1

LLH CR

fπ2

1=

HHL CR

fπ2

1=

The output-input voltage ratio can be computed by:

2222 ]))/(1([)( ffRRffffff

VV

HLHLLH

H

in

out

+++−=

Dr. Ashraf Saleem 11

Page 12: Filters DAC and ADC

Example: p

A signal-conditioning system uses aA signal conditioning system uses a frequency variation from 6 kHz to 60 kHz to carry measurement information Thereto carry measurement information. There is a considerable noise at 120 Hz and 1 MHz Design a band pass filter to reduceMHz. Design a band pass filter to reduce the noise by 90%.

Dr. Ashraf Saleem 12

Page 13: Filters DAC and ADC

Data Acquisition SystemData Acquisition System

Mechatronic systems use digital data acquisition for a y g qvariety of purposes such as:process condition monitoring and performance

l tievaluation,fault detection and diagnosis, product quality assessmentproduct quality assessment, dynamic testing, system identification (i.e., experimental modeling), and y ( , p g),feedback control.

Dr. Ashraf Saleem 13

Page 14: Filters DAC and ADC

Data Acquisition SystemBlock DiagramBlock Diagram

Dr. Ashraf Saleem 14

Page 15: Filters DAC and ADC

A/D Converter: Input Signalp g

AnalogAnalogSignal is continuousExample: strain gage Most transducersExample: strain gage. Most transducers

produce analog signals

DigitalSi l i ith ON OFFSignal is either ON or OFFExample: light switch.

Dr. Ashraf Saleem 15

Page 16: Filters DAC and ADC

DigitalDigital--Analog Converter (DAC)Analog Converter (DAC)Weighted Resistor DACWeighted Resistor DACWeighted Resistor DACWeighted Resistor DAC

22...

2 102

1ref

nn

n

vbbbv ⎥⎦⎤

⎢⎣⎡ +++= −

−−

Dr. Ashraf Saleem 16

Page 17: Filters DAC and ADC

DigitalDigital--Analog Converter (DAC)Analog Converter (DAC)Ladder DAC (Ladder DAC (22RR--R)R)Ladder DAC (Ladder DAC (22RR--R)R)

02 refn vbbbv ⎥⎤

⎢⎡ +++= −

22...

2 11 nnbv ⎥⎦⎢⎣+++= −−

Dr. Ashraf Saleem 17

Page 18: Filters DAC and ADC

Example 1p

What is the output voltage of a 10-bitWhat is the output voltage of a 10-bit Ladder DAC with a 10 V reference voltage if the input is 00101101012voltage if the input is 00101101012.

Dr. Ashraf Saleem 18

Page 19: Filters DAC and 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 1-bit change in binary word. g p g y

nVV −=Δ 2Rout VV =Δ 2Where ∆Vout = smallest output change

VR = reference voltage n = number of bits in the word

Dr. Ashraf Saleem 19

Page 20: Filters DAC and ADC

Example 2: p

Determine how many bits a D/A converterDetermine how many bits a D/A converter must have to provide output increments of 0 04V or less The reference is 10Vof 0.04V or less. The reference is 10V

Dr. Ashraf Saleem 20

Page 21: Filters DAC and ADC

Example 3: p

A control valve has a linear variation of opening as the p ginput 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. g g g

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

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

Dr. Ashraf Saleem 21

Page 22: Filters DAC and ADC

DAC Error SourcesDAC Error Sources

Code Ambiguity. In many digital codes (e.g., in the straight bi d ) i ti b b LSB ill i lbinary code), incrementing a number by an LSB will involve more than one bit switching. If the speed of switching from 0-1 is different from that for 1-0, and if switching pulses are not

li d t th it hi i it i lt l th it hi fapplied to the switching circuit simultaneously, the switching of the bits will not take place simultaneously. Settling Time. The circuit hardware in a DAC unit will have some dynamics, with associated time constants and perhaps oscillations (underdamped response). Hence, the output voltage cannot instantaneously settle to its ideal value upon switching. The time required for the analog output to settle within a certain band (say :t2% of the final value or :t resolution), following the application of the digital data, is termed settling time.

Dr. Ashraf Saleem 22

pp g g

Page 23: Filters DAC and ADC

DAC Error SourcesDAC Error Sources

Parametric Errors. resistor elements in a DAC might not b i ti l l h i t ithi idbe very precise, particularly when resistors within a wide range of magnitudes are employed, as in the case of weighted-resistor DAC. These errors appear at the analog output Furthermore aging and environmentalanalog output. Furthermore, aging and environmental changes (primarily, change in temperature) will change the values of circuit parameters, resistance in partic-ular. This also will result in DAC error. Reference Voltage Variation: Since the analog output of a DAC is proportional to the reference voltage vref, any variations in the voltage supply will directly appear as an

Thi bl b b i t bili derror. This problem can be overcome by using stabilized voltage sources with sufficiently low output impedance.

Dr. Ashraf Saleem 23

Page 24: Filters DAC and ADC

Analog to Digital Converters (ADC)Analog to Digital Converters (ADC)

The formulae of analog to digital conversion is as

innn V

Vbbb =+++ −−− 2.........22 22

11

following:

rVWhere b1b2b3….bn = n-bit digital output

Vin = analog input voltage

Vr = analog reference voltage

The output uncertainty/resolution can be given by:

∆V=Vr2-n

Dr. Ashraf Saleem 24

r

Page 25: Filters DAC and ADC

Example 1: p

Temperature is measured by a sensor withTemperature is measured by a sensor with an output of 0.02 V/oC. Determine the required ADC reference and word size torequired ADC reference and word size to measure 0o to 100oC with 0.1oCresolutionresolution

Dr. Ashraf Saleem 25

Page 26: Filters DAC and ADC

Example 2: p

Find the digital word that results from aFind the digital word that results from a 3.127 V input to a 5-bit ADC with a 5V reference?reference?

Dr. Ashraf Saleem 26

Page 27: Filters DAC and ADC

Successive Approximation ADCSuccessive Approximation ADC

Dr. Ashraf Saleem 27

Page 28: Filters DAC and ADC

Example 3: p

Find the successive approximation ADCFind the successive approximation ADC output for a 4-bit converter to a 3.217V input if the reference is 5Vinput if the reference is 5V.

Dr. Ashraf Saleem 28

Page 29: Filters DAC and ADC

DualDual--Slope ADC Slope ADC

Dr. Ashraf Saleem 29

Page 30: Filters DAC and ADC

Example 4: p

A dual-slope ADC as shown previouslyA dual slope ADC as shown previously has R=100 kΩ and C=0.01μF. The reference is 10V and the fixedreference is 10V, and the fixed integration time is 10 ms. Find the conversion time for a 6 8V inputconversion time for a 6.8V input.

Dr. Ashraf Saleem 30