You are on page 1of 31

Together Towards A Green Environment

Lecture Outcome

Describe methods of interfacing digital circuits to analogue circuits,


Demonstrate an application of such an interface.

Syllabus
The concepts of representing analogue signals in a digital format.
Discussion of typical circuits which can implement D/A conversion,
Interface methods, typical examples of application.

Together Towards A Green Environment

Main Objectives
Upon completion of this chapter, you will be able to:
Understand the theory of operation of several types of digital-to-analog
converters (DACs).

Read and understand the various DAC manufacturer specifications.


Analyze the process by which a computer, reconstructs the analog signal from
the digital data.
REVIEW OF DIGITAL VERSUS ANALOG
A digital quantity has a value that is specified as one of two possibilities,
such as 0 or 1, LOW or HIGH, true or false, and so on.
By contrast, an analog quantity can take on any value over a continuous
range of values
Analog-to-digital converter (ADC): converts analog input to a digital output
Digital-to-analog converter (DAC): converts digital input to a analog output

Together Towards A Green Environment

Information Domains

Together Towards A Green Environment

Currency

DIGITAL-TO-ANALOG CONVERSION
D/A conversion is the process of taking a value represented in digital code and
converting it to a voltage or current that is proportional to the digital value.

analog output = K X digital input

- K is the proportionality constant value.


- The analog output can be a voltage or a current.
- When it is a voltage, K will be in voltage units,
and when the output is a current, K will be in current units.
For the DAC of above figure, K = 1 V VOUT = (1 V) X digital input
For example, with a digital input of 11002 =1210, we obtain VOUT = 1 V X 12 = 12 V
Together Towards A Green Environment

Example 1
A five-bit DAC has a current output. For a digital input of 01010, an output
current of 5 mA is produced. What will IOUT be for a digital input of 11101?
Solution

The digital input 010102 is equal to decimal 10.


Because IOUT = 5 mA for this case, the proportionality factor must be 0.5 mA.
Thus, we can find IOUT for any digital input such as 111012 = 2910 as follows:
IOUT = (0.5 mA) X 29

= 14.5 mA

Together Towards A Green Environment

Example 2
What is the largest value of output voltage from an eight-bit DAC that

produces 2.0 V for a digital input of 00110010 ?


Solution

001100102 = 5010.
2.0 V = K X 50.
Therefore, K = 40 mV
The largest output will occur for an input of 111111112 = 25510 .
VOUT(max) = 40 mV X 255
= 10.2 V

Together Towards A Green Environment

Input Weights
For the 4 bits DAC, note that each digital input contributes a
different amount to the analog output.
This is easily seen if we examine the cases where only one input is
HIGH (see Table).
Thus, A, which is the LSB, has a weight of 1 V;
B has a weight of 2 V;
C has a weight of 4 V;
and D, the MSB, has the largest weight, 8 V.
The weights are successively doubled for each bit, beginning with
the LSB.

Thus, we can consider VOUT to be the weighted sum of the digital


inputs.
For instance, to find VOUT for the digital input 0111, we can add the
weights of the C, B, and A bits to obtain 4 V + 2 V + 1 V = 7 V.

Together Towards A Green Environment

Example 3 (Input Weights)


A five-bit D/A converter produces VOUT = 0.1 V for a digital input of 00001.

Find the value of VOUT for an input of 11111.


Solution

Obviously, 0.1 V is the weight of the LSB. Thus, the weights of the other bits
must be 0.2 V, 0.4 V, 0.8 V, and 1.6 V, respectively.
For a digital input of 11111, then, the value of VOUT will be
1.6 V+0.8 V+0.4 V+0.2 V+0.1 V = 3.1 V.

Together Towards A Green Environment

Resolution (Step Size)


Resolution of a D/A converter is defined as the
smallest change that can occur in the analog output

as a result of a change in the digital input.


For the given table, we can see that the resolution
is 1 V because VOUT can change by no less than 1 V
when the digital input value is changed.

The resolution is always equal to the weight of the


LSB and is also referred to as the step size because
it is the amount that VOUT will change as the digital
input value is changed from one step to the next

Together Towards A Green Environment

10

Resolution (Step Size)


The resolution (or step size) is the size of the jumps in the staircase waveform; in this case,
each step is 1 V.
Note that the staircase has 16 levels corresponding to the 16 input states, but there are
only 15 steps or jumps between the 0-V level and full-scale.

Figure: Output waveforms of a DAC as inputs are provided by a binary counter.

Together Towards A Green Environment

11

Resolution (Step Size)


In general, for an N-bit DAC, the number of different levels will be 2N,
and the number of steps will be 2N-1.
Resolution (step size) = K constant in the DAC input/output relationship

analog output = K X digital input

Figure: Output waveforms of a DAC as inputs are provided by a binary counter.


Together Towards A Green Environment

12

Resolution (Step Size)


If we define:
Afs as the analog full-scale output,
n is the number of bits, then

A fs
Resolution K n
(2 1)

Figure: Output waveforms of a DAC as inputs are provided by a binary counter.


Together Towards A Green Environment

13

Example 4 (Resolution)
A five-bit D/A converter produces VOUT = 0.2 V for a digital input of 00001.
1. What is the resolution (step size) of the DAC ?
2. Describe the staircase signal out of this DAC.
3. Determine VOUT for a digital input of 10001.
Solution
1. The LSB for this converter has a weight of 0.2 V. This is the resolution or step size.

2. A staircase waveform can be generated by connecting a five-bit counter to the DAC


inputs. The staircase will have 32 levels, from 0 V up to a full-scale output of 6.2 V,
and 31 steps of 0.2 V each
3. The step size is 0.2 V, which is the proportionality factor K. The digital input is
10001 = 1710. Thus, we have
VOUT = (0.2 V) X 17
= 3.4 V
Together Towards A Green Environment

14

Percentage Resolution

To illustrate, the DAC of Figure below has a maximum full-scale output of 15 V


(when the digital input is 1111).
The step size is 1 V. This gives a percentage resolution of

Figure: Output waveforms of a DAC as inputs are provided by a binary counter.


Together Towards A Green Environment

15

Example 5 (Percentage Resolution)


A 10-bit DAC has a step size of 10 mV. Determine the full-scale output voltage
and the percentage resolution.
Solution
With 10 bits, there will be 210 - 1 = 1023 steps of 10 mV each.
The full-scale output will therefore be 10 mV X 1023 = 10.23 V, and

The percentage resolution can also be calculated from

For an N-bit binary input code, the total number of steps is 2N 1.


Thus, for the previous example,

Together Towards A Green Environment

16

DAC CIRCUITRY

For example, if the digital input is 1010, then


VD=VB=5V and VC=VA=0 V. Thus

Simple DAC using an op-amp summing amplifier with binary weighted resistors.
Together Towards A Green Environment

17

Example 5 (DAC CIRCUITRY)


Determine:
1. The resolution of this D/A converter.
2. The weight of each input bit
3. The full-scale output if RF = 250

Solution
1. The weighting of the LSB, which is
(1/8) X 5 V = 0.625 V.
As shown in the table, the analog output increases by
0.625 V as the binary input number advances one step.

2. The MSB passes with gain 1, so its weight in the output is 5 V. Thus
3. If RF is reduced by a factor of 4, to 250 , each input weight
will be four times smaller than the values above.
Thus, the full-scale output will be reduced by this same
factor and becomes -9.375/4 = -2.344 V.

Together Towards A Green Environment

18

Formula
Resolution

= Step Size = Input bit for LSB

Vout (analog output)= K x Digital Input


K = Total Voltage/Current
Number Of Step
*

Or

Analog Output
Digital Input

K = the factor of proportionality and is a fixed value for a DAC

Digital Input = Number of Step

Number of Step = 2n 1
Where;

n = Number of input bits

Together Towards A Green Environment

19

Errors

Together Towards A Green Environment

20

Offset Errors

Together Towards A Green Environment

21

Full Scale Error


Combination of gain error and offset error

Together Towards A Green Environment

22

Non Linearity Error


Combination of gain error and offset error

Together Towards A Green Environment

23

Accuracy
The two most common ways of specifying accuracy are:
full-scale error and linearity error which are normally expressed as a percentage of the
converters full-scale output (% F.S.).

Full-scale error is the maximum deviation of the DACs output from its expected (ideal) value,
expressed as a percentage of full scale.

For example,

4-bit DAC has +0.01%FS accuracy and DAC full- scale is15V.
So 0.01% X 15 = 1.5mV.
This means that the DAC output will be different from the ideal value 1.5mV
Linearity error is the maximum deviation in step size from the ideal step size.

Together Towards A Green Environment

24

Example
An 8-bit DAC has 2mA full-scale value and +0.5% FS accuracy. What is the
output range for input 10000000?
Solution
100000002

12810

Step Size = 2mA


255

= 7.84A

Ideal output for input 12810 = 12810 X 7.84A


= 1004A
Error

= 0.5% FS X 2mA
= 10A

Actual output will deviate as much as 1004


The actual range is 994A-1014A after with error.

Together Towards A Green Environment

25

Settling Time
the time required for the DAC output to go from zero to full scale as the binary input is
changed from all 0s to all 1s.
Actually, it is the time for the DAC output to settle within step size (resolution) of
its final value.
For example, if a DAC has a resolution of 10 mV, settling time is measured as the time
it takes the output to settle within 5 mV of its full-scale value.

Together Towards A Green Environment

26

Monotonicity
A DAC is monotonic if its output increases as the binary input is incremented
from one value to the next.

Vout

Vout

Vout

Bin
a

Bin

Bin
b

a and b is Monotonic but c is not Monotonic

Together Towards A Green Environment

27

Monotonicity
Another way to describe this is that the staircase output will have no downward steps
as the binary input is incremented from zero to full scale.

Together Towards A Green Environment

28

Advantages of using a computer to control devices rather than people


Cheaper -

If a computer is monitoring and controlling applications, you do


not need to employ people.

Higher Work
Rate -

Computers can control applications all day, every day without


getting tired or bored.

Safer -

Computers can work in conditions that would be too dangerous


for people. Examples include chemical plants, radioactive sites
and extremely cold areas (antarctic).

Accuracy -

Computers will respond to inputs from sensors accurately every


time. E.g. a heater will be switched on as soon as the temperature
falls below 10C.

Speed -

Computers will respond to data received from sensors very


quickly. E.g. as soon as an infrared sensor detects an intruder the
alarm will sound.

Together Towards A Green Environment

29

Applications

Together Towards A Green Environment

30

Applications

Together Towards A Green Environment

31

You might also like