Professional Documents
Culture Documents
Analog-To-Digital Converter (Adc) : Introduction To Mechatronics Fall 2012 Craig Woodin Ali Alsaibie Ehsan Maleki
Analog-To-Digital Converter (Adc) : Introduction To Mechatronics Fall 2012 Craig Woodin Ali Alsaibie Ehsan Maleki
Introduction to Mechatronics
Fall 2012
Craig Woodin
Ali AlSaibie
Ehsan Maleki
Background Information
What is ADC?
Conversion Process
Accuracy
Examples of ADC applications
Quantizing
and
Encoding
Sampling and
Hold
t
Input: Analog Signal t
ADC Process
Sampling & Hold
01
00
K=22 00
01
10
11
ADC Process
Quantization & Coding
01
00
K=22 00
01
10
11
ADC Process
Quantization & Coding
K=23 000
001
010
011
100
101
110
111
ADC Process
Quantization & Coding
t t
Sampling Rate, Ts Resolution, Q
Based on number of steps Improves accuracy in
required in the conversion measuring amplitude of
process analog signal
Increases the maximum Limited by the signal-to-
frequency that can be noise ratio (~6dB)
measured
ADC Process-Accuracy
The accuracy of an ADC can be improved by increasing:
t t
Sampling Rate, Ts Resolution (bit depth), Q
Based on number of steps Improves accuracy in
required in the conversion measuring amplitude of
process analog signal
Increases the maximum
frequency that can be
measured
ADC-Error Possibilities
Aliasing (sampling)
Occurs when the input signal is changing much faster
than the sample rate
Should follow the Nyquist Rule when sampling
• Answers question of what sample rate is required
• Use a sampling frequency at least twice as high as the
maximum frequency in the signal to avoid aliasing
• fsample>2*fsignal
Quantization Error (resolution)
Optimize resolution
Dependent on ADC converter of microcontoller
ADC Applications
ADC are used virtually everywhere where an
analog signal has to be processed, stored, or
transported in digital form
Microphones
Strain Gages
Thermocouple
Digital Multimeters
Types of ADC
0
Vin lies in between Vcomp5 & Vcomp6
0
Vcomp5 = Vref*5/8 = 5V
Vcomp6 = Vref*6/8 = 6V 1
1
+
_
Control
Logic
Start Stop
Clock Counter
Dual-Slope ADC – How It Works
An unknown input voltage is applied to the input of the integrator and allowed to
ramp for a fixed time period (tu)
Then, a known reference voltage of opposite polarity is applied to the integrator
and is allowed to ramp until the integrator output returns to zero (td)
The input voltage is computed as a function of the reference voltage, the constant
run-up time period, and the measured run-down time period
The run-down time measurement is usually made in units of the converter's clock,
so longer integration times allow for higher resolutions
The speed of the converter can be improved by sacrificing resolution
td
Vin Vref
tu
Delta-Sigma A/D Converter
Input Pins
ADC Built-into
MC9S12C32
ATD
Port AD
ATD 10B8C - Block Diagram
High/Low
Ref Voltage
Power
Supplies
Analog Input
General Purpose I/O
External Trigger
Analog Input
General Purpose I/O
ATD 10B8C – Key Features
Modes:
Stop Mode: All clocks halt; conversion aborts; minimum
recovery delay (~ 20μs)
REGISTERS
6 Control Registers (first 2 are reserved!)
2 Status Registers
2 Test Registers
1 Digital Input Enable Register
1 Digital Port Data Register
8 Result Registers
Control Register (2)
This register controls power down, interrupt, and external
trigger.
Writes to this register will abort current conversion sequence
but will not start a new sequence.
Sequence Conversion
Complete Flag Counter
Status Register (1)
This register contains the SC bit used to enable special channel conversions.
Port Data Register
The data port associated with the ATD is general purpose I/O.
Digital Input Enable Register
This bit controls the digital input buffer from the analog input
pin to PTADx data register.
Results Registers – Left Justified
Results Registers – Right Justified
Setting Up & Starting the ADC
BACK
Tables 8-4 & 8-5
BACK
Table 8-8
Table 8-10
Table 8-11
Table 8-12
References
http://en.wikipedia.org/wiki/Analog-to-digital_converter
http://www.grin.com/object/external_document.259394/fb1fe2e3b955672eca34
58c9116d595b_LARGE.png
http://en.wikipedia.org/wiki/Successive_approximation_ADC
http://www.maximintegrated.com/app-notes/index.mvp/id/810
http://en.wikipedia.org/wiki/Delta-sigma_modulation
http://www.beis.de/Elektronik/DeltaSigma/DeltaSigma.html
http://www.allaboutcircuits.com/vol_4/chpt_13/9.html
http://en.wikipedia.org/wiki/Integrating_ADC
MC9S12C Family Reference Manual