EECS 373 - Fall 2026 - Lecture 14: “ADCs” — Transcript
Full transcript
- 0:00Let's see. Uh, you had James last week,
- 0:03so hopefully I don't know. You guys got
- 0:05through of analog sampling, I assume.
- 0:08Talk about analog circuits. Okay, great.
- 0:10So, that sets us up for this week. Um,
- 0:13so homework not due today. Today is not
- 0:15the 26th. That's scary. Next week.
- 0:23Next.
- 0:27All right.
- 0:29next Monday. And then homework 7's been
- 0:32released. It's not due for a couple
- 0:33weeks. Um, this week you guys need to
- 0:36sign up for project proposal meeting
- 0:38slots if you haven't already. Uh,
- 0:39they're going to start on Sunday or on
- 0:41Friday. Uh, we're not going to have
- 0:43class on Monday to make room for those
- 0:46uh, meetings. Um, and then your job
- 0:49generally is to complete your project
- 0:51perfor proposal like the night before.
- 0:53So me and Matt will look through them in
- 0:55the morning, but also bring slides that
- 0:57kind of outline what you're going to uh
- 0:59be uh um presenting to us and what your
- 1:03project is. Um I mean, if you really had
- 1:05to, you could bring up your uh project
- 1:07proposal uh on the the monitor, but it's
- 1:10just easier if you have slides. Um and
- 1:13then we're going to give you feedback.
- 1:14So the project report askked for a lot
- 1:17of information. If you don't know the
- 1:18answer to every single thing because you
- 1:20haven't figured out what part it is yet,
- 1:21that's okay. but it's to try and prompt
- 1:23you to start thinking through things. If
- 1:25there are major issues with your report
- 1:27or maybe you just drastically change
- 1:28your project, well, there's a
- 1:29resubmission date where you can get back
- 1:31the points u and and kind of really the
- 1:33goal is for you to have a plan by the
- 1:35time you leave that meeting and finish
- 1:38your project reports or proposals that
- 1:40you have a plan for what to do. Uh and
- 1:42then there'll be no class on Monday.
- 1:45Yeah.
- 1:48>> The night before.
- 1:49>> Yeah. whenever you sign up, it's just
- 1:51due the night before.
- 1:53And it's not like because it's like a
- 1:55variable deadline and some people go
- 1:56longer, get longer time, like you we're
- 1:58really going to grade the resubmissions.
- 2:00So if you get a resubmission, that's
- 2:02what we're going to grade. Some teams
- 2:03just won't need it. So don't don't feel
- 2:06like, oh my gosh, I'm losing out because
- 2:07I went first.
- 2:12Any other questions?
- 2:15If you can't find a a meeting time,
- 2:18please let me and James know. We'll find
- 2:20alternate times. We realize that we're
- 2:21trying to work around my schedule and
- 2:24James' schedule and some meetings at the
- 2:26NSF I have as well as all your
- 2:28schedules. So, just let us know.
- 2:31Okay.
- 2:34So, last week you talked about analog
- 2:36signals in general. And if you are EE
- 2:38student who's taken I think 216, is that
- 2:41your signals class? or 316, you've
- 2:44probably already done this, but uh
- 2:46especially we have computer scientists
- 2:48and people just haven't taken those
- 2:49classes yet. So that's kind of give you
- 2:50the background of analog systems. And
- 2:52now we're going to talk about um analog
- 2:55digital converters and digital to analog
- 2:57converter. Well, today we're only going
- 2:59to talk about ADCs.
- 3:01Uh so if you want some references, uh
- 3:03your reference sheet, uh chapter 20 of
- 3:06this book and also um analog devices has
- 3:09some good tutorials. There's good some
- 3:11good uh general stuff online.
- 3:14All right. And then this should be
- 3:16updated, but we're going to talk about
- 3:17sample and hold circuits and then
- 3:18different types of ADCs and then we'll
- 3:21talk about your specific ADC on your
- 3:23device. All right. So remember analog
- 3:26digital converter is basically an
- 3:28oscilloscope. This is just a fancy
- 3:29version of it. We're trying to capture
- 3:31some signal that exists in the world and
- 3:34do something with it. So here right it's
- 3:36these are really high speed high uh
- 3:39voltage tolerant range uh they can um be
- 3:44adjusted in in lots of different ways.
- 3:46Um but you your microcontroller can do
- 3:49almost everything. Um in fact you can
- 3:52buy like really really cheap analog
- 3:54digital converters you can buy online
- 3:55that are like USB ones are just
- 3:57microcontrollers especially if you see
- 3:58like the voltage range is like between
- 4:00zero and five volts or zero and 3.3
- 4:02volts. It's just a microcontroller
- 4:04inside. So you can get a lot of work
- 4:05done with an analog digital converter.
- 4:10So to begin with uh you need this thing
- 4:12called a sample and hold circuit. So if
- 4:14you're going to do an analog digital
- 4:16conversion, it takes some time to
- 4:18measure the signal. If that signal is
- 4:19moving around a lot while you're trying
- 4:21to measure it, it's going to be it's not
- 4:23going to work out so well. So um you
- 4:26have to use a thing called that sample
- 4:27and hold circuit. And again, your job is
- 4:30not to like, oh, how do I do my node
- 4:33voltage equations for this whole thing?
- 4:34It's to really understand why it exists,
- 4:37how it's used, and then deal reason
- 4:39like, okay, when I'm setting up my
- 4:41Hample and sample and hold circuit time
- 4:44on my microcontroller, what do I have to
- 4:45consider?
- 4:53Okay.
- 4:55Um, so here the goal is to take this
- 4:57voltage A uh input on some buffer and
- 5:01hold it on this capacitor and we're
- 5:03going to use this switch here to charge
- 5:05up this capacitor and we're just going
- 5:07to hold it for a while and then allow
- 5:09the output to um measure it, right? And
- 5:12so the nice thing here is with a analog
- 5:15amplifier or voltage follow or a buffer
- 5:17whatever you want to call it it allows
- 5:19it takes the voltage here and reproduces
- 5:21it here with no matter how much current
- 5:23or how much you try and low down the
- 5:25circuit it should not affect the input
- 5:26here and of course this is true for
- 5:28short relatively short periods of time.
- 5:31Um yeah so when the switch is open it's
- 5:34sampling and then when the switch is oh
- 5:36sorry when switching closed here it's
- 5:38sampling and then when it's open it's
- 5:39holding.
- 5:41Okay. So, we can look at a a real
- 5:43example or at least a circuit example of
- 5:45how that would work. Uh, nope, you can't
- 5:48see that. Okay. Hold on.
- 5:52Okay.
- 5:54Uh, but that's the wrong circuit. So,
- 5:56here's uh reset and run. So, all these
- 6:00circuits are in the slides you have. Uh,
- 6:02so you can play with them if you want.
- 6:04But here the idea is you have some
- 6:06sinoso signal. It doesn't really matter
- 6:07what the signal is, but it's um changing
- 6:11over time. And if it takes us a long
- 6:14time to uh measure the output, the
- 6:16problem here is that the signal would
- 6:17have changed. So here we can sample it,
- 6:20which means we're going to charge up
- 6:21this capacitor. And you can actually see
- 6:23this is over a long period of time. You
- 6:25can see the the voltage on the capacitor
- 6:26is changing as a function of time and
- 6:28mirroring the input. And then when I let
- 6:30go, it holds it there for a while.
- 6:33Right? And so here, this is the
- 6:36structure here is acting like the switch
- 6:37and it's keeping that current uh that
- 6:39voltage from discharging back out. And
- 6:42then we're just holding it here. That
- 6:44make sense?
- 6:49Okay. So, it's a simple circuit. There's
- 6:52lots of different ways to make it, but
- 6:54um the things that you might have to
- 6:56worry about is if your signal here, this
- 6:58is a nice voltage source, right? If it
- 6:59was kind of a weak signal, then maybe
- 7:01this capacitor could influence it. And
- 7:03certainly if you didn't have this um
- 7:05this buffer here, your analog digital
- 7:08converter could load down the signal and
- 7:10like um it wouldn't get as high as it as
- 7:13it would normally be. It might corrupt
- 7:15the signal. So that's why putting the um
- 7:18opamp up here is necessary to buffer the
- 7:20voltage.
- 7:23Okay.
- 7:27Um and so you one of the challenges is
- 7:31you have to determine the minimum
- 7:32sampling time. So uh you might have a
- 7:36voltage source or something you're
- 7:37measuring and you have it's going to
- 7:39charge up this capacitor. Well, if you
- 7:42have a very strong voltage source,
- 7:44meaning that it can supply lots of
- 7:45current, no problem. It's going the RC
- 7:48charge time is going to be uh very
- 7:50short. effectively the resistor here
- 7:52will be very small and it doesn't really
- 7:55matter but sometimes you have weak
- 7:57signals that take a while and that's why
- 7:59you might want to adjust your sample and
- 8:01hold circuit to sample longer so then it
- 8:04can slowly climb up and it'll do this RC
- 8:08discharge curve will be or charge curve
- 8:10will be longer because the effective
- 8:12resistance would be higher and so you
- 8:13now you have to wait longer for it to
- 8:15charge all the way up so knowing
- 8:16something about your signal source will
- 8:18make a big difference um in your work.
- 8:21You might have to think about if you're
- 8:24measuring something like a voltage
- 8:25divider or
- 8:27maybe a resistive circuit and you want
- 8:29to go really fast. So maybe like a
- 8:31strain gauge for a smart glove or
- 8:33something. If you want to go really
- 8:35fast, uh you're going to have to make
- 8:37sure that the the charge up time is
- 8:40reasonable uh that you're able to charge
- 8:42up. So, the easiest way to do that is
- 8:45just do some calibration uh and see if
- 8:47your signal is the correct value you
- 8:50think it is. If it's not, then maybe you
- 8:51need to put an analog buffer here to
- 8:53hold this thing high uh to give it some
- 8:55more power going in or you need to
- 8:58adjust your charge up time. The other
- 9:00thing you can do is you could just do an
- 9:01offset. If it always charges up about
- 9:04the same amount of time, you could just
- 9:05make yourself a lookup table. That's not
- 9:07very reliable, but you could do that.
- 9:10Uh yeah, and your sample time is
- 9:12programmable in software because they're
- 9:13trying to give you this ability to trade
- 9:16time for accuracy.
- 9:20Any questions on sample and hold?
- 9:26I don't think you guys have ever seen a
- 9:27sample and hold circuit before. Correct.
- 9:30Okay, that's fine. You're again as
- 9:33embedded systems people, you're this is
- 9:35be like as much analog as you ever get,
- 9:37right? We're going to go through analog
- 9:39to digital converters. You're going to
- 9:40be like, "Okay, that's the last time
- 9:41I've ever studied analog to digital
- 9:43converters." Totally fine. But at least
- 9:44it'll help you decide which one should I
- 9:46choose if you're going to uh put one in
- 9:48your system.
- 9:50Okay. Um then, so now we're going to go
- 9:54on to different analog digital converter
- 9:56structures and there's some basic
- 9:58components we need to know for each one.
- 10:00So one of the components that's used
- 10:03over and over again is this thing called
- 10:04a voltage comparator. Basically, it's
- 10:06just an op amp that's not in feedback.
- 10:09And what it is is uh you have power,
- 10:11ground, and you have some output signal.
- 10:12And if the input is greater than the
- 10:15sorry, if the positive input is greater
- 10:16than the negative input, then the output
- 10:18just goes all the way high. And
- 10:20otherwise, it's low. So, it's basically
- 10:21taking two analog signals. If one's
- 10:23higher than the other one, the output's
- 10:25high. If the other one's lower, then the
- 10:26output's low. That's all the decision
- 10:28it's making. And then we're going to use
- 10:29this structure over and over again.
- 10:32The other uh structure you need to know
- 10:34about is a uh voltage divider. Now, I
- 10:38promised you at the beginning of the
- 10:39course that you're never really going to
- 10:40have to do node voltage equations
- 10:42because that's horrible, but you just
- 10:44have to have a little bit of intuition
- 10:45about what these circuits are trying to
- 10:47do. And this is uh this formula here. Uh
- 10:50I mean, you can drive it of course, but
- 10:52it should give you some of the intuition
- 10:53that says like, okay, you know, if I
- 10:55take R2 and make it zero, right? Well,
- 10:59then my voltage is going to get closer
- 11:01and closer to ground. And if I make R0
- 11:03really really large, like infinity, then
- 11:06my voltage is going to get uh closer and
- 11:08closer to VN.
- 11:10How we typically use these in um analog
- 11:14digital converters is we just make R1
- 11:15and R2 the same. And now this is why we
- 11:18call the voltage divider. VN is divided
- 11:21by two. And you're going to see later on
- 11:22we're going to have three, four, n
- 11:25different um resistors. And then it's
- 11:27going to be V / N. And you're going to
- 11:29see that there's a little uh step down
- 11:31for each one. And we'll we'll talk about
- 11:33it when we get there, but basically this
- 11:35is just a structure that divides a
- 11:37voltage from one value to another value
- 11:39based on a ratio.
- 11:42Um, now you can put those two things
- 11:43together
- 11:45and say here we have a comparator and
- 11:48the comparator is running at VDD and or
- 11:50VCC and ground and we have a voltage
- 11:52divider that's connected to VDD and
- 11:55ground. And because R equals R, we
- 11:57didn't say R1 and R2, we just said R and
- 11:59R, we know these values are the same.
- 12:01And so the value here is VDD over two.
- 12:04And now you get this simple circuit that
- 12:06says whatever VN is. If VN is low, then
- 12:10the output of the comparator is low. If
- 12:12it's lower than VDD over two, I always
- 12:14say VDD instead of VCC because I in my
- 12:18undergrad, I did a lot of integrated
- 12:19circuit design and it was always in
- 12:21silicon. VCC is typically for um BJTs, I
- 12:25think. So I don't know why why the
- 12:27convention is that way, but that's why I
- 12:28say it that way. Anyways, and if your
- 12:31input is above VREF, then you're going
- 12:33to get a high output. So, basically,
- 12:35this is just showing you the output. And
- 12:37this logical structure is just about
- 12:40built into every ADC.
- 12:43U any questions here?
- 12:51Great.
- 12:52And then it's usually just useful to
- 12:55look out for the the positive or
- 12:57negative signal. Sometimes different
- 12:58diagrams are not always V+ is not always
- 13:01on the top or uh so you just have to
- 13:03make sure you're looking for that to
- 13:04figure out what logic it is. Okay, so
- 13:07that should set us up for the most
- 13:09simple ADC
- 13:11that there is. Um so we call it a flash
- 13:14ADC.
- 13:16You'll see why in a minute, but it has a
- 13:17basically concatenation of that
- 13:19structure we just saw. Here we have a
- 13:21reference voltage coming in and we have
- 13:24a ladder of resistors. And here we're
- 13:26just going to show that we're just going
- 13:28to divide uh the voltage into even parts
- 13:32uh up on this ladder. And so now we can
- 13:34say that okay rewrtors.
- 13:41So one over seven minus RF that's the
- 13:44voltage here. And then you can see that
- 13:46each one of these is trying to make a
- 13:48comparison to that reference voltage
- 13:50from the input voltage. And we'll go
- 13:52through a circuit diagram or false
- 13:54diagram in a minute. But basically,
- 13:56we've got instantiated a bunch of
- 13:58different reference voltages. And then
- 14:00each comparator is trying to make a
- 14:02simple decision. Is the voltage input I
- 14:04have now higher or lower than this? And
- 14:07then it would have to go to a a uh a
- 14:10binary decoder encoder to turn this uh
- 14:13linear um measurement into a binary
- 14:16value.
- 14:18Oh, hey, I had great animations I didn't
- 14:20see.
- 14:22So each one of those is a uh made its
- 14:25own reference voltage and then it's just
- 14:27going to check to see which one is which
- 14:29which one is higher. So you know there's
- 14:32never going to be a case where uh R3 is
- 14:34high and R2 and R or sorry op amp or
- 14:37comparator three is high and comparator
- 14:402 and one are not high. um it's all
- 14:42going to be the same but it just says
- 14:44okay this is where that point is in
- 14:46space
- 14:49and then
- 14:51go over here we can see that in action
- 14:54let's see so here's the run so in fallad
- 14:59the the magnitude of the color indicates
- 15:02the voltage so you can kind of just
- 15:03visually see already that the voltage is
- 15:06uh dropping here
- 15:08and so here we have our reference ladder
- 15:10and then each one is just trying to make
- 15:11a decision. And you can see the input
- 15:13voltage is rising. And then you can see
- 15:15the the value here is rising as well by
- 15:18the colors. And then the this is just a
- 15:20encoder here that changes this decimal
- 15:22or this uh value into a binary value.
- 15:29What do you think?
- 15:34Okay.
- 15:36Um, so what do you think some of the
- 15:38advantages of this ADC is? I guess you
- 15:41can't compare it to anything else, but
- 15:43what do you think it's good at?
- 15:45>> Yeah.
- 15:47>> Yeah, it's fast. And well, it was in the
- 15:49name, but uh, so it's a flash ADC only
- 15:52because not because flash has anything
- 15:53to do with it as a technology or for any
- 15:56other reason except for the fact it can
- 15:58go very quickly. In fact, it can do this
- 16:01uh within one clock cycle almost
- 16:03guaranteed because you're just looking
- 16:04at the propagation delay through this uh
- 16:07comparator and then through this logic.
- 16:10So almost guaranteed you're going to get
- 16:11this done in less than a clock cycle. So
- 16:13it's very very fast.
- 16:17Uh let's see.
- 16:21So, one of the challenges here though um
- 16:24is that it can be kind of hard to be
- 16:26accurate because now on a on a piece of
- 16:28silicon you have to have all these
- 16:30resistors having exactly the same value.
- 16:32Here we put the we did it offset by two
- 16:35uh or by half on here. So, this is um
- 16:38fifth 500 and this is 500. But basically
- 16:40all those resistors have to be
- 16:42approximately or have to be the same
- 16:44size. And if one was point Let's see if
- 16:48I can can I do it? Yeah, sure. So, if I
- 16:51made one accidentally, it was
- 16:53mismanufactured, let's say, and now it's
- 16:550.980.
- 16:58Okay. Right now, this voltage is going
- 17:00to be under reportported. Right? So,
- 17:02it's going to trip higher than normal.
- 17:05And so, uh you can't tell from the
- 17:07inputs that that's what's happening. Uh
- 17:10but because of this manufacturing error,
- 17:13the step size between one ADC value to
- 17:15the next ADC value isn't linear anymore.
- 17:18And that's a challenge. Why this would
- 17:20happen? Well, you're making a piece of
- 17:22silicon and they do have lots of tricks
- 17:24to make the resistors all the same size
- 17:26and how you did the layout, but there's
- 17:28lots of little reasons, manufacturing
- 17:29errors or how it's polished where that
- 17:32may not be true. In fact, we have to use
- 17:35all of those have to be exactly the same
- 17:37throughout the chip for you to get a
- 17:39good uh linear ADC. So, that is one of
- 17:42the challenges. Uh, another challenge is
- 17:45that resistors may not be obvious, but
- 17:47resistors take up a lot of space on
- 17:49silicon. Um, they like a transistor is
- 17:52super small, but resistors uh depending
- 17:55on how they're made, there's different
- 17:56types, uh, can be, you know, hundreds to
- 17:59thousands of times larger than uh than
- 18:02that comparator there uh just in terms
- 18:05of space on your die. So now this thing,
- 18:08it's not obvious, but this thing is
- 18:10actually takes up space and is going to
- 18:11be more expensive from a die area point
- 18:13of view. And so now you have something
- 18:15that's very fast, but also very
- 18:16expensive.
- 18:18And the last thing to think about is if
- 18:20this is a a simple threebit solution,
- 18:23but say you wanted to get up to 24 bits
- 18:25or something some high value, think
- 18:27about how many resistors you have to
- 18:28make. how to scale this thing up is
- 18:30going to be a challenge because now you
- 18:32have to get all those resistors the same
- 18:33size and they have to all fit on um this
- 18:37piece of silicon. So both of those limit
- 18:40typically uh flash ADCs to be relatively
- 18:43low number of bits. I mean you can still
- 18:45get 12 bits. It's not inherently a
- 18:48problem. Um but you're not going to get
- 18:51the highest bit range out of these sorts
- 18:53of ADCs because it's usually not cost
- 18:54effective. 10 bits, 8 bits is pretty
- 18:57reasonable.
- 19:02Okay,
- 19:04[snorts]
- 19:05so let's see if I if I remembered all
- 19:07these correctly. So yes, it's very fast
- 19:09by definition. Uh is only the
- 19:11propagation delay through a few gates
- 19:13and that comparator. So it is very fast.
- 19:16I guess you still going to have to have
- 19:17a sample and hold circuit, right? So
- 19:19you're going to have to pay some penalty
- 19:20there. Um but all the devices that we've
- 19:23talked about are going to have to pay
- 19:24that penalty.
- 19:26uh resolution. Now you're limited to
- 19:29that ladder stack up. That's the
- 19:31challenge. You can't get very high
- 19:32resolution. And then the complexity just
- 19:35of how many devices you have to have. So
- 19:37it's not it's reasonably complex for
- 19:40uh the number of comparators and
- 19:42resistors you have to have.
- 19:45And then here we're on the power
- 19:46consumption. The power consumption of
- 19:48these is typically higher just because
- 19:50you have this big resistor ladder, lots
- 19:51of comparators uh compared to some of
- 19:53the other techniques we'll show in a
- 19:55minute.
- 19:56So any questions about flash ADCs?
- 20:02Okay.
- 20:04Um different types of ADCs here. So a
- 20:07slope integrator. This is a different
- 20:09style that's trying to accomplish the
- 20:10same task. And the idea here is we're
- 20:13going to use time rather than So the
- 20:16other one was using we're going to use
- 20:17reference voltages here. We're going to
- 20:18try and use time to measure uh um
- 20:22voltage. And remember, microcontrollers
- 20:24in any digital system is only really
- 20:26good at measuring time. So that's we're
- 20:29on the the good side of the piece of
- 20:31silicon.
- 20:33Um, so here we're going to use like a
- 20:34analog ramp function. We'll talk about
- 20:36how to make that in a second. And then
- 20:37we're going to see how long it takes to
- 20:39to hit the input voltage. So here we
- 20:41have time. We have some input voltage.
- 20:44We're going to say it's held uh constant
- 20:45with that sample and hold circuit. And
- 20:47then we're going to cause a little ramp
- 20:48function to come up. And when these two
- 20:51um cross each other, we're going to say,
- 20:53"Aha, that is when uh then we know when
- 20:56that voltage occurs." And then we're
- 20:57going to take a measurement of time. So,
- 20:59we're going to count how many clock
- 21:00cycles go by. And so, if that input
- 21:02voltage was lower and we use the same
- 21:05ramp function, then that time would be
- 21:07smaller. And if we went longer,
- 21:09obviously the time would be longer. So
- 21:11now it's about as long as that ramp
- 21:13function is nice and even and and
- 21:15reliable then we can just uh use time to
- 21:18measure uh your ADC value. So that's
- 21:22again the you have good clocks in u
- 21:25because you have those good watch
- 21:26crystals on your devices.
- 21:28[clears throat]
- 21:29So the question is how do you make this
- 21:31slope generator? Uh that is uh we'll
- 21:33leave that to the analog engineers but
- 21:35the the big the quick idea here is we
- 21:38know how RC charge works. So here you
- 21:40could have a a circuit you you uh close
- 21:43it and then the resistor and capacitor
- 21:46rise at a known rate. Um it's a little
- 21:49less obvious is that if you had a
- 21:51current source going into a capacitor um
- 21:53this rises at a constant rate. So here's
- 21:56this exponential and this is a constant
- 21:58of uh rise time. And so, um, it turns
- 22:03out that making current sources on, uh,
- 22:06silicon is actually relatively easy, uh,
- 22:09compared to if you're trying to make it
- 22:11on a breadboard. So, because of that,
- 22:14uh, it's fairly easy to have these
- 22:15constant ring up times. So, we'll show a
- 22:17quick example of how that works in
- 22:19practice.
- 22:22All right, so this is a super
- 22:24complicated circuit now that I think
- 22:25about it, but it's not too bad. Let's
- 22:27start off. Um, so here we have our
- 22:31analog voltage and we have a comparator
- 22:34and then bunch of control logic. Don't
- 22:36worry how that works. Nobody cares how
- 22:37that works. It just all it's going to do
- 22:39is some sequencing. It's going to switch
- 22:40between it's going to switch uh the ramp
- 22:42on and off. And then we have um some
- 22:46display technology here. Right. So this
- 22:48is just a display. This is a binary
- 22:50counter. So this is doing the timing for
- 22:52us and this is going to make it readable
- 22:53for us. All right. So we'll start and
- 22:56then I'm going to start the whole
- 22:57process. Oh, wait. It started on its
- 22:59own. That's cool.
- 23:02Oh, that's because this new uh control
- 23:04logic's handling that. Okay. So, what's
- 23:05happening is every so often this thing
- 23:09is going to fire. It restarts the
- 23:11sampling here and then um it restarts.
- 23:15So, here I can change the voltage. So,
- 23:17if I lower the voltage here, you can see
- 23:20it takes less time to get here. And we
- 23:22see it's five. And I raise the voltage
- 23:25and it's going to take longer. and then
- 23:27the the binary values here. So here is
- 23:29this this ramp function here which is
- 23:31occurring at this point here is just
- 23:35ramping up until these two things are
- 23:36equal and the logic just traps it holds
- 23:38it on that uh display value and you can
- 23:40see it counting up.
- 23:48Now I want you to take 30 seconds to say
- 23:50well how could you increase the
- 23:52resolution of this timer? So why don't
- 23:54you take 60 seconds talks with each
- 23:56other and figure out what is the easiest
- 23:59way to make uh this a higher resolution
- 24:02um uh EDC so we can get more bits for
- 24:06every uh sample.
- 24:12[snorts]
- 24:18[groaning]
- 24:49I think you can All
- 25:02right. What do you think? How could we
- 25:03change the resolution of this timer?
- 25:08>> Does that question even make sense?
- 25:15>> We were thinking if you could increase
- 25:16the clock cycle, you have more
- 25:19operations at the same time.
- 25:20>> Yeah.
- 25:22>> Yeah. So here it just happens to be I
- 25:25can do that right now. So here we're
- 25:26going to do I'm going to increase the
- 25:27clock frequency of this clock that's
- 25:29running this counter. And so now I can
- 25:32count up and now let's see for this
- 25:36particular input voltage which is 3.8 uh
- 25:38we are going to get let me can pause it
- 25:40here.
- 25:42So
- 25:44so there we're at 31 which is the the
- 25:47count. And if I slowed it way down,
- 25:51right now we're going to do another
- 25:52cycle, right? Where got the analog
- 25:54voltage is at the same point. We're
- 25:55ramping up, but we're going slower. So
- 25:58now it's at six. So the same hardware,
- 26:02but now I was able to make a trade-off
- 26:04versus time versus resolution. Just by
- 26:07running my counter faster allowed me to
- 26:09get better resolution out of my ADC.
- 26:11That seems like a nice trick. What did
- 26:13we what what cost us? What did we uh
- 26:16have to give up to get that trade-off?
- 26:31All right, talk amongst yourselves for
- 26:3230 seconds. Figure out is there anything
- 26:34by running the clock faster do we do we
- 26:36give up? Do we lose? Why not just always
- 26:39run this thing as fast as possible?
- 26:53>> [clears throat]
- 27:10>> All right. What do we give up?
- 27:16Yeah.
- 27:22>> And like a bigger value for whatever you
- 27:25have, which means you can't store.
- 27:34>> You mean my Vmax, the maximum voltage I
- 27:36can measure is going to be smaller? I
- 27:38don't think so.
- 27:40Um
- 27:43I think Vmax is really defined by the
- 27:45slope function. So if I go and take
- 27:48uh let's run this again. So I put my
- 27:51voltage my input voltage here is what
- 27:53like 5 volts.
- 27:55As long as this ramping function that's
- 27:57made by this current source going into
- 27:59this capacitor, right? This is we're
- 28:00comparing this value to this value. And
- 28:03when this value equals this value, then
- 28:05we stop. As long as I can get up there,
- 28:08that's my limiting factor. It's it's not
- 28:10necessarily a time thing.
- 28:13What else? What would we give up? Why
- 28:15not just run this ADC as fast as
- 28:16possible all the time?
- 28:21>> Yeah,
- 28:23>> register.
- 28:27>> That's true. Maybe that's what you were
- 28:29saying. um you so let's just assume that
- 28:32our counter value is large enough that
- 28:37that's not a problem that would be a
- 28:39that would be a constraint but we can
- 28:41fix that at design time.
- 28:44>> Yeah. So we're going to run a clock the
- 28:46counter faster where that means that
- 28:50that digital logic is going to be
- 28:51clicking over faster and faster and
- 28:53faster. It's going to increase your
- 28:54power consumption. Now, maybe compared
- 28:56to the power consumption of your devkit,
- 29:00uh, running at full blast, it's not that
- 29:03big a deal. But if it was a really low
- 29:04power application, maybe you'd want to
- 29:06make a trade-off between, hey, I got to
- 29:08run this thing faster. I get higher
- 29:09resolution, but do I really want to
- 29:11spend that extra extra power?
- 29:14But that's for me, I I always like this
- 29:16one because I get to make a trade-off
- 29:18and I get uh between using time to
- 29:20measure uh some voltage, which is kind
- 29:23of interesting idea.
- 29:26Okay. Now, what we find, oh, let's go
- 29:30back here.
- 29:32Okay. So, we talked about Oh, I I did
- 29:36gave away the power question in the
- 29:37terms of voltage trade-offs, but what
- 29:40could be one particular issue with this
- 29:42sort of scenario? Like remember, we're
- 29:44making integrated circuits. We're trying
- 29:46to make hundreds of them, thousands of
- 29:48them at a time, and I can't tune each
- 29:50one. So what would be the challenge with
- 29:53creating with using a single slope
- 29:54integrator uh with when when it comes to
- 29:58um or what potential issues when will
- 30:01happen to the current and capacitor
- 30:04measurements because of um how I use
- 30:07these circuits or how these circuits are
- 30:09manufactured. So uh take 60 seconds
- 30:11think about that. If you have some
- 30:12workarounds that would be great too.
- 30:32Let me know [snorts] why.
- 30:41[clears throat]
- 30:50Yeah.
- 31:12How about that?
- 31:21All right. What do you think? What are
- 31:22some potential issues with relying on
- 31:25current and capacitance to measure uh
- 31:28voltage or to to have those be constant
- 31:32as a function of time?
- 31:43Yeah,
- 31:44>> one sort of issue that we brought up is
- 31:46that um you're not measuring the voltage
- 31:48directly. So for instance if your
- 31:51capacitors and capacity push up um the
- 31:54way
- 31:56vice versal
- 32:08>> Yep. What are some things that influence
- 32:12uh your capacitance or your current?
- 32:15>> Yeah. Parasitic.
- 32:18>> Oh, yeah. Parasitic capacitance on your
- 32:20device. Uh, so and then what's one way
- 32:23around that?
- 32:27>> Yeah. So, a manufacturer time they could
- 32:29measure that. What are some other uh
- 32:33factors?
- 32:34Maybe something you can't Okay. Yeah.
- 32:37>> Heat. Yes. So, uh that you can't take
- 32:40care of at manufacturer time, right? So,
- 32:42they do calibrate a lot of your things
- 32:44through testing. So if there was a
- 32:46little offset in your ADC because of you
- 32:49know wire resistance or something they
- 32:51could account for that but temperature
- 32:52changing as a function of time they
- 32:54can't really account for and so uh your
- 32:57capacitance right if you have a
- 32:58capacitor we often use capacitors as
- 33:01sensors and we'll put some dialectric in
- 33:03between to say changes its uh size as a
- 33:07function of temperature
- 33:09or humidity. So this is how you make
- 33:11humidity sensors. Well that's that's how
- 33:13you make a nice sensor. Now they're
- 33:14trying to mitigate those quantities when
- 33:16they're making onchip capacitors. But
- 33:17still there's a little bit of change
- 33:19just at the silicon level. It gets a
- 33:21little warmer that capacitance moves a
- 33:23little bit. Uh your current source you
- 33:25get a little bit warmer and then
- 33:26electrons flow a little bit uh
- 33:31less good. Yeah, a little bit higher
- 33:34resistance through your uh gates. So now
- 33:37you have a slope that's dependent on
- 33:39temperature and now your ADC
- 33:41measurements depends on the temperature.
- 33:43So now you're correlating, you have
- 33:45these confounding factors. Um, how would
- 33:48you get around that issue?
- 34:03Guys are very tired. I can I can that
- 34:05must be it. Either I'm boring or you're
- 34:07tired. So I'm going with you're tired
- 34:08and I'm super interested. Um so the way
- 34:13around one way around this is that if
- 34:15you are temperature dependent you could
- 34:16have a temperature sensor that tells you
- 34:18what the relative temperature the
- 34:20temperature is now and then you could
- 34:21have a offset table and it it's not
- 34:24obvious but uh almost every piece of
- 34:26silicon can have a free temperature
- 34:28sensor. uh the the trick is you have two
- 34:30diodes of they're manufactured almost
- 34:32you know as precisely as possible and
- 34:34you put two dissimilar currents uh
- 34:36between them and the resulting voltage
- 34:38is proportional to absolute zero uh just
- 34:41a trick of physics and on silicon you
- 34:43can bet about half a degree accur deg C
- 34:46accuracy with that um anyway so now you
- 34:50could have a lookup table to try and
- 34:52compensate for the temperature var
- 34:54variations not the ideal method uh so
- 34:57there is a way around that um
- 35:01uh oh and here's the answer um yeah so
- 35:05basically these are inaccurate because
- 35:06of uh temperature but you can get around
- 35:08it through factory factory calibration
- 35:10and temperature compensation. So the way
- 35:13around this is what they call a dual
- 35:15slope integrator. We're not uh the the
- 35:17exact operation of all the analog
- 35:18circuits not important but the intuition
- 35:20of how the slope integrator should works
- 35:23which is this you're you have a constant
- 35:24rise time and you're seeing when the
- 35:25voltage equals and this one which is uh
- 35:29we'll talk about in a second which is
- 35:31rise and fall time. Understanding though
- 35:33that trick is what's important and when
- 35:36to apply it. So a dual slope integrator
- 35:39is kind of the industry standard and uh
- 35:41what it does is it's uh uh samples has a
- 35:45sample phase and then it has a uh or
- 35:48integration phase and then it has a um
- 35:51measurement phase. So the trick here is
- 35:54that in phase one you have uh some
- 35:57current or some voltage uh like you have
- 36:00a trans impedance amplifier. So you have
- 36:01your input voltage and that's being
- 36:02turned into a current through the magic
- 36:04of analog circuits. And basically that's
- 36:06charging up your capacitor. So you'd
- 36:08have um some value like that. And then
- 36:12at some point in time you reverse that
- 36:14and you have a known current pulling u
- 36:17charge out of that capacitor. And then
- 36:20if you that's phase two and then if you
- 36:22do the math you can remove the R and C
- 36:25from the equation allowing you to have a
- 36:28value that's just proportional to uh
- 36:31your voltage reference and your input
- 36:32voltage and time. So this way you can by
- 36:35charging up the uh capacitor and then
- 36:37discharging capacitor you pay the
- 36:39inaccurate penalty of your capacitor was
- 36:42too big or too small uh once on the way
- 36:45up and then you subtract that off on the
- 36:47way down. So the the trick is that uh
- 36:50you just um you those R and C's both
- 36:54cancel out of your circuit.
- 36:57And so that's why it's a very popular
- 36:58circuit, this dual slope integrator. We
- 37:01can see a quick example of that here.
- 37:05Again, another super complicated
- 37:06circuit, but this is just supposed to be
- 37:09a trans impedance or transconductance
- 37:11amplifier. Sorry, this is just an op
- 37:13amp. Doesn't matter how it works. And
- 37:15you're going to charge up this
- 37:16capacitor. And then you're gonna have an
- 37:19op amp here, uh, which is doing the
- 37:22comparison. And then you're going to
- 37:24discharge this capacitor through here.
- 37:26Um, and so we're going to push this
- 37:28button. And then we're going to that's
- 37:30all going to trigger this thing to start
- 37:32counting. So let's try it.
- 37:35Let's see.
- 37:37Start. Oh, I have a simulation going
- 37:39very slow. So here we uh Oh, I'll start
- 37:43again. I went too fast.
- 37:50And here we go. We'll start it.
- 37:54And we're we're basically we connected
- 37:56this input through this uh
- 37:58transconductance amplifier and it's
- 38:00charging up this capacitor.
- 38:04And then after some period of time just
- 38:06defined by this circuit here, it
- 38:07switches to this current source here and
- 38:09it's pulling this thing down. So now
- 38:12we're not dependent on the Rs and C's in
- 38:14here. and the Rs are implicit. We're
- 38:16just dependent on uh the value of this
- 38:18current source here. Um and now we can
- 38:21measure this value and we get that over
- 38:23here. I didn't I didn't put the
- 38:25frequency part on here. Uh but you still
- 38:28get the same benefit here of you could
- 38:30have a clock that's going faster
- 38:33uh to do a higher sample rate or that to
- 38:37increase your ADC resolution. Uh the the
- 38:40downside of all these devices is that it
- 38:42takes a lot of time to get there, right?
- 38:44So you think about trying to do
- 38:46operations within as minimum number of
- 38:48clock cycles as possible. And now you
- 38:50say I I want to have this high
- 38:51resolution ADC that's going to count up
- 38:53to you know uh you tens of thousands of
- 38:56uh units. Well, it's going to take that
- 38:59many clock cycles. So now this is very
- 39:01slow compared to your uh
- 39:04microcontroller, but it has high
- 39:06accuracy compared to other ones and it's
- 39:08relatively uh cheap and small.
- 39:14Uh
- 39:19yeah. So it's slow u but it uses time to
- 39:22measure. The resolution is the highest.
- 39:24Uh typically these are used in like
- 39:26multimemeters or even benchtop
- 39:28multimeters where you want to get like
- 39:30um you know five five digits of
- 39:33accuracy. Um the complexity is
- 39:36relatively high. Uh but it has good
- 39:38noise performance, good interference
- 39:39performance, those sorts of things.
- 39:43U power consumption is relatively low.
- 39:46You don't have a lot of comparators. You
- 39:47did have some digital logic in there,
- 39:48but that's pretty cheap. Uh in the
- 39:50current source seems like it would be
- 39:52bad, but actually in reality it's not
- 39:54that big compared to say all the
- 39:58comparators we saw in the flash ADC or
- 40:00all those resistors that needed to be
- 40:02biased.
- 40:04All right. So, any questions about slope
- 40:06ADCs?
- 40:12Remember that the conceptual trick is
- 40:13here we're charging up capacitor. Uh
- 40:16maybe we're discharging the capacitor,
- 40:17but that charging up we can measure with
- 40:19time. That's that's the trick you want
- 40:21to take away from this thing.
- 40:23Okay.
- 40:25And then so um the pop more popular
- 40:27version here is a SAR ADC. This is
- 40:29what's on your uh microcontroller. So a
- 40:32successive approximation register ADC
- 40:35and uh this device has uh a unit we
- 40:39haven't in there I haven't told you
- 40:40about yet which is a digital analog
- 40:42converter. So just even though we
- 40:44haven't taught you what that is just
- 40:46assume you put some digital values in
- 40:48and it's going to produce an analog uh
- 40:49value out basically you know just what a
- 40:53um speaker would do.
- 40:56And so now we're going to take we have
- 40:57some sample and hold circuit. We didn't
- 40:59show that in the other circuits. All
- 41:00circuits would have a sample and hold
- 41:01circuit but basically we have some input
- 41:02value. We're going to hold it here and
- 41:04then we're just going to make a
- 41:06comparison. Okay, is it you know this
- 41:08value? Is it higher or lower than this
- 41:10value? And then you're going to uh use
- 41:12this control loop here to say okay if it
- 41:15was higher or lower then I have this
- 41:16successive approximation. Basically it's
- 41:18doing binary searching to try and find
- 41:21where the value is. So it's going to be
- 41:24uh searching back and forth. I think I
- 41:26have an animation of that. Yeah. So we
- 41:27have two inputs and a comparator. Uh and
- 41:29then the binary searches you start off
- 41:31at say half half half your binary value
- 41:34size and then you're just going to try
- 41:36and look is this value greater or less
- 41:37than my deck output. And whatever it is
- 41:40then you're just going to do your binary
- 41:41search and keep trying to look for that
- 41:43particular value.
- 41:47And of course if it's above then you you
- 41:49choose back up. So this is just a kind
- 41:51of analog way to or digital way to
- 41:54search for an analog value. So the nice
- 41:56thing is here it doesn't take as long to
- 41:59converge as your slope integrator slope
- 42:01integrator was like I have to count
- 42:03every single um uh uh point right every
- 42:07single clock cycle I have to count
- 42:09something all the way up to my value
- 42:11here I can just basically do power by
- 42:13two so it's much faster at converging
- 42:16but it is more complex
- 42:21and so if you this would be another
- 42:23another way to show this um So here's
- 42:25kind of that search process. Here we
- 42:27have time and then some analog voltage
- 42:30here. So here we have our sample and
- 42:32hold circuit. So sis for whatever
- 42:34reason, let's say it started at zero.
- 42:35We're not going to pay attention to
- 42:36anything that happened in the past. And
- 42:38you have some sample time. Well, that's
- 42:39going to charge up this capacitor. And
- 42:41then we're going to hold it. Then we're
- 42:42going to start doing an analog
- 42:44conversion. Start at say 1 0 0. We're
- 42:46going to say, are we higher or lower
- 42:48than that? Well, we're higher. So we'll
- 42:50go up to half between, you know, 0.5
- 42:53volts and 1vt. uh whatever that is
- 42:55binary and then we're going to guess and
- 42:57that is 1 one zero 0 and we're higher
- 42:59than it was. Now you can see that we're
- 43:00kind of converging and searching for
- 43:03that analog value. Uh and now you
- 43:05remember we still have quantization
- 43:07error. We talked about that before or
- 43:09last week. So we didn't exactly get to
- 43:11the value but this is the closest binary
- 43:13value that will represent that analog
- 43:15voltage.
- 43:20And we can see this circuit in action.
- 43:24Uh, all right. So, let's see. So, this
- 43:26one, uh, a lot of little control
- 43:29elements here, unfortunately, but
- 43:31there's a timer and a controller block.
- 43:33That's this is the thing that's doing
- 43:34the binary searching. Uh, and then you
- 43:37have your DACK. So, basically, it's this
- 43:39loop right here. You have your analog
- 43:41voltage coming in. We're going to
- 43:43compare it to the DAC output. This thing
- 43:45is going to go high or low. And then we
- 43:46just have this controller that's going
- 43:48to search back and forth and and see if
- 43:50we can find it. So, let's start it.
- 43:53And what do I have to do? Oh, it already
- 43:56started. Okay, good.
- 43:58So, here's the analog voltage. And we
- 44:00can see that binary search. It goes up a
- 44:02little bit higher, then it came back
- 44:03down. And then, uh, you have to know
- 44:06when to to look. It doesn't have a like
- 44:08a hold when it's done. Like the
- 44:10simulation doesn't stop when it's done.
- 44:12Um, but we can change the analog value.
- 44:16Let's see. So, what this does, it's
- 44:17going to put out four pulses. So, it's a
- 44:19four bits. and we'll start on this next
- 44:21one here.
- 44:23So there's four values here. And now you
- 44:26can see it's doing the analog searching
- 44:28or digital searching for that analog
- 44:30value. And then so I should have said
- 44:33this before, this little counter here
- 44:36pulse uh puts out four pulses as four
- 44:40clock cycles because it's a fourbit uh
- 44:42ADC. And then the value is is uh uh
- 44:46accurate here. And if I change the
- 44:48voltage up here, hit reset and run, we
- 44:53can see that the analog voltage is
- 44:56higher. And now we can see that the uh
- 44:59ADC, the DAC is kind of searching for
- 45:01that value.
- 45:13>> Zero question. Oh, good. I'm Thank Thank
- 45:15goodness you're here. Sure.
- 45:26>> How do we know if we're like within like
- 45:28half basically?
- 45:30>> You don't
- 45:32um basically you're going to keep going
- 45:34uh until you um I mean there's a little
- 45:37state machine that says we're not going
- 45:38to go back, right? We're always going to
- 45:40go that one bit over,
- 45:42>> right? So basically say this was a 8bit
- 45:45thing and but now you know that um
- 45:50uh you came very close to it at the very
- 45:52beginning. Well then it's going to say
- 45:53well I can't go any higher. So it might
- 45:55go up and might go back down but it
- 45:57can't uh it's just going to converge on
- 45:59that because it can't get any closer to
- 46:00that that value.
- 46:08All right.
- 46:13Oh, that's the old version. Okay.
- 46:18And so, uh, this, so now we in the
- 46:20trade-offs of speed. Uh, so this is an
- 46:22analog binary search. So, it's a nice
- 46:25compromise between speed and resolution.
- 46:28Um, I should have said this before. One
- 46:30trick you can do with SAR ADCs is if you
- 46:32want to go faster, you don't have to
- 46:34convert all the all those bits. Say you
- 46:36have a 16- bit uh SAR ADC, but it just
- 46:40your clock speed is limited. Uh or say
- 46:43um you want to go faster, but your
- 46:46propagation delay through your uh device
- 46:48won't let you go fast enough. So you
- 46:50want to go say a megahertz, but uh your
- 46:52full 16- bit conversion takes longer
- 46:54than that. Well, what they do is they'll
- 46:56just not convert the last few bits. So
- 46:58you could do like a 8 bit or two bit or
- 47:00four bit. Two bit wouldn't make sense,
- 47:02but four bit or 8 bit or six bit,
- 47:04whatever it is. And that would allow you
- 47:06to have less time uh to get to a
- 47:09conversion and then you could sample
- 47:10faster. So this is another way of uh uh
- 47:14optimizing speed versus um
- 47:17uh accuracy which is nice. Um I would
- 47:21say that the the complexity is maybe
- 47:24medium or so. Um because you do need
- 47:26this DAC and we talk in a control unit
- 47:28but we don't need in one uh comparator
- 47:32um but we don't need uh you know voltage
- 47:34or current sources or those dividers
- 47:38and power consumption is um pretty uh
- 47:41reasonable considering the costs of most
- 47:44microcontrollers. So, it's less than a
- 47:46flash ADC,
- 47:48probably not as much as a uh uh uh
- 47:52sorry, it's much less than a flash ADC
- 47:54and probably more than a slope
- 47:56integrator.
- 47:58Okay, so the goals uh for you guys is
- 48:01not to necessarily know every ADC and
- 48:04work through every single topology and
- 48:05be able to recreate those circuits on an
- 48:07exam because that would be horrible.
- 48:09Your goal is to say, "Oh, these devices
- 48:12have different trade-offs, right? I
- 48:14would want to choose one of them to uh
- 48:17have to accomplish certain goals. And so
- 48:19the reason I show you those uh circuit
- 48:21trade-offs is just so you can figure it
- 48:23out. Uh you can play with the circuits
- 48:25on your own. Oh, you need more. Sorry.
- 48:30Set those up. Uh and just kind of learn
- 48:33about those trade-offs as well. You can
- 48:36just take those and hand them up that
- 48:38way. Go that way. And so for this thing,
- 48:40you're just trying to rate
- 48:43um
- 48:46you know them from one to three. I think
- 48:48it's three is the fastest or the best
- 48:50and one is the worst. And you can kind
- 48:52of figure out like comparatively which
- 48:54one would you choose for different use
- 48:56cases.
- 48:57[snorts]
- 49:16here. I can help some along.
- 49:19There you go.
- 49:22There you go.
- 49:25That way.
- 49:31Pass those out that way.
- 49:53It says this one is this one is easy for
- 49:55speed. If they're right in the name,
- 49:57it's giving you points.
- 50:12>> [groaning]
- 50:15>> That was great.
- 50:34about
- 50:51[clears throat]
- 51:27might
- 51:44reservation.
- 52:05You must
- 52:08Glory.
- 52:31[groaning]
- 52:35Yeah.
- 53:05Open.
- 53:22Heat. Heat.
- 54:01Happy
- 54:19glory.
- 54:22Oh,
- 54:34please.
- 54:53What is
- 55:17>> Yeah.
- 55:18>> [clears throat]
- 55:22>> Are you
- 55:24watching?
- 55:44All
- 55:48right.
- 56:15Facebook.
- 56:28Yeah.
- 56:56>> Okay.
- 56:59All right.
- 57:05[clears throat]
- 57:26Perhaps
- 57:37>> [clears throat]
- 57:53>> What do you want?
- 57:56That's your
- 58:39Okay, now
- 58:42these are not supposed to be like
- 58:43absolute like not every category can you
- 58:46come up with absolute value for because
- 58:48some of them are like like die like area
- 58:51You'd have to do the layout to figure
- 58:52that out. We can just kind of guess,
- 58:54right? This exercise is more about
- 58:56trying to compare them. What do you
- 58:57think the trade-off?
- 58:59So, uh, resolution. I didn't even really
- 59:02define what I meant by resolution. Who
- 59:04who had a definition for resolution?
- 59:07What do you think that means?
- 59:15>> What does that mean?
- 59:17>> Like step [clears throat] size.
- 59:18>> Yeah.
- 59:19>> Yeah. Yeah. So I was thinking of like uh
- 59:21step size like what's the smallest
- 59:24measurement you can make right? So
- 59:25higher resolution low resolution would
- 59:27be really coarse steps and higher
- 59:29resolution would be um small steps. So
- 59:32which which device could give you you
- 59:36know in theory higher resolution than
- 59:38the other ones. What do we think?
- 59:44I see I know you guys had things on your
- 59:46papers. Saw them.
- 59:49Yeah, I would say that's probably right.
- 59:51And now it's of course you could also
- 59:53say like I'm going to make a really big
- 59:56class A and then it could have higher
- 59:58than an instance. But it's trying to
- 1:00:00just argue like what is this technology
- 1:00:02good at or bad at? So I said and somehow
- 1:00:05my columns are off. I don't know. But I
- 1:00:07said here like um look the dual slope is
- 1:00:10going to give us this opportunity to use
- 1:00:12time to measure things. Right? So now I
- 1:00:16can I can have a really slow ramp up
- 1:00:19time and I can count really really fast.
- 1:00:21I can get a really high uh number of
- 1:00:23step sizes that I can differentiate. And
- 1:00:26so that's pretty universally going to be
- 1:00:28the the highest resolution.
- 1:00:31[clears throat]
- 1:00:31Flash on the other side is bound. You
- 1:00:34can't make them too big just because
- 1:00:36then you have to get all these resistors
- 1:00:37perfectly aligned and there's just
- 1:00:39limitations on how practical you can
- 1:00:41make a flash. I'm seeing usually that
- 1:00:42has the smallest uh resolution out
- 1:00:45[clears throat] of these categories and
- 1:00:47SAR is somewhere in between.
- 1:00:50Anybody want to argue I like arguing
- 1:00:52like no it's something different. Okay.
- 1:00:57Flash is in the name. All right. So
- 1:00:59flash is going to be the fastest. There
- 1:01:01is no clock involved in any of those
- 1:01:04circuit diagrams I show uh because the
- 1:01:07propagation is just uh through one um
- 1:01:11comparator and those are going to be
- 1:01:13really fast. So these are the things
- 1:01:15that will go up to the gigahertz uh and
- 1:01:20beyond. So these are really what the the
- 1:01:21workhorse for fast things are. But you
- 1:01:23have to give up resolution as you see
- 1:01:24above because you can't get a lot of
- 1:01:26different steps.
- 1:01:28The slowest right is going to be dual
- 1:01:30slope or even just slope integration
- 1:01:32because here every measurement you make
- 1:01:36you have to have a clock cycle for while
- 1:01:38SAR is at least it's uh uh 2 to the n
- 1:01:42right so here you're doing binary search
- 1:01:44this one is your linear linear search
- 1:01:47looking for the value so uh you know
- 1:01:50it's it's this is kind of on average of
- 1:01:52course if the input voltage happens to
- 1:01:54be zero you're going to find it
- 1:01:55immediately with uh slope integrator
- 1:01:58It's going to take you longer to find
- 1:01:59that value with your SAR ABC. But on
- 1:02:02average, the slope integrator uh is
- 1:02:04going to be slower than the SAR.
- 1:02:09Uh what about accuracy? What do you guys
- 1:02:11think? It's going to be the most
- 1:02:13accurate one. And here I meant didn't
- 1:02:16tell you accuracy means uh for a given
- 1:02:19step size, whether it's big or small,
- 1:02:21how constant is that step size? or if
- 1:02:24you take one measurement one day and
- 1:02:26take another measurement another day,
- 1:02:27how likely is it that they're going to
- 1:02:28be the exact same value? What do you
- 1:02:30think the most accurate
- 1:02:33uh device is?
- 1:02:43>> I would say it's a dual slope. I'd say
- 1:02:47um it depends on the least number of
- 1:02:50analogy parts, right? So the flash ADC
- 1:02:53has always resistors that have to be
- 1:02:56perfectly negative and if there's a
- 1:02:58little deviation one resistor then your
- 1:03:00step size a little bit worse and sorry
- 1:03:03you see um it's not bad it's just that
- 1:03:08uh you have a deck and there will learn
- 1:03:09about decks and they have their own
- 1:03:10inherent problem here we figure out way
- 1:03:13to get rid of the RNC constant inside
- 1:03:16that thing by charging up the capacitor
- 1:03:17and then subtracting off the RNC as you
- 1:03:20charge down. So this one while still has
- 1:03:23errors in measurements and and other
- 1:03:25issues, it's just less prone than the
- 1:03:27other devices. So it has higher
- 1:03:29accuracy.
- 1:03:32Uh what about complexity? We didn't
- 1:03:33really talk about even what that means.
- 1:03:35Generally was thinking about the number
- 1:03:37of components you have to put into these
- 1:03:39things. Not the digital logic. We'll say
- 1:03:41the digital logic's free, but like the
- 1:03:43number of comparators, number of
- 1:03:45resistors, like how much of those extra
- 1:03:47pieces you have to put in.
- 1:03:55Who wants to dispense a guess? Doesn't
- 1:03:57have to be correct.
- 1:03:59>> Yeah. What do you think?
- 1:04:00>> I guess the simplest one is the dual
- 1:04:02slope per
- 1:04:04simplest one. Dual slope. What did I Who
- 1:04:06knows? I forgot what I even said. Let's
- 1:04:08find out. Uh I said the dual slope was
- 1:04:11the most complex. Why did I say that?
- 1:04:14>> No. No. I said the dual Well, it depends
- 1:04:17if I want complexity to be up or down.
- 1:04:19Simple
- 1:04:20>> least. So what did you mean to say? You
- 1:04:22want you can redefine it.
- 1:04:24>> Simplest
- 1:04:25complexity.
- 1:04:26>> Okay. So simplest is a slope.
- 1:04:29>> Yeah.
- 1:04:29>> Okay. I don't even I made these slides
- 1:04:32like two weeks ago. I don't even know
- 1:04:33what I meant by complexity. But uh so
- 1:04:36let's see. Let's try and interpret what
- 1:04:38that means. Um complexity in the sense
- 1:04:40that um there's a lot of analog
- 1:04:43trickiness. Okay, that's in the uh slope
- 1:04:46integrator. But there's less parts to
- 1:04:49get wrong.
- 1:04:51Okay. And over in the Flash, I'd say the
- 1:04:53Flash says the structure is pretty in uh
- 1:04:56[snorts] easy to understand, but there's
- 1:04:58lots of components to get right. So
- 1:04:59maybe I would look at uh flash as being
- 1:05:02the most complex in the sense of trying
- 1:05:04to get it wrong. And dual slope is maybe
- 1:05:07the easier one to get right. Maybe I
- 1:05:10need to pre-label that one. Okay. How
- 1:05:13about power?
- 1:05:18Which one's going to be the most power
- 1:05:20consuming of all these devices?
- 1:05:23Yeah.
- 1:05:28>> Yeah, I'd say I'd say so. So I I said
- 1:05:30that as well. Flash in a sense here we
- 1:05:33have a comparator for every step size.
- 1:05:36For every step you have to have a
- 1:05:37comparator. Those are always on. Um, and
- 1:05:41then you have to have that resistor
- 1:05:43ladder as well before you have any of
- 1:05:44the decode logic. So, taking the digital
- 1:05:46logic out, I'd say that's the most power
- 1:05:49consumption. And the dual slope
- 1:05:51integrator only has one compared
- 1:05:56circuits, but those are relatively
- 1:05:58[clears throat] minor compared uh to all
- 1:06:00the other ones on the left. And you're
- 1:06:03seeing a trend here. Somehow SAR keeps
- 1:06:05falling in between both of these two
- 1:06:08extras.
- 1:06:09Now here's the the the one that's the
- 1:06:11hardest and most arbitrary of all the
- 1:06:13other arbitrary ones that are up there.
- 1:06:16uh we can think about uh cost is most
- 1:06:18arbitrary because the cost that you will
- 1:06:21see as designers as a meta system
- 1:06:23designer is like uh probably more about
- 1:06:26IP than it is about intellectual
- 1:06:28property than it is about like the
- 1:06:30actual die area right uh it's like
- 1:06:32you're trying to get a package thing a
- 1:06:35component you can buy off somewhere and
- 1:06:38die area is not a direct function but
- 1:06:40let's just assume that size is closely
- 1:06:43related to cost. Uh what do we think
- 1:06:46would be the [clears throat] most
- 1:06:47costly?
- 1:06:49Probably flash. I I think so too. Let's
- 1:06:51see if I if I agree with myself. Okay.
- 1:06:54This time. So flash uh because it has
- 1:06:57these large resistors uh takes up a lot
- 1:07:00more area. So that's what it means in
- 1:07:02terms of cost. Um
- 1:07:05and then dual slope only has you know
- 1:07:08one capacitor on it relatively small and
- 1:07:10sorry somewhere.
- 1:07:12Okay. Is there anyone here you're like,
- 1:07:14"No, I disagree with
- 1:07:17could disagree with me." It's fine.
- 1:07:23>> I guess
- 1:07:28[clears throat]
- 1:07:34that's a good point. Yeah, that's a good
- 1:07:36point. So, some of these are flexible,
- 1:07:38right? So, of course, you could run your
- 1:07:40dual slope um with a really coarse um
- 1:07:44timer, right? A really slow clock and
- 1:07:46then it resolution really fast. So,
- 1:07:49that's that's a fair point. Um somehow
- 1:07:52in my mind, maybe the mind of the
- 1:07:54internet as well, these are like if
- 1:07:56there's somehow equivalent, right, that
- 1:07:59these are what the curiosity these are
- 1:08:00all 12 minutes.
- 1:08:04That's a fair point. Any other any other
- 1:08:07caveats or questions or things you want
- 1:08:10to argue about?
- 1:08:13Okay.
- 1:08:16Uh let's see.
- 1:08:20All right. So, we went through those.
- 1:08:21There are a few other ones you might
- 1:08:23see. This is just enough to know like
- 1:08:25that they exist. So, uh, sigma delta or
- 1:08:29delta sigma ADC's um, is kind of like
- 1:08:32sorry to see except there's this one bit
- 1:08:34ADC and and there basically just
- 1:08:37accumulating these samples over time.
- 1:08:39It's an interesting uh, device to look
- 1:08:42at and then there's also pipeline ADCs
- 1:08:45where each stage is doing a small bit of
- 1:08:48the calculation of the voltage. So now
- 1:08:50you can do um, all these processes in
- 1:08:53parallel. It's kind of like multiple um
- 1:08:57SAR ECs all stacked together and now you
- 1:09:00have a a voltage uh distribution
- 1:09:03function that gives each one a separate
- 1:09:04little piece of that voltage to look at
- 1:09:06but not not part of the exam or
- 1:09:08anything. You just have to know that or
- 1:09:10just it's good to know that there are
- 1:09:11other types of ADCs that exist.
- 1:09:15Okay. So for your particular device uh
- 1:09:18you will be using it in lab. Uh so it's
- 1:09:21a you have four ADCs. They're all 12
- 1:09:23bits. They're all SAR ADCs. And then you
- 1:09:26get to make the tradeoff here between uh
- 1:09:29sampling speed like how fast you want to
- 1:09:31go. Three mega samples per second, two
- 1:09:33mega samples per second. And you have a
- 1:09:34bit tradeoff whether it's this 8 bit or
- 1:09:3712 bit. And so really usually it's
- 1:09:40trying to figure out what's the fastest
- 1:09:42sampling speed I need for my signal. So
- 1:09:44my signal is coming in. I want to do
- 1:09:46overnight twist, but you probably want
- 1:09:47to be like maybe five [clears throat]
- 1:09:48times faster depending on what your
- 1:09:50signal is just so you can get uh rid of
- 1:09:53the noise and everything and really
- 1:09:54understand what signal it is. So, it's
- 1:09:56probably good to over sample, but uh
- 1:09:58then you can see like well do I really
- 1:09:59need I want to go faster, but do I
- 1:10:01really need the the higher resolution?
- 1:10:03And [clears throat] sometimes there's
- 1:10:04other signal processing tricks you can
- 1:10:05do say um using opamp to get it full
- 1:10:09range. Right? So before we saw last week
- 1:10:11you probably saw examples where if it
- 1:10:13was really narrow range well then you
- 1:10:16don't have very many bits to measure. So
- 1:10:18if you use the op amp you can increase
- 1:10:21the the range of your signal. So there's
- 1:10:24kind of choice as to where you're trying
- 1:10:25to go faster or how many bits you need
- 1:10:27to represent something.
- 1:10:29Uh so you have uh eight channels per ADC
- 1:10:33which means you have one ADC but you can
- 1:10:35channel them in from different sources.
- 1:10:37So you can basically use them
- 1:10:38pipelining. So it won't work if you're
- 1:10:40trying to go for the fastest for every
- 1:10:42channel, but you imagine you have eight
- 1:10:44different values you're trying to
- 1:10:46measure
- 1:10:48and uh rather than and basically it's
- 1:10:51going to act like a muck. So maybe you
- 1:10:52have a a glove smart plug you're trying
- 1:10:55to make with a bunch of resistors on
- 1:10:57there to measure finger angle and now
- 1:10:59you can send all those signals to
- 1:11:01different pins and those get routed and
- 1:11:03then the ADC is going to select between
- 1:11:06which one it's going to cue. So he's
- 1:11:08going to do time domain multiplexing
- 1:11:10sample one then next one next one next
- 1:11:12one that allows you to set this thing up
- 1:11:15uh to do ADC conversions and it'll just
- 1:11:17cycle through each one and then set put
- 1:11:20the results in a register set of
- 1:11:22registers for you.
- 1:11:25Um you can do 14 bit oversampling. I had
- 1:11:27to figure out like what do they mean by
- 1:11:29that? How do they take a 12- bit
- 1:11:30[clears throat] ADC and turn it into a
- 1:11:3214-bit ADC? Didn't make sense to me. Had
- 1:11:35to look in the data sheet kind of
- 1:11:36remember what they were talking about.
- 1:11:37So basically they're going to over
- 1:11:38sample. They're going to sample
- 1:11:42um the input multiple times and then
- 1:11:44they're just going to sum them all
- 1:11:46together and shift over to do averaging.
- 1:11:50So basically on devices it's going to
- 1:11:52over sample the thing and then do
- 1:11:54averaging and then put that result back
- 1:11:56to you. And if you know if you're slow,
- 1:11:58if you're working in a world that's
- 1:12:00relatively slow, it doesn't really
- 1:12:01matter. If you're trying to go at, you
- 1:12:03know, uh, 2 megabit samples per second,
- 1:12:06that's not going to work. Now you have
- 1:12:07to do all these extra conversions. But
- 1:12:09it is a way to get extra uh, bits out of
- 1:12:12this by basically doing hardware
- 1:12:14sampling. So, um, hardware oversampling.
- 1:12:17So, that's a a feature that they give
- 1:12:19you that's not on all microcontrollers.
- 1:12:22Uh, and then of course you can generate
- 1:12:24all sorts of interrupts. You can
- 1:12:26generate interrupts when your device is
- 1:12:28done, right? So when you've done an ADC
- 1:12:29conversion, you there's a small plot
- 1:12:31prime here. So you can uh take you know
- 1:12:35so all eight of those samples and when
- 1:12:36all eight samples are done then it'll
- 1:12:38throw an interrupt where you can pull
- 1:12:39data out of that spot. You can also do
- 1:12:41things like monitor a pin and if the
- 1:12:44analog voltage is above a certain value
- 1:12:46or below a certain value then it'll
- 1:12:47throw an interrupt. So maybe you're just
- 1:12:49trying to see if some signal goes high
- 1:12:51or low and it's in some range. It's not
- 1:12:53binary. It's not [snorts] one or zero.
- 1:12:55So, you just want to see if I don't know
- 1:12:57what it would be. Maybe it's a light
- 1:12:59sensor. You want to see if the thing uh
- 1:13:00dips below a certain value. Well, keep
- 1:13:02your mic controller asleep until
- 1:13:04[clears throat] that happens where you
- 1:13:06turn on your ADC module, have that
- 1:13:08going, and then throw an interrupt when
- 1:13:10uh the signal is outside of that range.
- 1:13:14And then, uh we kind of showed the slide
- 1:13:16before, but here you're just going to go
- 1:13:18through and you want to figure out what
- 1:13:20your calculation time is. You got to
- 1:13:22figure out what your sampling time is.
- 1:13:23you're going to get some sampling whole
- 1:13:24time and then your conversion time and
- 1:13:26that's just the number of n bits that
- 1:13:29you have times the clock time and then
- 1:13:32um uh yeah your here your here's sample
- 1:13:35time as software configur
- 1:13:37um so so just an example um for a
- 1:13:41particular ADC configuration you know
- 1:13:43you have a clock of uh 16 MHz can sample
- 1:13:47with four bits
- 1:13:49or sorry four clock cycles and uh four
- 1:13:52cycles for a sample and hold, you can go
- 1:13:54calculate what your conversion time is
- 1:13:57to actually uh convert that value and
- 1:14:00that would tell you what your highest uh
- 1:14:02sampling frequency could possibly be.
- 1:14:06Okay, we're almost at time. So to recap,
- 1:14:09uh it's good to know uh it says single
- 1:14:12slope, but you can just think about um
- 1:14:14slope integrators in general and be able
- 1:14:17to reason about the trade-offs. Why
- 1:14:18would you choose one over the other? And
- 1:14:20then the slide still says the wrong
- 1:14:22thing, but on your uh SAR on your
- 1:14:25microcontroller, you have a SAR ADC that
- 1:14:27does give you the speed versus
- 1:14:28resolution grade. All right. Thanks.
- 1:14:35If anybody has questions about projects,
- 1:14:37now's a good time to chat.
About this transcript
This page contains the full transcript of EECS 373 - Fall 2026 - Lecture 14: “ADCs” by Interactive Sensing and Computing Lab , generated from the public captions YouTube serves with the video. The transcript has 10,967 words across 1,608 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.