1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 11: Sampling, ADCs, and DACs Oct 9, 2012 Slides adapted from.

Slides:



Advertisements
Similar presentations
Lecture 17: Analog to Digital Converters Lecturers: Professor John Devlin Mr Robert Ross.
Advertisements

EET 252 Unit 6 Analog-to-Digital Conversion
Digital to Analog and Analog to Digital Conversion
Announcements Assignment 8 posted –Due Friday Dec 2 nd. A bit longer than others. Project progress? Dates –Thursday 12/1 review lecture –Tuesday 12/6 project.
CE 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Analog to Digital (and back again) Interfacing a microprocessor-based system.
4-Integrating Peripherals in Embedded Systems (cont.)
5/4/2006BAE Analog to Digital (A/D) Conversion An overview of A/D techniques.
Lecture 9: D/A and A/D Converters
2008EECS Dealing with Analog Signals A Microcontroller View Jonathan Hui University of California, Berkeley.
Mixed Signal Chip Design Lab Analog-to-Digital Converters Jaehyun Lim, Kyusun Choi Department of Computer Science and Engineering The Pennsylvania State.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 11: Sampling, ADCs, and DACs Oct 12, 2010 Slides adapted.
Analogue to Digital Conversion
Interfacing Analog and Digital Circuits
DIGITAL SYSTEMS TCE INTERFACING WITH ANALOG DEVICES (Week 12)
Current-Mode Multi-Channel Integrating ADC Electrical Engineering and Computer Science Advisor: Dr. Benjamin J. Blalock Neena Nambiar 16 st April 2009.
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.
Day of Miscellany ADC/DAC I2C Student presentations.
Embedded Systems Development and Applications
Introduction to Data Conversion
EET260: A/D and D/A converters
Lecture 9 Sensors, A/D, sampling noise and jitter Forrest Brewer.
Lecture 31 Electrical Instrumentation. Lecture 32 Electrical Instrumentation Electrical instrumentation is the process of acquiring data about one or.
Lecture161 Instrumentation Prof. Phillips March 14, 2003.
Introduction to Analog-to-Digital Converters
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 11: Sampling, ADCs, and DACs Oct 11, 2011 Slides adapted.
CMOS VLSIAnalog DesignSlide 1 CMOS VLSI Analog Design.
1 Digital to Analog Converter Nov. 1, 2005 Fabian Goericke, Keunhan Park, Geoffrey Williams.
Digital to Analog Converters
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Sampling, ADCs, and DACs Some slides adapted from Mark Brehob, Jonathan.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Sampling, ADCs, and DACs and more Some slides adapted from Prabal.
Computer Data Acquisition and Signal Conversion Chuck Kammin ABE 425 March 27, 2006.
ELECTRONICS PRIMER. Assignment: WEB-based Electronics Tutorial Basic definitions Components Ohm's Law LEDs and Transistors Additional electronics tutorials.
Digital to Analog Converters
Understanding ADC Specifications September Definition of Terms 000 Analogue Input Voltage Digital Output Code FS1/2.
1 4-Integrating Peripherals in Embedded Systems (cont.)
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
ELN5622 Embedded Systems Class 7 Spring, 2003 Aaron Itskovich
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Sampling, ADCs, and DACs and more Some slides adapted from Prabal.
Data Acquisition ET 228 Chapter 15 Subjects Covered Analog to Digital Converter Characteristics Integrating ADCs Successive Approximation ADCs Flash ADCs.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Sampling, ADCs, and DACs Some slides adapted from Mark Brehob, Jonathan.
CSCI1600: Embedded and Real Time Software Lecture 14: Input/Output II Steven Reiss, Fall 2015.
Analog/Digital Conversion
Digital to Analog Converter (DAC)
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Sampling, ADCs, and DACs and more Some slides adapted from Prabal.
Introduction to Data Conversion EE174 – SJSU Tan Nguyen.
Lecture Notes / PPT UNIT III
Analog-Digital Conversion. Other types of ADC i. Dual Slope ADCs use a capacitor connected to a reference voltage. the capacitor voltage starts at zero.
Analog-Digital Conversion. Analog outputs from sensors and analog front- ends (analog signal conditioning) have to be converted into digital signals.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 13 Interfacing with the Analog World.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 10: Digital Systems by Muhazam Mustapha, December 2011.
MECH 373 Instrumentation and Measurements
ECE 3430 – Intro to Microcomputer Systems
Analog-Digital Conversion
EI205 Lecture 13 Dianguang Ma Fall 2008.
Digital Control Systems Waseem Gulsher
Digital Acquisition of Analog Signals – A Practical Guide
Summary.
EECS 373 Design of Microprocessor-Based Systems Mark Brehob
Lesson 8: Analog Signal Conversion
CSCI1600: Embedded and Real Time Software
EECS 373 Design of Microprocessor-Based Systems A day of Misc. Topics
Conversation between Analogue and Digital System
Analog-to-digital converter
Chapter 7 Converters.
CSCI1600: Embedded and Real Time Software
Presentation transcript:

1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 11: Sampling, ADCs, and DACs Oct 9, 2012 Slides adapted from Mark Brehob, Jonathan Hui & Steve Reinhardt

2 Announcements Office Hours: –3:30-4:30pm today in 4773 BBB –Postponed, due to a talk at WIM2 IAB Practice Midterm/Homework 2 posted –Due just before exam Midterm Exam: –Thu, Oct 18 –In class, 80 minutes –Closed book, closed notes –ARM instruction set cheat sheet allowed/provided

3 Midcourse Feedback and Corrections Lot’s of content. Needs better organization. – –Will focus more on fundamentals and conceptual overviews (e.g. anatomy of a timer) Balance generality vs specificity, Emphasize more concepts, and Datasheets: the good and bad –Building embedded systems requires mastering the details, requires an ability to read datasheets –But, we will focus more on fundamentals and conceptual overviews (e.g. anatomy of a timer) Avoid ratholes during lecture –Going into some depth, and allowing fluid discussion is good. –However, we’ll cut off discussions when they appear to be headed down a rathole Lecture notes would be great, especially for some of the more technical topics –Here’s some. I’ll write a couple more, but they do take a lot of time, so don’t expect miracles: – – – Suggested readings/timeline –TODO: Will augment syllabus with background/additional readings

4 Midcourse Feedback and Corrections Just wanted to pass on some feedback I've received from the students. I'd appreciate any thoughts that you might have about these concerns, and your ideas on how we might be able to address them. 1. The labs don't appear to be debugged, and the students feel like they're doing the quality control. 2. Some labs are poorly worded and hence difficult to read/understand. 3. Most labs need a more holistic overview and a better roadmap. 4. It would be better if the source code we not "cut and paste" from the lab HTML. Two alternative were suggested: a. Enter the "code snippets" into individual files and provide download links (preferred by some). b. Collect all of the "code snippets" for a lab into a single download and provide a link (preferred by some). 5. Labs should require fewer “clicks” to navigate

5 Outline Announcements Sampling DACs ADCs & Errors

6 We live in an analog world Everything in the physical world is an analog signal –Sound, light, temperature, pressure Need to convert into electrical signals –Transducers: converts one type of energy to another Electro-mechanical, Photonic, Electrical, … –Examples Microphone/speaker Thermocouples Accelerometers

7 Transducers convert one form of energy into another Transducers –Allow us to convert physical phenomena to a voltage potential in a well-defined way. A transducer is a device that converts one type of energy to another. The conversion can be to/from electrical, electro-mechanical, electromagnetic, photonic, photovoltaic, or any other form of energy. While the term transducer commonly implies use as a sensor/detector, any device which converts energy can be considered a transducer. – Wikipedia.

8 Convert light to voltage with a CdS photocell V signal = (+5V) R R /(R + R R ) Choose R=R R at median of intended range Cadmium Sulfide (CdS) Cheap, low current t RC = C l *(R+R R ) –Typically R~50-200k  –C~20pF –So, t RC ~20-80uS –f RC ~ 10-50kHz Source: Forrest Brewer

Many other common sensors (some digital) Force –strain gauges - foil, conductive ink –conductive rubber –rheostatic fluids Piezorestive (needs bridge) –piezoelectric films –capacitive force Charge source Sound –Microphones Both current and charge versions –Sonar Usually Piezoelectric Position –microswitches –shaft encoders –gyros Acceleration –MEMS –Pendulum Monitoring – Battery-level voltage – Motor current Stall/velocity – Temperature Voltage/Current Source Field –Antenna –Magnetic Hall effect Flux Gate Location –Permittivity –Dielectric Source: Forrest Brewer

10 Going from analog to digital What we want How we have to get there SoftwareSensorADC Physical Phenomena Voltage or Current ADC Counts Engineering Units Physical Phenomena Engineering Units

11 Representing an analog signal digitally How do we represent an analog signal? –As a time series of discrete values  On MCU: read the ADC data register periodically V Counts

12 Choosing the vertical range What do the sample values represent? –Some fraction within the range of values  What range to use? Range Too Small Range Too Big Ideal Range

13 Choosing the horizontal granularity Resolution –Number of discrete values that represent a range of analog values –MSP430: 12-bit ADC 4096 values Range / 4096 = Step Larger range  less information Quantization Error –How far off discrete value is from actual –½ LSB  Range / 8192 Larger range  larger error

14 Converting between voltages, ADC counts, and engineering units Converting: ADC counts  Voltage Converting: Voltage  Engineering Units

15 A note about sampling and arithmetic Converting values in 16-bit MCUs vtemp = adccount/4095 * 1.5; tempc = (vtemp-0.986)/ ;  tempc = 0 Fixed point operations –Need to worry about underflow and overflow Floating point operations –They can be costly on the node

16 Choosing the sample rate What sample rate do we need? –Too little: we can’t reconstruct the signal we care about –Too much: waste computation, energy, resources Example: 2-bytes per sample, 4 kHz  8 kB / second

17 Shannon-Nyquist sampling theorem If a continuous-time signal contains no frequencies higher than, it can be completely determined by discrete samples taken at a rate: Example: –Humans can process audio signals 20 Hz – 20 KHz –Audio CDs: sampled at 44.1 KHz

18 Use anti-aliasing filters on ADC inputs to ensure that Shannon-Nyquist is satisfied Aliasing –Different frequencies are indistinguishable when they are sampled. Condition the input signal using a low-pass filter –Removes high-frequency components –(a.k.a. anti-aliasing filter)

19 Designing the anti-aliasing filter Note  is in radians  = 2  f Exercise: Find an R+C pair so that the half-power point occurs at 30 Hz

20 Can use dithering to deal with quantization Dithering –Quantization errors can result in large-scale patterns that don’t accurately describe the analog signal –Introduce random (white) noise to randomize the quantization error. Direct Samples Dithered Samples

Lots of other issues Might need anti-imaging filter Cost and power play a role Might be able to avoid analog all together –Think PWM when dealing with motors… 21

22 Outline Announcements Sampling DACs ADCs

23 A decoder-based DAC architecture in linear and folded forms

24 A binary-scaled DAC architecture in linear and folded forms Much more efficient Monotonicity not guaranteed May experiences glitches

DAC #1: Voltage Divider 2-to-4 decoder 2 Din Vout Fast Size (transistors, switches)? Accuracy? Monotonicity? Vref R R R R

DAC #2: R/2R Ladder D3 (MSB)D2D1D0 (LSB) 2R RRR Iout Vref Size? Accuracy? Monotonicity? (Consider > 1000)

27 DAC output signal conditioning Often use a low-pass filter May need a unity gain op amp for drive strength

28 Outline Announcements Sampling DACs ADCs

ADC #1: Flash Vref R R R R Vin +_+_ priority encoder Vcc 2 Dout +_+_ +_+_

ADC #2: Single-Slope Integration +_+_ Vin n-bit counter CLK EN* Vcc done Start: Reset counter, discharge C. Charge C at fixed current I until Vc > Vin. How should C, I, n, and CLK be related? Final counter value is Dout. Conversion may take several milliseconds. Good differential linearity. Absolute linearity depends on precision of C, I, and clock. C I

ADC #3: Successive Approximation (SAR) 1 Sample  Multiple cycles Requires N-cycles per sample where N is # of bits Goes from MSB to LSB Not good for high-speed ADCs

Errors and ADCs Figures and some text from: –Understanding analog to digital converter specifications. By Len Staller – Key concept here is that the specification provides worst case values.

Sometimes the intentional ½ LSB shift is included here!

DNL value given in a spec is the worst-case (Same with all the others…) Differential non-liniearity

Full-scale error is also sometimes called “gain error” full-scale error is the difference between the ideal code transition to the highest output code and the actual transition to the output code when the offset error is zero.

The integral nonlinearity (INL) is the deviation of an ADC's transfer function from a straight line. This line is often a best-fit line among the points in the plot but can also be a line that connects the highest and lowest data points, or endpoints. INL is determined by measuring the voltage at which all code transitions occur and comparing them to the ideal. The difference between the ideal voltage levels at which code transitions occur and the actual voltage is the INL error, expressed in LSBs. INL error at any given point in an ADC's transfer function is the accumulation of all DNL errors of all previous (or lower) ADC codes, hence it's called integral nonlinearity.

39 Questions? Comments? Discussion?