Beruflich Dokumente
Kultur Dokumente
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 ?
Data from real world are typically Analog Needs conversion system
from
ADC Essentials
Chap 0
Converter Errors
Offset Error
Gain Error
Chap 0
Nonlinear Error
Hard
to remove
Terminologies
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
Input voltage change during the conversion process introduces an undesirable uncertainty Full conversion accuracy is realized only if this uncertainty is kept low below the converters resolution
Rate
Rate of change
dvi 2 fA cos(2 ft ) 2 fA dt
Let FS = 2A
2 fA f
dV FS ( )max n dt 2 tc
of Change x tc resolution
2A 2 n tc 12.4 Hz
1 2 tc
n
Few Applications
6
Chap 0
Example
circuits that quickly samples the input signal on command and then holds it relatively constant while the ADC performs conversion Aperture time (ta)
1 2 ta
n
62.17 KHz
Chap 0
Time delay occurs in S/H circuits between the time the hold command is received and the instant the actual transition to the hold mode takes
Chap 0
Some of the converter output code never used Waste of converter dynamic range Greater relative effects of the converter errors on output
down the
Bipolar Converter
If
Typically, 0 ~ 5V
Chap 0
ADC output
Number of bits 8 and 12 bits are typical 10, 14, 16 bits also available Typically
natural
binary
Chap 0
BCD (3 BCD)
For digital panel meter,
Control Signals
HBE / LBE
From CPU To read Output word after EOC
Start
From CPU Initiate the conversion process
HBE
High Byte Enable
BUSY / EOC
To CPU Conversion is in progress
LBE
Low Byte Enable
Chap 0
11
Commonly Used
Dual Slop Integrating ADC Voltage to Frequency ADC Parallel or Flash ADC
Fast
Conversion
Chap 0
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
Can be used as S/H circuit By stopping desired instant Digital Output Long Hold Time Disabling UP (Down) control, Converter generate Minimum (Maximum) value reached by input signal over a given period
Chap 0
14
Most Commonly used in medium to high speed Converters Based on approximating the input signal with binary code and then successively revising this approximation until best approximation is achieved SAR(Successive Approximation Register) holds the current binary value
Block Diagram
Chap 0
15
Circuit waveform
Conversion Time
n clock for n-bit ADC Fixed conversion time
Logic Flow
Chap 0
16
Operation T1 Integrate 0 vi dt t2 Reset and integrate 0 Vr dt Thus T1vi ( AVG ) t2Vr t v Vr 2 i ( AVG ) Applications T1 DPM(Digital Panel Meter), DMM(Digital Multimeter),
Excellent Noise Rejection High frequency noise cancelled out by integration Proper T1 eliminates line noise Easy to obtain good resolution Low Speed If T1 = 60Hz, converter throughput rate < 30 samples/s
Chap 0
17
VFC (Voltage to Frequency Converter) Convert analog input voltage to train of pulses Counter Generates Digital output by counting pulses over a fixed interval of time
Chap 0
18
Very High speed conversion Up to 100MHz for 8 bit resolution Video, Radar, Digital Oscilloscope Single Step Conversion 2n 1 comparator Precision Resistive Network Encoder Resolution is limited Large number of comparator in IC
Homework #5-1 .
Chap 0
19
Software Implementation
Chap 0
20
Shaft Encoder
Elctromechanical ADC Convert shaft angle to digital output Encoding Optical or Magnetic Sensor Applications Machine tools, Industrial robotics, Numerical control
Chap 0
21
At end of conversion it updates an output FIFO Automatically start new conversion CPU read FIFO to acquire most recent data CPU initiate conversion every time it needs new data CPU check EOC until conversion is finished
Start-and-wait Scheme
CPU initiate conversion every time it needs new data CPU can proceed to do other thing ADC interrupt CPU when conversion is complete CPU goes to ISR
Chap 0
22
Interface Software
More complex decoding logic I/O Mapped Transfers ADC is in I/O Space
DMA (Direct Memory Access) CPU release system bus by the request of DMA DMA controller carried out data transfer by generating the required addresses and control signals The system bus control reverts back to CPU when data transfer is finished DMA is useful High Speed High volume data transfer
Chap 0
Interface Hardware
Asynchronous Serial transmission to send data over long distance to a monitoring station
Chap 0
DAS performs the complete function of converting the raw outputs from one or more sensors into equivalent digital signals usable for further processing, control, or displaying applications
Applications
Simple monitoring of a single analog variable Control and Monitoring of hundreds of parameters in a nuclear plant
Chap 0
25
Transducer
Amplifier, Filters
Amplify Remove noise Linearize
S/H (Sample and Hold) Reduce uncertainty error in the converted output when input changes are fast compared to the conversion time In Multi-channel system
To hold a sample from one channel while multiplexer proceed to sample next one Simultaneous sampling of two signal
Chap 0
26
High Value
Choose capacitor to get a best acquisition time while keeping the droop per conversion below 1 LSB
Chap 0
27
Chap 0
28
Multi-channel System
Low cost
Chap 0
29
Chap 0
30
Chap 0
31
Chap 0
32
Multi-channel system
Less than $100 ADC0816 from National Semiconductor Constant, repetitive rate
Generating clock For starting ADC conversion For causing interrupt Make a pulse stream from TCLK with short pulses of duration = x BCLK/4
1000 samples/s
Chap 0
33
Status Register
For polling TCLK and EOC signal Port 309H (/E9) Polling of EOC results in a low level after the data from ADC have been read
Chap 0
35
4.77MHz / 8 = 596KHz
Chap 0
36
Accuracy Calculation
Better than 1% accuracy is ensured Actual accuracy with smooth input signal at room temperature will be better than 0.5%
Chap 0
37
Sampling rate < 200 samples/s Because OUT and IN instruction in Basic takes 5ms
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
Outp(CNTRL,5) .
Chap 0
40