Sunteți pe pagina 1din 7

6.

025J Medical Device Design


Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

Let’s go back briefly to lecture 1, and look at where ADC’s and DAC’s fit into our overall picture.
I’m going in a little extra detail now since this is our eighth lecture on electronics and we are more
sophisticated now.

ADC ⇒ Analog-to-digital converter


DAC ⇒ Digital-to-analog converter

Digital signal processing is amazing. For decades our processing power has doubled roughly every 18
months. If that fails to astound, imagine putting $1,000 into some sort of retirement account with
that kind of yield, and within 30 years…

But in order to get to all that DSP goodness, we must first translate our analog signals to digital
signals. If we want to act on our digital results, we often must translate digital commands back to
analog signals. So in medical electronics, it is almost impossible to get around these blocks. Lets take
a look at them.
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

Analog-to-Digital Conversion

An ADC is typically an integrated circuit (“IC” on microchip) that looks functionally like :

The ADC relies on a periodic square-wave signal called the “clock”. Once every clock cycle the
ADC looks at the voltage at VIN at that instant, and translates it to a binary number that is linearly
related to the input voltage. Recall how binary numbers work; each digit is a one or a zero:

Decimal equivalent: 2 7 iD7 + 2 6 iD6 + 2 5 iD5 + .....2 0 iD0

So in this case the output of the ADC binary code that represents a decimal magnitude.

Page 2
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

What does this digital code mean, or represent? You’ll in general have to look at a data sheet, but
often the ADC will require one or more reference voltage inputs (See attached example). A way to
visualize this is with a plot of output code vs. input voltage:

From a plot like this, we can see that for 2 N codes, where N is the number of bits, there are 2 N − 1
intervals on the voltage axis. This means that each LSB represents a change in input voltage of

This is the important detail. But from a qualitative viewpoint, the thing to really notice about ADC’s
is that they “discretize” our signal in two ways: in both voltage and in time. Lets take a good look at
both types of discretization. We’ll start with time.

Page 3
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

Sampling

Before doing the actual analog-to-digital conversion, the first thing an ADC will do is “sample” a
signal. That is, it will “grab” the signal at a particular instant in time and keep it still so that it can
embark on the conversion process. How do you grab an analog signal, you ask?

This is called a “sample and hold” or perhaps, more accurately, a “track and hold”. Remember that
this is a perfect amplifier, so its input draws no current. This means that when the switch is open, the
capacitor just holds at the value of v(t) right before the switch opens. We can illustrate the sampling
process graphically:

The ADC then provides digitized versions of the samples of v(A) . These samples are: v [ n ] = v ( nΤ ) .
Class Exercise:
Page 4
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

We can get into trouble by looking only at the samples of a signal. Suppose that we take the samples
of a sinusoid of frequency f0 :

x [ n ] = sin(2π f0 inΤ s )

And compare them to those of a sinusoid of frequency f0 Δf :

x2 [ n ] = sin ( 2π ( f0 + Δf ) i nΤ s )

Find Δf for which x [ n ] and x2 [ n ] are identical.

(Workspace)

The phenomenon that we have stumbled upon here is called “aliasing” and it is a hazard of sampled
data systems. You can work that out as long as your input signal is restricted to a frequency band
f f
− s < fIN < s , you have no difficulty. That is if the input signal is composed of complex
2 2
exponentials e jω t for which
ω ω
− s <ω < s
2 2
1
where fs = , ω s = 2π fs , then you are okay.
Τs

Page 5
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

Incidentally, you have seen this before. TV cameras used to only sample 24 frames per second,
which is slower then rotational frequency of some of the wheels that were being shot. So you would
get this weird effect of the wheels seeming to turn backwards….

Anyway, in electronics design we will sometimes head this off by including an initializing filter before
the ADC:

So that’s what we mean by discretization in time. What about amplitude?

Δ
In general when you take a sample, you will have an error that can be anywhere between − and
2
Δ
, where Δ is the LSB (From page 3). For purposes of analysis, we treat this as a quantization noise
2
with PDF:

Page 6
6.025J Medical Device Design
Lecture 3: Analog-to-Digital Conversion
Prof. Joel L. Dawson

It has been shown that this “quantization noise” distributes pretty uniformly in frequency, so we treat
it the way we treat thermal noise. The signal-to-quantization noise ratio relates to the number of bits
according to

SQNR = ( 6.02B + 1.76 ) dB ≈ (6B)dB

So…if you digitize a pure, full scale sinusoid and take an IFT, what you will see is

Page 7

S-ar putea să vă placă și