1
Analog to Digital
Sources:
(1) Course materials developed by CDR Hewitt Hymas, USN
(2) Frenzel, Principles of Electronic Communication Systems, 3
rd
ed., McGraw Hill, 2008
a.
Provide examples of analog and digital communications systems.
b.
Describe the
advantages of digital over analog communications.
c.
Explain the concept of serial and parallel transmission of digital signals and the advantages/ disadvantages of each method.
d.
Discuss the basic steps of the analog

to

digital conversion process: sampling, qu
antizing and encoding.
Analog systems
A
nalog systems use electrical signals that vary
continuously
, not having discrete values
.
Analog signals are electrical representations of signals from nature (pressure, light, sound, etc.)
Examples of
analog sys
tems
: AM/FM radio, telephone, cassettes, VCR
Digital signals
Binary digital signals use two discrete voltage levels to represent binary 1 or 0.
Combining
multiple bits into words permits us to represent larger values.
Digital circuits operate on
digital signals
performing logic and arithmetic functions.
Digital systems
Digital systems use electrical signals that represent discrete, binary values.
Examples of
digital systems are CDs, DVDs, digital cameras and HDTV.
Digital signals are not
representative of signals that occur in nature
.
Natural signals must be
converted
into
digital format.
Historically, signals in communications systems have been analog but a migration to digital
systems has been underway for the last 25 years.
Advantage
s of digital signals
The most important advantage of digital communications is
noise immunity
.
Receiver circuitry can distinguish between a binary 0 and 1 with a significant amount of noise.
analog signal with noise
digital
signal with noise
Dig
ital signals can be stripped of any noise in a process called
signal
regeneration
.
Consider a network of relay stations.
An analog signal is received, amplified and retransmitted at each station.
o
However, the noise is also amplified each link.
A digital
signal is received, regenerated, then retransmitted at each station.
o
The noise can be eliminated at each repeater.
Time (sec)
Voltage (V)
2
Even if a digital signal does contain bit errors, many of these errors can be fixed at the receiver through the use
of
error correcting codes
.
Error correcting codes allows CDs with minor scratches to be played without errors.
We will discuss such codes later.
Digital signals are easier to
multiplex
.
Multiplexing is the process of allowing multiple signals to
sha
re
the
same transmission chann
el.
Digital is the native format for computers.
Computers permit the
digital signal processing
(DSP) and digital storage of communication signals.
DSP allows operations such as filtering, equalization and mixing to be done numerically without the use
of
analog circuits.
DSP also permits
data compression (encoding information so fewer bits are needed)
.
So, in summary, the advantages of digital signals are: (1) better noise immunity, (2) ability to multiplex, (3)
ability to do error correction, and (4) abi
lity to do DSP (encryption, compression, encoding, etc).
Transmission of digital data
There are two ways to move bits from one place to another:
Transmit all bits of a word simultaneously (parallel transfer).
Send only 1 bit at a time (serial transfer)
.
Serial transmission
In serial transmission, each bit of a word is transmitted
sequentially,
one after another.
The least significant bit (LSB) is transmitted first, and the most significant bit (MSB) last.
Each bit is transmitted for a fixed interval
of time.
Serial data can be transmitted faster and over longer distances than parallel data.
Serial buses are now replacing parallel buses in equipment where very high speeds are required.
Parallel transmission
Parallel data transmission is extremely f
ast because all the bits of the data word are transferred simultaneously.
There must be one wire for each bit of information to be transmitted.
A multi

wire
cable must be used.
Parallel data transmission is
impractical
for long

distance
communication be
cause of:
Cost of laying multi

wire cables.
Signal attenuation over long distances.
At high speeds, capacitance and inductance of multiple wires
distorts the pulse signal. To reduce this, line lengths must be
severely shortened.
To achieve clock speeds up
to 400 MHz, line lengths must
limited to a few inches
Parallel data transmission by radio would be complex and expensive.
We would need o
ne transmitter and one receiver for each bit.
3
Serial

parallel conversion
Because both parallel and serial transmissi
on occur in computers and other equipment, there must be techniques
for converting between parallel and serial and vice versa.
Such data conversions are usually taken care of by
shift registers
, sequential logic circuits made up of a
number of flip

flops
connected in cascade.
Conversion from analog to digital
Before we can use digital transmission, we must convert the signal of interest into a digital format.
Translating an analog signal into a digital signal is called
analog

to

digital
(A/D) conversion, digitizing a signal,
or encoding.
The device used to p
erform this translation is known as an analog

to

digital converter or ADC.
An analog signal is a smooth or continuous voltage or current variation.
Through A/D conversion these
continuously variable signals are changed into a series of binary numbers.
The first step in A/D conversion is a process of
sampling
the analog
signal at regular time intervals.
How often do we need to sample the signal?
Put another way: H
ow large does our sampling frequency
f
need to
be
in order to accurately represent the signal?
Q
D
C
Q
D
C
Q
D
C
Q
D
C
Q
Q
Q
Q
Data
input
Clock
input
Parallel outputs
Time (sec)
Voltage (V)
01101010100111001101010101111
4
1
1.0005
1.001
1.0015
1.002
1.0025
1.003
1.0035
1.004
1.0045
1.005
1
0.5
0
0.5
1
Time (sec)
Voltage (V)
0
1000
2000
3000
4000
5000
6000
0
0.05
0.1
0.15
0.2
0.25
Frequency (Hz)
Voltage (V)
Minimum sampling frequency
The minimum sampling rate required in order to accurately reconstruct the
analog input is given by the Nyquist sampling rate
f
N
given
by the formula
2
N m
f f
where
f
m
is the highest frequency of the analog input.
The Nyquist rate is a
theoretical
minimum.
In practice, sampling rates are typically
2.5 to 3
times the Nyquist rate
f
N
.
Therefore, we say that the sampling frequency must be
more than
twice the value
of the highest
frequency component of the signal:
2
s m
f f
If this rule is violated, a problem called
aliasing
results.
A/D conversion
The
actual analog signal is smooth and continuous and represents an infinite number of actual
voltage values.
It is not possible to convert all analog samples to a precise binary number.
Therefore, samples
are converted to a binary number whose value is clo
se to the actual sample value.
The A/D converter can represent only a
finite
number of voltage
values over a specific range.
An A/D converter divides a voltage
range into discrete increments, each of which is represented by a
binary number.
The proces
s of mapping the sampled analog voltage levels to these
discrete, binary values is called
quantization
.
Quantizers are
characterized by their number of output levels.
A
n
N

bit quantizer
has 2
N
levels and outputs binary numbers of length
N
.
Telephones use
8

bit encoding
2
8
=
256
levels
CD audio use 16

bit encoding
2
16
=
65,536
levels
Example Problem 1
Consider the signal depicted below in time and frequency domain representations.
1.
What is the maximum frequency present in the oboe signal?
2.
Based upon this, what would be the minimum sampling rate according to Nyquist?
3.
What would be practical sampling rate?
Example Problem
2
Suppose you have an analog signal that varies between 0 volts and 20 volts. Suppose you
use 4 bit quantiz
ation.
(a) What is the amount of separation between quantization levels (in volts)?
(b) What happens to the amount of separation between quantization levels as you increase the number of bits
used in the quantization process?
5
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
a.
Explain the
analog

to

digital (A/D) and digital

to

analog (D/A) conversion process.
b.
Given an analog waveform, sampling rate and resolution, determine the resulting binary A/D output and sketch the
reconstructed output of the D/A converter.
c.
Calculate the minimum (Nyqui
st) sampling rate for an analog signal.
d.
Calculate the resolution and dynamic range of an N

bit quantizer.
e.
Explain how quantizing error occurs and how it is affected by sampling rate and quantizer resolution.
f.
Calculate quantization signal

to

noise ratio for an N

bit quantizer.
Conversion from analog to digital
Last time we considered the problem of converting an analog waveform
into binary values. We will review that process again, and then look at the problem of converting the digital
signal back into analog.
Analog
Digital
Back to analog
Recall: First we sample. The analog waveform is composed of an
infinite number of points. Therefore, we must take samples of this
continuous waveform to send.
Question: If we take a sample every 0.5 ms, what is the sampling rate?
Answer:
1 1
2 kHz
0.0005
s
f
T
How fast does our sampling rate
f
need to be?
The number of samples required is dictated by the frequency content of
our analog waveform.
A slowly changing waveform (i.e. low frequency) can be sampled at a
lower rate.
A rapidly changing waveform (i.e. high frequency) must be sampled at a high rate in order to capture the
rapid changes.
Minimum sampling frequency
The minimum sampling rate required
in order to accurately reconstruct the
analog input is given by the Nyquist sampling rate
f
N
given
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
0110
0111
1000
1010
1100
1110
1111
1111
1111
1110
1100
1010
0111
sampling period
T =
0.5 ms
6
2
N m
f f
where
f
m
is the highest frequency of the analog signal. The Nyquist
rate is theoretical minimum. In practice,
the sampling frequency is
2
s m
f f
. Sampling rates are typically 2.5 to 3 times the value of
f
m
.
Next step: Quantization
We now determine the amplitudes associated
with each sample point.
We then convert these amplitudes (real
numbers) into binary integers.
The process of mapping the sampled analog voltage levels to discrete,
binary values is called quantization.
Quantizers are characterized length of the binary words they produce.
An
N

bit quantizer has
2
N
levels and outputs binary numbers of length
N
.
Telephones use 8

bit encoding
2
8
= 256 levels
CD audio use 16

bit encoding
2
16
= 65,536 levels
Example: 3

bit quantization
Quantization intervals
Quantizers are limited to specific voltage range. For the example above, we will
assume that our analog input falls within a range of

1.0 to +1.0 volts. The quantizer will partition this range
into 2
N
steps of size
q
, the quantizer step size, given by
max min
2
N
v v
q
.
Note:
q
is also called the resolution .
Each of these intervals (or bins) is assigned a binary value
from 0 to
2 1
N
.
If sampled point falls within that interval (or bin), it is assigned
that binary
value.
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
Voltage (V)
0.1768
0.1173
0.5486
0.9017
0.9275
0.5543
0.03326
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
000
001
010
011
100
101
110
111
7
These binary values are then transmitted to the receiver as a digital signal.
So…this digital signal arrives at the receiver. The receiver has to convert it back to an analog signal.
Digital

to

analog (D/A) conversion
At the receiver, these
binary values must be converted back into an analog
signal. This process is called digital

to

analog (D/A) conversion.
The reconstruction levels are the midpoints of the intervals used by the quantizer.
The incoming bit stream is carefully divided into the correct groups of 3 bits each.
8
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
000
001
010
011
100
101
110
111
011
100
110
111
111
110
011
001
011
100
110
111
111
110
011
001
If the “stair

step” voltage (green) is passed thru a low

pass filter, the smoother (blue) voltage results.
Quantization error
Notice
that there is some error associated with this conversion process. The error is the
difference between analog input and the reconstructed signal.
Quantization error can be reduced by increasing the number of bits
N
.
This error manifes
ts itself as additive noise due to the difference between
the
analog value and its closest digital value.
Quantization noise has an approximate rms voltage given
12
n
q
V
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
0
1
2
3
4
5
6
1.00
0.75
0.50
0.25
0.00
0.25
0.50
0.75
1.00
Time (ms)
9
0
1
2
3
4
5
6
7
8
9
10
1.000
0.875
0.750
0.625
0.500
0.375
0.250
0.125
0.000
0.125
0.250
0.375
0.500
0.625
0.750
0.875
1.000
Time (ms)
Voltage (V)
Dynamic range
The
dynamic range of an A/D converter is the ratio of the maximum input voltage to the
minimum recognizable voltage level (
q
). Dynamic range is typically express in decibels and for an
N

bit
quantizer is given
Example Problem 1
Consider the following analog waveform. This waveform is sampled at a 1

kHz rate and quantized with a 4

bit
quantizer (input range

1.0 to +1.0 V).
a. Circle the sample points.
b. Indicate the quantization intervals and corresponding binary values.
c. In
dicate the binary number assigned to each sample point.
d. Sketch the reconstructed waveform at the D/A.
Example Problem 2
What is the dynamic range of an 8

bit quantizer used for digitizing telephone signals?
max min
20log
20log2
DR 6.02 [dB]
N
v v
N
q
0
1
2
3
4
5
6
7
8
9
10
1.000
0.875
0.750
0.625
0.500
0.375
0.250
0.125
0.000
0.125
0.250
0.375
0.500
0.625
0.750
0.875
1.000
Time (ms)
Voltage (V)
10
(2) Frenzel,
Principles of Electronic Communication Systems, 3
rd
ed., McGraw Hill, 2008
g.
Describe the function of the anti

aliasing filter and the sample

and

hold circuit.
h.
Describe the operation of a comparator.
i.
Understand the construction and operation of a
successive

approximation converter and state its advantages.
j.
Explain the construction operation of a flash converter and state its advantages/ disadvantages.
k.
Understand the R

2R ladder D/A converter and calculate its output for a given binary input.
A/D
conversion
We discussed last time how A/D conversion is done conceptually, Now, we will consider the
actual process and circuits required to convert an analog waveform into a digital output.
A modern A/D converter
is a single

chip IC which performs the following processes.
Sampling and aliasing
Sampling
is basically a multiplication process, and it gives rise to sidebands just like
AM modulation does.
The frequency spectrum resulting from sampling looks like:
Decreasing the sampling frequency (
f
s
), we get:
If we continue to decrease
f
s
to a value
less than the Nyquist rate
, aliasing (overlapping of the spectra) occurs:
To eliminate the problem, a low

pass filter called an anti

aliasing filter is include
d at the input of the A/D
converter to block any frequencies higher than one

half the sampling frequency.
Anti

aliasing
filter
Sample

and

hold
(S/H) circuit
A/D
converter
analog input
sampling pulses
0110
0111
1000
1010
1100
1110
0011
11
+
A
B
+V
cc
= +
5 V

V
cc
=
0 V
C
Sample

and

hold circuit
A/D conversion begins with sampling, which is carried out by a sample

and

hold
(S/H) circuit. The S/H circuit takes a
precise measurement of the analog voltage at specified intervals. A
sample

and

hold (S/H) circuit accepts the analog input signal and passes it through, unchanged, during its
sampling mode.
The constant S/H output during the sampling interval permits a
ccurate quantization.
Conversion
The last step is the conversion from an analog voltage into a binary number. Two common
converters are:
Successive

approximation converter
Flash converter
Before discussing either of these converters, we first must be familiar with the operation of a camparator, which
is found in both types of A/D converters.
Comparator
A comparator compares two analog inputs and produces a binary output.
Successive

approximation converter
This converter contains an 8

bit successive

approximation register.
inputs
outputs
if
A
>
B
C
is true (+5 V)
if
A
<
B
C
is false (0 V)
12
Special logic in the register causes
each bit to be turned on one at a time from the MSB to the LSB until the
closest binary value is stored in the register.
At each clock cycle, a comparison is made.
If the D/A output is greater than the analog input, that bit is turned off (set to 0)
If the D/A output is less than the analog input, that bit is left on (set to 1).
Process repeats until 8 bits are checked.
Successive

approximation converters are fast and consistent. Conversion times range from 0.25 to 200
s and
8

, 10

, 12

, and 16

bit versions are available.
Flash converter
A flash converter uses a large resistive voltage divider and multiple analog comparators. The
encoder logic circuit converts the 7

bit input from the comparators into a 3

bit binary output.
The flash converter produces an output as fast as the comparators can switch and the signals can be translated to
binary levels by the logic circuits. Flash converters are the fastest type of A/D converter.
The number of comparators is equal to
2 1
N
, where
N
is the number of desired output bits.
Flash A/D converters are complicated and expensive, but are the best choice for high

speed conversions.
Conversion speeds < 100 ns are typical.
Speed less than 0.5 ns are possible.
6

, 8

, 10

bit flash converters are available.
Digital

to

analog (D/A) conversion
We will consider a circuit which convert a digital signal into and analog
output.
13
One of the most popular D/A circuits is the
R

2
R
ladder shown below
The output voltage is given
V
o
=
Example Problem 1.
If the clock frequency is 200

kHz, how long does it take to complete the conversion for
an 8

bit D/A converter?
1 1
1 2
*
2 2 2
n n
o Ref f
n
b b b
V V R
R R R
(MSB)
(LSB)
14
Example Problem 2
Assume the
R

2
R
ladder DAC circuit below has the foll
owing values:
R =
10
0
k
and
R
f
=
100 k
. Assume
V
ref
=
1 V. Determine the D/A converter output for the following binary inputs.
a. 0000
2
b. 0001
2
c. 0101
2
d. 1111
2
e. What is the resolution of this D/A converter.
b
0
b
1
b
2
b
3
V
ref
V
o
Comments 0
Log in to post a comment