- Hands-On Industrial Internet of Things
- Giacomo Veneri Antonio Capasso
- 839字
- 2021-06-10 19:21:25
Digital to analogical
A digital to analog converter (DAC) acts as an interface between the numerical values that are generated by a calculation system in discrete time instants and the continuous time signals of the analogical world.
A DAC takes digital words as input and generates voltage or current values as output. It therefore carries out a transduction operation. If the converter memorizes the input word through an internal register, it must also directly carry out the so-called zero-order hold (ZOH) operation. If not, the register must be preempted in the DAC when it interfaces with a calculator, even if it is not actually included.
The digital input word and the reference voltage control the output of a DAC according to the following relation:
Vout = KVfs(a12-1 + a22-2 + an2-n) + Voffset
Here, Vout is the voltage in the output, K is the gain, Vfs is the full scale value in the output, a1, a2, . . . an are the n bits of the binary world in the input, and Voffset is the offset voltage.
The output can be made available as a potential voltage or a current value, depending on the converter. The input word is generally handled as a binary fraction that has the decimal point on the left. a1 is the most significant bit (MSB) and an is the least significant bit (LSB).
If K = 1 and Voffset =0 , the potential voltage in the output can also be represented as follows:
Here, N is the decimal value of the word in the input to the DAC. For example, the word 10001001 would be handled as the binary number 0.10001001. Its decimal value, therefore, is as follows:
Alternatively, you can consider the decimal representation of the input word. 137 is the decimal value that corresponds to the binary value 10001001, while 256 is the decimal value that corresponds to the binary value 11111111.
The reference voltage controls the full-scale value Vfs of the converter (or Ifs, if the output is in the current). Typical values of the potential voltage are 2.5, 5.0, 10.00, and 10.24 volts, which coincide with the required reference voltages. For outputs in the current, a typical value for the full scale is 20 mA.
The constant K represents the gain of the converter and is typically equal to 1. The offset voltage represents the output value when the digital input is zero and must be set to zero.
The resolution of a DAC is defined as the smallest change in output that is possible. It is determined by the number of bits of the input word and by the full-scale value of the voltage according to the following relation:
Here, n indicates the number of the bits of the converter. For example, a 12-bit converter with a full-scale voltage of five volts has a resolution of 1221 mV. This applies to mono-polar DACs, where the output is always positive. There are also bipolar DACs, in which the input word is coded to represent negative values. In general, the relationship may not be linear because the input-output couples are not on a straight line, as shown in the following diagram:
For this reason, some errors are defined against the ideal relationship that is represented by a straight line. These include the following:
- Error of linearity: This is defined as the maximum deviation of the output value from that of an ideal converter. It is usually expressed as a fraction of the LSB or as a percentage of the full scale.
- Error of differential linearity: When the input word changes by one bit, the output should vary by one LSB. If this does not occur, the differential linearity error is defined as the amplitude of the maximum difference between the actual increase of the output when the input varies of one bit and the ideal increase.
- Error of integral linearity: For a given input word, the error of integral linearity is defined as the sum of differential linearity errors up to the given word.
DACs have a few important properties. These include the following:
- Monotonic: If the input word increases by one bit, the output must always increase, even if by an incorrect value. This property is very important in a control system. If it is non-monotonic, this represents a variation of the desired phase, which can lead to unstable behavior.
- Settling time: This is the time needed for the output value to follow a change of the input word within a limited percentage error.
- Glitches: Glitches occur in the output due to non-simultaneous variations of the bits of the input word. The DACs on the market have specific circuits to minimize the occurrences of this phenomena.
The performance of a DAC changes over time, with variations in the temperature and the supply voltage.