Analogue to Digital Conversion

Slides:



Advertisements
Similar presentations
EET260 Introduction to digital communication
Advertisements

Analog to Digital Conversion (ADC)
Analog-to-Digital Converter (ADC) And
Lecture 17: Analog to Digital Converters Lecturers: Professor John Devlin Mr Robert Ross.
Sensors Interfacing.
Digital to Analogue Conversion Chapter 13. Why is conversion needed? Most signals in the world are analogue. Microprocessors and most computers computers.
Digital to Analogue Conversion
Digital to Analog and Analog to Digital Conversion
Digital Fundamentals Tenth Edition Floyd Chapter 12.
CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system.
Data Acquisition Risanuri Hidayat.
COMP3221: Microprocessors and Embedded Systems
Analog to Digital Conversion. 12 bit vs 16 bit A/D Card Input Volts = A/D 12 bit 2 12 = Volts = Volts = 2048 −10 Volts = 0 Input Volts.
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Shuvra Das University of Detroit Mercy
Analog to Digital Converters (ADC) 2 ©Paul Godin Created April 2008.
Lecture 9: D/A and A/D Converters
CHAPTER 5 Discrete Sampling and Analysis of Time-Varying Signals Analog recording systems, which can record signals continuously in time, digital data-acquisition.
Analogue to Digital Conversion
Interfacing Analog and Digital Circuits
Interfacing with the Analog World Wen-Hung Liao, Ph.D.
1 Dr. Un-ki Yang Particle Physics Group or Shuster 5.15 Amplifiers and Feedback: 3.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 26.1 Data Acquisition and Conversion  Introduction  Sampling  Signal Reconstruction.
Introduction to Data Conversion
Discussion #25 – ADCECEN 3011 Conversion Mosiah 5:2 2 And they all cried with one voice, saying: Yea, we believe all the words which though has spoken.
EET260: A/D and D/A converters
JF 12/04111 BSC Data Acquisition and Control Data Representation Computers use base 2, instead of base 10: Internally, information is represented by binary.
1 Digitisation Conversion of a continuous electrical signal to a digitally sampled signal Analog-to-Digital Converter (ADC) Sampling rate/frequency, e.g.
EKT343 –Principle of Communication Engineering
PH4705/ET4305: A/D: Analogue to Digital Conversion
Fundamentals of Digital Audio. The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter.
 Principles of Digital Audio. Analog Audio  3 Characteristics of analog audio signals: 1. Continuous signal – single repetitive waveform 2. Infinite.
Digital to Analogue Conversion Natural signals tend to be analogue Need to convert to digital.
Computer Based Data Acquisition Basics. Outline Basics of data acquisition Analog to Digital Conversion –Quantization –Aliasing.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
Key terms Sampling rate – how often we read the value of the signal Resolution – the separation between “levels” for our samples (can we read the value.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Analog & Digital Signals Analog to Digital Conversion (ADC)
Understanding ADC Specifications September Definition of Terms 000 Analogue Input Voltage Digital Output Code FS1/2.
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
Analog to Digital Converters (ADC) 1
Analog to Digital conversion. Introduction  The process of converting an analog signal into an equivalent digital signal is known as Analog to Digital.
Data Acquisition Systems
ISAT 300 Computer-Based Instrumentation (part 2) Sampling and A/D Converters 11/14/01.
University of Tehran 1 Interface Design Transforms Omid Fatemi.
Topic 1 modelling of sensors systems ETEC Calibration methods We have a RTD sensing the temperature. The integer of the sensor inside the PLC is.
Data Acquisition ET 228 Chapter 15 Subjects Covered Analog to Digital Converter Characteristics Integrating ADCs Successive Approximation ADCs Flash ADCs.
V. Rouillard  Introduction to measurement and statistical analysis DIGITAL SAMPLING - DIGITISATION Digital sampling is mainly used in data acquisition.
1 Data-Converter Circuits A/D and D/A Chapter 9 1.
1 Manipulating Audio. 2 Why Digital Audio  Analogue electronics are always prone to noise time amplitude.
IT-101 Section 001 Lecture #9 Introduction to Information Technology.
Analog Capture- Port E. Digital to Analog and Analog to Digital Conversion D/A or DAC and A/D or ADC.
4.2 Digital Transmission Pulse Modulation Pulse Code Modulation
Analog/Digital Conversion
ECE 2799 Electrical and Computer Engineering Design ANALOG to DIGITAL CONVERSION Prof. Bitar Last Update:
Digital Audio I. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.
0808/0809 ADC. Block Diagram ADC ADC0808/ADC Bit μP Compatible A/D Converters with 8-Channel Multiplexer The 8-bit A/D converter uses successive.
Introduction to Data Conversion EE174 – SJSU Tan Nguyen.
Electronic instrumentation Digitization of Analog Signal in TD
Sampling. Introduction  Sampling refers to the process of converting a continuous, analog signal to discrete digital numbers.
Analog-Digital Conversion. Analog outputs from sensors and analog front- ends (analog signal conditioning) have to be converted into digital signals.
MECH 373 Instrumentation and Measurements
Microprocessors Data Converters Analog to Digital Converters (ADC)
COMPUTER NETWORKS and INTERNETS
Analog to digital conversion
Analog to Digital Converters Electronics Unit – Lecture 7
Chapter 2 Signal Sampling and Quantization
Lesson 8: Analog Signal Conversion
Conversation between Analogue and Digital System
Presentation transcript:

Analogue to Digital Conversion Chapter 13

mbed

ADC As mentioned before, most sensors of temperature, sound, and acceleration have analog outputs. However, these analog outputs have to be converted into digital signals before they can be stored or used in calculations by the microcontroller. Analog signals are converted into digital representations with a resolution and a rate determined by the Analog to Digital Converter (ADC). An ADC is a circuit whose digital output is proportional to the analog input. Effectively, an ADC measures the input analog voltage, and gives a binary output proportional to the size of the input signal. The input range of the ADC is usually determined by the value of a voltage reference (3.3 V)

ADC Block Diagram Analo gue The conversion process is started by a digital input called SC, start convert. It takes a finite time to perform the conversion, depending on the clock frequency. The ADC signals that the conversion is completed via the EOC, end of conversion line The resulting data can then be written onto the output data bus, when the output enable, OE control line, is high. Voltage Reference + + Analogue to Digital - Converter Analo gue Analog Input uuee + Digital Output (n bits) to Digital Converter - SC (Start Convert) EOC (End of Conversion) OE (Output Enable) Example Control Lines

2 bit ADC http://www.asdlib.org/onlineArticles/elabware/Scheeline_ADC/ADC_ADC_Flash.html

Many ADCs follow the relation where: D is the digital output value Vi is the analog input voltage Vr is the reference voltage n is the number of bits in the converter output How many voltage comparators are needed for a 12- bit ADC?

The output binary number is an integer, and for an n-bit number can take any value from 0 to (2n – 1 ). You may want to think about this. The ADC process rounds (truncates) the calculation to produce an integer output. An ADC will have maximum and minimum input values that it convert. The difference is the range. Often the minimum value is 0 V, so the range is then just the maximum possible input value. Analog input values that exceed the maximum or minimum will likely be digitized as the maximum or minimum values (a limiting or clipping action occurs).

3 bit ADC As input voltage goes from 0 V to Vmax, the digital output will step from 0 to 111 or (23-1) Range of analog values all represented by 100 This shows that in making the conversion, an approximation is involved as any one digital output value has to represent a range of analog input signals. For example, if the output value of 100 is precisely correct in the middle of the step, the greatest errors will occur at either end.

Error made by ADC From Understanding Data Converters, Texas Instruments Application Note

Quantisation Error The greatest quantisation error is one half of the step width, or half of one least significant bit (LSB) equivalent on the voltage scale. To reduce the quantisation error, the “step width” should be narrowed. This can be achieved by increasing the number of bits in the ADC process. This increases complexity and cost, and often the time taken to undertake the conversion. What is the step width and worst case quantisation error? The LPC1768 ADC is 12 bit. The reference voltage is taken from the regulated 3.3 V supply.

Effect of Quantization Error Quantization Noise eg 8 bits A/D ‐> noise floor is ~ 50 dB From Understanding Data Converters, Texas Instruments Application Note

Sample and Hold When performing an analog to digital conversion, a “sample” is taken of analog signal and quantized to the accuracy defined by the resolution of the ADC. The signal is held, which means that it is stored temporally while the signal is compared to the reference voltage and the digital signal is generated. Sometimes, the digital signal is generated by averaging the results of several analog samples. The more samples taken, the more accurate the digital data will be as long as the analog signal is not changing. Sampling is generally done at a fixed frequency, called the sampling frequency.

S&H – Sample and Hold Decoder – circuitry to change outputs of the n comparators to the digital signal. http://www.seas.upenn.edu/~ese206/labs/adc206/adc206.html

Sampling Frequency The ideal sampling frequency depends on the maximum frequency of the signal being digitised. If the sampling frequency is too low, then rapid changes in the analog signal may not be represented in the resulting digital data. Waveforms showing that undersampling results in the digitised output (lower traces) not representing the input waveforms (upper traces)

Nyquist-Shannon Sampling Theorem The Nyquist-Shannon sampling criterion states that the sampling frequency must be at least double that of the highest frequency of interest. However, it is generally agreed that the sampling frequency should be 5+ times the highest frequency found in the analog signal. If the highest frequency that is created when a human speaks is 3.5 kHz, what is the minimum sampling frequency that should be used? The name of the criterion is usually shortened one or the other names – Nyquist criterion or Shannon Criterion.

Aliasing If the Nyquist criteria is not satisfied, a phenomenon known as aliasing occurs. Many weird and wonderful things can happen. Two signals can have the same digitized output. If the sampling frequency is the same as the input frequency, the output is constant! http://www.svi.nl/AliasingArtifacts

ADC/DAC Program #include "mbed.h" /*Program to explore some of the time-related aspects of the mbed DAC and ADC/   #include "mbed.h" AnalogOut Aout(p18); AnalogIn Ain (p20); DigitalOut test(p5); float ADCdata; int main(){ while(1){ ADCdata=Ain; //Perform an ADC conversion test=1; test=0; //1 pulse on p5 shows end of the ADC conversion Aout=ADCdata; //Perform a DAC conversion test=0; test=1; //2 pulses on p5 shows end of the DAC conversion }

Timing issues and consequences DAC conversion DAC conversion ADC Conversion Single pulse Double pulse Single pulse Double pulse

Switching an digital output on or off takes ~72 ns cf 1 clock period = 1/96 MHz = 10.4 ns

Performing a D to A conversion takes ~1.2s

Performing A to D conversion takes

Sampling rate /*Program to explore some of the time-related aspects of the mbed DAC and ADC/   #include "mbed.h" AnalogOut Aout(p18); AnalogIn Ain (p20); DigitalOut test(p5); float ADCdata; int main(){ while(1){ ADCdata=Ain; //Perform an ADC conversion test=1; test=0; //1 pulse on p5 shows end of the ADC conversion Aout=ADCdata; //Perform a DAC conversion test=0; test=1; //2 pulses on p5 shows end of the DAC conversion wait (0.001) // slows sampling rate }

wait = 1ms Maximum frequency < 500 Hz Ain = 200 Hz Ain = 400 Hz Ain = 500 Hz Ain = 976 Hz

wait = 0 ms. What is Nyquist frequency ? Looks ~ 44 kHz. Standard audio CDs are sampled at played back at 44.1 kHz, to adhere to Nyquist sampling criteria as it relates to human auditory system which extends to ~ 20 kHz. Coincidence?

Some DAC and ADC timing issues and consequences This is a bit strange, as from the LPC1768 User Manual Table 531, A/D Control Register This is the price we are paying for the ease of programming the mbed using the C++ functions.