Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Principles of Mechatronics

MEC 232
Lecture_5

Data Acquisition (DAC)


Instructor: Dr.Wessam Hussein.
Phone: 01063638071
Email: wessam@eaeat-academy.edu.eg
Office Hours: Monday – Wednesday – Thursday
Spring 2023 - 2024
DAC Selection
• Resolutions (# of bits)
• Sampling rate.
• # of Channels.
• Dynamic response.
• Sampling Methods
• Types of Inputs…..
• Range
• Types of DAC
o Weighted Resistor Method
o R-2R Ladder Circuit
o PWM Based Conversion
Why do you need to know
how they work
• Because the theoretical course you will
shortly undertake assumes perfect
converter products - BUT
• Practical converters have :
• Many conversion methods - why
• Trade-offs between resolution and speeds +
delays
• Different methods of “sampling” the waveforms
• A large number of basic and method-dependent
error sources
• Manufacturers specifications which ‘differ’ - AND
• Almost all converters need some analog ‘signal
conditioning’ which is application dependent
• Resolution = 2n -1 [n = number of bits]

n 2n
• 8bits 256

Digital coding •
10bits
12bits
1024
4096

methods •
14bits
16bits
16384
65536
• 18bits 262144
• 20bits 1,048576
• 22bits 4,194304
• 24bits 16,777216
Drawbacks
• The binary-weighted DAC has quite a large gap between LSB and MSB
resistors values and requires a very precise value of resistors.
• It becomes impractical for higher-order DACs and is suitable for less
resolution DACs.
• The stability of the device is resistor-dependent and is difficult to maintain
an accurate resistance ratio with temperature variations.
Advantages
• It has a simple assembly.
• It has a fast conversion speed.
• Simple conversion circuit
The digital binary data exists in the form of
bits. Each bit is either 1 or 0 & they
represent its weight corresponding to its
position. The weight is 2n where the n is the
position of the bit from right hand side & it
start from 0.
Bit Weight = 2n
Bit weight of 4th bit from left= 2n = 23 = 8
The bit weight is multiplied by the bit value. Since the bit could be either 0 or 1, it
means;
Bit value of 1 x bit weight = 1 x 2n = 2n
Bit value of 0 x bit weight = 0 x 2(n-1) = 0

Now adding the weights of all the bits with its value in a binary number 10011;
1 00112 = (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21) + (1 x 20)
100112 = 16 + 0 + 0 + 2 + 1
100112 = 19
This is how the digital to analog converter DAC works by adding the weights of all
corresponding bits with its value to generate the analog value at its output.
Advantages
• It can be fabricated easily.
• The configuration requires only two resistors with one being twice the
other in value instead of a wide range of resistors.
• The output resistance remains the same despite the number of bits.
• Increasing the resolution does not degrade the performance.
Disadvantages
• It has a slow conversion speed.
R-2R D/A Converter Example
A 4-bit R-2R digital-to-analogue converter is constructed to control the speed of a small DC motor using the
output from a digital logic circuit. If the logic circuit uses 10 volt CMOS devices, calculate the analogue output
voltage from the DAC when the input code is hexadecimal number “B”. Also determine the resolution of the
DAC.

Solution
1). The hexadecimal letter “B” is equal to the number eleven in decimal. The decimal number eleven is equal to
the binary code “1011” in binary. That is: B16 = 10112. Thus for our 4-bit binary number of 10112, input bit D = 1,
bit C = 0, bit B = 1 and bit A = 1.
If we assume that feedback resistor RF is equal to “R”, then our R-2R D/A converter circuit will look like:
The digital logic circuit uses 10 volt CMOS devices, so the input voltage to the R-2R network will be 10 volts.
Also being a 4-bit ladder DAC, there will be 24 possible input combinations, so using our equation from above,
the ouput voltage for a binary code of 10112 is calculated as:

Therefore the analogue output voltage used to control the DC motor when the input code is 10112 is calculated as:
-6.875 volts. Note that the output voltage is negative due to the inverting input of the operational amplifier.
2). The resolution of the converter will be equal to the value of the least significant bit (LSB) which is given as:

Then the smallest step change of the analogue


output voltage, VOUT for a 1-bit LSB change of the
digital input of this 4-bit R-2R digital-to-analogue
converter example is: 0.625 volts. That is the output
voltage changes in steps or increments of 0.625
volts and not as a straight linear value.
Thank You

You might also like