CS212 Adc
CS212 Adc
Analog-to-Digital
Converter (ADC)
1. What is ADC?
2. Conversion Process
3. Accuracy
4. Examples of ADC applications
Digital Signals
t
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 7
Analog-Digital Converter (ADC)
College of Information and Communication Technologies
Department of Computer Science and Engineering
t
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 8
ADC Conversion Process
College of Information and Communication Technologies
Department of Computer Science and Engineering
Quantizing
and
Encoding
Sampling and
Hold
t
Input: Analog Signal t
Continuous Signal
Quantizing Encoding
K=2N
N is the number of bits of
the ADC
01
00
K=22 00 t
01
10
11
01
00
K=22 00 t
01
10
11
K=23 000
001
010
011
100
101
110
UDSM, 25.05.2021 CS212: Analog-to-Digital 111
Conversion Page 18
ADC Process
College of Information and Communication Technologies
Department of Computer Science and Engineering
t
Sampling Rate, Ts
Based on number of steps
required in the conversion
process
Increases the maximum
frequency that can be
measured
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 20
ADC Process-Accuracy
College of Information and Communication Technologies
Department of Computer Science and Engineering
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
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 21
ADC-Error Possibilities
College of Information and Communication Technologies
Department of Computer Science and Engineering
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
fsampling>2*fsignal
The higher sampling rate technically leads to more
measurements per second and a closer recreation
of the original analogue signal
Quantization Error (resolution)
Optimize resolution
Dependent on ADC converter of microcontoller
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 22
ADC Applications
College of Information and Communication Technologies
Department of Computer Science and Engineering
Components
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
+
_
Control
Logic
Start Stop
Output/
Clock Counter Display
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 27
Dual-slope ADC
College of Information and Communication Technologies
Department of Computer Science and Engineering
Algorithm
Vin value lies between two comparators
𝑉𝑟𝑒𝑓
Resolution ∆𝑉 = 𝑁 ;
2
N= Encoder Output bits
Comparators 2N-1
Example
Input Pins
ADC Built-into
MC9S12C32
ATD
Port AD
High/Low
Ref Voltage
Power
Supplies
Analog Input
General Purpose I/O
External Trigger
Analog Input
General Purpose I/O
UDSM, 25.05.2021 CS212: Analog-to-Digital Conversion Page 38
ATD 10B8C – Key Features
College of Information and Communication Technologies
Department of Computer Science and Engineering