Analog to Digital Converters Electronics Unit – Lecture 7

Download Report

Transcript Analog to Digital Converters Electronics Unit – Lecture 7

Analog to Digital Converters
Electronics Unit – Lecture 7
Representing a continuously varying
physical quantity by a sequence of
discrete numerical values.
03 07 10 14 09 02 00 04
LSU 10/10/2013
Electronics 7
1
Conversion Methods
(selected types, there are others)
Ladder Comparison
Successive Approximation
Slope Integration
Flash Comparison
LSU 10/10/2013
Electronics 7
2
Ladder Comparison
LSU 10/10/2013
Electronics 7
3
Single slope integration
Voltage accross the capacitor
• Charge a capacitor at constant
current
• Count clock ticks
• Stop when the capacitor voltage
matches the input
• Cannot achieve high resolution
– Capacitor and/or comparator
Start
Conversion
Vin
0
Start
Conversion
IN
+
Electronics 7
2
4
6
8
10
Counting time
S
Q
R
Oscillator
12
14
16
Time
Enable
Counter
-
C
LSU 10/10/2013
20
18
16
14
12
10
8
6
4
2
0
N-bit Output
Clk
4
Successive Approximation
LSU 10/10/2013
Electronics 7
5
Flash Comparison
If N is the number of bits in the
output word….
Then 2N comparators will be
required.
With modern microelectronics
this is quite possible, but will be
expensive.
LSU 10/10/2013
Electronics 7
6
Pro and Cons
Slope Integration & Ladder Approximation
Cheap but Slow
Flash Comparison
Fast but Expensive
Successive Approximation
The Happy Medium ??
LSU 10/10/2013
Electronics 7
7
Resolution
Suppose a binary number with N bits is to
represent an analog value ranging from 0 to A
There are 2N possible numbers
Resolution = A / 2N
LSU 10/10/2013
Electronics 7
8
Resolution Example
Temperature range of 0 K to 300 K to be linearly
converted to a voltage signal of 0 to 2.5 V, then
digitized with an 8-bit A/D converter
2.5 / 28 = 0.0098 V, or about 10 mV per step
300 K / 28 = 1.2 K per step
LSU 10/10/2013
Electronics 7
9
Resolution Example
Temperature range of 0 K to 300 K to be linearly
converted to a voltage signal of 0 to 2.5 V, then
digitized with a 10-bit A/D converter
2.5 / 210 = 0.00244V, or about 2.4 mV per step
300 K / 210 = 0.29 K per step
Is the noise present in the system well below 2.4 mV ?
LSU 10/10/2013
Electronics 7
10
Quantization Noise
Each conversion has an average uncertainty of onehalf of the step size
½(A / 2N)
This quantization error places an upper limit on the
signal to noise ratio that can be realized.
Maximum (ideal) SNR ≈ 6 N + 1.8 decibels (N = # bits)
e.g. 8 bit → 49.8 db, 10 bit → 61.8 db
LSU 10/10/2013
Electronics 7
11
Signal to Noise Ratio
Recovering a signal masked by noise
Some audio examples
In each successive example the noise power is reduced
by a factor of two (3 db reduction), thus increasing the
signal to noise ratio by 3 db each time.
Example 1
LSU 10/10/2013
Example 2
Example 3
Electronics 7
Example 4
12
Data Collection – Sampling Rate
The Nyquist Rate
A signal must be sampled at a rate at least twice that of the highest
frequency component that must be reproduced.
Example – Hi-Fi sound (20-20,000 Hz) is generally sampled
at about 44 kHz.
External temperature during flight need only be sampled
every few seconds at most.
LSU 10/10/2013
Electronics 7
13
ADC Specifications
Input Voltage Range (unipolar or bipolar)
Conversion Time (determines max sampling rate)
Resolution (Number of bits)
Choose an ADC that meets your requirements.
LSU 10/10/2013
Electronics 7
14
ADC0834 Analog-to-Digital Converter
• 8-Bit Successive Approximation ADC
TC ≈ 32 μs
• Synchronous Serial Interface
Use SHIFTIN and SHIFTOUT instructions
• 4-Channel Input Multiplexor
BalloonSat has temperature sensor on-board for CH3
• External Reference Voltage - Can be set to 2.5V or 3V.
Input Voltage 0V to Vref gives ADC counts 0 to 255
($FF)
LSU 10/10/2013
Electronics 7
15
ADC0834 Serial Interface
LSU 10/10/2013
Electronics 7
16
ADC0834 Start Convert Command
1
LSU 10/10/2013
x x
x
Start bit = 1 to start conversion
Electronics 7
17
ADC0834 Channel Select (MUX)
LSU 10/10/2013
Electronics 7
18
ADC0834 Start Convert with Ch 0
1
LSU 10/10/2013
1 0
0
decimal 12
Electronics 7
Hex C
19
Activity
• EEPROM - Read, Write
• Real-Time-Clock - Set Time/Date, Read Time/Date
• ADC - Select Channel, Read ADC
• Read ADC, store data and time stamps to EEPROM.
“Post-flight” readback of data
• Coming Soon….Build (and document!) a data
acquisition system using your BalloonSat
LSU 10/10/2013
Electronics 7
20