Sei sulla pagina 1di 59

Analog-to-Digital Converter (ADC)

Module
Background Information
 What is ADC?
 Conversion Process
 Accuracy
 Examples of ADC applications
Signal Types
Analog Signals
 Any continuous signal that a
time varying variable of the
signal is a representation of
some other time varying
quantity
 Measures one quantity in
terms of some other quantity t

 Examples
• Speedometer needle as
function of speed
• Radio volume as function of
knob movement
Signal Types
Digital Signals
 Consist of only two states
 Binary States
 On and of 1

 Computers can only


perform processing on
digitized signals 0
Analog-Digital Converter (ADC)
 An electronic integrated circuit which converts a signal from
analog (continuous) to digital (discrete) form
 Provides a link between the analog world of transducers and
the digital world of signal processing and data handling

V k

t t
ADC Conversion Process
Two main steps of process:
1. Sampling and Holding
2. Quantization and Encoding
Analog-to-Digital Converter

Quantizing
and
Encoding
Sampling and
Hold
t
Input: Analog Signal t
ADC Process
Sampling & Hold

 Measuring analog signals at


uniform time intervals
t
 Ideally twice as fast as what
we are sampling

 Digital system works with


t
discrete states
 Taking a sample from each
location

 Reflects sampled and hold


signal
 Digital approximation
t
ADC Process
Quantizing Encoding
 Separating the input signal  Assigning a unique
into a discrete states with K digital code to each
increments
state for input into the
 K=2N
 N is the number of bits of the
microprocessor
ADC
 Analog quantization size
 Q=(Vmax-Vmin)/2N
 Q is the Resolution
ADC Process

Quantization & Coding


 Use original analog
signal
 Apply 2 bit coding
11

10

01

00
K=22 00 01
10
11
ADC Process
Quantization & Coding

 Use original analog


signal
 Apply 3 bit coding
 Better representation of
input information with
additional bits K=23 000 001
K=16 0000 K=… .
 MCS12 has max of 10 010 .
011 .
bits 100 1111
101
110
111
ADC Process-Accuracy
The accuracy of an ADC can be improved by increasing:

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
frequency that can be measured
 Limited by the signal-to-
noise ratio (~6dB)
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
required in the conversion  Improves accuracy in
process measuring amplitude of
 Increases the maximum analog signal
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

 Successive Approximation A/D Converter


 Flash A/D Converter
 Dual Slope A/D Converter
 Delta-Sigma A/D Converter
Successive Approximation ADC
 Elements
• DAC = Digital to Analog Converter
• EOC = End of Conversion
• SAR = Successive Approximation Register
• S/H = Sample and Hold Circuit
• Vin = Input Voltage
• Comparator
• Vref = Reference Voltage
Comparison of ADC’s
Speed Cost Resolution
Type Accuracy
(relative) (relative) (bits)

Dual Slope Slow Med 12-16 Good

Flash Very Fast High 4-12 Good

Successive Medium – Low 8-16 High


Approx Fast
Sigma – Slow Low 12-24 Good
Delta

 For 10bit ADC, Resolution==4.88mv/step

Analog Voltage Decimal output Binary output


0 0 00 0000 0000
5 1023 11 1111 1111
2.5 511 01 1111 1111
1.25 255 00 1111 1111
ADC in PIC16F877A
 Single ADC module.
 Successive approximation ADC.
 8 channel ADC 8 input signals could be sampled.
 Only one channel could be selected at a time.
 10 bit ADC- the result after conversion is 10 bits.
 ADRESH, ADRESL
 0 to 5V analog input.
 Selectable references +Vref, -Vref
 Unidirectional ADC
 Control Registers: ADCON0,ADCON1
ADC -The configuration …
The A/D conversion time per bit is defined as TAD.
For correct A/D conversions, the A/D conversion clock (TAD) must be
selected to ensure a minimum TAD time of 1.6 μs.

Potrebbero piacerti anche