Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf ·...

34
Analog to Digital Conversion [ADC] mohammad iqbal [email protected] Teknik Elektro – Universitas Muria Kudus

Transcript of Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf ·...

Page 1: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Analog to Digital Conversion[ADC]

mohammad iqbal� [email protected]

Teknik Elektro – Universitas Muria Kudus

Page 2: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Latihan: ADC

• Jika saya menggunakan ADC 10-bit dengan menggunakan nilai tegangan referensi 5 Volt1. Berapa kemungkinan nilai pada output ADC?2. Berapa mVolt resolusi (perbandingan input dan

output) dari ADC tersebut?3. Berapakah nilai output ADC, jika tegangan input

adalah a) 1 Voltb) 2 Voltc) 4 Volt

4. Jika diketahui frekuensi clock yg digunakan adalah 500kHz sedangkan waktu konversi adalah 70 kali clock, berapakah total waktu konversinya?

Page 3: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Latihan: ADC

• Jika saya menggunakan ADC 10-bit dengan menggunakan nilai tegangan referensi 5 Volt

1. kemungkinan nilai pada output ADC = 2n = 210 = 10242. resolusi (perbandingan input dan output) dari ADC =

Vrange/2n 2= 5/1024 = 4,883mV3. nilai output ADC, jika tegangan input adalah

a) 1 Volt � output ADC = 204 = 00 1100 1100 (biner)b) 2 Volt � output ADC = 409 = 01 1001 1001 (biner)c) 4 Volt � output ADC = 819 = 11 0011 0011 (biner)

4. Jika diketahui frekuensi clock yg digunakan adalah 500kHz sedangkan waktu konversi adalah 70 kali clock, maka total waktu konversinya = 70/f = 70/(500.103) = 140us

Page 4: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Analog Signals

Analog signals – directly measurable quantities in terms of some other quantity

Examples:• Thermometer – mercury height rises as

temperature rises• Car Speedometer – Needle moves farther

right as you accelerate• Stereo – Volume increases as you turn the

knob.

Page 5: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Digital Signals

Digital Signals – have only two states. For digital computers, we refer to binary states, 0 and 1. “1” can be on, “0” can be off.

Examples:• Light switch can be either on or off• Door to a room is either open or closed

Page 6: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Examples of A/D Applications

• Microphones - convert pressure waves in the air into varying electrical signals

• Strain Gages - resistance changes with applied strain

• Thermocouple - temperature measuring device converts thermal energy to electric energy

• Voltmeters• Digital Multimeters

Page 7: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Just what does an A/D converter DO?

• Converts analog signals into binary words

Page 8: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Analog � Digital Conversion 2-Step Process:

• Quantizing - breaking down analog value is a set of finite states

• Encoding - assigning a digital word or number to each state and matching it to the input signal

Page 9: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Step 1: Quantizing

Example: You have 0-10V signals. Separate them into a set of discrete states with 1.25V increments. (How did we get 1.25V? See next slide…)

Output States

Discrete Voltage Ranges (V)

0 0.00-1.25

1 1.25-2.50

2 2.50-3.75

3 3.75-5.00

4 5.00-6.25

5 6.25-7.50

6 7.50-8.75

7 8.75-10.0

Page 10: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Quantizing

The number of possible states that the converter can output is:

N=2n

where n is the number of bits in the AD converter

Example: For a 3 bit A/D converter, N=23=8.

Analog quantization size:Q=(Vmax-Vmin)/N = (10V – 0V)/8 = 1.25V

Page 11: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Encoding

• Here we assign the digital value (binary number) to each state for the computer to read.

Output States

Output Binary Equivalent

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Page 12: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Accuracy of A/D Conversion

There are two ways to best improve 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.

Page 13: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Resolution

• Resolution (number of discrete values the converter can produce) = Analog Quantization size (Q)(Q) = Vrange / 2n, where Vrange is the range of analog voltages which can be represented

• limited by signal-to-noise ratio (should be around 6dB)

• In our previous example: Q = 1.25V, if we used a 2-bit converter, then the resolution would be 10/2^2 = 2.50V.

Page 14: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Sampling Rate

Frequency at which ADC evaluates analog signal. As we see in the second picture, evaluating the signal more often more accurately depicts the ADC signal.

Page 15: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Aliasing

• Occurs when the input signal is changing much faster than the sample rate.

For example, a 2 kHz sine wave being sampled at 1.5 kHz would be reconstructed as a 500 Hz (the aliased signal) sine wave.

Nyquist Rule:• Use a sampling frequency at least twice as high

as the maximum frequency in the signal to avoid aliasing.

Page 16: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Overall Better Accuracy

• Increasing both the sampling rate and the resolution you can obtain better accuracy in your AD signals.

Page 17: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 18: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

ADC Various Approaches

• 3 Basic Types

– Digital-Ramp ADC

– Successive Approximation ADC– Flash ADC

Page 19: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 20: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Digital-Ramp ADC

Page 21: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 22: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Successive approximation ADC

Illustration of 4Illustration of 4--bit SAC with 1 volt step size bit SAC with 1 volt step size

Page 23: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 24: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Successive Approximation Example

• 10 bit resolution or 0.0009765625V of Vref

• Vin= .6 volts• Vref=1volts• Find the digital value of

Vin

Page 25: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Successive Approximation

• MSB (bit 9)– Divided Vref by 2– Compare Vref /2 with Vin

– 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)

Page 26: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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

Page 27: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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)

Page 28: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

Successive Approximation• This process continues for all the

remaining bits.

Page 29: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 3Illustrated is a 3--bit flash ADC with resolution 1 voltbit flash ADC with resolution 1 volt

Page 30: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

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 31: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

ADC080x, 8-Bit µP Compatible A/D Converters

• CMOS 8-bit successive approximation A/D converters that use a differential potentiometer ladder—similar to the 256R products.

• These converters are designed to allow operation with the NSC800 and INS8080A derivative control bus with TRI-STATE output latches directly driving the data bus.

• These A/Ds appear like memory locations or I/O ports to the microprocessor and no interfacing logic is needed.

• Differential analog voltage inputs allow increasing the common-mode rejection and offsetting the analog zero input voltage value.

• In addition, the voltage reference input can be adjusted to allow encoding any smaller analog voltage span to the full 8 bits of resolution.

Page 32: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

ADC080x Features• Compatible with 8080 µP

derivatives—no interfacing logic needed - access time - 135 ns

• Easy interface to all microprocessors, or operates “stand alone”

• Differential analog voltage inputs• Logic inputs and outputs meet both

MOS and TTL voltage level specifications

• Works with 2.5V (LM336) voltage reference

• On-chip clock generator• 0V to 5V analog input voltage range

with single 5V supply• No zero adjust required

Page 33: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...

ADC080x, interfacing

Page 34: Analog to Digital Conversion [ADC] - Teknik Elektro UMKelektro.umk.ac.id/1qbal/si/00 adc.pdf · Analog to Digital Conversion [ADC] mohammad iqbal ... Latihan: ADC • Jika saya ...