Navigation

Saturday, 11 April 2015

Design of a 4-bit Digital to Analog Circuit

A DAC is a digital to analogue circuit. The microcontroller produces a digital value while the DAC converts it to an analog value. A DAC can be implemented using either a binary-weighted circuit or an R-2R ladder circuit.

For the binary weighted circuit, assuming a 4-bit DAC, there are 16 levels which are from 0-15. Assuming the voltage is between 0 – 5v

Digital Value (N)
b3
b2
b1
b0
Analog Value
0
0
0
0
0
0
1
0
0
0
5.0V
5.0*(1/15)
2
0
0
5.0V
0
5.0*(2/15)
3
0
0
5.0V
5.0V
5.0*(3/15)
4
0
5.0V
0
0
5.0*(4/15)
5
0
5.0V
0
5.0V
5.0*(5/15)
6
0
5.0V
5.0V
0
5.0*(6/15)
7
0
5.0V
5.0V
5.0V
5.0*(7/15)
8
5.0V
0
0
0
5.0*(8/15)
9
5.0V
0
0
5.0V
5.0*(9/15)
10
5.0V
0
5.0V
0
5.0*(10/15)
11
5.0V
0
5.0V
5.0V
5.0*(11/15)
12
5.0V
5.0V
0
0
5.0*(12/15)
13
5.0V
5.0V
0
5.0V
5.0*(13/15)
14
5.0V
5.0V
5.0V
0
5.0*(14/15)
15
5.0V
5.0V
5.0V
5.0V
5.0

The resolution of this DAC which represents the smallest change it can capture is given by the difference between each consecutive elements is 5v/15=0.33V. 

The b0 is the LSB while b3 is the MSB. The resistor values are chosen in the ratio of 1/2/4/8 such that the MSB, b3, is attached to the least value of resistor while the LSB, bo, is attached to the highest value of resistance. Bit 0 is the LSB so it is subjected to a higher resistance, Bit 3 is the MSB so it is subjected to the least resistance. The higher the significance of the bit, the lower is the resistor it is connected to


Doing the analysing of the circuit when N=8 from the table, b3-b0 is given by 1000 where b3 is at 5.0V. This means at the circuit becomes:


The equivalent circuit becomes:



So Vout needs to be obtained. The equivalent resistance of 3KOhms. 6KOhm and 12KOhms in parallel is 12/7 KΩ. Therefore, the circuit can be further reduced to:


From voltage divider rule,

This results in the same analog value for the N= 8 as shown in the table

Taking another condition, say N= 12, the equivalent circuit becomes


The equivalent circuit becomes:


Which can be further reduced to:




This value is also the same as the analogue value in the N=12 row of the table.

Inorder to implement the DAC binary-weighted circuit, the value of resistors required has to be 1/2/4/8/16/32/64 ... which will continue to increase depending on the resolution of the DAC. Therefore a 10-bit DAC will require resistors which are in multiples of 2 up to 1024. Generally, it might be difficult to obtain these resistance values. However, when 2 resistors of the same value are connected in parallel, the resulting resistance is half of the value of each of the resistors. Likewise, connecting 2 same valued resistors in series will produce a resistance that is twice each of the resistor. This can be taken into consideration when the exact value of resistance is not available.

Another way of implementing the DAC is an R-2R ladder network. In this case, just two resistance values are required but the number of resistors needed is increased when compared with the binary weighted circuit



No comments:

Post a Comment