EE251: Tuesday October 10

Similar documents
EE 308 Spring Using the HCS12 PWM

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

Analog to Digital Converters

PHYS225 Lecture 22. Electronic Circuits

Menu EEL EEL 3744 A/D and D/A Conversion Process. A-to-D, D-to-A, Part 1

EE 308 Spring 2015 The MC9S12 A/D Converter

Linear Integrated Circuits

Analog to Digital Conversion

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

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

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

CENG4480 Lecture 04: Analog/Digital Conversions

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

Electronics A/D and D/A converters

Data Conversion and Lab (17.368) Fall Lecture Outline

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

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

Outline. Analog/Digital Conversion

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

A-D and D-A Converters

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

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

EECS 373 Design of Microprocessor-Based Systems

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

Digital Sampling. This Lecture. Engr325 Instrumentation. Dr Curtis Nelson. Digital sampling Sample rate. Bit depth. Other terms. Types of conversion.

Chapter 2 Signal Conditioning, Propagation, and Conversion

Digital to Analog Conversion. Data Acquisition

DATA CONVERSION AND LAB (17.368) Fall Class # 07. October 16, 2008

Embedded Systems Lecture 2: Interfacing with the Environment. Björn Franke University of Edinburgh

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

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

EEE312: Electrical measurement & instrumentation

Computerized Data Acquisition Systems. Chapter 4

Fundamentals of Data Converters. DAVID KRESS Director of Technical Marketing

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

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

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

6.111 Lecture # 15. Operational Amplifiers. Uses of Op Amps

Cyber-Physical Systems ADC / DAC

Analog to digital and digital to analog converters

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

Analog to Digital Conversion

EE 435 Switched Capacitor Amplifiers and Filters. Lab 7 Spring 2014 R 2 V OUT V IN. (a) (b)

System on a Chip. Prof. Dr. Michael Kraft

Chapter 5: Signal conversion

In this lecture. System Model Power Penalty Analog transmission Digital transmission

Chapter 2 Analog-to-Digital Conversion...

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

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

In this lecture, we will look at how different electronic modules communicate with each other. We will consider the following topics:

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820

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

ANALOGUE AND DIGITAL COMMUNICATION

The need for Data Converters

Lab Exercise 6: Digital/Analog conversion

CHAPTER ELEVEN - Interfacing With the Analog World

EECS 373 Design of Microprocessor-Based Systems

ME 461 Laboratory #3 Analog-to-Digital Conversion

Tuesday, March 1st, 9:15 11:00. Snorre Aunet Nanoelectronics group Department of Informatics University of Oslo.

Microprocessors & Interfacing

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Lecture 6: Digital/Analog Techniques

Select the Right Operational Amplifier for your Filtering Circuits

Data acquisition and instrumentation. Data acquisition

Data Acquisition: A/D & D/A Conversion

! Where are we on course map? ! What we did in lab last week. " How it relates to this week. ! Sampling/Quantization Review

Department of Mechanical and Aerospace Engineering. MAE334 - Introduction to Instrumentation and Computers. Final Examination.

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

Analytical Chemistry II

Analog to Digital Conversion

Fill in the following worksheet-style pages. A colored pen or pencil works best. The procedure is:

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

P a g e 1. Introduction

SAMPLING AND RECONSTRUCTING SIGNALS

ECEN Network Analysis Section 3. Laboratory Manual

Analog-to-Digital i Converters

University of Pittsburgh

ENGR 210 Lab 12: Analog to Digital Conversion

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Embedded System Hardware

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

Chapter 7: From Digital-to-Analog and Back Again

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

EE 230. Electronic Circuits and Systems. Randy Geiger 2133 Coover

Department of Mechanical and Aerospace Engineering. MAE334 - Introduction to Instrumentation and Computers. Final Examination.

Waveform Encoding - PCM. BY: Dr.AHMED ALKHAYYAT. Chapter Two

Theoretical 1 Bit A/D Converter

LINEAR IC APPLICATIONS

Module 1: Introduction to Experimental Techniques Lecture 2: Sources of error. The Lecture Contains: Sources of Error in Measurement

EE445L Spring 2018 Final EID: Page 1 of 7

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

Digital Fundamentals

Analogue to Digital Conversion

Electronic Systems. Dr. Kenneth Kin-Yip Wong. ENGG st Semester, Department of Electrical and Electronic Engineering

Lecture #6: Analog-to-Digital Converter

Electronics II Physics 3620 / 6620

ANALOG TO DIGITAL CONVERTER ANALOG INPUT

Electrical Engineering 40 Introduction to Microelectronic Circuits

EE 280 Introduction to Digital Logic Design

GSM BASED PATIENT MONITORING SYSTEM

Transcription:

EE251: Tuesday October 10 Analog to Digital Conversion Text Chapter 20 through section 20.2 TM4C Data Sheet Chapter 13 Lab #5 Writeup Lab Practical #1 this week Homework #4 is due on Thursday at 4:30 p.m. Lab #4 is due next week, and Lab #5 begins next week. A/D Conversion Work on this and future labs with a partner. Lecture #15 1

Extra Credit Ideas See class website BUT there are a couple of A/D converter projects that aren t too difficult and could begin very soon: 1. Use our A/D converter to measure the temperature of our TM4C processor chip. This could be instead of or in addition to Lab #5 objectives. 2. Compare/contrast the conversion formulas (analog to converter output and converter output to analog estimate) of our lecture slides with those in Zhu text. Write a paper (~5 pages) describing your conclusions. No programming is required. Interested in either one? See next slide! Lecture #15 3

Extra Credit Process IF YOU ARE INTERESTED IN doing one: 1. Look at suggestions on class website. Find an interesting project (or a few to choose from). 2. Discuss it with me: email, phone, or office hours 3. Write a proposal (½ - 1 page). 4. Submit this proposal to me for approval by October 31. 5. Complete the project (paper and demo as appropriate) by December 7. Extra credit of up to one minor grade point (e.g. B- B) will be given based on your results. Lecture #15 4

Analog-to-Digital Conversion Fundamental Concepts: Transducers We live in an analog world (except for you quantum physicists)! Physical variables require conversion to digital representation for use in digital computers. E.g.: light, pressure, temperature, position, speed, flow rate,... voltage digital rep. Requires transducer for conversion to voltage For best accuracy, we must scale the transducer output so that it fills a Conversion Window (V RH - V RL ) required by the next step in the process: conversion to digital representation. Lecture #15 5

A/D Conversion Process temperature pressure light weight Transducer Signal Conditioning Circuit voltage voltage A/D Converter Digital Value Computer airflow humidity... Such as a scale, load cell, photocell, or thermocouple A/D Conversion Window Lecture #15 6

Scaling Transducer Output Transducer output must be scaled before application to an A to D converter unit so that it will be: Always within the Range of the A/D converter (E.g. 0 to 3.3 volts on our processor chip) Fills the range of the A/D converter, so that the representation has as much resolution as possible. (E.g. If we used only 0 to 1 volts in the converter above, we d be throwing away 60% of the A/D s resolution!) Implies an Offset (to start at 0 v.) and Scaling (to end at 3.3 v.) operation--all analog. Lecture #15 7

Scaling Transducer Output Example What if our temperature transducer supplied a signal of V temp = -0.5 to + 0.5 volts, and a 0 3.3 volt A/D converter is used? We can offset and then scale: V AD = (V temp + 0.5) * 3.3 Or we can scale and then offset: V AD = 3.3*V temp + 1.65 In either case, we now have a signal that can fill the range of our 0 to 3.3 v. A/D converter. With a simple op amp circuit, there s no real choice. It does it all in the same simple circuit. Lecture #15 8

A/D Converter Operation An Analog-to-Digital (A/D) converter converts a properly scaled analog voltage into a digital number. A/D converters are classified according to several characteristics (you need to learn these) Resolution (number of bits): typically 8 bits to 24 bits Speed (samples per second): a few samples/sec to 56 billion samples/sec (fastest I ve found) Accuracy: how much absolute error there is in the conversion Excellent Wikipedia entry: Analog-to-digital converter Question: What is the difference between Resolution and Accuracy? Lecture #15 9

Sampling Examples 1KHz signal sampled at 2KHz: a problem! 4000 Signal Points are digital data, solid curve is the truth. What is the frequency? 3000 2000 1000 0 0.000 0.002 0.004 0.006 0.008 Time (sec) Lecture #15 10

Sampling Examples 2.2KHz signal sampled at 2.0KHz 4000 Signal Points are digital data, solid curve is the truth. What is the frequency? 3000 2000 1000 0 This is aliasing 0.000 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 Time (sec) Lecture #15 11

A/D Conversion Process: Sampling Rate Previous slide and strobe light examples Nyquist criterion: Sample signal at a minimum frequency of twice the highest frequency content of the sampled signal. Otherwise aliasing (translating high frequencies to low frequencies) will occur. f sample 2 f highest content Time interval between samples T sample = 1/ f sample 1/(2 f highest content ) Anti-aliasing filter solution: use a low pass filter with: f cutoff ½ f sample E.g.: Phone companies sample human voice at 8 KHz, uses 4 KHz low pass filter to prevent aliasing Trick question: Is it best to do analog or digital filtering here? Sampling rate solution: sample at frequency = 10x that contained in signal being sampled to allow good quality reproduction of analog signal. Lecture #15 12

A/D Conversion Process: Encoding Provides unique binary code for voltages in various ranges between V RH and V RL. If b= number of bits in representation, then there are n = 2 b binary codes representing ranges of voltage levels. For b=3, n=8: Code Voltage Range Represented (0-3.3 v. signal) 000 0.0000 0.4125 v. 001 0.4125 0.8250 v. 010 0.8250 1.2375 v. 011 1.2375 1.6500 v. 100 1.6500 2.0625 v. 101 2.0625 2.4750 v. 110 2.4750 2.8875 v. 111 2.8875 3.3000 v. 2 3 = 8 unique binary codes representing input voltage range Lecture #15 13

A/D Conversion Process: Quantization, Resolution, Data Rate Learn this stuff it s too easy to turn into test questions! Quantization: number of discrete levels the analog signal is divided into between V RH and V RL ( = 2 b ) More levels provide better representation of sampled signal. Example: V RH = 3.3 V and V RL = 0 V, with an 12-bit converter gives 2 12 or 4096 levels of quantization. voltage per step = (3.3 0 V)/(4096 steps) = 806 V/step What if we had an 8-bit converter instead? mv/step Resolution: Voltage range per step Resolution = (V RH - V RL )/number of steps = (V RH - V RL )/2 b Is 3.3V/4096 steps = 806 V/step in example above Data Rate: d = f s b bits/sec (average) where f s is sampling rate (in Hz) Lecture #15 14

68HC12 Dynamic Range The Dynamic Range of an A/D converter is given in decibels (db): DR(dB)=20 log(2 b ) = 20 b log(2)=6.02 b In ECE251, we round the 6.02 to 6 for computation A 12-bit A/D converter has a dynamic range of DR(dB)=6. x 12 = 72. db A 16 bit converter s dynamic range is db How many bits required to get 120 db of dynamic range? Called Dynamic Range because it s the ratio of the largest to smallest signal represented by the digital value Check Decibel on Wikipedia. It could be on a quiz. Lecture #15 15

A/D Conversion Process The Analog-to-Digital conversion process is simply sampling the scaled analog signal (typically done at regular time intervals, T s,) then converting each of the samples in real time into a binary code. Lecture #15 16

Sample and Hold Circuit The purpose of the sample and hold circuitry is to take a snapshot of the analog signal and hold that value while the A to D conversion occurs. The ADC must have a stable signal in order to accurately perform a conversion. It usually works by charging a capacitor to the input voltage, then disconnecting the capacitor from the input voltage during conversion. Requires a high inputimpedance circuit to next stage: The TM4C has a built-in sample and hold. Lecture #15 17

Choosing Sampling Time V C t = V in (1 e t T c ) Sampling Time is Software Programmable Larger sampling time Smaller sampling error Slower ADC speed Tradeoff Lecture #15 18

Comparator Functionality A comparator is used in many types of A/D converters. A comparator is the simplest interface from an analog signal to a digital signal A comparator compares two voltage values on its two inputs If the voltage on the + input is greater than the voltage on the - input, the output will be a logic high If the voltage on the + input is less than the voltage on the - input, the output will be a logic low It s really just a very high gain analog amplifier. How can we use this circuit element to create an A/D converter? (Glad you asked!) V cc V ref V in + V out Lecture #15 19

Parallel or Flash A/D Conversion A Parallel or Flash A/D converter is simple to comprehend It compares an input voltage to a several reference voltages simultaneously An n-bit flash converter uses ~2 n comparators Fast Expensive For Example, a 10-bit converter would require 1024 comparators and resistors (feasible with today s IC technology). Lecture #15 20

Slope A/D Converter A simple A/D converter can be constructed with a counter, a D/A converter, and a comparator See next slide The counter counts from 0 to 2 b 1 The counter drives the input of the D/A converter The output of the D/A converter is compared to the input voltage When the output of the comparator switches from 0 to 1, the approximated voltage has just passed the unknown voltage and the counter value is latched. Pro: Straightforward, inexpensive design Con: Slow, time-varying conversion Lecture #15 21

Slope A/D Converter V latch Lecture #15 22

Successive Approximation A/D Converter (A Good Compromise of Speed and Resolution) 1. Test whether unknown voltage is > or < half the range of A/D converter (i.e. Should most significant bit of binary representation be set?). How? Drive a D/A converter with this first approximation test Compare unknown with this approximation using a comparator. Choose 0 (V in < approximation) or 1 (V in > approximation) for most significant bit of binary representation. 2. Next, divide remaining range in half (Is 2nd most significant bit set (based on D/A converter in the middle of this new range)?). Continue the process above through all bits in binary representation. 3. Continuing to divide voltage range in half with each step is called Successive Approximation Number of bits of resolution = number of steps taken Lecture #15 23

Block Diagram of a Successive Approximation A/D Converter analog comparator + - V in (analog input) Clock Control Logic Successive approximation register (SAR) Digital-to-analog converter V RH V RL Output Latch Digital code Figure 10.2 Block diagram of a successive approximation A/D converter Lecture #15 24

Algorithm of Successive Approximation Start - Initialize the SAR register to 0. - Starting from the most significant bit of SAR and work toward the least significant bit, for each bit: 1. Guess the bit to be a 1. 2. Converts the value of the SAR to an analog voltage 3. Compares the D/A output with the analog input. 4. Clears the bit to 0 if the guess was wrong (D/A output is larger than applied voltage). i i - 1 SAR[n-1,..., 0] 0 i n - 1 SAR[i] 1 Convert the value in SAR to a voltage Is the Converted voltage greater than the input? no yes SAR[i] 0 no i = 0? yes Stop Sop Figure 10.3 Successive approximation A/D conversion method Lecture #15 25

Successive Approximation A/D Converter analog comparator + - V in (analog input) Clock Control Logic Successive approximation register (SAR) Digital-to-analog converter V RH V RL Output Latch Digital code Figure 10.2 Block diagram of a successive approximation A/D converter Lecture #15 26

Next Lecture Successive Approximation A/D Converter Our TM4C A/D Converter (a really good one) Capabilities Programming But we ve done the hard work for you! Lecture #15 27