7 Instrumentation - Data Conversion
7 Instrumentation - Data Conversion
1
•Digital signal processing is more accurate than analogue
techniques. However
(i)analogue processing is the faster of the two alternatives
(ii)digital processing equipment is more expensive
(iii)Also accuracy is reduced with measurements coming from
analogue sensors and transducers, because an analogue-to-
digital conversion stage is necessary before the digital
processing can be applied, thereby introducing conversion
errors
Sampling Theorem
•Process of A/D conversion consists of sampling the analogue
signal at regular intervals of time
• Each sample of the analogue voltage is then converted into an
equivalent digital value
•This conversion takes a certain finite time, during which the
analogue signal can be changing in value
•The next sample of the analogue signal cannot be taken until
conversion of the last sample to digital form is completed
3
•A continuous analogue signal is thus represented in digital format
as a sequence of samples whose pattern only approximately
follows the shape of the original signal
• This pattern of samples taken at successive, equal intervals of
time is known as a discrete signal
•Process of conversion between a continuous analogue signal and
a discrete digital one is illustrated below for a sine wave:
•Raw analogue signal frequency
(fraw) ≈ 0.75 cycles per second
•At sampling rate of 11
samples/sec (dotted line), the
sample reconstruction matches
the original analogue signal very
well
•For sampling rate very much less
than fraw e.g.1 sample per second,
only the samples marked ‘X’ would
•. Fitting a line through these ‘X’s incorrectly estimates a signal whose
be obtained 4
frequency is ≈ 0.25 cycles per second
•This phenomenon whereby the process of sampling transmutes a
high-frequency signal into a lower frequency one is called aliasing
•To avoid aliasing, theoretically the sampling rate should be at least
twice the highest frequency in the analogue signal sampled (Nyquist-
Shannon sampling theorem)
Basic Operation
•Involves the linear charging and discharging of a capacitor
using constant currents
•First, the capacitor is charged up for a fixed time interval from a
constant current derived from the analog input voltage, Vi. Thus
at the end of this fixed charging interval, the capacitor voltage
will be proportional to Vi
•At that point, the capacitor is linearly discharged from a constant
current derived from a precise reference voltage, Vref
• When the capacitor voltage reaches 0, the linear discharging is
terminated
•During the discharge interval, a digital reference frequency is
fed to a counter and counted. The duration of the discharge
interval will be proportional to the initial capacitor voltage
•At the end of the discharge interval, the counter will hold a
count proportional to the initial capacitor voltage, which is
proportional to Vi
•In
addition to low cost, another advantage of the dual-slope
ADC is its low sensitivity to noise and to variations in its
component values caused by temperature changes
•
Voltage-to-Frequency ADC
•The voltage-to-frequency ADC is simpler than other ADCs
because it does not use a DAC
•Instead it uses a linear voltage-controlled oscillator (VCO) that
produces an output frequency proportional to its input voltage
•The analog voltage to be converted is applied to the VCO to
generate an output frequency
•This frequency is fed to a counter to be counted for a fixed time
interval. The final count is proportional to the value of the analog
voltage
•It
is much simpler to achieve D/A conversion than A/D
conversion and cost of hardware is also considerably less
where Afs is the analog full-scale output and n is the number of bits
• Alternatively
1 1
% resolution x100% N x100%
total number of steps 2 -1
• The greater the number of bits, the finer the resolution (the smaller
the step size)
• The resolution limits how close the DAC output can come to a
given analog value
• Generally, the cost of DACs increases with the number of bits so a
system designer will use only as many bits as necessary
a) Weighted Resistor DAC
•Inputs A, B, C, D are
binary inputs with values of
either 0 or 5 V
•The op-amp, a summing
amplifier, produces the
weighted sum of these
input voltages.
•The summing amplifier
multiplies each input
voltage by the ratio of the
feedback resistor RF to the
corresponding input
Binary- weighted resistor DAC resistor RIN
•RF = 1 kΩ. The D input has RIN = 1 kΩ, so the voltage at D is passed
with no attenuation. The C input has RIN = 2 kΩ so it is attenuated by
1/2. Similarly, the B input is attenuated by 1/4, and the A input by 1/8
• The amplifier output can thus be expressed as
VOUT VD 1 VC 1 VB 1 VA
2 4 8
The negative sign is present because the summing amplifier is
a polarity-inverting amplifier
• Note: The resistors are binarily weighted, i.e. starting with the
MSB resistor, the resistor values increase by a factor of 2
b) R/2R Ladder DAC
•While the use of binary-weighted resistors to produce the proper
weighting of each bit works in theory, it has some practical limitations
• The biggest problem is the large difference in resistor values
between the LSB and the MSB, especially in high-resolution DACs
(i.e., many bits)
• E.g. if the MSB resistor is 1 kΩ in a 12-bit DAC, the LSB resistor will
be over 2 MΩ
•With current IC fabrication technology, it is very difficult to produce
resistance values over a wide resistance range that maintain an
accurate ratio especially with variations in temperature
•Thus a circuit that uses resistances that are fairly close in value is
preferable
•The R/2R ladder network, where the resistance values span a range
of only 2 to 1, is one of the most widely used DAC circuits that
satisfies this requirement
•It consists of a resistor-ladder network on the input to an operational
amplifier
8-bit R/2R
ladder DAC
Accuracy
• Two ways of specifying accuracy are:
(ii) Linearity error : Is the maximum deviation in step size from the
ideal step size
• Also normally expressed as a percentage of the converter's full-
scale output (% F.S.)
Offset Error
• Ideally, a DAC’s output will be zero volts when the binary
input is all 0s
• In practice however, there will be a very small output voltage
for this situation, called the offset error
• This offset error, if uncorrected, will be added to the
expected DAC output for all input cases
• Offset error can be negative as well as positive
Ideal and actual DAC output for a four-bit DAC with an offset error of
+2 mV and a perfect step size of 100 mV
Settling Time
• Specifies the operating speed of a DAC
• Settling time is 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
• It is measured as the time for the DAC output to settle within ± 1/2
step size (resolution) of its final value
Monotonicity
• A DAC is monotonic if its output increases as the binary input is
incremented from one value to the next
• The staircase output will have no downward steps as the binary
input is incremented from zero to full scale