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

Similar documents
Analog to Digital Conversion

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

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

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

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

A-D and D-A Converters

Digital to Analog Conversion. Data Acquisition

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

Electronics A/D and D/A converters

CENG4480 Lecture 04: Analog/Digital Conversions

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

Microprocessors & Interfacing

P a g e 1. Introduction

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

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

Lab Exercise 6: Digital/Analog conversion

ANALOGUE AND DIGITAL COMMUNICATION

Analog to Digital Converters

Data Acquisition: A/D & D/A Conversion

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

CHAPTER ELEVEN - Interfacing With the Analog World

PHYS225 Lecture 22. Electronic Circuits

Chapter 2 Signal Conditioning, Propagation, and Conversion

Cyber-Physical Systems ADC / DAC

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

University of Pennsylvania. Department of Electrical and Systems Engineering. ESE Undergraduate Laboratory. Analog to Digital Converter

System on a Chip. Prof. Dr. Michael Kraft

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

Care and Feeding of the One Bit Digital to Analog Converter

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

for amateur radio applications and beyond...

INTRODUCTION TO COMMUNICATION SYSTEMS LABORATORY IV. Binary Pulse Amplitude Modulation and Pulse Code Modulation

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

Lecture #6: Analog-to-Digital Converter

Enhancing Analog Signal Generation by Digital Channel Using Pulse-Width Modulation

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

EE 210 Lab Exercise #4 D/A & A/D Converters

The need for Data Converters

Care and Feeding of the One Bit Digital to Analog Converter

Electronics II Physics 3620 / 6620

Analog to Digital Conversion

EEE312: Electrical measurement & instrumentation

ME 461 Laboratory #3 Analog-to-Digital Conversion

Computerized Data Acquisition Systems. Chapter 4

Analyzing A/D and D/A converters

Analog-Digital Interface

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

Chapter 5: Signal conversion

EE251: Tuesday October 10

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

Outline. Analog/Digital Conversion

BINARY AMPLITUDE SHIFT KEYING

The University of Texas at Arlington Lecture 10 ADC and DAC

Instructor: Dr. Phillip Jones

Reading: Schwarz and Oldham (light on non-ideal) and comparator viewgraphs. Lecture 14: October 17, 2001

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

SAMPLING AND RECONSTRUCTING SIGNALS

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

Overview. Lecture 3. Terminology. Terminology. Background. Background. Transmission basics. Transmission basics. Two signal types

CprE 288 Introduction to Embedded Systems (Analog-to-Digital Converter)

Direct Digital Synthesis Primer

ECE 6770 FINAL PROJECT

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

Chapter Two. Fundamentals of Data and Signals. Data Communications and Computer Networks: A Business User's Approach Seventh Edition

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Lab 7: DELTA AND SIGMA-DELTA A/D CONVERTERS

Analog ó Digital Conversion Sampled Data Acquisition Systems Discrete Sampling and Nyquist Digital to Analog Conversion Analog to Digital Conversion

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

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

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

ME 461 Laboratory #2 Timers and Pulse-Width Modulation

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

IES Digital Mock Test

High Group Hz Hz. 697 Hz A. 770 Hz B. 852 Hz C. 941 Hz * 0 # D. Table 1. DTMF Frequencies

DIGITAL FILTERING OF MULTIPLE ANALOG CHANNELS

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

I hope you have completed Part 2 of the Experiment and is ready for Part 3.

University of Pittsburgh

PC-based controller for Mechatronics System

Section 1. Fundamentals of DDS Technology

Capacitive Touch Sensing Tone Generator. Corey Cleveland and Eric Ponce

Analogue to Digital Conversion

Data Converters. Lecture Fall2013 Page 1

ECE 271 Microcomputer Architecture and Applications University of Maine

Analog to digital and digital to analog converters

Chapter 2 Analog-to-Digital Conversion...

Interfacing a Microprocessor to the Analog World

SIGMA-DELTA CONVERTER

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

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

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

Data Conversion and Lab (17.368) Fall Lecture Outline

L9: Analog Building Blocks (OpAmps, A/D, D/A)

UNIVERSITY OF CALIFORNIA. EECS 145M: Microcomputer Interfacing Lab

High-Speed Analog to Digital Converters. ELCT 1003:High Speed ADCs

Embedded System Hardware

Standard single-purpose processors: Peripherals

1. R-2R ladder Digital-Analog Converters (DAC). Connect the DAC boards (2 channels) and Nexys 4 board according to Fig. 1.

DTMF Detection and Generation Virtual Peripheral Modules

MARMARA UNIVERSITY CSE315 DIGITAL DESIGN LABORATORY MANUAL. EXPERIMENT 7: Analog-to-Digital Conversion. Research Assistant Müzeyyen KARAMANOĞLU

Transcription:

ECE 280 / CSE 280 Digital Design Laboratory Lecture 7 A/D and D/A

Analog/Digital Conversion A/D conversion is the process of sampling a continuous signal Two significant implications 1. The information content of the sampled signal is less than the continuous signal The continuous signal contains an infinite number of independent samples, the sampling process reduces that to a finite number of independent samples 2. Uncertainty is added to the sampled data. Quantization error is part of the sampling process since the number of intervals is finite. This is analogous to truncating a number after a specific number of places

Analog-to-digital converters V max = 7.5V 7.0V 6.5V 6.0V 5.5V 5.0V 4.5V 4.0V 3.5V 3.0V 2.5V 2.0V 1.5V 1.0V 0.5V 0V 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000 analog input (V) 4 3 2 1 time t1 t2 t3 t4 0100 1000 0110 0101 Digital output analog output (V) 4 3 2 1 t1 t2 t3 t4 time 0100 1000 0110 0101 Digital input proportionality analog to digital digital to analog Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis

Analog/Digital Conversion Example Number of bits = 3 Number of intervals = 2 3 Range = 0-10 volts Resolution= 1.25 volts Quantization error= +/-.625 volts Variance =(1.25) 2 /12=.130 volts 2

Proportional Signals Simple Equation Assume minimum voltage of 0 V. V max = maximum voltage of the analog signal a = analog value n = number of bits for digital encoding 2 n = number of digital codes M = number of steps, either 2 n or 2 n 1 d = digital encoding a / V max = d / M Vmax 1..1 = 2 n -1 0 V 0..0 = 0

DAC vs. ADC DAC: n digital inputs for digital encoding d analog input for V max analog output a ADC: Given a V max analog input and an analog input a,, how does the converter know what binary value to assign to d in order to satisfy the ratio? Try and build circuitry that converts directly from a to d Not easy Use a guessing mechanisum Use DAC to generate analog values for comparison with a ADC guesses an encoding d,, then checks its guess by inputting d into the DAC and comparing the generated analog output a with original analog input a How does the ADC guess the correct encoding?

Bit Weight Each bit is weighted with an analog value, such that a 1 in that bit position adds its analog value to the total analog value represented by the digital encoding. Example: -5 V to +5 V analog range, n=8 Digital Bit 7 6 5 4 3 2 1 0 Bit Weight (V) 10/2 = 5 10/4 = 2.5 10/8 = 1.25 10/16 = 0.625 10/32 = 0.313 10/64 = 0.157 10/128 = 0.078 10/256 = 0.039

Bit Weight Example (continued): -5 V to +5 V analog range, n=8 Digital numbers for a few analog values Values shown increment by 6 bits (weight for bit position 5 is 1.25 V) Maximum digital number only approximates the maximum analog value in the range Try (-5) + sum of all bit weights Analog (V) -5-3.75-2.5-1.25 0 1.25 2.5 3.75 5-0.039 = 4.961 Digital (hex) 00 20 40 60 80 A0 C0 E0 FF

DAC: Binary weighted input Use inverting sum configuration of feedback opamps V 1 R R V 2 - V out = -V 1 - V 2 + R

DAC: Binary weighted input From AllAboutCircuits.com 2003

DAC: Binary weighted input Digital Input 000 001 010 011 100 101 110 111 Analog Voltage 0.00V -1.25V -2.50V -3.75V -5.00V -6.25V -7.50V -8.75V

DAC: Binary weighted input Feedback resistor can be adjusted to change output voltage range DAC is highly sensitive to changes in resistor values All digital inputs must deliver the same voltage level for a logical high I.e. if bit 0 is 5.02V for a logical high, then bit 1 should be 5.02V as well - not 4.99V

ADC: Direct conversion Flash ADC Parallel ADC From AllAboutCircuits.com 2003

ADC: Digital Encoding Guessing the encoding is similar to finding an item in a list. 1. Sequential search counting up: start with an encoding of 0, then 1, then 2, etc. until find a match. 2 n comparisons: Slow! 2. Binary search successive approximation: start with an encoding for half of maximum; then compare analog result with original analog input; if result is greater (less) than the original, set the new encoding to halfway between this one and the minimum (maximum); continue dividing encoding range in half until the compared voltages are equal n comparisons: Faster, but more complex converter Takes time to guess the encoding: start conversion input, conversion complete output

ADC: Sequential Search Digital Ramp ADC

ADC: Digital Ramp ADC From AllAboutCircuits.com 2003

ADC: Binary Search Successive Approximation

ADC: Successive Approximation From AllAboutCircuits.com 2003

ADC: Successive Approximation Given an analog input signal whose voltage should range from 0 to 15 volts, and an 8-bit digital encoding, calculate the correct encoding for 5 volts. Then trace the successive-approximation approach to find the correct encoding. 5/15 = d/(2 8-1) d= 85 Encoding: 01010101 Successive-approximation method M should be 2 n 1/2(V max + V min ) = 7.5V V max = 7.5 volts. 0 0 0 0 0 0 0 0 1/2(5.63 + 4.69) = 5.16V V max = 5.16 volts. 0 1 0 1 0 0 0 0 1/2(7.5 + 0) = 3.75V V min = 3.75 volts. 0 1 0 0 0 0 0 0 1/2(5.16 + 4.69) = 4.92V V min = 4.92 volts. 0 1 0 1 0 1 0 0 1/2(7.5 + 3.75) = 5.63V V max = 5.63 volts 0 1 0 0 0 0 0 0 1/2(5.16 + 4.92) = 5.04V V max = 5.04 volts. 0 1 0 1 0 1 0 0 1/2(5.63 + 3.75) = 4.69V V min = 4.69 volts. 0 1 0 1 0 0 0 0 1/2(5.04 + 4.92) = 4.98V 0 1 0 1 0 1 0 1 Embedded Systems Design: A Unified Hardware/Software Introduction, (c) 2000 Vahid/Givargis

Analog/Digital Conversion Sampling Frequency Shannon s s Theorem Must sample at 2*f max to preserve information Nyquist Bandwidth Undersampling can cause aliasing in the frequency spectrum CD sampling frequency of 44.1KHz to capture all human- audible sound below 22KHz Different concept than MP3 bit rates

Terms & Equations Offset:: minimum analog value Span (or Range): difference between maximum and minimum analog values n:: number of bits in digital code (sometimes referred to as n-bit resolution) Bit Weight: : analog value corresponding to a bit in the digital number Step Size (or Resolution): : smallest analog change resulting from changing one bit in the digital number, or the analog difference between two consecutive digital numbers; also the bit weight of the LSB StepSize = Span 2 n Quantization Error: Maximum error due to a/d translation QuantizationError = ±StepSize 2 AV = DN StepSize + Offset = DN Span + Offset 2 n DN = AV Offset StepSize = (AV Offset) 2 n Span

FPGA DAC Can not use analog techniques Use digital techniques to generate a sequence of pulses - pulse width modulation (PWM) Pass through a low-pass filter to generate the analog signal

FPGA DAC PWM From 2816A-FPLSI Application Note Atmel

FPGA DAC PWM d is the duty cyle V is the maximum value f (t) = a 0 2 + a n cos 2nπt + b n sin 2nπt T T = 1 T Td 2 Td 2 n=1 Vdt + 2 T n=1 Td 2 n=1 Td 2 = Vd + 4Vd sin nπd a n = 2 T b n = 2 T V cos 2nπt dt cos 2nπt + T T ( ) cos 2nπt T T 2 T 2 T 2 T 2 Td 2 Td 2 f (t)cos 2nπt dt T f (t)sin 2nπt dt T V sin 2nπt dt sin 2nπt T T

FPGA DAC FPGA Low-Pass Filter Sampling Frequency = f CLK 2 n 16-bit 44KHz CD sampling would require a 2.9GHz clock

Lab 6 DTMF Tone Generator 1209 Hz 1336 Hz 1477 Hz _ ABC DEF 697 Hz 1 2 3 _ GHI JKL MNO 770 Hz 4 5 6 _ PRS TUV WXY 852 Hz 7 8 9 _ 941 Hz * 0 # _

Lab 6 DTMF Tone Generator Keyboard reader Use from previous lab Should generate Ascii_available interrupt State machine Wait for ascii_available signal and then store ascii data

Lab 6 Signal Generator Use clock divider to generate 7 square waves Square waves are not ideal since they have higher frequency harmonics Optionally create a sine wave using a lookup table Use stored ascii data from state machine to decide which row and column frequencies to use Use adder to sum waves from row and column

Lab 6 PWM Module Take in an input value with sufficient resolution (4- bits minimum) Output a single waveform adjusting pulse widths based on the input value Speaker Module Must be connected to PIM which is connected to the B1 header Use data pin 1 for the speaker data Speaker module contains a low pass filter for PWM filtering.