
{"id":414,"date":"2018-10-02T16:25:37","date_gmt":"2018-10-02T16:25:37","guid":{"rendered":"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/?page_id=414"},"modified":"2018-10-02T16:27:34","modified_gmt":"2018-10-02T16:27:34","slug":"analogue-to-digital-converter-adc-glossary-entry","status":"publish","type":"page","link":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/glossary-2\/analogue-to-digital-converter-adc-glossary-entry\/","title":{"rendered":"Analogue to Digital Converter (ADC) &#8211; (Glossary Entry)"},"content":{"rendered":"<p>A device that measures a bounded analogue voltage level, and encodes it in a digital integer representation.<\/p>\n<p>An ADC has two key properties:<\/p>\n<p><b>Resolution<\/b> (in bits) &#8211; how many binary bits are used in the integer representation<\/p>\n<p><b>Maximum Sampling Rate<\/b> (in Hz) &#8211; the maximum number of samples than can be measure in a second.<\/p>\n<p>There are other important properties, such as linearity and precision, which we will not discuss here.<\/p>\n<p>Consider the analogue waveform below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-415\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/AnalogueWaveform3v3.png\" alt=\"\" width=\"600\" height=\"330\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/AnalogueWaveform3v3.png 1012w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/AnalogueWaveform3v3-300x165.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/AnalogueWaveform3v3-768x422.png 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>In this diagram, we see how an analogue signal <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-a2f33825c8ec052e86696209360348d4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"28\" style=\"vertical-align: -5px;\"\/>\u00a0can take <b>any<\/b> value between 0.0V and 3.3V. Furthermore, you can measure the voltage at <b>any<\/b> time <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-6b97bb0f65c75b6cc0fba1868749478d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>. There are no breaks in either dimension, so we say this signal is continuous.<\/p>\n<p>In a digital computer, we may wish to record and store this waveform in the computer memory over a given time period. There are two processes that need to occur:<\/p>\n<p><b>Sample and Hold<\/b><\/p>\n<p>As <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-6b97bb0f65c75b6cc0fba1868749478d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>\u00a0is a continuous quantity, we simply cannot measure <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-a2f33825c8ec052e86696209360348d4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"28\" style=\"vertical-align: -5px;\"\/>\u00a0for all possible values of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-6b97bb0f65c75b6cc0fba1868749478d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>. Even for a fixed duration, that would still be an infinite set of data!<\/p>\n<blockquote><p>Does this prove that no two infinities are the same? \ud83d\ude42<\/p><\/blockquote>\n<p>Back to earthly discussions&#8230; we need to measure a finite set of samples at regular intervals. This process is known as sampling (you can think of this as quantization along the time axis).<\/p>\n<figure id=\"attachment_416\" aria-describedby=\"caption-attachment-416\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-416\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/SamplingInTime.png\" alt=\"\" width=\"600\" height=\"355\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/SamplingInTime.png 1025w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/SamplingInTime-300x177.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/SamplingInTime-768x454.png 768w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/SamplingInTime-1024x605.png 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-416\" class=\"wp-caption-text\">Sampling in Time &#8211; showing the sampling interval T<\/figcaption><\/figure>\n<p>The first task of an Analogue to Digital Converter (ADC) is to sample and hold. A regular digital clock is used to capture and hold the voltage every <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-58f18d11e5ffdd11dd9095c427922c8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/>\u00a0seconds.<\/p>\n<p>In practice, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-58f18d11e5ffdd11dd9095c427922c8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/>\u00a0is usually measured in <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-2b7d0f24a7d7697199f292c527a7b989_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#109;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"24\" style=\"vertical-align: 0px;\"\/> or <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-451b6fc50c3135d5a2df0c5f30018860_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#109;&#117;&#32;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"19\" style=\"vertical-align: -4px;\"\/><\/p>\n<p><b>Information loss<\/b> &#8211; At this point, you are still using analogue electronics to \u201chold\u201d values. We are loosing information of course (the values between the sampling points), so we usually try to keep <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-58f18d11e5ffdd11dd9095c427922c8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/>\u00a0as small as possible. There are some mathematically derived rules to determine the minimum value of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-58f18d11e5ffdd11dd9095c427922c8b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/>. This is beyond the scope of this course, but you can read about it in any book on signal processing, or alternatively:<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Sampling_(signal_processing\">https:\/\/en.wikipedia.org\/wiki\/Sampling_(signal_processing<\/a>)<\/p>\n<p><b>Quantisation<\/b><\/p>\n<p>Like time <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-6b97bb0f65c75b6cc0fba1868749478d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>, the voltage value <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-a2f33825c8ec052e86696209360348d4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;&#40;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"28\" style=\"vertical-align: -5px;\"\/>\u00a0can take ANY value between two limits (0.0V and 3.3V in this case), so again, there are theoretically an infinite<span class=\"Apple-converted-space\">\u00a0set of\u00a0values.<\/span><\/p>\n<p>In a digital computer, there are no data types that can hold a value with infinite precision. ALL numbers in a digital computer are ultimately represented in binary.<\/p>\n<p>The next step is to evenly quantize along the voltage axis as shown below:<\/p>\n<figure id=\"attachment_417\" aria-describedby=\"caption-attachment-417\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-417\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/Quantisation.png\" alt=\"\" width=\"600\" height=\"351\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/Quantisation.png 1027w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/Quantisation-300x175.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/Quantisation-768x449.png 768w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/10\/Quantisation-1024x598.png 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-417\" class=\"wp-caption-text\">Showing the process of quantisation. For an arbitrary analogue waveform, nearest &#8220;preferred values&#8221; are selected.<\/figcaption><\/figure>\n<p>In this example I\u2019ve used 3-bit sampling simply for clarity. The y-axis is evenly divided into 8 equal distributed values, spanning 0.0V to 3.3V.<\/p>\n<p>In this example, each level is encoded as a 3-bit binary value, from 000 to 111<\/p>\n<p>000 (integer 0) represents <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-301a96f0e904cd41eb249b2496d967bb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#48;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"23\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>001 (integer 1) represents <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-e22d6a8cb4f82ff8d0c98c24e9e09702_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#61;&#32;&#48;&#46;&#52;&#55;&#49;&#52;&#50;&#57;&#32;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"120\" style=\"vertical-align: 0px;\"\/>\u00a0<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>010 (integer 2) represents <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-157722ff1b9d6db62bf7c456132e6c15_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#50;&#32;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#61;&#32;&#48;&#46;&#57;&#52;&#50;&#56;&#53;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"115\" style=\"vertical-align: 0px;\"\/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-d02774366c4513835c28f087ab356ad7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#118;&#100;&#111;&#116;&#115;\" title=\"Rendered by QuickLaTeX.com\" height=\"15\" width=\"3\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>111 (integer 7) represents <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/ql-cache\/quicklatex.com-da9cd2fd185b2b752ec9d497dca74482_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#55;&#32;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#61;&#32;&#51;&#46;&#51;&#86;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"84\" style=\"vertical-align: 0px;\"\/><\/p>\n<p>The process of quantisation is to consider the analogue signal being \u201cheld\u201d, and decide which of these binary levels it is <b>closest to<\/b> (depicted by the circles). It is the nearest binary value that is presented at the output of the ADC and ultimately stored in the computer.<\/p>\n<p><b>Quantisation noise. <\/b>You will probably have noticed that there are inevitable errors. There are frequently differences between the real signal and the nearest preferred value (quantised signal). These errors manifest themselves as <em>quantisation noise<\/em>. For many real world signals (such as music), this can be random. For some signals, there may be some statistical bias in this noise.<b><span class=\"Apple-converted-space\">\u00a0<\/span><\/b><\/p>\n<p>Increasing the number of quantization levels helps to reduce this noise. To do this, we must increase the number of bits used to represent these values. This is why in music we hear about 16 bit audio (CD), 24 bit (for some recording studios) and even 32 bit when talking about sound quality. Strangely enough, increasing the sampling rate (in time) can in some circumstances, increase the signal resolution (in V), a technique known and marketed as \u201cover-sampling\u201d <a href=\"https:\/\/en.wikipedia.org\/wiki\/Oversampling\"><b>https:\/\/en.wikipedia.org\/wiki\/Oversampling<\/b><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A device that measures a bounded analogue voltage level, and encodes it in a digital integer representation. An ADC has two key properties: Resolution (in bits) &#8211; how many binary bits are used in the integer representation Maximum Sampling Rate (in Hz) &#8211; the maximum number of samples than can be measure in a second.&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/glossary-2\/analogue-to-digital-converter-adc-glossary-entry\/\">Continue reading <span class=\"screen-reader-text\">Analogue to Digital Converter (ADC) &#8211; (Glossary Entry)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":153,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-414","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/414","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":4,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/414\/revisions"}],"predecessor-version":[{"id":421,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/414\/revisions\/421"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/153"}],"wp:attachment":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/media?parent=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}