Professional Documents
Culture Documents
ADC Essentials
A/D Conversion Techniques
Interfacing the ADC to the IBM PC
DAS (Data Acquisition Systems)
How to select and use an ADC
A low cost DAS for the IBM PC
Why ADC ?
Amplifier, Filters
Sample and Hold Circuit, Multiplexer
ADC
Chap 0
ADC Essentials
ADC is Rationing
System
x = Analog input /
Reference
n bits ADC
Number of discrete output
level : 2n
Quantum
LSB size
Q = LSB = FS / 2n
Quantization Error
1/2 LSB
Reduced by increasing n
Fraction: 0 ~ 1
Chap 0
Converter Errors
Chap 0
Offset Error
Gain Error
Nonlinear Error
Hard to remove
Terminologies
Chap 0
Converter Resolution
The smallest change
required in the analog
input of an ADC to change
its output code by one
level
Converter Accuracy
The difference between
the actual input voltage
and the full-scale weighted
equivalent of the binary
output code
Maximum sum of all
converter errors including
quantization error
Conversion Time
Required time (tc) before
the converter can provide
valid output data
Converter Throughput Rate
The number of times the
input signal can be
sampled maintaining full
accuracy
Inverse of the total time
required for one
successful conversion
Inverse of Conversion time
if No S/H(Sample and
Hold) circuit is used
5
Chap 0
Rate of Change x tc
resolution
dV
FS
(
dt
) max
2 n tc
Example
8-bit ADC
Conversion Time: 100sec
Sinusoidal input
vi of change
A sin(2
Rate
dvi
fA cos(2 ft ) 2 fA
Let FS=22A
dt
2 fA
ft )
2A
2 n tc
Limited ftoLow1frequency
of 12.4
12.4
Hz
Hz
2n t
Few Applications
Chap 0
Example
1
62.17 KHz
n
2 ta
Chap 0
0 ~ 10V and 0 ~ 5V
In a final stage of
preconditioning circuit
By proportionally
scaling down the
reference signal
If reference signal is
adjustable
Add
offset
scaled
Bipolar Converter
If polarity information in
output is desired
Bipolar input range
Typically, 0 ~ 5V
Bipolar Output
Chap 0
2s Complement
Offset Binary
Sign Magnitude
From
ADC output
Number of bits
BCD (3 BCD)
For digital panel meter, and
digital multimeter
Cause
Initial Adjustment
Drift with time and
temperature
Gain error in Transfer
characteristics
Typically, precision IC
voltage reference is used
5ppm/C ~ 100ppm/C
Chap 0
10
Control Signals
Start
From CPU
Initiate the conversion
process
To CPU
Conversion is in
progress
Chap 0
BUSY / EOC
HBE / LBE
From CPU
To read Output word
after EOC
HBE
High Byte Enable
LBE
Low Byte Enable
0=Busy: In progress
1=EOC: End of
Conversion
11
Chap 0
Fast Conversion
Software Implementation
Shaft Encoder
12
Block diagram
Operation
Reset and Start Counter
DAC convert Digital output of
Counter to Analog signal
Compare Analog input and
Output of DAC
Vi < VDAC
Continue counting
Vi = VDAC
Stop counting
Waveform
Chap 0
13
Using Up/Down
Counter to track input
signal continuously
Chap 0
14
Chap 0
Block Diagram
15
Circuit waveform
Conversion Time
Chap 0
Logic Flow
16
Chap 0
Operation
T1
Integrate 0 vi dt
t2
Reset and integrate
0 Vr dt
Thus T1vi ( AVG ) t2Vr
t2
v
V
i ( AVG )
r
T1
Applications
DPM(Digital Panel Meter),
DMM(Digital Multimeter),
17
Low Speed
Good Noise Immunity
High resolution
Chap 0
Digital transmission
over a long distance
18
Chap 0
Homework #5-1
.
19
Software Implementation
Implementation with
software using
microprocessor
Chap 0
Counting
Shifting
Inverting
Code Conversion
Availability of Good
performance with very
reasonable Cost
20
Shaft Encoder
Chap 0
Elctromechanical ADC
Convert shaft angle to digital
output
Encoding
Optical or Magnetic Sensor
Applications
Machine tools, Industrial
robotics, Numerical control
Binary Encoder
Misalignment of mechanism
causes large error
Gray Encoder
Misalignment causes 1 LSB
error
21
Interface Operations
Most-recent-data Scheme
At end of conversion it
updates an output FIFO
Automatically start new
conversion
CPU read FIFO to
acquire most recent data
Start-and-wait Scheme
Chap 0
22
Interface Software
Chap 0
Interface Hardware
Chap 0
Asynchronous Serial
transmission to send
data over long distance
to a monitoring station
UART is commonly
used
Interfacing 10 or 12 bit
ADC
Chap 0
Applications
Simple monitoring of a
single analog variable
Control and Monitoring
of hundreds of
parameters in a nuclear
plant
25
Transducer
Amplifier, Filters
Amplify
Remove noise
Linearize
Chap 0
26
High Value
Chap 0
Chap 0
28
Multi-channel System
Analog multiplexer
and a ADC
Chap 0
Low cost
29
Range of commercially
available ADCs
Chap 0
30
Chap 0
31
Chap 0
32
Multi-channel system
Chap 0
1000 samples/s
Generating clock
For starting ADC
conversion
For causing interrupt
Make a pulse stream from
TCLK with short pulses of
duration = x BCLK/4
33
SCSLCT
(Start Conversion SeLeCT)
: Latched trough port 30CH
SCSLCT = H
Selection of 30AH (/E10)
start conversion
SCSLCT = L
TCLK start conversion
INTSLCT
(INTerrupt SeLeCT)
: Latched trough port 30CH
INTSLCT = H
EOC cause IRQ2
INTSLCT = L
No Interrupt
CPU read Status register
(Port 309H) to check EOC
Chap 0
34
Status Register
Chap 0
35
4.77MHz / 8
= 596KHz
Chap 0
36
Accuracy Calculation
Chap 0
37
Chap 0
38
Chap 0
Sampling from ADC channel 1 at 5ms interval and sending each sampled data point to
the DAC
39
Homework #5-2
Prototype board C
program
Chap 0
Outp(CNTRL,5)
.
40