Professional Documents
Culture Documents
Chapter Eleven
11.1 - 11.3
Outline
Introduction The main features of a data acquisition system The characteristics of an analog-todigital converter The characteristics of the 16F873A analog-to-digital converter Summary
Dr. Gheith Abandah 2
Infinite range of Limited by the values numbers length Weak Tolerant to signal degradation
3
Resistance to Degradation
ADC Types
1. Dual ramp (slow with very high accuracy, for precision measurements) 2. Flash converter (fast, lesser accuracy, for video or radar) 3. Successive approximation (medium speed and accuracy, for general-purpose industrial applications, commonly found in embedded systems)
Dr. Gheith Abandah
Conversion characteristic
Voltage Range Vr = Vmax 0 Resolution = Vr / 2n Quantization error = Resolution / 2 = Vr / 2n+1
Dr. Gheith Abandah 6
Conversion Steps
1. 2. 3. 4. Get Sample Start conversion Wait Read digital value (in parallel or serially)
1. Filter: get rid of unwanted signal components 2. Multiplexer: select one of multiple inputs 3. Sampler: the conversion rate must be at least twice the highest signal frequency (Nyquist sampling criterion) Dr. Gheith Abandah 8
10
11
Example
What should be the acquisition time for a 10-bit ADC? The voltage should rise to Vs quantization error = Vs - Vs / 2n+1 Vs(2047/2048) = 0.9995 Vs VC = Vs {1 exp(t/RC)} 0.9995Vs = Vs {1 exp(t/RC)} exp(t/RC) = 1 0.9995 t = RC ln(0.0005) Dr. Gheith Abandah t = 7.6RC
12
13
16F874A 16F877A
40
16
U: ADON:
unimplemented A/D On
18
A full 10-bit conversion takes around 12 TAD cycles TAD should be equal to or just greater than 1.6 s Minimum 2TAD between two successive conversions Maximum conversion rate is 30 kHz, higher rate by switching to higher
Dr. TAD after starting the conversion Gheith Abandah 19
20
21
22
23
24
26
27
28
Summary - 1
Most signals produced by transducers are analog in nature, while all processing done by a microcontroller is digital. Analog signals can be converted to digital form using an analog-to-digital converter (ADC). The ADC generally forms just one part of a larger data acquisition system. Considerable care needs to be taken in applying ADCs and data acquisition systems, using knowledge among other things of timing requirements, signal conditioning, grounding and the use of Dr. Gheith Abandah 29 voltage references.
Summary - 2
The 16F873A has a 10-bit ADC module that contains the features of a data acquisition system. Data values, once acquired, are likely to need further processing, including offsetting, scaling and code conversion. Standard algorithms exist for all of these, and Assembler libraries are published. A simple interface between the analog and digital world is the comparator, which is commonly used to classify an analog signal into one of two states.
Dr. Gheith Abandah 30