Upload
preston-wade
View
216
Download
0
Tags:
Embed Size (px)
Citation preview
Digital and Analog
◊ Digital systems are discrete, meaning they have a finite numerical value. Sometimes referred to as “fixed” or “stepped” values.
◊ Analog values are continuous, meaning they have a value that can vary continuously. The values can be to a great degree of precision and may contain more information such as frequency, phase, etc…
◊ Analog values make up real-world values that can be measured.
◊ This presentation describes methods for converting digital values to analog values.
DAC 1.2
Digital to Analog
◊ Digital electronics offers advantages over analog in processing, data manipulation, storage and analysis of values.
◊ Often these digital circuits must interface with the real world:◊ as inputs to analyze, process and manipulate◊ as outputs to control the physical environment
◊ It is important to establish a means of converting between digital systems and the real world.
DAC 1.3
Transducers
◊ Transducers are devices that convert physical quantities into electrical quantities. There are many possible physical measurements requiring many types of transducers:◊ Light◊ Pressure◊ Speed◊ Flow◊ Angle◊ Temperature◊ Rotation◊ Vibration◊ Sound, …
DAC 1.4
Images from MSclipart (now Bing). Source & copyright status unknown!
◊ Actuators are electrically controlled devices that control the physical environment. There are many types of actuators available. These include:◊ motors◊ solenoids (electromagnetic non-rotational motion)◊ relays◊ pumps◊ valves◊ lifts◊ heaters◊ lights◊ acoustic devices, …
Actuators
DAC 1.5
Images from MSclipart (now Bing). Source & copyright status unknown!
Analog versus Digital
000000100000010000101000101000011010010011001110101000100000101000101000011010010011001110101000100000001000010100000010000101000101000011010010011001110101000100001010000110100100110011101010001010111011011010001001
Original Analog signal
Distorted Analog signal
Binary signal
A to A
A to D
DAC 1.6
Analog to Digital
Original Analog signal
Binary signal
A to D Conversion
000100110111101010001000111000000100000010011100101001001011101011110010101010010101010101001001010101001000101001010101111010000001001011101011101000000010101110101010000000000001001111010000000000000111111010000000000001010101010000000000001011011101000000000001101101100000000001100010111010000000100011111010110000001001010101000100000001010111101111000000011001101010100101000110111000010100101
…
The voltage is converted to a binary value at regular intervals.
AnimatedDAC 1.7
Digital to Analog
Digital signal
Analog signalD to A Conversion
000100110111101010001000111000000100000010011100101001001011101011110010101010010101010101001001010101001000101001010101111010000001001011101011101000000010101110101010000000000001001111010000000000000111111010000000000001010101010000000000001011011101000000000001101101100000000001100010111010000000100011111010110000001001010101000100000001010111101111000000011001101010100101000110111000010100101
…
The binary value is converted to a voltage at regular intervals.
Animated DAC 1.8
Digital to Analog
◊ We will begin looking at converting binary and analog values from the perspective of the actuator; we will look at digital to analog converters.
◊ There are several ways to implement such a system. This presentation will look at several of these systems.
◊ It is important to understand their basic operation to determine a circuit fault.
DAC 1.9
DAC Challenges
◊ Digital to Analog Converters take a digital value and convert it to voltage or current over time.
◊ Converting discrete (digital) values to analog values has some challenges. ◊ Since the digital values have discrete steps, the steps
and the values between the steps cannot always be completely and accurately represented in analog.
◊ How well a digital value creates an analog value depends on the number of bits that are used. Fewer bits means less resolution.
DAC 1.10
Scaling
◊ The range of the available digital values represents the scale. It is based on the number of bits in the binary number.
◊ Scale is referred to as Resolution in DACs.
◊ DACs have two extremes in output values: zero and full-scale output. Knowing these two extremes and the number of unique digital outputs in between, the resolution of a circuit can therefore be determined.
DAC 1.11
Resolution Example
D C B A VOUT
0 0 0 0 0.0
0 0 0 1 0.5
0 0 1 0 1.0
0 0 1 1 1.5
0 1 0 0 2.0
0 1 0 1 2.5
0 1 1 0 3.0
0 1 1 1 3.5
1 0 0 0 4.0
1 0 0 1 4.5
1 0 1 0 5.0
1 0 1 1 5.5
1 1 0 0 6.0
1 1 0 1 6.5
1 1 1 0 7.0
1 1 1 1 7.5
DAC
DCBA
MSB
LSB
Min VOUT = 0VMax VOUT = 7.5V
VOUT
There are 16 values from 0000 to 1111, but the first step (0000) equals 0V. Therefore there are 15 steps.
If the maximum output is 7.5 Volts (input 1111), the calculated scale will be 0.5 Volts per binary increment.
Min
bin
ary
= 0
000
Max b
inary
= 1
111
DAC 1.12
Resolution Example
◊ Analyzing the voltage output from the example it becomes evident that the output voltage, although analog, still follows a pattern of discrete values.
DAC 1.13
Resolution
◊ The resolution represents the smallest change, or step, in the analog output. The greater the resolution, the smaller the steps.
◊ To increase resolution increase the number of bits in the binary value.
◊ In our example, a 4-bit number represented a 0.5 volt change per step. By increasing the number to 5 bits, each change would represent approximately 0.25 volt change per step, increasing the resolution.
DAC 1.14
Improved Resolution
◊ By increasing the binary number size by one bit the voltage between steps decreases.
E D C B A VOUT
0 0 0 0 0 0.00
0 0 0 0 1 0.25
0 0 0 1 0 0.50
0 0 0 1 1 0.750 0 1 0 0 1.00
0 0 1 0 1 1.25
0 0 1 1 0 1.50
0 0 1 1 1 1.75
0 1 0 0 0 2.00
0 1 0 0 1 2.25
0 1 0 1 0 2.500 1 0 1 1 2.75
0 1 1 0 0 3.00
0 1 1 0 1 3.25
0 1 1 1 0 3.50
0 1 1 1 1 3.75
1 0 0 0 0 4.001 0 0 0 1 4.25
1 0 0 1 0 4.50
1 0 0 1 1 4.75
1 0 1 0 0 5.00
1 0 1 0 1 5.25
1 0 1 1 0 5.50
1 0 1 1 1 5.751 1 0 0 0 6.00
1 1 0 0 1 6.25
1 1 0 1 0 6.50
1 1 0 1 1 6.75
1 1 1 0 0 7.00
1 1 1 0 1 7.25
1 1 1 1 0 7.501 1 1 1 1 7.75
4-bit resolution 5-bit resolution
DAC 1.15
Resolution
◊ Volts per step is calculated as the full scale voltage divided by the number of steps.
◊ A percent resolution is the percent of output voltage change with one step. It is simply calculated as 1/(2N -1) where N represents how many bits in the binary number.
◊ Discussion: assuming 12V out on a full scale, what is the resolution of:◊ 8-bit value ◊ 16-bit value◊ 20-bit value
DAC 1.16
Bipolar DAC
◊ The examples shown so far represented positive digital values. Analog values can be negative or positive.
◊ To represent a negative value two popular numbering systems are used:◊ signed magnitudes◊ 2’s compliment values
DAC 1.17
Signed Magnitude
◊ Binary systems utilize only 1’s and 0’s. The negative symbol cannot be used.
◊ In a signed magnitude value, the bit in the leftmost position of a binary number is used to indicate if the value is positive or negative. This is the sign bit. The value following the sign bit is the magnitude.
01001101 = positive value, 10011012
11001101 = negative value, 10011012
The leftmost bit is the sign bit.
DAC 1.18
2’s Compliment
◊ In Binary there is an interesting principle.◊ If each digit of a binary number is inverted and a 1 is
added to the number, the new value is the “negative equivalent” of it.
◊ 2’s compliment example:
DAC 1.19
1100 is 12
0011 is 31100 is 1’s compliment1101 is 2’s compliment
Note the extra bit is always disregarded
12- 3 9
DAC DEVICES
DAC 1.20
DAC Devices
◊ DACs require an input that can scale the binary values and an output circuit in the form of an amplifier.
◊ There are several different ways of building DACs.◊ Each has advantages and disadvantages. They are
chosen based on the required circuit parameters.
DAC 2.21
Operational Amplifiers (Op-Amps)
◊ The Operational Amplifier (Op-Amp) is one of the basic building blocks of electronics.
◊ Its basic form has two inputs, one inverting and the other non-inverting.
◊ Op-Amps can be configured in many different ways:◊ Compare voltages◊ Amplify signals◊ Invert signals◊ Oscillate◊ Filter, …
◊ Op Amps typically require a positive (VDD) and negative (VEE) supply, and a ground reference (VSS).
DAC 1.22
VDD
VEE
Op-Amp as an Amplifier
◊ This Operational Amplifier configuration operates in this general manner:◊ Gain (voltage increase) equals the input voltage times
the ratio of the feedback resistor Rf to the input resistor.
◊ In this configuration the output is inverted (goes negative)
VDD
VEE
Rf
Rin
DAC 2.23
Vout = Vin(Rf/RIN)
Vin VOUT
Binary-Weighted Resistor DAC
◊ The Summing Op-Amp output will be the sum of the input voltages times the ratio of Rf over each Rin.
VDD
VEE
Rf
Rin1
Rin2
Rin3
Rin4
DAC 2.24
Binary-Weighted Resistor DAC
◊ The first resistor has no attenuation therefore the voltage is passed. The second R has a ½ ratio so will attenuate by 50%. The 3rd R attenuates by ¼, and the last by 1/8.
◊ This is an inverting amplifier (output voltage is negative)
VDD
VEE
1 kΩ
1 kΩ
2 kΩ
4 kΩ
8 kΩ
DAC 2.25
◊ A 4-bit binary input is applied to the input resistors, with the 1 kΩ resistor considered the MSB.
◊ The resistor ratio for the MSB is 1:1...if the input voltage is 5V, the output is 5V.
Binary-Weighted Resistor DAC
VDD
VEE
1 kΩ
1 kΩ
2 kΩ
4 kΩ
8 kΩ
MSB
LSB
DAC 2.26
Binary-Weighted R DAC - Table
◊ Based on an input of 5V for the MSB, the resolution can be calculated:◊ If just the MSB is active, the output
voltage equals the MSB input voltage (gain =1)
◊ 10002 = 810, therefore each step = 5V/8 = 0.625V per step
◊ Note the amplifier inverts, therefore the output voltage is negative
D C B A VOUT
0 0 0 0 -0.000
0 0 0 1 -0.625
0 0 1 0 -1.250
0 0 1 1 -1.875
0 1 0 0 -2.500
0 1 0 1 -3.125
0 1 1 0 -3.750
0 1 1 1 -4.375
1 0 0 0 -5.000
1 0 0 1 -5.625
1 0 1 0 -6.250
1 0 1 1 -6.875
1 1 0 0 -7.500
1 1 0 1 -8.125
1 1 1 0 -8.750
1 1 1 1 -9.375
DAC 2.27
Limitations
◊ The Binary-Weighted DAC can be difficult to implement:◊ The resistors must be precise, otherwise the scale steps
will be uneven.◊ The output of logic devices such as gates or flip-flops are
not always at 5 volts and will therefore affect the scale.◊ If switches are used, pull-up resistors will affect the
operation of the device.◊ Larger binary values require progressively larger
resistors for the LSB. For our example:◊ 5 bit = 16kΩ◊ 8 bit = 128kΩ◊ 12 bit = 2.048MΩ
DAC 2.28
Conclusion
◊ There are other configurations for DACs.
◊ Next presentation will look at other methods.
DAC 2.29
©Paul R. Godinprgodin°@ gmail.com
End of Part 1
DAC 1.30