chapter 5.pptx: drainage and irrigation engineering
Analog to Digital , Digital to Analog Conversion
1. ANALOG TO DIGITAL &
DIGITAL TO ANALOG CONVERSION
Prepared by:-
Kunj Patel (140410116058)
2. ANALOG-TO-DIGITAL CONVERTERS
Why Analog?
• Not everything is digital!
• Even digital signaling has analog aspects (!?)
• Analog circuits and analysis are still necessary
• Physical phenomena (i.e., the real world) are
usually analog
• Many sensors are analog (potentiometer,
phototransistor, thermo-sensor, microphone)
• Many actuators are analog (solenoid, speakers)
• Some signals need to be processed in analog domain
before conversion to digital (amplification, filtering,
linearization)
3. ANALOG-TO-DIGITAL CONVERTERS
proportionality
Vmax = 7.5V
0V
1111
1110
0000
0010
0100
0110
1000
1010
1100
0001
0011
0101
0111
1001
1011
1101
0.5V
1.0V
1.5V
2.0V
2.5V
3.0V
3.5V
4.0V
4.5V
5.0V
5.5V
6.0V
6.5V
7.0V
analog to digital
4
3
2
1
t1 t2 t3 t4
0100 1000 0110 0101
time
analoginput(V)
Digital output
digital to analog
4
3
2
1
0100 1000 0110 0101
t1 t2 t3 t4
time
analogoutput(V)
Digital input
4. ANALOG TO DIGITAL CONVERSION
Instantaneous amplitudes of
continuous analog signal, measured
at equally spaced points in time.
A series of “snapshots”
Error=1/2 LSB
5. ANALOG TO DIGITAL CONVERSION
5
[a.k.a. “sample word length,” “bit depth”]
Precision of numbers used for
measurement: the more bits, the higher
the resolution.
Example: 16 bit
Sampling Rate
How often analog signal is measured
Sampling Resolution
[samples per second, Hz]
Example: 44,100 Hz
6. SAMPLING RATE
6
Nyquist Theorem:
Sampling rate must be at least twice as high as
the highest frequency you want to represent.
Determines the highest frequency that you
can represent with a digital signal.
Capturing just the crest and trough of a sine
wave will represent the wave exactly.
7. DIGITAL AND ANALOG CONVERSION
A/D transfer function:
10-bit ADC converter
1024 voltage levels between 0V and
VREF
10-bit digital value
Usually VDD=VREF
(e-Vmin)/(Vmax-Vmin)=d/(2^n-
1),
When Vmin=0:
e/Vmax=D/(2^n-1)
In general
Vmax match 2^n-1
Vmin match 0
How does D/A and A/D
conversion work?
8. DIGITAL AND ANALOG CONVERSION
D/A is simpler than A/D
Different resisters and an inverted OpAmp, to
implement a weighted summer.
Example: 4-bit D/A
If D3D2D1D0=0001 (i.e., 0V,0V,0V,-5V)
Vo=-1.1*(D0/17.6+D1/8.8+D2/4.4+D2/2.2)
=0.3125V
If D3D2D1D0=1111 (i.e., -5V,-5V,-5V,-5V)
Vo=-1.1*(D0/17.6+D1/8.8+D2/4.4+D2/2.2)
=4.6875V
9. DIGITAL AND ANALOG CONVERSION
Use D/A converter to generate
different analog values and
compare
Control logic decides which values to try
When comparison complete, best match
is put on output
How can D/A be matched to
input in fewest steps?
comp
VIN
D/A
converter
A/D control
logic
10-bit test value
clock
10-bit output
start
conversion
conversion
complete
12. 3-BIT QUANTIZATION
A 3-bit binary (base 2) number has 23 = 8 values.
0
1
2
3
4
5
6
7
A rough approximation
Amplitude
Time — measure amp. at each tick of sample clock
13. COMMON SAMPLING RATES
Sampling Rate Uses
44.1 kHz (44100) CD, DAT
48 kHz (48000) DAT, DV, DVD-Video
96 kHz (96000) DVD-Audio
22.05 kHz (22050) Old samplers
Most software can handle all these rates.
Which rates can represent the range of
frequencies audible by (fresh) ears?