YouTube2Text

EECS 373 - Fall 2026 - Lecture 14: “ADCs” — Transcript

by Interactive Sensing and Computing Lab · 10,967 words · 1,608 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Let's see. Uh, you had James last week,
  2. 0:03so hopefully I don't know. You guys got
  3. 0:05through of analog sampling, I assume.
  4. 0:08Talk about analog circuits. Okay, great.
  5. 0:10So, that sets us up for this week. Um,
  6. 0:13so homework not due today. Today is not
  7. 0:15the 26th. That's scary. Next week.
  8. 0:23Next.
  9. 0:27All right.
  10. 0:29next Monday. And then homework 7's been
  11. 0:32released. It's not due for a couple
  12. 0:33weeks. Um, this week you guys need to
  13. 0:36sign up for project proposal meeting
  14. 0:38slots if you haven't already. Uh,
  15. 0:39they're going to start on Sunday or on
  16. 0:41Friday. Uh, we're not going to have
  17. 0:43class on Monday to make room for those
  18. 0:46uh, meetings. Um, and then your job
  19. 0:49generally is to complete your project
  20. 0:51perfor proposal like the night before.
  21. 0:53So me and Matt will look through them in
  22. 0:55the morning, but also bring slides that
  23. 0:57kind of outline what you're going to uh
  24. 0:59be uh um presenting to us and what your
  25. 1:03project is. Um I mean, if you really had
  26. 1:05to, you could bring up your uh project
  27. 1:07proposal uh on the the monitor, but it's
  28. 1:10just easier if you have slides. Um and
  29. 1:13then we're going to give you feedback.
  30. 1:14So the project report askked for a lot
  31. 1:17of information. If you don't know the
  32. 1:18answer to every single thing because you
  33. 1:20haven't figured out what part it is yet,
  34. 1:21that's okay. but it's to try and prompt
  35. 1:23you to start thinking through things. If
  36. 1:25there are major issues with your report
  37. 1:27or maybe you just drastically change
  38. 1:28your project, well, there's a
  39. 1:29resubmission date where you can get back
  40. 1:31the points u and and kind of really the
  41. 1:33goal is for you to have a plan by the
  42. 1:35time you leave that meeting and finish
  43. 1:38your project reports or proposals that
  44. 1:40you have a plan for what to do. Uh and
  45. 1:42then there'll be no class on Monday.
  46. 1:45Yeah.
  47. 1:48>> The night before.
  48. 1:49>> Yeah. whenever you sign up, it's just
  49. 1:51due the night before.
  50. 1:53And it's not like because it's like a
  51. 1:55variable deadline and some people go
  52. 1:56longer, get longer time, like you we're
  53. 1:58really going to grade the resubmissions.
  54. 2:00So if you get a resubmission, that's
  55. 2:02what we're going to grade. Some teams
  56. 2:03just won't need it. So don't don't feel
  57. 2:06like, oh my gosh, I'm losing out because
  58. 2:07I went first.
  59. 2:12Any other questions?
  60. 2:15If you can't find a a meeting time,
  61. 2:18please let me and James know. We'll find
  62. 2:20alternate times. We realize that we're
  63. 2:21trying to work around my schedule and
  64. 2:24James' schedule and some meetings at the
  65. 2:26NSF I have as well as all your
  66. 2:28schedules. So, just let us know.
  67. 2:31Okay.
  68. 2:34So, last week you talked about analog
  69. 2:36signals in general. And if you are EE
  70. 2:38student who's taken I think 216, is that
  71. 2:41your signals class? or 316, you've
  72. 2:44probably already done this, but uh
  73. 2:46especially we have computer scientists
  74. 2:48and people just haven't taken those
  75. 2:49classes yet. So that's kind of give you
  76. 2:50the background of analog systems. And
  77. 2:52now we're going to talk about um analog
  78. 2:55digital converters and digital to analog
  79. 2:57converter. Well, today we're only going
  80. 2:59to talk about ADCs.
  81. 3:01Uh so if you want some references, uh
  82. 3:03your reference sheet, uh chapter 20 of
  83. 3:06this book and also um analog devices has
  84. 3:09some good tutorials. There's good some
  85. 3:11good uh general stuff online.
  86. 3:14All right. And then this should be
  87. 3:16updated, but we're going to talk about
  88. 3:17sample and hold circuits and then
  89. 3:18different types of ADCs and then we'll
  90. 3:21talk about your specific ADC on your
  91. 3:23device. All right. So remember analog
  92. 3:26digital converter is basically an
  93. 3:28oscilloscope. This is just a fancy
  94. 3:29version of it. We're trying to capture
  95. 3:31some signal that exists in the world and
  96. 3:34do something with it. So here right it's
  97. 3:36these are really high speed high uh
  98. 3:39voltage tolerant range uh they can um be
  99. 3:44adjusted in in lots of different ways.
  100. 3:46Um but you your microcontroller can do
  101. 3:49almost everything. Um in fact you can
  102. 3:52buy like really really cheap analog
  103. 3:54digital converters you can buy online
  104. 3:55that are like USB ones are just
  105. 3:57microcontrollers especially if you see
  106. 3:58like the voltage range is like between
  107. 4:00zero and five volts or zero and 3.3
  108. 4:02volts. It's just a microcontroller
  109. 4:04inside. So you can get a lot of work
  110. 4:05done with an analog digital converter.
  111. 4:10So to begin with uh you need this thing
  112. 4:12called a sample and hold circuit. So if
  113. 4:14you're going to do an analog digital
  114. 4:16conversion, it takes some time to
  115. 4:18measure the signal. If that signal is
  116. 4:19moving around a lot while you're trying
  117. 4:21to measure it, it's going to be it's not
  118. 4:23going to work out so well. So um you
  119. 4:26have to use a thing called that sample
  120. 4:27and hold circuit. And again, your job is
  121. 4:30not to like, oh, how do I do my node
  122. 4:33voltage equations for this whole thing?
  123. 4:34It's to really understand why it exists,
  124. 4:37how it's used, and then deal reason
  125. 4:39like, okay, when I'm setting up my
  126. 4:41Hample and sample and hold circuit time
  127. 4:44on my microcontroller, what do I have to
  128. 4:45consider?
  129. 4:53Okay.
  130. 4:55Um, so here the goal is to take this
  131. 4:57voltage A uh input on some buffer and
  132. 5:01hold it on this capacitor and we're
  133. 5:03going to use this switch here to charge
  134. 5:05up this capacitor and we're just going
  135. 5:07to hold it for a while and then allow
  136. 5:09the output to um measure it, right? And
  137. 5:12so the nice thing here is with a analog
  138. 5:15amplifier or voltage follow or a buffer
  139. 5:17whatever you want to call it it allows
  140. 5:19it takes the voltage here and reproduces
  141. 5:21it here with no matter how much current
  142. 5:23or how much you try and low down the
  143. 5:25circuit it should not affect the input
  144. 5:26here and of course this is true for
  145. 5:28short relatively short periods of time.
  146. 5:31Um yeah so when the switch is open it's
  147. 5:34sampling and then when the switch is oh
  148. 5:36sorry when switching closed here it's
  149. 5:38sampling and then when it's open it's
  150. 5:39holding.
  151. 5:41Okay. So, we can look at a a real
  152. 5:43example or at least a circuit example of
  153. 5:45how that would work. Uh, nope, you can't
  154. 5:48see that. Okay. Hold on.
  155. 5:52Okay.
  156. 5:54Uh, but that's the wrong circuit. So,
  157. 5:56here's uh reset and run. So, all these
  158. 6:00circuits are in the slides you have. Uh,
  159. 6:02so you can play with them if you want.
  160. 6:04But here the idea is you have some
  161. 6:06sinoso signal. It doesn't really matter
  162. 6:07what the signal is, but it's um changing
  163. 6:11over time. And if it takes us a long
  164. 6:14time to uh measure the output, the
  165. 6:16problem here is that the signal would
  166. 6:17have changed. So here we can sample it,
  167. 6:20which means we're going to charge up
  168. 6:21this capacitor. And you can actually see
  169. 6:23this is over a long period of time. You
  170. 6:25can see the the voltage on the capacitor
  171. 6:26is changing as a function of time and
  172. 6:28mirroring the input. And then when I let
  173. 6:30go, it holds it there for a while.
  174. 6:33Right? And so here, this is the
  175. 6:36structure here is acting like the switch
  176. 6:37and it's keeping that current uh that
  177. 6:39voltage from discharging back out. And
  178. 6:42then we're just holding it here. That
  179. 6:44make sense?
  180. 6:49Okay. So, it's a simple circuit. There's
  181. 6:52lots of different ways to make it, but
  182. 6:54um the things that you might have to
  183. 6:56worry about is if your signal here, this
  184. 6:58is a nice voltage source, right? If it
  185. 6:59was kind of a weak signal, then maybe
  186. 7:01this capacitor could influence it. And
  187. 7:03certainly if you didn't have this um
  188. 7:05this buffer here, your analog digital
  189. 7:08converter could load down the signal and
  190. 7:10like um it wouldn't get as high as it as
  191. 7:13it would normally be. It might corrupt
  192. 7:15the signal. So that's why putting the um
  193. 7:18opamp up here is necessary to buffer the
  194. 7:20voltage.
  195. 7:23Okay.
  196. 7:27Um and so you one of the challenges is
  197. 7:31you have to determine the minimum
  198. 7:32sampling time. So uh you might have a
  199. 7:36voltage source or something you're
  200. 7:37measuring and you have it's going to
  201. 7:39charge up this capacitor. Well, if you
  202. 7:42have a very strong voltage source,
  203. 7:44meaning that it can supply lots of
  204. 7:45current, no problem. It's going the RC
  205. 7:48charge time is going to be uh very
  206. 7:50short. effectively the resistor here
  207. 7:52will be very small and it doesn't really
  208. 7:55matter but sometimes you have weak
  209. 7:57signals that take a while and that's why
  210. 7:59you might want to adjust your sample and
  211. 8:01hold circuit to sample longer so then it
  212. 8:04can slowly climb up and it'll do this RC
  213. 8:08discharge curve will be or charge curve
  214. 8:10will be longer because the effective
  215. 8:12resistance would be higher and so you
  216. 8:13now you have to wait longer for it to
  217. 8:15charge all the way up so knowing
  218. 8:16something about your signal source will
  219. 8:18make a big difference um in your work.
  220. 8:21You might have to think about if you're
  221. 8:24measuring something like a voltage
  222. 8:25divider or
  223. 8:27maybe a resistive circuit and you want
  224. 8:29to go really fast. So maybe like a
  225. 8:31strain gauge for a smart glove or
  226. 8:33something. If you want to go really
  227. 8:35fast, uh you're going to have to make
  228. 8:37sure that the the charge up time is
  229. 8:40reasonable uh that you're able to charge
  230. 8:42up. So, the easiest way to do that is
  231. 8:45just do some calibration uh and see if
  232. 8:47your signal is the correct value you
  233. 8:50think it is. If it's not, then maybe you
  234. 8:51need to put an analog buffer here to
  235. 8:53hold this thing high uh to give it some
  236. 8:55more power going in or you need to
  237. 8:58adjust your charge up time. The other
  238. 9:00thing you can do is you could just do an
  239. 9:01offset. If it always charges up about
  240. 9:04the same amount of time, you could just
  241. 9:05make yourself a lookup table. That's not
  242. 9:07very reliable, but you could do that.
  243. 9:10Uh yeah, and your sample time is
  244. 9:12programmable in software because they're
  245. 9:13trying to give you this ability to trade
  246. 9:16time for accuracy.
  247. 9:20Any questions on sample and hold?
  248. 9:26I don't think you guys have ever seen a
  249. 9:27sample and hold circuit before. Correct.
  250. 9:30Okay, that's fine. You're again as
  251. 9:33embedded systems people, you're this is
  252. 9:35be like as much analog as you ever get,
  253. 9:37right? We're going to go through analog
  254. 9:39to digital converters. You're going to
  255. 9:40be like, "Okay, that's the last time
  256. 9:41I've ever studied analog to digital
  257. 9:43converters." Totally fine. But at least
  258. 9:44it'll help you decide which one should I
  259. 9:46choose if you're going to uh put one in
  260. 9:48your system.
  261. 9:50Okay. Um then, so now we're going to go
  262. 9:54on to different analog digital converter
  263. 9:56structures and there's some basic
  264. 9:58components we need to know for each one.
  265. 10:00So one of the components that's used
  266. 10:03over and over again is this thing called
  267. 10:04a voltage comparator. Basically, it's
  268. 10:06just an op amp that's not in feedback.
  269. 10:09And what it is is uh you have power,
  270. 10:11ground, and you have some output signal.
  271. 10:12And if the input is greater than the
  272. 10:15sorry, if the positive input is greater
  273. 10:16than the negative input, then the output
  274. 10:18just goes all the way high. And
  275. 10:20otherwise, it's low. So, it's basically
  276. 10:21taking two analog signals. If one's
  277. 10:23higher than the other one, the output's
  278. 10:25high. If the other one's lower, then the
  279. 10:26output's low. That's all the decision
  280. 10:28it's making. And then we're going to use
  281. 10:29this structure over and over again.
  282. 10:32The other uh structure you need to know
  283. 10:34about is a uh voltage divider. Now, I
  284. 10:38promised you at the beginning of the
  285. 10:39course that you're never really going to
  286. 10:40have to do node voltage equations
  287. 10:42because that's horrible, but you just
  288. 10:44have to have a little bit of intuition
  289. 10:45about what these circuits are trying to
  290. 10:47do. And this is uh this formula here. Uh
  291. 10:50I mean, you can drive it of course, but
  292. 10:52it should give you some of the intuition
  293. 10:53that says like, okay, you know, if I
  294. 10:55take R2 and make it zero, right? Well,
  295. 10:59then my voltage is going to get closer
  296. 11:01and closer to ground. And if I make R0
  297. 11:03really really large, like infinity, then
  298. 11:06my voltage is going to get uh closer and
  299. 11:08closer to VN.
  300. 11:10How we typically use these in um analog
  301. 11:14digital converters is we just make R1
  302. 11:15and R2 the same. And now this is why we
  303. 11:18call the voltage divider. VN is divided
  304. 11:21by two. And you're going to see later on
  305. 11:22we're going to have three, four, n
  306. 11:25different um resistors. And then it's
  307. 11:27going to be V / N. And you're going to
  308. 11:29see that there's a little uh step down
  309. 11:31for each one. And we'll we'll talk about
  310. 11:33it when we get there, but basically this
  311. 11:35is just a structure that divides a
  312. 11:37voltage from one value to another value
  313. 11:39based on a ratio.
  314. 11:42Um, now you can put those two things
  315. 11:43together
  316. 11:45and say here we have a comparator and
  317. 11:48the comparator is running at VDD and or
  318. 11:50VCC and ground and we have a voltage
  319. 11:52divider that's connected to VDD and
  320. 11:55ground. And because R equals R, we
  321. 11:57didn't say R1 and R2, we just said R and
  322. 11:59R, we know these values are the same.
  323. 12:01And so the value here is VDD over two.
  324. 12:04And now you get this simple circuit that
  325. 12:06says whatever VN is. If VN is low, then
  326. 12:10the output of the comparator is low. If
  327. 12:12it's lower than VDD over two, I always
  328. 12:14say VDD instead of VCC because I in my
  329. 12:18undergrad, I did a lot of integrated
  330. 12:19circuit design and it was always in
  331. 12:21silicon. VCC is typically for um BJTs, I
  332. 12:25think. So I don't know why why the
  333. 12:27convention is that way, but that's why I
  334. 12:28say it that way. Anyways, and if your
  335. 12:31input is above VREF, then you're going
  336. 12:33to get a high output. So, basically,
  337. 12:35this is just showing you the output. And
  338. 12:37this logical structure is just about
  339. 12:40built into every ADC.
  340. 12:43U any questions here?
  341. 12:51Great.
  342. 12:52And then it's usually just useful to
  343. 12:55look out for the the positive or
  344. 12:57negative signal. Sometimes different
  345. 12:58diagrams are not always V+ is not always
  346. 13:01on the top or uh so you just have to
  347. 13:03make sure you're looking for that to
  348. 13:04figure out what logic it is. Okay, so
  349. 13:07that should set us up for the most
  350. 13:09simple ADC
  351. 13:11that there is. Um so we call it a flash
  352. 13:14ADC.
  353. 13:16You'll see why in a minute, but it has a
  354. 13:17basically concatenation of that
  355. 13:19structure we just saw. Here we have a
  356. 13:21reference voltage coming in and we have
  357. 13:24a ladder of resistors. And here we're
  358. 13:26just going to show that we're just going
  359. 13:28to divide uh the voltage into even parts
  360. 13:32uh up on this ladder. And so now we can
  361. 13:34say that okay rewrtors.
  362. 13:41So one over seven minus RF that's the
  363. 13:44voltage here. And then you can see that
  364. 13:46each one of these is trying to make a
  365. 13:48comparison to that reference voltage
  366. 13:50from the input voltage. And we'll go
  367. 13:52through a circuit diagram or false
  368. 13:54diagram in a minute. But basically,
  369. 13:56we've got instantiated a bunch of
  370. 13:58different reference voltages. And then
  371. 14:00each comparator is trying to make a
  372. 14:02simple decision. Is the voltage input I
  373. 14:04have now higher or lower than this? And
  374. 14:07then it would have to go to a a uh a
  375. 14:10binary decoder encoder to turn this uh
  376. 14:13linear um measurement into a binary
  377. 14:16value.
  378. 14:18Oh, hey, I had great animations I didn't
  379. 14:20see.
  380. 14:22So each one of those is a uh made its
  381. 14:25own reference voltage and then it's just
  382. 14:27going to check to see which one is which
  383. 14:29which one is higher. So you know there's
  384. 14:32never going to be a case where uh R3 is
  385. 14:34high and R2 and R or sorry op amp or
  386. 14:37comparator three is high and comparator
  387. 14:402 and one are not high. um it's all
  388. 14:42going to be the same but it just says
  389. 14:44okay this is where that point is in
  390. 14:46space
  391. 14:49and then
  392. 14:51go over here we can see that in action
  393. 14:54let's see so here's the run so in fallad
  394. 14:59the the magnitude of the color indicates
  395. 15:02the voltage so you can kind of just
  396. 15:03visually see already that the voltage is
  397. 15:06uh dropping here
  398. 15:08and so here we have our reference ladder
  399. 15:10and then each one is just trying to make
  400. 15:11a decision. And you can see the input
  401. 15:13voltage is rising. And then you can see
  402. 15:15the the value here is rising as well by
  403. 15:18the colors. And then the this is just a
  404. 15:20encoder here that changes this decimal
  405. 15:22or this uh value into a binary value.
  406. 15:29What do you think?
  407. 15:34Okay.
  408. 15:36Um, so what do you think some of the
  409. 15:38advantages of this ADC is? I guess you
  410. 15:41can't compare it to anything else, but
  411. 15:43what do you think it's good at?
  412. 15:45>> Yeah.
  413. 15:47>> Yeah, it's fast. And well, it was in the
  414. 15:49name, but uh, so it's a flash ADC only
  415. 15:52because not because flash has anything
  416. 15:53to do with it as a technology or for any
  417. 15:56other reason except for the fact it can
  418. 15:58go very quickly. In fact, it can do this
  419. 16:01uh within one clock cycle almost
  420. 16:03guaranteed because you're just looking
  421. 16:04at the propagation delay through this uh
  422. 16:07comparator and then through this logic.
  423. 16:10So almost guaranteed you're going to get
  424. 16:11this done in less than a clock cycle. So
  425. 16:13it's very very fast.
  426. 16:17Uh let's see.
  427. 16:21So, one of the challenges here though um
  428. 16:24is that it can be kind of hard to be
  429. 16:26accurate because now on a on a piece of
  430. 16:28silicon you have to have all these
  431. 16:30resistors having exactly the same value.
  432. 16:32Here we put the we did it offset by two
  433. 16:35uh or by half on here. So, this is um
  434. 16:38fifth 500 and this is 500. But basically
  435. 16:40all those resistors have to be
  436. 16:42approximately or have to be the same
  437. 16:44size. And if one was point Let's see if
  438. 16:48I can can I do it? Yeah, sure. So, if I
  439. 16:51made one accidentally, it was
  440. 16:53mismanufactured, let's say, and now it's
  441. 16:550.980.
  442. 16:58Okay. Right now, this voltage is going
  443. 17:00to be under reportported. Right? So,
  444. 17:02it's going to trip higher than normal.
  445. 17:05And so, uh you can't tell from the
  446. 17:07inputs that that's what's happening. Uh
  447. 17:10but because of this manufacturing error,
  448. 17:13the step size between one ADC value to
  449. 17:15the next ADC value isn't linear anymore.
  450. 17:18And that's a challenge. Why this would
  451. 17:20happen? Well, you're making a piece of
  452. 17:22silicon and they do have lots of tricks
  453. 17:24to make the resistors all the same size
  454. 17:26and how you did the layout, but there's
  455. 17:28lots of little reasons, manufacturing
  456. 17:29errors or how it's polished where that
  457. 17:32may not be true. In fact, we have to use
  458. 17:35all of those have to be exactly the same
  459. 17:37throughout the chip for you to get a
  460. 17:39good uh linear ADC. So, that is one of
  461. 17:42the challenges. Uh, another challenge is
  462. 17:45that resistors may not be obvious, but
  463. 17:47resistors take up a lot of space on
  464. 17:49silicon. Um, they like a transistor is
  465. 17:52super small, but resistors uh depending
  466. 17:55on how they're made, there's different
  467. 17:56types, uh, can be, you know, hundreds to
  468. 17:59thousands of times larger than uh than
  469. 18:02that comparator there uh just in terms
  470. 18:05of space on your die. So now this thing,
  471. 18:08it's not obvious, but this thing is
  472. 18:10actually takes up space and is going to
  473. 18:11be more expensive from a die area point
  474. 18:13of view. And so now you have something
  475. 18:15that's very fast, but also very
  476. 18:16expensive.
  477. 18:18And the last thing to think about is if
  478. 18:20this is a a simple threebit solution,
  479. 18:23but say you wanted to get up to 24 bits
  480. 18:25or something some high value, think
  481. 18:27about how many resistors you have to
  482. 18:28make. how to scale this thing up is
  483. 18:30going to be a challenge because now you
  484. 18:32have to get all those resistors the same
  485. 18:33size and they have to all fit on um this
  486. 18:37piece of silicon. So both of those limit
  487. 18:40typically uh flash ADCs to be relatively
  488. 18:43low number of bits. I mean you can still
  489. 18:45get 12 bits. It's not inherently a
  490. 18:48problem. Um but you're not going to get
  491. 18:51the highest bit range out of these sorts
  492. 18:53of ADCs because it's usually not cost
  493. 18:54effective. 10 bits, 8 bits is pretty
  494. 18:57reasonable.
  495. 19:02Okay,
  496. 19:04[snorts]
  497. 19:05so let's see if I if I remembered all
  498. 19:07these correctly. So yes, it's very fast
  499. 19:09by definition. Uh is only the
  500. 19:11propagation delay through a few gates
  501. 19:13and that comparator. So it is very fast.
  502. 19:16I guess you still going to have to have
  503. 19:17a sample and hold circuit, right? So
  504. 19:19you're going to have to pay some penalty
  505. 19:20there. Um but all the devices that we've
  506. 19:23talked about are going to have to pay
  507. 19:24that penalty.
  508. 19:26uh resolution. Now you're limited to
  509. 19:29that ladder stack up. That's the
  510. 19:31challenge. You can't get very high
  511. 19:32resolution. And then the complexity just
  512. 19:35of how many devices you have to have. So
  513. 19:37it's not it's reasonably complex for
  514. 19:40uh the number of comparators and
  515. 19:42resistors you have to have.
  516. 19:45And then here we're on the power
  517. 19:46consumption. The power consumption of
  518. 19:48these is typically higher just because
  519. 19:50you have this big resistor ladder, lots
  520. 19:51of comparators uh compared to some of
  521. 19:53the other techniques we'll show in a
  522. 19:55minute.
  523. 19:56So any questions about flash ADCs?
  524. 20:02Okay.
  525. 20:04Um different types of ADCs here. So a
  526. 20:07slope integrator. This is a different
  527. 20:09style that's trying to accomplish the
  528. 20:10same task. And the idea here is we're
  529. 20:13going to use time rather than So the
  530. 20:16other one was using we're going to use
  531. 20:17reference voltages here. We're going to
  532. 20:18try and use time to measure uh um
  533. 20:22voltage. And remember, microcontrollers
  534. 20:24in any digital system is only really
  535. 20:26good at measuring time. So that's we're
  536. 20:29on the the good side of the piece of
  537. 20:31silicon.
  538. 20:33Um, so here we're going to use like a
  539. 20:34analog ramp function. We'll talk about
  540. 20:36how to make that in a second. And then
  541. 20:37we're going to see how long it takes to
  542. 20:39to hit the input voltage. So here we
  543. 20:41have time. We have some input voltage.
  544. 20:44We're going to say it's held uh constant
  545. 20:45with that sample and hold circuit. And
  546. 20:47then we're going to cause a little ramp
  547. 20:48function to come up. And when these two
  548. 20:51um cross each other, we're going to say,
  549. 20:53"Aha, that is when uh then we know when
  550. 20:56that voltage occurs." And then we're
  551. 20:57going to take a measurement of time. So,
  552. 20:59we're going to count how many clock
  553. 21:00cycles go by. And so, if that input
  554. 21:02voltage was lower and we use the same
  555. 21:05ramp function, then that time would be
  556. 21:07smaller. And if we went longer,
  557. 21:09obviously the time would be longer. So
  558. 21:11now it's about as long as that ramp
  559. 21:13function is nice and even and and
  560. 21:15reliable then we can just uh use time to
  561. 21:18measure uh your ADC value. So that's
  562. 21:22again the you have good clocks in u
  563. 21:25because you have those good watch
  564. 21:26crystals on your devices.
  565. 21:28[clears throat]
  566. 21:29So the question is how do you make this
  567. 21:31slope generator? Uh that is uh we'll
  568. 21:33leave that to the analog engineers but
  569. 21:35the the big the quick idea here is we
  570. 21:38know how RC charge works. So here you
  571. 21:40could have a a circuit you you uh close
  572. 21:43it and then the resistor and capacitor
  573. 21:46rise at a known rate. Um it's a little
  574. 21:49less obvious is that if you had a
  575. 21:51current source going into a capacitor um
  576. 21:53this rises at a constant rate. So here's
  577. 21:56this exponential and this is a constant
  578. 21:58of uh rise time. And so, um, it turns
  579. 22:03out that making current sources on, uh,
  580. 22:06silicon is actually relatively easy, uh,
  581. 22:09compared to if you're trying to make it
  582. 22:11on a breadboard. So, because of that,
  583. 22:14uh, it's fairly easy to have these
  584. 22:15constant ring up times. So, we'll show a
  585. 22:17quick example of how that works in
  586. 22:19practice.
  587. 22:22All right, so this is a super
  588. 22:24complicated circuit now that I think
  589. 22:25about it, but it's not too bad. Let's
  590. 22:27start off. Um, so here we have our
  591. 22:31analog voltage and we have a comparator
  592. 22:34and then bunch of control logic. Don't
  593. 22:36worry how that works. Nobody cares how
  594. 22:37that works. It just all it's going to do
  595. 22:39is some sequencing. It's going to switch
  596. 22:40between it's going to switch uh the ramp
  597. 22:42on and off. And then we have um some
  598. 22:46display technology here. Right. So this
  599. 22:48is just a display. This is a binary
  600. 22:50counter. So this is doing the timing for
  601. 22:52us and this is going to make it readable
  602. 22:53for us. All right. So we'll start and
  603. 22:56then I'm going to start the whole
  604. 22:57process. Oh, wait. It started on its
  605. 22:59own. That's cool.
  606. 23:02Oh, that's because this new uh control
  607. 23:04logic's handling that. Okay. So, what's
  608. 23:05happening is every so often this thing
  609. 23:09is going to fire. It restarts the
  610. 23:11sampling here and then um it restarts.
  611. 23:15So, here I can change the voltage. So,
  612. 23:17if I lower the voltage here, you can see
  613. 23:20it takes less time to get here. And we
  614. 23:22see it's five. And I raise the voltage
  615. 23:25and it's going to take longer. and then
  616. 23:27the the binary values here. So here is
  617. 23:29this this ramp function here which is
  618. 23:31occurring at this point here is just
  619. 23:35ramping up until these two things are
  620. 23:36equal and the logic just traps it holds
  621. 23:38it on that uh display value and you can
  622. 23:40see it counting up.
  623. 23:48Now I want you to take 30 seconds to say
  624. 23:50well how could you increase the
  625. 23:52resolution of this timer? So why don't
  626. 23:54you take 60 seconds talks with each
  627. 23:56other and figure out what is the easiest
  628. 23:59way to make uh this a higher resolution
  629. 24:02um uh EDC so we can get more bits for
  630. 24:06every uh sample.
  631. 24:12[snorts]
  632. 24:18[groaning]
  633. 24:49I think you can All
  634. 25:02right. What do you think? How could we
  635. 25:03change the resolution of this timer?
  636. 25:08>> Does that question even make sense?
  637. 25:15>> We were thinking if you could increase
  638. 25:16the clock cycle, you have more
  639. 25:19operations at the same time.
  640. 25:20>> Yeah.
  641. 25:22>> Yeah. So here it just happens to be I
  642. 25:25can do that right now. So here we're
  643. 25:26going to do I'm going to increase the
  644. 25:27clock frequency of this clock that's
  645. 25:29running this counter. And so now I can
  646. 25:32count up and now let's see for this
  647. 25:36particular input voltage which is 3.8 uh
  648. 25:38we are going to get let me can pause it
  649. 25:40here.
  650. 25:42So
  651. 25:44so there we're at 31 which is the the
  652. 25:47count. And if I slowed it way down,
  653. 25:51right now we're going to do another
  654. 25:52cycle, right? Where got the analog
  655. 25:54voltage is at the same point. We're
  656. 25:55ramping up, but we're going slower. So
  657. 25:58now it's at six. So the same hardware,
  658. 26:02but now I was able to make a trade-off
  659. 26:04versus time versus resolution. Just by
  660. 26:07running my counter faster allowed me to
  661. 26:09get better resolution out of my ADC.
  662. 26:11That seems like a nice trick. What did
  663. 26:13we what what cost us? What did we uh
  664. 26:16have to give up to get that trade-off?
  665. 26:31All right, talk amongst yourselves for
  666. 26:3230 seconds. Figure out is there anything
  667. 26:34by running the clock faster do we do we
  668. 26:36give up? Do we lose? Why not just always
  669. 26:39run this thing as fast as possible?
  670. 26:53>> [clears throat]
  671. 27:10>> All right. What do we give up?
  672. 27:16Yeah.
  673. 27:22>> And like a bigger value for whatever you
  674. 27:25have, which means you can't store.
  675. 27:34>> You mean my Vmax, the maximum voltage I
  676. 27:36can measure is going to be smaller? I
  677. 27:38don't think so.
  678. 27:40Um
  679. 27:43I think Vmax is really defined by the
  680. 27:45slope function. So if I go and take
  681. 27:48uh let's run this again. So I put my
  682. 27:51voltage my input voltage here is what
  683. 27:53like 5 volts.
  684. 27:55As long as this ramping function that's
  685. 27:57made by this current source going into
  686. 27:59this capacitor, right? This is we're
  687. 28:00comparing this value to this value. And
  688. 28:03when this value equals this value, then
  689. 28:05we stop. As long as I can get up there,
  690. 28:08that's my limiting factor. It's it's not
  691. 28:10necessarily a time thing.
  692. 28:13What else? What would we give up? Why
  693. 28:15not just run this ADC as fast as
  694. 28:16possible all the time?
  695. 28:21>> Yeah,
  696. 28:23>> register.
  697. 28:27>> That's true. Maybe that's what you were
  698. 28:29saying. um you so let's just assume that
  699. 28:32our counter value is large enough that
  700. 28:37that's not a problem that would be a
  701. 28:39that would be a constraint but we can
  702. 28:41fix that at design time.
  703. 28:44>> Yeah. So we're going to run a clock the
  704. 28:46counter faster where that means that
  705. 28:50that digital logic is going to be
  706. 28:51clicking over faster and faster and
  707. 28:53faster. It's going to increase your
  708. 28:54power consumption. Now, maybe compared
  709. 28:56to the power consumption of your devkit,
  710. 29:00uh, running at full blast, it's not that
  711. 29:03big a deal. But if it was a really low
  712. 29:04power application, maybe you'd want to
  713. 29:06make a trade-off between, hey, I got to
  714. 29:08run this thing faster. I get higher
  715. 29:09resolution, but do I really want to
  716. 29:11spend that extra extra power?
  717. 29:14But that's for me, I I always like this
  718. 29:16one because I get to make a trade-off
  719. 29:18and I get uh between using time to
  720. 29:20measure uh some voltage, which is kind
  721. 29:23of interesting idea.
  722. 29:26Okay. Now, what we find, oh, let's go
  723. 29:30back here.
  724. 29:32Okay. So, we talked about Oh, I I did
  725. 29:36gave away the power question in the
  726. 29:37terms of voltage trade-offs, but what
  727. 29:40could be one particular issue with this
  728. 29:42sort of scenario? Like remember, we're
  729. 29:44making integrated circuits. We're trying
  730. 29:46to make hundreds of them, thousands of
  731. 29:48them at a time, and I can't tune each
  732. 29:50one. So what would be the challenge with
  733. 29:53creating with using a single slope
  734. 29:54integrator uh with when when it comes to
  735. 29:58um or what potential issues when will
  736. 30:01happen to the current and capacitor
  737. 30:04measurements because of um how I use
  738. 30:07these circuits or how these circuits are
  739. 30:09manufactured. So uh take 60 seconds
  740. 30:11think about that. If you have some
  741. 30:12workarounds that would be great too.
  742. 30:32Let me know [snorts] why.
  743. 30:41[clears throat]
  744. 30:50Yeah.
  745. 31:12How about that?
  746. 31:21All right. What do you think? What are
  747. 31:22some potential issues with relying on
  748. 31:25current and capacitance to measure uh
  749. 31:28voltage or to to have those be constant
  750. 31:32as a function of time?
  751. 31:43Yeah,
  752. 31:44>> one sort of issue that we brought up is
  753. 31:46that um you're not measuring the voltage
  754. 31:48directly. So for instance if your
  755. 31:51capacitors and capacity push up um the
  756. 31:54way
  757. 31:56vice versal
  758. 32:08>> Yep. What are some things that influence
  759. 32:12uh your capacitance or your current?
  760. 32:15>> Yeah. Parasitic.
  761. 32:18>> Oh, yeah. Parasitic capacitance on your
  762. 32:20device. Uh, so and then what's one way
  763. 32:23around that?
  764. 32:27>> Yeah. So, a manufacturer time they could
  765. 32:29measure that. What are some other uh
  766. 32:33factors?
  767. 32:34Maybe something you can't Okay. Yeah.
  768. 32:37>> Heat. Yes. So, uh that you can't take
  769. 32:40care of at manufacturer time, right? So,
  770. 32:42they do calibrate a lot of your things
  771. 32:44through testing. So if there was a
  772. 32:46little offset in your ADC because of you
  773. 32:49know wire resistance or something they
  774. 32:51could account for that but temperature
  775. 32:52changing as a function of time they
  776. 32:54can't really account for and so uh your
  777. 32:57capacitance right if you have a
  778. 32:58capacitor we often use capacitors as
  779. 33:01sensors and we'll put some dialectric in
  780. 33:03between to say changes its uh size as a
  781. 33:07function of temperature
  782. 33:09or humidity. So this is how you make
  783. 33:11humidity sensors. Well that's that's how
  784. 33:13you make a nice sensor. Now they're
  785. 33:14trying to mitigate those quantities when
  786. 33:16they're making onchip capacitors. But
  787. 33:17still there's a little bit of change
  788. 33:19just at the silicon level. It gets a
  789. 33:21little warmer that capacitance moves a
  790. 33:23little bit. Uh your current source you
  791. 33:25get a little bit warmer and then
  792. 33:26electrons flow a little bit uh
  793. 33:31less good. Yeah, a little bit higher
  794. 33:34resistance through your uh gates. So now
  795. 33:37you have a slope that's dependent on
  796. 33:39temperature and now your ADC
  797. 33:41measurements depends on the temperature.
  798. 33:43So now you're correlating, you have
  799. 33:45these confounding factors. Um, how would
  800. 33:48you get around that issue?
  801. 34:03Guys are very tired. I can I can that
  802. 34:05must be it. Either I'm boring or you're
  803. 34:07tired. So I'm going with you're tired
  804. 34:08and I'm super interested. Um so the way
  805. 34:13around one way around this is that if
  806. 34:15you are temperature dependent you could
  807. 34:16have a temperature sensor that tells you
  808. 34:18what the relative temperature the
  809. 34:20temperature is now and then you could
  810. 34:21have a offset table and it it's not
  811. 34:24obvious but uh almost every piece of
  812. 34:26silicon can have a free temperature
  813. 34:28sensor. uh the the trick is you have two
  814. 34:30diodes of they're manufactured almost
  815. 34:32you know as precisely as possible and
  816. 34:34you put two dissimilar currents uh
  817. 34:36between them and the resulting voltage
  818. 34:38is proportional to absolute zero uh just
  819. 34:41a trick of physics and on silicon you
  820. 34:43can bet about half a degree accur deg C
  821. 34:46accuracy with that um anyway so now you
  822. 34:50could have a lookup table to try and
  823. 34:52compensate for the temperature var
  824. 34:54variations not the ideal method uh so
  825. 34:57there is a way around that um
  826. 35:01uh oh and here's the answer um yeah so
  827. 35:05basically these are inaccurate because
  828. 35:06of uh temperature but you can get around
  829. 35:08it through factory factory calibration
  830. 35:10and temperature compensation. So the way
  831. 35:13around this is what they call a dual
  832. 35:15slope integrator. We're not uh the the
  833. 35:17exact operation of all the analog
  834. 35:18circuits not important but the intuition
  835. 35:20of how the slope integrator should works
  836. 35:23which is this you're you have a constant
  837. 35:24rise time and you're seeing when the
  838. 35:25voltage equals and this one which is uh
  839. 35:29we'll talk about in a second which is
  840. 35:31rise and fall time. Understanding though
  841. 35:33that trick is what's important and when
  842. 35:36to apply it. So a dual slope integrator
  843. 35:39is kind of the industry standard and uh
  844. 35:41what it does is it's uh uh samples has a
  845. 35:45sample phase and then it has a uh or
  846. 35:48integration phase and then it has a um
  847. 35:51measurement phase. So the trick here is
  848. 35:54that in phase one you have uh some
  849. 35:57current or some voltage uh like you have
  850. 36:00a trans impedance amplifier. So you have
  851. 36:01your input voltage and that's being
  852. 36:02turned into a current through the magic
  853. 36:04of analog circuits. And basically that's
  854. 36:06charging up your capacitor. So you'd
  855. 36:08have um some value like that. And then
  856. 36:12at some point in time you reverse that
  857. 36:14and you have a known current pulling u
  858. 36:17charge out of that capacitor. And then
  859. 36:20if you that's phase two and then if you
  860. 36:22do the math you can remove the R and C
  861. 36:25from the equation allowing you to have a
  862. 36:28value that's just proportional to uh
  863. 36:31your voltage reference and your input
  864. 36:32voltage and time. So this way you can by
  865. 36:35charging up the uh capacitor and then
  866. 36:37discharging capacitor you pay the
  867. 36:39inaccurate penalty of your capacitor was
  868. 36:42too big or too small uh once on the way
  869. 36:45up and then you subtract that off on the
  870. 36:47way down. So the the trick is that uh
  871. 36:50you just um you those R and C's both
  872. 36:54cancel out of your circuit.
  873. 36:57And so that's why it's a very popular
  874. 36:58circuit, this dual slope integrator. We
  875. 37:01can see a quick example of that here.
  876. 37:05Again, another super complicated
  877. 37:06circuit, but this is just supposed to be
  878. 37:09a trans impedance or transconductance
  879. 37:11amplifier. Sorry, this is just an op
  880. 37:13amp. Doesn't matter how it works. And
  881. 37:15you're going to charge up this
  882. 37:16capacitor. And then you're gonna have an
  883. 37:19op amp here, uh, which is doing the
  884. 37:22comparison. And then you're going to
  885. 37:24discharge this capacitor through here.
  886. 37:26Um, and so we're going to push this
  887. 37:28button. And then we're going to that's
  888. 37:30all going to trigger this thing to start
  889. 37:32counting. So let's try it.
  890. 37:35Let's see.
  891. 37:37Start. Oh, I have a simulation going
  892. 37:39very slow. So here we uh Oh, I'll start
  893. 37:43again. I went too fast.
  894. 37:50And here we go. We'll start it.
  895. 37:54And we're we're basically we connected
  896. 37:56this input through this uh
  897. 37:58transconductance amplifier and it's
  898. 38:00charging up this capacitor.
  899. 38:04And then after some period of time just
  900. 38:06defined by this circuit here, it
  901. 38:07switches to this current source here and
  902. 38:09it's pulling this thing down. So now
  903. 38:12we're not dependent on the Rs and C's in
  904. 38:14here. and the Rs are implicit. We're
  905. 38:16just dependent on uh the value of this
  906. 38:18current source here. Um and now we can
  907. 38:21measure this value and we get that over
  908. 38:23here. I didn't I didn't put the
  909. 38:25frequency part on here. Uh but you still
  910. 38:28get the same benefit here of you could
  911. 38:30have a clock that's going faster
  912. 38:33uh to do a higher sample rate or that to
  913. 38:37increase your ADC resolution. Uh the the
  914. 38:40downside of all these devices is that it
  915. 38:42takes a lot of time to get there, right?
  916. 38:44So you think about trying to do
  917. 38:46operations within as minimum number of
  918. 38:48clock cycles as possible. And now you
  919. 38:50say I I want to have this high
  920. 38:51resolution ADC that's going to count up
  921. 38:53to you know uh you tens of thousands of
  922. 38:56uh units. Well, it's going to take that
  923. 38:59many clock cycles. So now this is very
  924. 39:01slow compared to your uh
  925. 39:04microcontroller, but it has high
  926. 39:06accuracy compared to other ones and it's
  927. 39:08relatively uh cheap and small.
  928. 39:14Uh
  929. 39:19yeah. So it's slow u but it uses time to
  930. 39:22measure. The resolution is the highest.
  931. 39:24Uh typically these are used in like
  932. 39:26multimemeters or even benchtop
  933. 39:28multimeters where you want to get like
  934. 39:30um you know five five digits of
  935. 39:33accuracy. Um the complexity is
  936. 39:36relatively high. Uh but it has good
  937. 39:38noise performance, good interference
  938. 39:39performance, those sorts of things.
  939. 39:43U power consumption is relatively low.
  940. 39:46You don't have a lot of comparators. You
  941. 39:47did have some digital logic in there,
  942. 39:48but that's pretty cheap. Uh in the
  943. 39:50current source seems like it would be
  944. 39:52bad, but actually in reality it's not
  945. 39:54that big compared to say all the
  946. 39:58comparators we saw in the flash ADC or
  947. 40:00all those resistors that needed to be
  948. 40:02biased.
  949. 40:04All right. So, any questions about slope
  950. 40:06ADCs?
  951. 40:12Remember that the conceptual trick is
  952. 40:13here we're charging up capacitor. Uh
  953. 40:16maybe we're discharging the capacitor,
  954. 40:17but that charging up we can measure with
  955. 40:19time. That's that's the trick you want
  956. 40:21to take away from this thing.
  957. 40:23Okay.
  958. 40:25And then so um the pop more popular
  959. 40:27version here is a SAR ADC. This is
  960. 40:29what's on your uh microcontroller. So a
  961. 40:32successive approximation register ADC
  962. 40:35and uh this device has uh a unit we
  963. 40:39haven't in there I haven't told you
  964. 40:40about yet which is a digital analog
  965. 40:42converter. So just even though we
  966. 40:44haven't taught you what that is just
  967. 40:46assume you put some digital values in
  968. 40:48and it's going to produce an analog uh
  969. 40:49value out basically you know just what a
  970. 40:53um speaker would do.
  971. 40:56And so now we're going to take we have
  972. 40:57some sample and hold circuit. We didn't
  973. 40:59show that in the other circuits. All
  974. 41:00circuits would have a sample and hold
  975. 41:01circuit but basically we have some input
  976. 41:02value. We're going to hold it here and
  977. 41:04then we're just going to make a
  978. 41:06comparison. Okay, is it you know this
  979. 41:08value? Is it higher or lower than this
  980. 41:10value? And then you're going to uh use
  981. 41:12this control loop here to say okay if it
  982. 41:15was higher or lower then I have this
  983. 41:16successive approximation. Basically it's
  984. 41:18doing binary searching to try and find
  985. 41:21where the value is. So it's going to be
  986. 41:24uh searching back and forth. I think I
  987. 41:26have an animation of that. Yeah. So we
  988. 41:27have two inputs and a comparator. Uh and
  989. 41:29then the binary searches you start off
  990. 41:31at say half half half your binary value
  991. 41:34size and then you're just going to try
  992. 41:36and look is this value greater or less
  993. 41:37than my deck output. And whatever it is
  994. 41:40then you're just going to do your binary
  995. 41:41search and keep trying to look for that
  996. 41:43particular value.
  997. 41:47And of course if it's above then you you
  998. 41:49choose back up. So this is just a kind
  999. 41:51of analog way to or digital way to
  1000. 41:54search for an analog value. So the nice
  1001. 41:56thing is here it doesn't take as long to
  1002. 41:59converge as your slope integrator slope
  1003. 42:01integrator was like I have to count
  1004. 42:03every single um uh uh point right every
  1005. 42:07single clock cycle I have to count
  1006. 42:09something all the way up to my value
  1007. 42:11here I can just basically do power by
  1008. 42:13two so it's much faster at converging
  1009. 42:16but it is more complex
  1010. 42:21and so if you this would be another
  1011. 42:23another way to show this um So here's
  1012. 42:25kind of that search process. Here we
  1013. 42:27have time and then some analog voltage
  1014. 42:30here. So here we have our sample and
  1015. 42:32hold circuit. So sis for whatever
  1016. 42:34reason, let's say it started at zero.
  1017. 42:35We're not going to pay attention to
  1018. 42:36anything that happened in the past. And
  1019. 42:38you have some sample time. Well, that's
  1020. 42:39going to charge up this capacitor. And
  1021. 42:41then we're going to hold it. Then we're
  1022. 42:42going to start doing an analog
  1023. 42:44conversion. Start at say 1 0 0. We're
  1024. 42:46going to say, are we higher or lower
  1025. 42:48than that? Well, we're higher. So we'll
  1026. 42:50go up to half between, you know, 0.5
  1027. 42:53volts and 1vt. uh whatever that is
  1028. 42:55binary and then we're going to guess and
  1029. 42:57that is 1 one zero 0 and we're higher
  1030. 42:59than it was. Now you can see that we're
  1031. 43:00kind of converging and searching for
  1032. 43:03that analog value. Uh and now you
  1033. 43:05remember we still have quantization
  1034. 43:07error. We talked about that before or
  1035. 43:09last week. So we didn't exactly get to
  1036. 43:11the value but this is the closest binary
  1037. 43:13value that will represent that analog
  1038. 43:15voltage.
  1039. 43:20And we can see this circuit in action.
  1040. 43:24Uh, all right. So, let's see. So, this
  1041. 43:26one, uh, a lot of little control
  1042. 43:29elements here, unfortunately, but
  1043. 43:31there's a timer and a controller block.
  1044. 43:33That's this is the thing that's doing
  1045. 43:34the binary searching. Uh, and then you
  1046. 43:37have your DACK. So, basically, it's this
  1047. 43:39loop right here. You have your analog
  1048. 43:41voltage coming in. We're going to
  1049. 43:43compare it to the DAC output. This thing
  1050. 43:45is going to go high or low. And then we
  1051. 43:46just have this controller that's going
  1052. 43:48to search back and forth and and see if
  1053. 43:50we can find it. So, let's start it.
  1054. 43:53And what do I have to do? Oh, it already
  1055. 43:56started. Okay, good.
  1056. 43:58So, here's the analog voltage. And we
  1057. 44:00can see that binary search. It goes up a
  1058. 44:02little bit higher, then it came back
  1059. 44:03down. And then, uh, you have to know
  1060. 44:06when to to look. It doesn't have a like
  1061. 44:08a hold when it's done. Like the
  1062. 44:10simulation doesn't stop when it's done.
  1063. 44:12Um, but we can change the analog value.
  1064. 44:16Let's see. So, what this does, it's
  1065. 44:17going to put out four pulses. So, it's a
  1066. 44:19four bits. and we'll start on this next
  1067. 44:21one here.
  1068. 44:23So there's four values here. And now you
  1069. 44:26can see it's doing the analog searching
  1070. 44:28or digital searching for that analog
  1071. 44:30value. And then so I should have said
  1072. 44:33this before, this little counter here
  1073. 44:36pulse uh puts out four pulses as four
  1074. 44:40clock cycles because it's a fourbit uh
  1075. 44:42ADC. And then the value is is uh uh
  1076. 44:46accurate here. And if I change the
  1077. 44:48voltage up here, hit reset and run, we
  1078. 44:53can see that the analog voltage is
  1079. 44:56higher. And now we can see that the uh
  1080. 44:59ADC, the DAC is kind of searching for
  1081. 45:01that value.
  1082. 45:13>> Zero question. Oh, good. I'm Thank Thank
  1083. 45:15goodness you're here. Sure.
  1084. 45:26>> How do we know if we're like within like
  1085. 45:28half basically?
  1086. 45:30>> You don't
  1087. 45:32um basically you're going to keep going
  1088. 45:34uh until you um I mean there's a little
  1089. 45:37state machine that says we're not going
  1090. 45:38to go back, right? We're always going to
  1091. 45:40go that one bit over,
  1092. 45:42>> right? So basically say this was a 8bit
  1093. 45:45thing and but now you know that um
  1094. 45:50uh you came very close to it at the very
  1095. 45:52beginning. Well then it's going to say
  1096. 45:53well I can't go any higher. So it might
  1097. 45:55go up and might go back down but it
  1098. 45:57can't uh it's just going to converge on
  1099. 45:59that because it can't get any closer to
  1100. 46:00that that value.
  1101. 46:08All right.
  1102. 46:13Oh, that's the old version. Okay.
  1103. 46:18And so, uh, this, so now we in the
  1104. 46:20trade-offs of speed. Uh, so this is an
  1105. 46:22analog binary search. So, it's a nice
  1106. 46:25compromise between speed and resolution.
  1107. 46:28Um, I should have said this before. One
  1108. 46:30trick you can do with SAR ADCs is if you
  1109. 46:32want to go faster, you don't have to
  1110. 46:34convert all the all those bits. Say you
  1111. 46:36have a 16- bit uh SAR ADC, but it just
  1112. 46:40your clock speed is limited. Uh or say
  1113. 46:43um you want to go faster, but your
  1114. 46:46propagation delay through your uh device
  1115. 46:48won't let you go fast enough. So you
  1116. 46:50want to go say a megahertz, but uh your
  1117. 46:52full 16- bit conversion takes longer
  1118. 46:54than that. Well, what they do is they'll
  1119. 46:56just not convert the last few bits. So
  1120. 46:58you could do like a 8 bit or two bit or
  1121. 47:00four bit. Two bit wouldn't make sense,
  1122. 47:02but four bit or 8 bit or six bit,
  1123. 47:04whatever it is. And that would allow you
  1124. 47:06to have less time uh to get to a
  1125. 47:09conversion and then you could sample
  1126. 47:10faster. So this is another way of uh uh
  1127. 47:14optimizing speed versus um
  1128. 47:17uh accuracy which is nice. Um I would
  1129. 47:21say that the the complexity is maybe
  1130. 47:24medium or so. Um because you do need
  1131. 47:26this DAC and we talk in a control unit
  1132. 47:28but we don't need in one uh comparator
  1133. 47:32um but we don't need uh you know voltage
  1134. 47:34or current sources or those dividers
  1135. 47:38and power consumption is um pretty uh
  1136. 47:41reasonable considering the costs of most
  1137. 47:44microcontrollers. So, it's less than a
  1138. 47:46flash ADC,
  1139. 47:48probably not as much as a uh uh uh
  1140. 47:52sorry, it's much less than a flash ADC
  1141. 47:54and probably more than a slope
  1142. 47:56integrator.
  1143. 47:58Okay, so the goals uh for you guys is
  1144. 48:01not to necessarily know every ADC and
  1145. 48:04work through every single topology and
  1146. 48:05be able to recreate those circuits on an
  1147. 48:07exam because that would be horrible.
  1148. 48:09Your goal is to say, "Oh, these devices
  1149. 48:12have different trade-offs, right? I
  1150. 48:14would want to choose one of them to uh
  1151. 48:17have to accomplish certain goals. And so
  1152. 48:19the reason I show you those uh circuit
  1153. 48:21trade-offs is just so you can figure it
  1154. 48:23out. Uh you can play with the circuits
  1155. 48:25on your own. Oh, you need more. Sorry.
  1156. 48:30Set those up. Uh and just kind of learn
  1157. 48:33about those trade-offs as well. You can
  1158. 48:36just take those and hand them up that
  1159. 48:38way. Go that way. And so for this thing,
  1160. 48:40you're just trying to rate
  1161. 48:43um
  1162. 48:46you know them from one to three. I think
  1163. 48:48it's three is the fastest or the best
  1164. 48:50and one is the worst. And you can kind
  1165. 48:52of figure out like comparatively which
  1166. 48:54one would you choose for different use
  1167. 48:56cases.
  1168. 48:57[snorts]
  1169. 49:16here. I can help some along.
  1170. 49:19There you go.
  1171. 49:22There you go.
  1172. 49:25That way.
  1173. 49:31Pass those out that way.
  1174. 49:53It says this one is this one is easy for
  1175. 49:55speed. If they're right in the name,
  1176. 49:57it's giving you points.
  1177. 50:12>> [groaning]
  1178. 50:15>> That was great.
  1179. 50:34about
  1180. 50:51[clears throat]
  1181. 51:27might
  1182. 51:44reservation.
  1183. 52:05You must
  1184. 52:08Glory.
  1185. 52:31[groaning]
  1186. 52:35Yeah.
  1187. 53:05Open.
  1188. 53:22Heat. Heat.
  1189. 54:01Happy
  1190. 54:19glory.
  1191. 54:22Oh,
  1192. 54:34please.
  1193. 54:53What is
  1194. 55:17>> Yeah.
  1195. 55:18>> [clears throat]
  1196. 55:22>> Are you
  1197. 55:24watching?
  1198. 55:44All
  1199. 55:48right.
  1200. 56:15Facebook.
  1201. 56:28Yeah.
  1202. 56:56>> Okay.
  1203. 56:59All right.
  1204. 57:05[clears throat]
  1205. 57:26Perhaps
  1206. 57:37>> [clears throat]
  1207. 57:53>> What do you want?
  1208. 57:56That's your
  1209. 58:39Okay, now
  1210. 58:42these are not supposed to be like
  1211. 58:43absolute like not every category can you
  1212. 58:46come up with absolute value for because
  1213. 58:48some of them are like like die like area
  1214. 58:51You'd have to do the layout to figure
  1215. 58:52that out. We can just kind of guess,
  1216. 58:54right? This exercise is more about
  1217. 58:56trying to compare them. What do you
  1218. 58:57think the trade-off?
  1219. 58:59So, uh, resolution. I didn't even really
  1220. 59:02define what I meant by resolution. Who
  1221. 59:04who had a definition for resolution?
  1222. 59:07What do you think that means?
  1223. 59:15>> What does that mean?
  1224. 59:17>> Like step [clears throat] size.
  1225. 59:18>> Yeah.
  1226. 59:19>> Yeah. Yeah. So I was thinking of like uh
  1227. 59:21step size like what's the smallest
  1228. 59:24measurement you can make right? So
  1229. 59:25higher resolution low resolution would
  1230. 59:27be really coarse steps and higher
  1231. 59:29resolution would be um small steps. So
  1232. 59:32which which device could give you you
  1233. 59:36know in theory higher resolution than
  1234. 59:38the other ones. What do we think?
  1235. 59:44I see I know you guys had things on your
  1236. 59:46papers. Saw them.
  1237. 59:49Yeah, I would say that's probably right.
  1238. 59:51And now it's of course you could also
  1239. 59:53say like I'm going to make a really big
  1240. 59:56class A and then it could have higher
  1241. 59:58than an instance. But it's trying to
  1242. 1:00:00just argue like what is this technology
  1243. 1:00:02good at or bad at? So I said and somehow
  1244. 1:00:05my columns are off. I don't know. But I
  1245. 1:00:07said here like um look the dual slope is
  1246. 1:00:10going to give us this opportunity to use
  1247. 1:00:12time to measure things. Right? So now I
  1248. 1:00:16can I can have a really slow ramp up
  1249. 1:00:19time and I can count really really fast.
  1250. 1:00:21I can get a really high uh number of
  1251. 1:00:23step sizes that I can differentiate. And
  1252. 1:00:26so that's pretty universally going to be
  1253. 1:00:28the the highest resolution.
  1254. 1:00:31[clears throat]
  1255. 1:00:31Flash on the other side is bound. You
  1256. 1:00:34can't make them too big just because
  1257. 1:00:36then you have to get all these resistors
  1258. 1:00:37perfectly aligned and there's just
  1259. 1:00:39limitations on how practical you can
  1260. 1:00:41make a flash. I'm seeing usually that
  1261. 1:00:42has the smallest uh resolution out
  1262. 1:00:45[clears throat] of these categories and
  1263. 1:00:47SAR is somewhere in between.
  1264. 1:00:50Anybody want to argue I like arguing
  1265. 1:00:52like no it's something different. Okay.
  1266. 1:00:57Flash is in the name. All right. So
  1267. 1:00:59flash is going to be the fastest. There
  1268. 1:01:01is no clock involved in any of those
  1269. 1:01:04circuit diagrams I show uh because the
  1270. 1:01:07propagation is just uh through one um
  1271. 1:01:11comparator and those are going to be
  1272. 1:01:13really fast. So these are the things
  1273. 1:01:15that will go up to the gigahertz uh and
  1274. 1:01:20beyond. So these are really what the the
  1275. 1:01:21workhorse for fast things are. But you
  1276. 1:01:23have to give up resolution as you see
  1277. 1:01:24above because you can't get a lot of
  1278. 1:01:26different steps.
  1279. 1:01:28The slowest right is going to be dual
  1280. 1:01:30slope or even just slope integration
  1281. 1:01:32because here every measurement you make
  1282. 1:01:36you have to have a clock cycle for while
  1283. 1:01:38SAR is at least it's uh uh 2 to the n
  1284. 1:01:42right so here you're doing binary search
  1285. 1:01:44this one is your linear linear search
  1286. 1:01:47looking for the value so uh you know
  1287. 1:01:50it's it's this is kind of on average of
  1288. 1:01:52course if the input voltage happens to
  1289. 1:01:54be zero you're going to find it
  1290. 1:01:55immediately with uh slope integrator
  1291. 1:01:58It's going to take you longer to find
  1292. 1:01:59that value with your SAR ABC. But on
  1293. 1:02:02average, the slope integrator uh is
  1294. 1:02:04going to be slower than the SAR.
  1295. 1:02:09Uh what about accuracy? What do you guys
  1296. 1:02:11think? It's going to be the most
  1297. 1:02:13accurate one. And here I meant didn't
  1298. 1:02:16tell you accuracy means uh for a given
  1299. 1:02:19step size, whether it's big or small,
  1300. 1:02:21how constant is that step size? or if
  1301. 1:02:24you take one measurement one day and
  1302. 1:02:26take another measurement another day,
  1303. 1:02:27how likely is it that they're going to
  1304. 1:02:28be the exact same value? What do you
  1305. 1:02:30think the most accurate
  1306. 1:02:33uh device is?
  1307. 1:02:43>> I would say it's a dual slope. I'd say
  1308. 1:02:47um it depends on the least number of
  1309. 1:02:50analogy parts, right? So the flash ADC
  1310. 1:02:53has always resistors that have to be
  1311. 1:02:56perfectly negative and if there's a
  1312. 1:02:58little deviation one resistor then your
  1313. 1:03:00step size a little bit worse and sorry
  1314. 1:03:03you see um it's not bad it's just that
  1315. 1:03:08uh you have a deck and there will learn
  1316. 1:03:09about decks and they have their own
  1317. 1:03:10inherent problem here we figure out way
  1318. 1:03:13to get rid of the RNC constant inside
  1319. 1:03:16that thing by charging up the capacitor
  1320. 1:03:17and then subtracting off the RNC as you
  1321. 1:03:20charge down. So this one while still has
  1322. 1:03:23errors in measurements and and other
  1323. 1:03:25issues, it's just less prone than the
  1324. 1:03:27other devices. So it has higher
  1325. 1:03:29accuracy.
  1326. 1:03:32Uh what about complexity? We didn't
  1327. 1:03:33really talk about even what that means.
  1328. 1:03:35Generally was thinking about the number
  1329. 1:03:37of components you have to put into these
  1330. 1:03:39things. Not the digital logic. We'll say
  1331. 1:03:41the digital logic's free, but like the
  1332. 1:03:43number of comparators, number of
  1333. 1:03:45resistors, like how much of those extra
  1334. 1:03:47pieces you have to put in.
  1335. 1:03:55Who wants to dispense a guess? Doesn't
  1336. 1:03:57have to be correct.
  1337. 1:03:59>> Yeah. What do you think?
  1338. 1:04:00>> I guess the simplest one is the dual
  1339. 1:04:02slope per
  1340. 1:04:04simplest one. Dual slope. What did I Who
  1341. 1:04:06knows? I forgot what I even said. Let's
  1342. 1:04:08find out. Uh I said the dual slope was
  1343. 1:04:11the most complex. Why did I say that?
  1344. 1:04:14>> No. No. I said the dual Well, it depends
  1345. 1:04:17if I want complexity to be up or down.
  1346. 1:04:19Simple
  1347. 1:04:20>> least. So what did you mean to say? You
  1348. 1:04:22want you can redefine it.
  1349. 1:04:24>> Simplest
  1350. 1:04:25complexity.
  1351. 1:04:26>> Okay. So simplest is a slope.
  1352. 1:04:29>> Yeah.
  1353. 1:04:29>> Okay. I don't even I made these slides
  1354. 1:04:32like two weeks ago. I don't even know
  1355. 1:04:33what I meant by complexity. But uh so
  1356. 1:04:36let's see. Let's try and interpret what
  1357. 1:04:38that means. Um complexity in the sense
  1358. 1:04:40that um there's a lot of analog
  1359. 1:04:43trickiness. Okay, that's in the uh slope
  1360. 1:04:46integrator. But there's less parts to
  1361. 1:04:49get wrong.
  1362. 1:04:51Okay. And over in the Flash, I'd say the
  1363. 1:04:53Flash says the structure is pretty in uh
  1364. 1:04:56[snorts] easy to understand, but there's
  1365. 1:04:58lots of components to get right. So
  1366. 1:04:59maybe I would look at uh flash as being
  1367. 1:05:02the most complex in the sense of trying
  1368. 1:05:04to get it wrong. And dual slope is maybe
  1369. 1:05:07the easier one to get right. Maybe I
  1370. 1:05:10need to pre-label that one. Okay. How
  1371. 1:05:13about power?
  1372. 1:05:18Which one's going to be the most power
  1373. 1:05:20consuming of all these devices?
  1374. 1:05:23Yeah.
  1375. 1:05:28>> Yeah, I'd say I'd say so. So I I said
  1376. 1:05:30that as well. Flash in a sense here we
  1377. 1:05:33have a comparator for every step size.
  1378. 1:05:36For every step you have to have a
  1379. 1:05:37comparator. Those are always on. Um, and
  1380. 1:05:41then you have to have that resistor
  1381. 1:05:43ladder as well before you have any of
  1382. 1:05:44the decode logic. So, taking the digital
  1383. 1:05:46logic out, I'd say that's the most power
  1384. 1:05:49consumption. And the dual slope
  1385. 1:05:51integrator only has one compared
  1386. 1:05:56circuits, but those are relatively
  1387. 1:05:58[clears throat] minor compared uh to all
  1388. 1:06:00the other ones on the left. And you're
  1389. 1:06:03seeing a trend here. Somehow SAR keeps
  1390. 1:06:05falling in between both of these two
  1391. 1:06:08extras.
  1392. 1:06:09Now here's the the the one that's the
  1393. 1:06:11hardest and most arbitrary of all the
  1394. 1:06:13other arbitrary ones that are up there.
  1395. 1:06:16uh we can think about uh cost is most
  1396. 1:06:18arbitrary because the cost that you will
  1397. 1:06:21see as designers as a meta system
  1398. 1:06:23designer is like uh probably more about
  1399. 1:06:26IP than it is about intellectual
  1400. 1:06:28property than it is about like the
  1401. 1:06:30actual die area right uh it's like
  1402. 1:06:32you're trying to get a package thing a
  1403. 1:06:35component you can buy off somewhere and
  1404. 1:06:38die area is not a direct function but
  1405. 1:06:40let's just assume that size is closely
  1406. 1:06:43related to cost. Uh what do we think
  1407. 1:06:46would be the [clears throat] most
  1408. 1:06:47costly?
  1409. 1:06:49Probably flash. I I think so too. Let's
  1410. 1:06:51see if I if I agree with myself. Okay.
  1411. 1:06:54This time. So flash uh because it has
  1412. 1:06:57these large resistors uh takes up a lot
  1413. 1:07:00more area. So that's what it means in
  1414. 1:07:02terms of cost. Um
  1415. 1:07:05and then dual slope only has you know
  1416. 1:07:08one capacitor on it relatively small and
  1417. 1:07:10sorry somewhere.
  1418. 1:07:12Okay. Is there anyone here you're like,
  1419. 1:07:14"No, I disagree with
  1420. 1:07:17could disagree with me." It's fine.
  1421. 1:07:23>> I guess
  1422. 1:07:28[clears throat]
  1423. 1:07:34that's a good point. Yeah, that's a good
  1424. 1:07:36point. So, some of these are flexible,
  1425. 1:07:38right? So, of course, you could run your
  1426. 1:07:40dual slope um with a really coarse um
  1427. 1:07:44timer, right? A really slow clock and
  1428. 1:07:46then it resolution really fast. So,
  1429. 1:07:49that's that's a fair point. Um somehow
  1430. 1:07:52in my mind, maybe the mind of the
  1431. 1:07:54internet as well, these are like if
  1432. 1:07:56there's somehow equivalent, right, that
  1433. 1:07:59these are what the curiosity these are
  1434. 1:08:00all 12 minutes.
  1435. 1:08:04That's a fair point. Any other any other
  1436. 1:08:07caveats or questions or things you want
  1437. 1:08:10to argue about?
  1438. 1:08:13Okay.
  1439. 1:08:16Uh let's see.
  1440. 1:08:20All right. So, we went through those.
  1441. 1:08:21There are a few other ones you might
  1442. 1:08:23see. This is just enough to know like
  1443. 1:08:25that they exist. So, uh, sigma delta or
  1444. 1:08:29delta sigma ADC's um, is kind of like
  1445. 1:08:32sorry to see except there's this one bit
  1446. 1:08:34ADC and and there basically just
  1447. 1:08:37accumulating these samples over time.
  1448. 1:08:39It's an interesting uh, device to look
  1449. 1:08:42at and then there's also pipeline ADCs
  1450. 1:08:45where each stage is doing a small bit of
  1451. 1:08:48the calculation of the voltage. So now
  1452. 1:08:50you can do um, all these processes in
  1453. 1:08:53parallel. It's kind of like multiple um
  1454. 1:08:57SAR ECs all stacked together and now you
  1455. 1:09:00have a a voltage uh distribution
  1456. 1:09:03function that gives each one a separate
  1457. 1:09:04little piece of that voltage to look at
  1458. 1:09:06but not not part of the exam or
  1459. 1:09:08anything. You just have to know that or
  1460. 1:09:10just it's good to know that there are
  1461. 1:09:11other types of ADCs that exist.
  1462. 1:09:15Okay. So for your particular device uh
  1463. 1:09:18you will be using it in lab. Uh so it's
  1464. 1:09:21a you have four ADCs. They're all 12
  1465. 1:09:23bits. They're all SAR ADCs. And then you
  1466. 1:09:26get to make the tradeoff here between uh
  1467. 1:09:29sampling speed like how fast you want to
  1468. 1:09:31go. Three mega samples per second, two
  1469. 1:09:33mega samples per second. And you have a
  1470. 1:09:34bit tradeoff whether it's this 8 bit or
  1471. 1:09:3712 bit. And so really usually it's
  1472. 1:09:40trying to figure out what's the fastest
  1473. 1:09:42sampling speed I need for my signal. So
  1474. 1:09:44my signal is coming in. I want to do
  1475. 1:09:46overnight twist, but you probably want
  1476. 1:09:47to be like maybe five [clears throat]
  1477. 1:09:48times faster depending on what your
  1478. 1:09:50signal is just so you can get uh rid of
  1479. 1:09:53the noise and everything and really
  1480. 1:09:54understand what signal it is. So, it's
  1481. 1:09:56probably good to over sample, but uh
  1482. 1:09:58then you can see like well do I really
  1483. 1:09:59need I want to go faster, but do I
  1484. 1:10:01really need the the higher resolution?
  1485. 1:10:03And [clears throat] sometimes there's
  1486. 1:10:04other signal processing tricks you can
  1487. 1:10:05do say um using opamp to get it full
  1488. 1:10:09range. Right? So before we saw last week
  1489. 1:10:11you probably saw examples where if it
  1490. 1:10:13was really narrow range well then you
  1491. 1:10:16don't have very many bits to measure. So
  1492. 1:10:18if you use the op amp you can increase
  1493. 1:10:21the the range of your signal. So there's
  1494. 1:10:24kind of choice as to where you're trying
  1495. 1:10:25to go faster or how many bits you need
  1496. 1:10:27to represent something.
  1497. 1:10:29Uh so you have uh eight channels per ADC
  1498. 1:10:33which means you have one ADC but you can
  1499. 1:10:35channel them in from different sources.
  1500. 1:10:37So you can basically use them
  1501. 1:10:38pipelining. So it won't work if you're
  1502. 1:10:40trying to go for the fastest for every
  1503. 1:10:42channel, but you imagine you have eight
  1504. 1:10:44different values you're trying to
  1505. 1:10:46measure
  1506. 1:10:48and uh rather than and basically it's
  1507. 1:10:51going to act like a muck. So maybe you
  1508. 1:10:52have a a glove smart plug you're trying
  1509. 1:10:55to make with a bunch of resistors on
  1510. 1:10:57there to measure finger angle and now
  1511. 1:10:59you can send all those signals to
  1512. 1:11:01different pins and those get routed and
  1513. 1:11:03then the ADC is going to select between
  1514. 1:11:06which one it's going to cue. So he's
  1515. 1:11:08going to do time domain multiplexing
  1516. 1:11:10sample one then next one next one next
  1517. 1:11:12one that allows you to set this thing up
  1518. 1:11:15uh to do ADC conversions and it'll just
  1519. 1:11:17cycle through each one and then set put
  1520. 1:11:20the results in a register set of
  1521. 1:11:22registers for you.
  1522. 1:11:25Um you can do 14 bit oversampling. I had
  1523. 1:11:27to figure out like what do they mean by
  1524. 1:11:29that? How do they take a 12- bit
  1525. 1:11:30[clears throat] ADC and turn it into a
  1526. 1:11:3214-bit ADC? Didn't make sense to me. Had
  1527. 1:11:35to look in the data sheet kind of
  1528. 1:11:36remember what they were talking about.
  1529. 1:11:37So basically they're going to over
  1530. 1:11:38sample. They're going to sample
  1531. 1:11:42um the input multiple times and then
  1532. 1:11:44they're just going to sum them all
  1533. 1:11:46together and shift over to do averaging.
  1534. 1:11:50So basically on devices it's going to
  1535. 1:11:52over sample the thing and then do
  1536. 1:11:54averaging and then put that result back
  1537. 1:11:56to you. And if you know if you're slow,
  1538. 1:11:58if you're working in a world that's
  1539. 1:12:00relatively slow, it doesn't really
  1540. 1:12:01matter. If you're trying to go at, you
  1541. 1:12:03know, uh, 2 megabit samples per second,
  1542. 1:12:06that's not going to work. Now you have
  1543. 1:12:07to do all these extra conversions. But
  1544. 1:12:09it is a way to get extra uh, bits out of
  1545. 1:12:12this by basically doing hardware
  1546. 1:12:14sampling. So, um, hardware oversampling.
  1547. 1:12:17So, that's a a feature that they give
  1548. 1:12:19you that's not on all microcontrollers.
  1549. 1:12:22Uh, and then of course you can generate
  1550. 1:12:24all sorts of interrupts. You can
  1551. 1:12:26generate interrupts when your device is
  1552. 1:12:28done, right? So when you've done an ADC
  1553. 1:12:29conversion, you there's a small plot
  1554. 1:12:31prime here. So you can uh take you know
  1555. 1:12:35so all eight of those samples and when
  1556. 1:12:36all eight samples are done then it'll
  1557. 1:12:38throw an interrupt where you can pull
  1558. 1:12:39data out of that spot. You can also do
  1559. 1:12:41things like monitor a pin and if the
  1560. 1:12:44analog voltage is above a certain value
  1561. 1:12:46or below a certain value then it'll
  1562. 1:12:47throw an interrupt. So maybe you're just
  1563. 1:12:49trying to see if some signal goes high
  1564. 1:12:51or low and it's in some range. It's not
  1565. 1:12:53binary. It's not [snorts] one or zero.
  1566. 1:12:55So, you just want to see if I don't know
  1567. 1:12:57what it would be. Maybe it's a light
  1568. 1:12:59sensor. You want to see if the thing uh
  1569. 1:13:00dips below a certain value. Well, keep
  1570. 1:13:02your mic controller asleep until
  1571. 1:13:04[clears throat] that happens where you
  1572. 1:13:06turn on your ADC module, have that
  1573. 1:13:08going, and then throw an interrupt when
  1574. 1:13:10uh the signal is outside of that range.
  1575. 1:13:14And then, uh we kind of showed the slide
  1576. 1:13:16before, but here you're just going to go
  1577. 1:13:18through and you want to figure out what
  1578. 1:13:20your calculation time is. You got to
  1579. 1:13:22figure out what your sampling time is.
  1580. 1:13:23you're going to get some sampling whole
  1581. 1:13:24time and then your conversion time and
  1582. 1:13:26that's just the number of n bits that
  1583. 1:13:29you have times the clock time and then
  1584. 1:13:32um uh yeah your here your here's sample
  1585. 1:13:35time as software configur
  1586. 1:13:37um so so just an example um for a
  1587. 1:13:41particular ADC configuration you know
  1588. 1:13:43you have a clock of uh 16 MHz can sample
  1589. 1:13:47with four bits
  1590. 1:13:49or sorry four clock cycles and uh four
  1591. 1:13:52cycles for a sample and hold, you can go
  1592. 1:13:54calculate what your conversion time is
  1593. 1:13:57to actually uh convert that value and
  1594. 1:14:00that would tell you what your highest uh
  1595. 1:14:02sampling frequency could possibly be.
  1596. 1:14:06Okay, we're almost at time. So to recap,
  1597. 1:14:09uh it's good to know uh it says single
  1598. 1:14:12slope, but you can just think about um
  1599. 1:14:14slope integrators in general and be able
  1600. 1:14:17to reason about the trade-offs. Why
  1601. 1:14:18would you choose one over the other? And
  1602. 1:14:20then the slide still says the wrong
  1603. 1:14:22thing, but on your uh SAR on your
  1604. 1:14:25microcontroller, you have a SAR ADC that
  1605. 1:14:27does give you the speed versus
  1606. 1:14:28resolution grade. All right. Thanks.
  1607. 1:14:35If anybody has questions about projects,
  1608. 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.