Hardware Reference
In-Depth Information
Many embedded applications deal with nonelectric quantities, such as weight, humid-
ity, pressure, massflow, airflow, temperature, light intensity, and speed. These quantities are
analog
in nature because they have a continuous set of values over a given range, in con-
trast to the discrete values of digital signals. To enable the microcontroller to process these
quantities, they need to be represented in digital form; thus an
analog-to-digital
converter is
required.
An A/D converter can deal only with electric voltage. A nonelectric quantity must be con-
verted into a voltage before A/D conversion can be performed. The conversion of a nonelectric
quantity to a voltage requires the use of a
transducer
. In general, a transducer is a device that
converts the quantity from one form to another. For example, a temperature sensor is a trans-
ducer that can convert the temperature into a voltage. A
load cell
is the transducer that can
convert a weight into a voltage.
A transducer may not generate an output voltage in the range suitable for A/D conversion.
A voltage
scaler
(or
amplifier
) is often needed to amplify the transducer output voltage into a
range that can be handled by the A/D converter. The circuit that performs the scaling and shift-
ing of the transducer output is called a
signal-conditioning circuit
.
The overall A/D process is
illustrated in Figure 12.1.
Temperature
Pressure
Digital
value
Signal-
conditioning
circuit
Voltage
Voltage
A/D
converter
Light
Weight
Transducer
Computer
Airflow
Such as a
sensor,
load cell,
photocall, or
thermocouple
.
.
(optional)
Humidity
.
.
.
Figure 12.1
■
The A/D conversion process
An ideal A/D converter should demonstrate the linear input/output relationship shown
in Figure 12.2. However, the output characteristic shown in Figure 12.2 is unrealistic be-
cause it requires the A/D converter to use an infinite number of bits to represent the con-
version result. The output characteristic of an ideal A/D converter using
n
bits to represent
the conversion result is shown in Figure 12.3. An
n
-bit A/D converter has 2
n
possible out-
put code values. The area between the dotted line and the staircase is called the
quanti-
zation error
. The value of
V
DD
/2
n
is the resolution of this A/D converter. Using
n
bits to
represent the conversion result, the average
conversion error
is
V
DD
/2
n
11
if the converter is
perfectly linear. For a real A/D converter, the output characteristic may have
nonlinearity
Search WWH ::
Custom Search