>>Good day. This is Jim Pytel from Columbia
Gorge Community College. This is digital electronics. This lecture is entitled Analog
to Digital Conversion Basics. If you remember from
our previous lecture on digital signal
processing basics, I introduced this block
diagram right here. And what we’re going
to kind of talk about in this brief
lecture is this section of the block diagram. And in actuality, we
actually will kind of discuss a little
bit of digital to analog conversion also. What this block diagram is, if
we refresh our memories here, a filter that’s going to remove
unwanted input frequencies. So why are we’re
going to go ahead and input noise if
we don’t want it? So we just go ahead
and get rid of it. More potentially, some
high frequency components that we don’t need. [Inaudible] sample, okay. What is this sample
and hold portion in the block diagram
[inaudible]? Well, basically a sample. It converts the analog
signal into a series of impulses representing
the amplitude of the signal at
a given instant. So basically, it’s just
looking at it every second and every half-second, whatever
the frequency you’re looking at, and it’s saying okay, at that
time is it such and such value. This sampling rate occurs if
its rate sufficient enough to find the input waveform. So remember, Nyquist
Sampling Theorem discussion, you got to go ahead
at a very minimum, sample it at twice the frequency of the highest frequency
you wish to capture, okay. What does the hold do? Well, for it to quantize the
data, it should probably help out if it wasn’t changing, okay. So you sample it and in the
process of quantization, just hold it at that
constant level. Don’t vary it. That’s all the hold does. And what is quantization? Basically, you’re assigning the
binary code to that sample data, that sampled and held data. And one of the concepts that
is not often mentioned in some of these introduction to analogical digital
conversion is this concept of range and granular. Your digital multimeter is
a classic example of range. There’s an expected maximum. Think about a milliamp meter
versus and ammeter versus and ammeter that’s rated
for 40 amps or 160 amps, there’s certain ranges,
you know. If you’re using your ammeter
on 160-amp range, you’re trying to measure for milliamps, it’s
not going to do a good job. The same thing goes for
something that you’re going to go ahead and let’s say you’ve
got a 20 milliamps maximum range and you’re trying
to measure 160 amps. You’re darn right that
ammeter is not going to work out very well, because it’s
probably going to start on fire. This concept of range, you have to have previously
defined the range with which you’re
going to quantize. For example, you know, a
voltage waveform is going from zero volts to 160,
back down to zero, down to, excuse me, 170, back
down to negative 170, so on and so forth. That’s your range. That’s your expected range. Let’s say you maximum
out at 170 volts. What I would do is I would
assign the quantized value, the maximum quantized value. Let’s say I’m using a
four-bit system, quadruple one. I would probably assign
the maximum for that range, 170 being equal to four ones. Does that make sense? Whereas if I was to use this
in a different application, let’s say I’m going down
to 100 millivolts is my expected maximum. If I was to sample this
100-millivolt waveform maximum, I would assign my range where my
quantized value quadruple one is also equal to four ones and
the maximum of my range. You can’t use quantization for– You can’t use the same
transfer function. You’ll learn about
transfer functions in industrial controls. But what is a transfer
function in its basic form? It’s a sensor, you know. It’s a certain amount. Let’s say you’re trying to take
the analog data of pressure for a certain amount
of deflection of that pressure plate. There is a corresponding
voltage or current signal that if you’ve got a maximum
of 200 psi versus a maximum of 50 psi, that range
might be different to set up a proper DSP. You need to be aware
of the ranges of those quantized values. Does that make sense? Granularly, granularly is
potentially a little bit more difficult to discuss
without the use of diagrams, in which I’m going to
go to in a second here. But granularity, think about it. The more granular a beach is, probably there it is
easier to walk on. For example, a beach
with a bunch of boulders on it is not the smoothest
type of beach versus a beach with a bunch or rocks on it
versus a beach with a bunch of pebbles on it versus a
beach with a bunch sand on it. That’s where people like to hang out because it’s
nice and smooth. Think about that
in term of bits. If you’re defining, for example,
a pressure transducer, you know, it transduces to create a
range versus a pressure switch. What’s a pressure switch? On or off. On or off. There is no value it’s
trying to produce, whereas a transducer is trying
to produce a value, okay. Pressure transducer is
saying okay it’s 160 psi and now it’s 170 psi. Now it’s dropped down
to 150 psi, okay. So the granularity, with
which I try to represent that analog data, it’s
directly correspondent to the number of bits. The more bits you’ve got, the smaller you can
break those chunks into, the smaller the sand on your
beach is, the smoother it is. So let’s go ahead and
look at some examples here of basic analog to
digital conversion, okay. We’re going to go into
some specifics about analog to digital conversion methods. But right now, we’re just
keeping at the basics, okay. So here’s a two-bit quantization
of an analog waveform. So our analog waveform is in
the upper left-hand corner here and it’s smoothly
varying over time. And what we’ve done here, in
the upper right-hand corner, is we’ve sampled it
at a certain interval. We’ve taken a zero sample
right there, one sample, two. We’re assigning the
amplitude at that instant. And we’re holding
that and bringing it down to our quantization. So this is a two-bit
quantization. And if you could think about it, here was what we’re doing is we
are putting it in four levels. If there is a value that occurs
above here but below here, assign it the value zero, zero. If there’s a value that is above
this line but below this line, assign it the value zero,
one, so on and so forth with one zero and one one. And as we can see, our
two-bit quantization only has four levels. And it gives us a
very poor rendition of our original analog waveform. So how are we going to do that? Okay, what we’re going
to do is we’re going to increase the granularity. How are we going to do that? Increase the number of bits. What we’ll do is do a
three-bit quantization. And now we’re worried
about range for this. It’s the same analog signal. Let’s say, for example, this is
maxing out at like eight volts. Eight volt maximum is
represented by one, one, whereas this could also
be an 80 volt maximum, where 80 volts is
represented as one, one. It’s still kind of the
same shape of waveform and it’s still doing
the same sampling and it’s still doing the same
quantization, but realize one, one represents 80 volts, whereas
our previous example, one, one represents eight volts. So that concept of
range in granularity when you’re setting
up these things. Your expected values
know what to expect. I mean, the things that I harp
about, basic electronic stuff. Every single time you
guys grabbed a DMM, what was the mantra that
I had you guys repeat? Function leads range. What do you expect? So let’s move on to a
three-bit quantization of the same waveform. Upper left. Same waveform. Upper right. It’s the same sampling. At those particular
instance, it’s looked at. What is the value at
that instant, okay? Now things get different here. In this here, in this
lower left hand here, what I’ve defined is
eight different levels. Why is it eight different
levels? Because now I’m using
three bits. See how that granularity
is allowing us to represent the waveform in a slightly more accurate
representation compared to our previous one. A three-bit quantization leads to a lot more accurate
representation of our original waveform. We can kind of see it now. It kind of looks the same. Previously, we were missing
even that dip right there. Now we can kind if see that. It’s a little bit more
accurate representation. What have we also
gained with this? We’ve gained some complexity and
some storage there, you know, whereas previously, we were
storing at the two bits. Now we got three bits. You know, go ahead and
extend this out to four bits. What are we going to do here is
we are just going to go ahead and increase the
levels of granularity. We’re adding another bit. Now I can define
between incredibly, incredibly small levels here
and get this quantized value. The sampling and holding is
the same thing, except the fact that I’ve quantized it into
16 different levels now. And look how closely, how much
more accurate our digitized version of this analog
waveform looks like it, okay. It looks a lot more accurate. And basically, the summation of
this whole thing is, is here. Here’s our original waveform. On the left, we’ve got our
two-bit quantized digital representation, our
three-bit, and our four-bit. And you can clearly see the
four-bit is a much better representation of our
original analog waveform. If we were to extend this out to
five bits, six bits, 32 bits– I mean, just think about
what I drew right here. That’s a digitized
representation of my analog hand
movements on this tablet. So the more bits you get,
the more closer it looks to that original
analog waveform. Additionally, the more
times I sample this, or say for example I’m
increasing the frequency at which I sample
this thing, the better and more accurate
the representation of this waveform will be
up to a certain limit here. Again, that is the basics of
analog to digital conversion. We’ll go into some
of the methods. Like I said, there is
a little bit of digital to analog conversion here. All you got to do it just kind of point the arrows
the other direction. So let’s say I have
stored this waveform, this four-bit waveform,
in digital. All I would do is go ahead
and put it into some sort of smoothing filter
and potentially come out with something, as
opposed to that stair step, have a very smooth looking
analog signal coming out, which I could– Let’s say,
for example, it’s music or human speech, I
could feed to a speaker and it would produce
a reasonably accurate representation of that
human speech or music. So this concludes the
portion of the analog to digital conversion
basics lecture. We’re going to go ahead and
move on to some specific methods for analog to digital
conversion in the next lecture.

Categories: ArticlesBlog

11 Comments

haxkalibrr · January 14, 2015 at 1:48 am

sorry,but the voice is kinda horrible to listen to. Not sure if it's cos of the closeness to the mic or sth else

brock judd · January 16, 2015 at 2:18 am

Thanks for sharing your thoughts on dsp. I appreciate your summary of the key elements.

Garrett Kniffen · January 27, 2015 at 6:40 am

Fantastic lecture.

Clement Cole · February 4, 2015 at 5:10 pm

haxkalibrr X. Make ur own show. this is one the best videos I've seen on youtube. You complain too much.

Jim Pytel · May 25, 2015 at 2:36 pm

Wanted to let you all know I'm currently developing content for another YouTube channel at:

https://www.youtube.com/user/bigbadtech

The "Basic Electronics 1: DC Circuit Analysis" playlist will be finished summer 2015 and I've posted sample content for other playlists. This channel is undergoing major development and is regularly updated. Subscribe to it if you're interesting in getting the latest content. Long terms plans include a complete basic electronics series (DC, AC, 3 phase AC), motor control, power electronics, motors and generators, hydraulics, renewable energy, and more! Enjoy!

Dan Farrell · November 7, 2015 at 12:51 am

"YOU'RE DARN RIGHT THAT AMPMETER ISN'T GOING TO WORK OUT VERY WELL BECAUSE IT'S PROBABLY GUNNA START ON FIRE!"

2 thumbs up, would watch again (and did! so much angst!)

Alaa Rayan · November 24, 2015 at 9:55 am

Thank you..i do not know why they cannot simply replace professors with people who can teach like you and others

Buck Brown · April 19, 2016 at 2:34 pm

great! Learned more in ten minutes here than would have in an hour on some.

brandon taylor · September 25, 2016 at 11:08 pm

Not to be a dick but this is a little bit dry.

Caleb Hille · December 17, 2016 at 9:10 pm

@2:27 lol

AJ · March 8, 2017 at 3:33 pm

Thanks! This video helped me so much!!

Leave a Reply

Your email address will not be published. Required fields are marked *