39
Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Embed Size (px)

Citation preview

Page 1: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Chapter 15

Interfacing to the Analog World

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 2: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Digital and Analog Representations

• See Figure 15-1

• Four binary positions = 4-bit resolution– 16 different representations

• Eight binary positions = 8-bit resolution– 256 different representations

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 3: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-1

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 4: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Operational Amplifier Basics

• Very high input impedance

• Very high voltage gain

• Very low output impedance

• See Figure 15-2

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 5: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-2

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 6: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Binary-Weighted Digital-to-Analog Converters

• Sum of the currents from the input resistors

• Binary weighting factor

• See Figure 15-4

• Accurate resistances is difficult

• Practical for 4-bit conversions maximum

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 7: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-4

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 8: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

R/2R Ladder Digital-to-Analog Converters

• Only two resistor values

• 8, 10, 12, 14, 16 bits and higher resolutions

• See Figure 15-5– R/2R ladder

• See Figure 15-7– analog output versus digital input

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 9: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-5

Figure 15-7

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 10: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Integrated-Circuit Digital-to-Analog Converters

• DAC0808

• See Figure 15-8– block diagram– pin configuration– typical application

• See Figure 15-9– testing the 256-step output

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 11: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-8

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 12: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-9

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 13: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

IC Data Converter Specifications• See Figure 15-10

– differential nonlinearity– gain error– missing codes– nonmonotonic– offset error– relative accuracy– settling time– 3-bit ADC transfer characteristic

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 14: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-10

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 15: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-10 (continued)

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 16: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Parallel-Encoded Analog-to-Digital Converters

• Parallel encoding– simultaneous– multiple comparator– flash

• See Figure 15-11– three-bit parallel encoded ADC– priority encoder

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 17: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-11

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 18: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Counter-Ramp Analog-to-Digital Converters

• Counter in conjunction with a D/A converter

• See Figure 15-12

• For continuous conversions– end-of-conversion line back to clear input

• Disadvantage– slow conversion time– speed depends on steps necessary to convert

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 19: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-12

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 20: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Successive-Approximation Analog-to-Digital Conversion

• See Figure 15-13

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 21: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-13

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 22: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Integrated-Circuit Analog-to-Digital Converters

• NE5034– See Figure 15-15

• block diagram

• pin configuration

– Successive-Approximation– Three-state output buffer

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 23: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-15

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 24: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Integrated-Circuit Analog-to-Digital Converters

• ADC 0801– See Figure 15-17

• block diagram

• pin configuration

– successive-approximation– differential measurements

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 25: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-17

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 26: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Data Acquisition System Application

• See Figure 15-19– Analog Multiplexer Switch (AM3705)– Sample-and-Hold Circuit (LF198)– Programmable-Gain Instrumentation Amplifier

(LH0084)– Analog-to-Digital Converter (ADC0801)

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 27: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-19

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 28: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Transducers and Signal Conditioning

• Physical quantities to electrical quantities

• Must be conditioned

• Thermistors– resistance dependant on temperature– response is nonlinear– See Figure 15-20 - characteristic curve– See Figure 15-21 - circuit

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 29: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Figure 15-20

Figure 15-21

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 30: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Transducers and Signal Conditioning

• Linear IC Temperature Sensors– See Table 15-3 - temperature versus binary

output

• The Strain Gage– resistance changes when stretched

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 31: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 32: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary

• Any analog quantity can be represented by a binary number. Longer binary numbers provide higher resolution, which gives a more accurate representation of the analog quantity.

• The binary-weighted D/A converter is the simplest to construct, but it has practical limitations in resolution (number of input bits).

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 33: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary• Operational amplifiers are important building

blocks in analog-to-digital (A/D) and digital-to-analog (D/A) converters. They provide a means for summing currents at the input and converting a current to a voltage at the output of converter circuits.

• The R/2R ladder D/A converter uses only two different resistor values, no matter how many binary input bits are included. This allows for very high resolution and ease of fabrication in integrated-circuit form.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 34: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary

• The DAC0808 (or MC1408) IC is an 8-bit D/A converter that uses the R/2R ladder method of conversion. It accepts 8 binary input bits and outputs an equivalent analog current. Having 8 input bits means that it can resolve up to 256 unique binary values into equivalent analog values.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 35: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary

• Applying an 8-bit counter to the input of an 8-bit D/A converter will produce a 256-step sawtooth waveform at its output.

• The simplest way to build an analog-to-digital (A/D) converter is to use the parallel encoding method. The disadvantage is that it is practical only for low-resolution applications.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 36: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary

• The counter-ramp A/D converter employs a counter, a D/A converter, and a comparator to make its conversion. The counter counts from zero up to a value that causes the D/A output to exceed the analog input value slightly. That binary count is then output as the equivalent to the analog input.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 37: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary• The method of A/D conversion used most

often is called successive approximation. In this method, successive bits are tested to see if they contribute an equivalent analog value that is greater than the analog input to be converted. If they do, they are returned to zero. After all bits are tested, the ones that are left ON are used as the final digital equivalent to the analog input.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 38: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary

• The NE5034 and the ADC0804 are examples of A/D converter ICs. To make a conversion, the start-conversion pin is made LOW. When the conversion is completed the end-of-conversion pin goes LOW. Then to read the digital output, the output enable pin is made LOW.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 39: Chapter 15 Interfacing to the Analog World William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc

Summary• Data acquisition systems are used to read

several different analog inputs, respond to the values read, store the results, and generate reports on the information gathered.

• Transducers are devices that convert physical quantities such as heat, light, or force into electrical quantities. Those electrical quantities must then be conditioned (or modified) before they can be interpreted by a digital computer.

William KleitzDigital Electronics with VHDL, Quartus® II Version

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.