Digital to Analog Converters (DAC) 1 Technician Series ©Paul Godin March 2015
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 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 … The voltage is converted to a binary value at regular intervals. Animated DAC 1.7
Digital to Analog Digital signal Analog signal D to A Conversion … 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 DCBAV OUT DAC DCBADCBA MSB LSB Min V OUT = 0V Max V OUT = 7.5V V OUT 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 binary = 0000 Max binary = 1111 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. 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/(2 N -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 = positive value, = negative value, 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 is is is 1’s compliment 1101 is 2’s compliment 1100 (12) (-3) (9) Note the extra bit is always disregarded
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 (V DD ) and negative (V EE ) supply, and a ground reference (V SS ). DAC 1.22 V DD V EE
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 R f to the input resistor. ◊In this configuration the output is inverted (goes negative) V DD V EE RfRf R in DAC 2.23 V out = V in ●(R f /R IN ) V in V OUT
Binary-Weighted Resistor DAC ◊The Summing Op-Amp output will be the sum of the input voltages times the ratio of R f over each R in. V DD V EE RfRf R in1 R in2 R in3 R in4 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 3 rd R attenuates by ¼, and the last by 1 / 8. ◊This is an inverting amplifier (output voltage is negative) V DD V EE 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 V DD V EE 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) ◊ = 8 10, therefore each step = 5V/8 = 0.625V per step ◊Note the amplifier inverts, therefore the output voltage is negative DCBAV OUT 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. Godin prgodin gmail.com End of Part 1 DAC 1.30