Introduction to ADC and DAC PDF
Document Details
Uploaded by Deleted User
Ahmedabad University
Maryam Kaveshgar
Tags
Summary
This document introduces Analog-to-Digital Conversion (ADC) and Digital-to-Analog Conversion (DAC). It explains the concepts of continuous and discrete variables and how they relate to analog and digital signals, discusses the use of op-amps for ADC, and analyses ADC/DAC converters, specifications and circuit examples. The document is aimed at an undergraduate level.
Full Transcript
Introduction ENR107 Maryam Kaveshgar Syllabus in short Introduction to number systems Microprocessor and Microprocessor based computer board Integrated Development Environment (IDE) Programming Applications to real-time systems Evaluation components Mid-Semester Examination: 15% End Semeste...
Introduction ENR107 Maryam Kaveshgar Syllabus in short Introduction to number systems Microprocessor and Microprocessor based computer board Integrated Development Environment (IDE) Programming Applications to real-time systems Evaluation components Mid-Semester Examination: 15% End Semester Examination: 25% Other Components: Assignments - 15% Quiz: 15% Weekly reports: 15% Project - 15% Grade Rubric Absolute grading Grades A A- B+ B B- C+ C D NP Marks 90-100 80-89 70-79 60-69 50-59 40-49 35-39 30-34 0-29 Range Digital electronic circuits Classification Non programmable circuits (Logic gates, Flip-flops, Counters, Registers) Programmable circuits Processors Microprocessors Emphasis on programmable circuits Digital Programmable systems Two types General purpose systems (Laptops, Desktops etc.) Special purpose systems (Control of washing machines, mobiles, watches etc.) Emphasis on basics of special purpose systems General algorithm Read input (A key pressed. A value from temperature transducer etc.) Process (Find which key. Compare read value with a set point. ) Generate control signal Display Go to – Read input Continuous and discrete variables The processing in the computer is done using discrete variables. Hence this topic is of interest Continuous variable Even in a finite range the variable has infinite possible number of values (Distance ,Temperature, Time , Voltage etc.) Discrete variable The number of possible values is finite in finite range Discrete variables Many variables are inherently discrete Any count is discrete Number of balls , Number of keys Variables are stored as numbers. Continuous variables can not be stored exactly since each value will need infinite number of bits i.e. 1.2345678932 ---- Analog to digital conversion Since many variables are inherently continuous, they need to be converted to discrete before they can be processed These variables are often functions of time Called signals v(t), i(t), etc Since digital computer works with electrical signals any non-electrical signal has to be converted into an electrical signal by a sensor Analog signal Both x and t continuous variables (Continuous Amplitude, Continuous time CA/CT) : Analog signal CA/CT Signal x t Digital signal DA/DT Most transducers give analog signal Microphone output Thermocouple Analog to Digital converters Convert analog signal into a digital signal ADC operations Sampling This converts CA/CT signal into CA/DT signals Sampling frequency(fs) CA/DT >= 2 fmax (Nyquist theorem) Signal If we do not follow Nyquist theore: x Aliasing is when the digital signal appears to have a different frequency than the original 0 ts 2ts analog signal. t Sampling frequency(fs) >= 10 fmax (Valvano Postulate) Examples Speech signal fmax = 3.5 KHz Sampling frequency = 8 Ksamples/s Sound signal fmax = 20 KHz Sampling frequency fs = 48 Ksamples/s If Not we will face Aliasing error How sampling can be achieved A multiplier One input is the analog signal The other input is a periodic train of narrow pulses vi vo vi Multiplier 1 p(t) vo p(t) Quantization 4 111 3.5 110 2.5 q= 1 101 1.5 100.5 x(t) 0 011 t -.5 010 -1.5 001 -2.5 000 -3.5 -4 Quantization step The general formula for q , the quantization step is q = (Vmax – Vmin)/(2n) where n is the number of encoded digits. In the previous graph q = (4-(-4))/23 q = 8/8 = 1 volt Maximum quantization error = q/2 Quantization This converts continuous amplitude to discrete amplitude Encoding Encoder converts quantized amplitudes to binary values Analog Analog to Binary Signal Digital Signal Converter Why binary ? Every numeric digit has to be represented by a voltage level In a decimal system you will need 10 stable levels In a binary system you need only 2 stable levels Effect of noise is less Important in transmitting signals over large distances Processing circuits are easily designed using Boolean Algebra Summary of Analog to Digital Conversion Sampling Converts CA/CT signal to CA/DT signal Quantization Converts CA/DT signal to DA/DT signal Encoding Gives binary output Why we use Op-Amp for ADC? stability for temperature variations, high input impedance (so they do not alter the effective external electrical components connected to the input of the amplifier), low output impedance (so they do not alter the effective electrical load connected to the output of the amplifier), virtual grounding between the two-input terminals if one of the input terminals is grounded, that is, 0 V (so that the voltage of the other input terminal would also be 0 V), a very high gain (output/input), typically 105 , the ability to configure the effective gain of the operational amplifier using external electrical components. How to configure the Op-Amp open-loop—no feedback from the output of the amplifier is fed back into the input closed-loop— feedback from the output of the amplifier is fed back into the input ADC Converters Flash/Parallel ADC Succesive/Serial ADC Uses Comparators Uses comparators No Clocks Low conversion time Is one of the fastest memory register called the Needs more circuitry SAR (successive approximation For n-bit ADC: 2𝑛𝑛 − 1 register) comparator Conversion Time: 𝑇𝑇𝑐𝑐 = 𝑁𝑁 × 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐 Res. Up to 16 bits Conversion speed: 5 -8 Megasample/sec Serial transmission Each bit is read one at a time Binary Signal Analog Serial Analog to Parallel to outpu Signal Digital serial t Converter converter An example Speech signal Sampling frequency 8000 samples/s f s = 8000 Hz 4 bits per sample 1 1 ts = = sec onds f s 8000 ts 1 tb = = s 4 32000 0 ts 2ts Rb = 32000 bits / s Bit rate tb Specification of ADC Resolution: the smallest magnitude which can be converted from digital-to- analog form by the ADC. Quantisation Error: difference between the digitized value and the actual analog value. It is specified as a +1 LSB. Conversion Time: the time taken for the ADC to complete the digitization of any given analog signal. Accuracy: The accuracy of the DAC depends on any underlying errors in the circuit Discrete amplitude and Continuous time (DA/CT) x t DA/CT Signal Analog Digital Digital to Analog Analog Filter Output input converter CA/CT Basic Elements of a DSP System Digital ADC signal DAC+Filter processor Analog Analog EOC Outpu input t Start conversion Problem 1 A signal ranging from 0 to 10 volts is converted into a 8 bit digital signal. Find the quantization step q = 10/(28) q = 10/256 = 0.039063 DAC Weighted Resistor DAC R–2R Ladder DAC Resistors are working principle just two resistor values of a basic weighted resistor DAC stepwise change in the value of different weights selected to be the output voltage inversely proportional to the weights of the particular bit position. High error due to the resistor tolerance Specification of DAC Resolution or step size:. The smallest change which can occur in the magnitude of the analog signal caused by a change in the magnitude of the 𝑉𝑉 digital signal. ( 𝑛𝑛 ) 2 Full-scale output: The maximum analog output voltage produced by the DAC. Percentage Resolution: The magnitude of the step size as compared to the full-scale output of the DAC expressed as a percentage = 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 × 100 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝐷𝐷𝐷𝐷𝐷𝐷 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 Accuracy: expressed in terms of the full-scale DAC output and often as a percentage. Depends on the component. Digital to Analog converter Digital D to A Analog Input converter Output Analog output is proportional to decimal representation of the binary word The actual output will depend on the voltage levels for 0 and 1 Input-Output Relationship Three Bit Number Digital Analog Two bits Single bit (Electrical 000 0 Representation) Digital Analog Digital Analog 00V V/8 00 0 0 0 0V0 2V/8 0V V/4 V V 0VV 3V/8 V0 2V/4 V00 4V/8 VV 3V/4 V0V 5V/8 VV0 6V/8 V VVV 7V/8 Step size = N 2 N : Number of bits Two bit converter circuit V1 V2 Vo 0 0 0 With V2 = 0 : Vo1= V1/2 0 V V/4 With V1 = 0 : Vo2 = V2/4 V 0 V/2 Vo = V1/2 + V2/4 V V 3V/4 3- Bit converter circuit V1 V2 V3 Vo 0 0 0 0 0 0 V V/8 0 V 0 V/4 0 V V 3V/8 V 0 0 V/2 V 0 V 5V/8 V V 0 6V/8 V V V 7V/8 Test in Tinkercad Chose V = 8 volts V Color code for circuits Positive supply voltage1 -------- RED Ground ---------GREEN Positive supply voltage2 -------- Pink Negative supply voltage ------BLACK Input lines --------BLUE Output lines -----PURPLE Multimeter (Or CRO) +ve terminal ------ YELLOW Tinkercad simulation Animation Screen to GIF For generating animation https://www.screentogif.com/ https://users.ece.utexas.edu/~valvano/Volume1/E- Book/C14_ADCdataAcquisition.htm