Analog to Digital Conversion

Similar documents
Analog input/output. Textbook: Chapter 20, Analog-to-Digital Converter Chapter 21, Digital-to-Analog Converter

Advantages of Analog Representation. Varies continuously, like the property being measured. Represents continuous values. See Figure 12.

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Analog to Digital Conversion

Analog to Digital Converters

ELG3336: Converters Analog to Digital Converters (ADCs) Digital to Analog Converters (DACs)

The need for Data Converters

Chapter 2 Analog-to-Digital Conversion...

PHYS225 Lecture 22. Electronic Circuits

P a g e 1. Introduction

Digital to Analog Conversion. Data Acquisition

Electronics A/D and D/A converters

ELG4139: Converters Analog to Digital Converters (ADCs) Digital to Analog Converters (DACs)

Fundamentals of Data Converters. DAVID KRESS Director of Technical Marketing

EECS 373 Design of Microprocessor-Based Systems

UNIT III Data Acquisition & Microcontroller System. Mr. Manoj Rajale

Analog-Digital Interface

EECS 373 Design of Microprocessor-Based Systems

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

Analog-to-Digital Converter (ADC) And Digital-to-Analog Converter (DAC)

Embedded Control. Week 3 (7/13/11)

Introduction. These two operations are performed by data converters : Analogue-to-digital converter (ADC) Digital-to-analogue converter (DAC)

Data Converters. Dr.Trushit Upadhyaya EC Department, CSPIT, CHARUSAT

Outline. Analog/Digital Conversion

Analog to digital and digital to analog converters

ANALOG-TO-DIGITAL CONVERTERS

Chapter 5: Signal conversion

II Year (04 Semester) EE6403 Discrete Time Systems and Signal Processing

Microprocessors & Interfacing

INTEGRATED CIRCUITS. AN109 Microprocessor-compatible DACs Dec

A-D and D-A Converters

EEE312: Electrical measurement & instrumentation

10. Chapter: A/D and D/A converter principles

Data Acquisition & Computer Control

Data Acquisition: A/D & D/A Conversion

CHAPTER ELEVEN - Interfacing With the Analog World

ANALOG TO DIGITAL (ADC) and DIGITAL TO ANALOG CONVERTERS (DAC)

Analog/Digital and Sampling

System on a Chip. Prof. Dr. Michael Kraft

Analog Input and Output. Lecturer: Sri Parameswaran Notes by: Annie Guo

Signal Characteristics and Conditioning

Analog to Digital Conversion

Lecture #20 Analog Inputs Embedded System Engineering Philip Koopman Wednesday, 30-March-2016

Based with permission on lectures by John Getty Laboratory Electronics II (PHSX262) Spring 2011 Lecture 9 Page 1

Electronics II Physics 3620 / 6620

EE251: Tuesday October 10

Lecture 3: Sensors, signals, ADC and DAC

Analogue Interfacing. What is a signal? Continuous vs. Discrete Time. Continuous time signals

Lecture 6: Digital/Analog Techniques

Computerized Data Acquisition Systems. Chapter 4

EE 421L Digital Electronics Laboratory. Laboratory Exercise #9 ADC and DAC

Digital Design Laboratory Lecture 7. A/D and D/A

Chapter 2 Signal Conditioning, Propagation, and Conversion

CENG4480 Lecture 04: Analog/Digital Conversions

Introduction to Electronic Circuit for Instrumentation

Data Converters. Lecture Fall2013 Page 1

ME 461 Laboratory #3 Analog-to-Digital Conversion

Cyber-Physical Systems ADC / DAC

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

APPLICATION BULLETIN PRINCIPLES OF DATA ACQUISITION AND CONVERSION. Reconstructed Wave Form

Analogue-to-Digital Conversion

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

Serial communication inverter. Lab bench scenario. Inverter Board, A/D, D/A, PWM, Filters, Encoders. Inverter board. and Dimmer introduction

ELG3336 Design of Mechatronics System

LINEAR IC APPLICATIONS

Analog-to-Digital i Converters

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

Technical Brief FAQ (FREQUENCLY ASKED QUESTIONS) For further information, please contact Crystal Semiconductor at (512) or 1 (800)

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

LESSON PLAN. SUBJECT: LINEAR IC S AND APPLICATION NO OF HOURS: 52 FACULTY NAME: Mr. Lokesh.L, Hema. B DEPT: ECE. Portions to be covered

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

ANALOG TO DIGITAL CONVERTER ANALOG INPUT

Data acquisition and instrumentation. Data acquisition

MECE 3320 Measurements & Instrumentation. Data Acquisition

Single-channel power supply monitor with remote temperature sense, Part 1

Data Converter Fundamentals

Measuring and generating signals with ADC's and DAC's

Lab Exercise 6: Digital/Analog conversion

Real Time Embedded Systems. Lecture 1 January 17, 2012

Analogue to Digital Conversion

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

Sensing. Autonomous systems. Properties. Classification. Key requirement of autonomous systems. An AS should be connected to the outside world.

Design IV. E232 Spring 07

UNIVERSITY of PENNSYLVANIA DEPARTMENT OF ELECTRICAL AND SYSTEMS ENGINEERING ESE Undergraduate Labs Electrical Circuits and Systems II Laboratory

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

SIGMA-DELTA CONVERTER

BINARY AMPLITUDE SHIFT KEYING

PC-based controller for Mechatronics System

DSP Project. Reminder: Project proposal is due Friday, October 19, 2012 by 5pm in my office (Small 239).

Linear Integrated Circuits

Electronic Instrumentation and Measurements

Analog to Digital (ADC) and Digital to Analog (DAC) Converters

CHAPTER 6 DIGITAL INSTRUMENTS

The Fundamentals of Mixed Signal Testing

145M Final Exam Solutions page 1 May 11, 2010 S. Derenzo R/2. Vref. Address encoder logic. Exclusive OR. Digital output (8 bits) V 1 2 R/2

Figure 1.1 Mechatronic system components (p. 3)

Microcomputers. Digital Signal Processing

Mechatronics System Design - Sensors

Analogue to Digital Conversion

APPLICATION NOTE. Atmel AVR127: Understanding ADC Parameters. Atmel 8-bit Microcontroller. Features. Introduction

Transcription:

Analog to Digital Conversion

Why It s Needed Embedded systems often need to measure values of physical parameters These parameters are usually continuous (analog) and not in a digital form which computers (which operate on discrete data values) can process Temperature Thermometer (do you have a fever?) Thermostat for building, fridge, freezer Car engine controller Chemical reaction monitor Safety (e.g. microprocessor processor thermal management) Light (or infrared or ultraviolet) intensity Digital camera IR remote control receiver Tanning bed UV monitor Rotary position Wind gauge Knobs Pressure Blood pressure monitor Altimeter Car engine controller Scuba dive computer Tsunami detector Acceleration Air bag controller Vehicle stability Video game remote Mechanical strain Other Touch screen controller EKG, EEG Breathalyzer

The Big Picture Air Pressure V_ref Pressure Sensor V_sensor Analog to Digital Converter ADC_Code // Your software ADC_Code = ad; V_sensor = ADC_code*V_ref/23; Pressure_kPa = 25 * (V_sensor/V_supply+.4); Depth_ft = 33 * (Pressure_kPa Atmos_Press_kPa)/.3; Voltages V_ref ADC Output Codes........ V_sensor ADC_Code Ground..... Sensor detects air pressure and generates a proportional output voltage V_sensor 2. ADC generates a proportional digital integer (code) based on V_sensor and V_ref 3. Code can convert that integer to a something more useful. first a float representing the voltage, 2. then another float representing pressure, 3. finally another float representing depth

Getting From Analog to Digital A Comparator is a circuit which compares an analog input voltage with a reference voltage and determines which is larger, returning a -bit number An Analog to Digital converter [AD or ADC] is a circuit which accepts an analog input signal (usually a voltage) and produces a corresponding multi-bit number at the output. Comparator A/D Converter Vin Vin Vref Vin Clock

Waveform Sampling and Quantization Digital value time A waveform is sampled at a constant rate every t Each such sample represents the instantaneous amplitude at the instant of sampling At 37 ms, the input is.934945345452343 V Sampling converts a continuous time signal to a discrete time signal The sample can now be quantized (converted) into a digital value Quantization represents a continuous (analog) value with the closest discrete (digital) value The sampled input voltage of.934945345452343 V is best represented by the code x8, since it is in the range of.9 to.998 V which corresponds to code x8.

Transfer Function The ADC produces a given output code for all voltages within a specific range The ideal transfer function A/D converter is a stair-step function. Consider a 2-bit ADC to 4 V input LSB = 4/2 = V 3. V Code LSB = 4/2 2 = V Red line Truncation Maximum error is - LSB or + LSB Blue line Rounding Maximum error in conversion is usually ± /2 bit. Half as much error if we limit range to V ref (-2 N /2) 2. V. V. V Output LSB. V 2. V 3. V 4. V Input Voltage

Transfer Function Equation n General Equation n = converted code V in = sampled input voltage V +ref = upper end of input voltage range V -ref = lower end of input voltage range N = number of bits of resolution in ADC = ( ) V V in + ref V V ref ref 2 N + / 2 Simplification with V-ref = V n = n = ( ) V V in +ref 2 3.3 v 5v N 2 + / 2 + / 2 = 676 X = I floor function: nearest integer I such that I <= X

Example Your voltage range is 3.3 to V, device is an 8-bit ADC a) What is the step size? b) If v in is.9v, what is n? n = ( ) V V in + ref V V ref ref 2 N + / 2 Embedded Systems 8

A/D Flash Conversion A multi-level voltage divider is used to set voltage levels over the complete range of conversion. A comparator is used at each level to determine whether the voltage is lower or higher than the level. The series of comparator outputs are encoded to a binary number in digital logic (a priority encoder) Components used 2 N resistors 2 N - comparators Note This particular resistor divider generates voltages which are not offset by ½ bit, so maximum error is bit We could change this offset voltage by using resistors of values R, 2R, 2R... 2R, 3R (starting at bottom) V R Comparators 7/8 V + R 6/8 V 5/8 V 4/8 V 3/8 V 2/8 V /8 V V in R R R R R R + - + - + - - + - + - + - Encoder 3

ADC - Dual Slope Integrating Operation Input signal is integrated for a fixed time Input is switched to the negative reference and the negative reference is then integrated until the integrator output is zero The time required to integrate the signal back to zero is used to compute the value of the signal Accuracy dependent on V ref and timing Characteristics Noise tolerant (Integrates variations in the input signal during the T phase) Typically slow conversion rates (Hz to few khz) Slope proportional to input voltage C T V V in in = dt = C T2 Vref T T 2 V ref dt

ADC - Dual Slope Integrating Integrator Analog Input (V a ) Comparator - -V reference + + - Start of Conversion Status Digital Output 2 Control Logic Counter Comparator output Clock

ADC - Successive Approximation Conversion Successively approximate input voltage by using a binary search and a DAC SA Register holds current approximation of result Set all DAC input bits to Start with DAC s most significant bit Repeat Set next input bit for DAC to Wait for DAC and comparator to stabilize If the DAC output (test voltage) is smaller than the input then set the current bit to, else clear the current bit to Voltage Analog Input know xxxxxx, try know xxxxx, try Start of Conversion Test voltage (DAC output) know xxxx, try know xxx, try know xx, try know x, try Time know. Done. T T 2 T 3 T 4 T 5 T 6

A/D - Successive Approximation Converter Schematic Analog Input + Converter Schematic Comparator output - D/A Converter Digital Output 2 Start of Conversion Status Successive Approximation Register Clock

ADC Performance Metrics Linearity measures how well the transition voltages lie on a straight line. Differential linearity measure the equality of the step size. Conversion time:between start of conversion and generation of result Conversion rate = inverse of conversion time

Sampling Problems Nyquist criterion F sample >= 2 * F max frequency component Frequency components above ½ F sample are aliased, distort measured signal Nyquist and the real world This theorem assumes we have a perfect filter with brick wall rolloff Real world filters have more gentle roll-off Inexpensive filters are even worse (e.g. first order filter is 2 db/decade, aka 6 db/octave) So we have to choose a sampling frequency high enough that our filter attenuates aliasing components adequately

Quantization Quantization: converting an analog value (infinite resolution or range) to a digital value of N bits(finite resolution, 2 N levels can be represented) Quantization error Due to limited resolution of digital representation <= /(2*2 N ) Acoustic impact can be minimized by dithering (adding noise to input signal) 6 bits. too much for a generic microcontroller application? Consider a -5V analog signal to be quantized The LSB represents a change of 76 microvolts Unless you re very careful with your circuit design, you can expect noise of of at least tens of millivolts to be added in mv noise = 3 quantization levels. So log 2 3 = 7.3 bits of 6 are useless!

Inputs Multiplexing Typically share a single ADC among multiple inputs Need to select an input, allow time to settle before sampling Signal Conditioning Amplify and filter input signal Protect against out-of-range inputs with clamping diodes

Sample and Hold Devices Some A/D converters require the input analog signal to be held constant during conversion, (eg. successive approximation devices) In other cases, peak capture or sampling at a specific point in time necessitates a sampling device. This function is accomplished by a sample and hold device as shown to the right: These devices are incorporated into some A/D converters Analog Input Signal Sampling switch Hold Capacitor Output Signal

M3626 A/D Converter Overview

M3262 Converter Overview (626P similar) Embedded Systems 8-2

Digital to Analog Conversion May need to generate an analog voltage or current as an output signal Audio, motor speed control, LED brightness, etc. Digital to Analog Converter equation n = input code N = number of bits of resolution of converter V ref = reference voltage V out = output voltage V out = V ref * n/(2 N ) D/A Converter Vout Vref