Vous êtes sur la page 1sur 17

Basic Signal Conversion

Binary Code Sampling Concepts Digital To Analog Converters

Signal Conversion System

Analog to Digital

Digital to Analog

Conversion of Sensor Output to Binary Code

Conversion of Binary Code to Analog Signal

Chap 0

Binary Code

Numbers in Base 10

461.8 = 4 102 + 6 101 + 1 100 + 8 10-1

Numbers in Base 2

1101 = 1 23 + 1 22 + 0 21 + 1 20 = 13 (Decimal)

n bits Binary Number Unipolar: 0 ~ 2n 1 Bipolar: - 2n-1 ~ 2n-1 1 Binary Strings as a fraction of full scale Used in ADC 0 ~ 1 2-n 1101 = 1 2-1 + 1 2-2 + 0 2-3 + 1 2-4 = 13/16 (Decimal) See Figure 4.2, for 4 bits Natural Binary Code
3

Chap 0

Resolution and MRV

For n bits Binary

MRV (Minimum
Representable Voltage)

Resolution :

2-n

= Full Scale Resolution Example


MRV

Full Scale of 10V, 4-bit Encoding MRV = 10/16 = 625mV Impossible to represent a voltage lower than 625mV

To

improve accuracy of conversion, Increase n


Chap 0

Example: n = 8 MRV = 10 / 28 = 39mV

BCD and Gray Code

Binary Coded Decimal

Gray Code
Useful when angle is measured Change by only one bit as it proceed from one bit pattern to the next

4 bit is used to represent 0 ~ 9

24 = 16 (6 )

Example
283 Decimal 000100011011 Binary 0010 1000 0011 BCD

Chap 0

Bipolar Codes

Chap 0

Code Conversion

Chap 0

Code Conversion

Chap 0

Sampling Concepts

Sampling

Fourier Transform

Chap 0

Sampling Theorem

The conditions for exact representation and recovery are: The Signal must be band limited, and the sampling frequency must not be lower than twice the highest frequency present in the signal

In real, sensor output has infinite harmonics The use of low pass filter before sampling
To band limit signal To Avoid Aliasing Loss of high frequency information

Error of omission

Chap 0

10

Aliasing

Cosine wave Example

When sampling frequency is less than twice the highest frequency of the signal, signal is no longer recoverable by low pass filtering Homework #4-1

Spectrum of cosine wave

30 1/30 ? ?
1

Low pass Filter reconstruct cosine wave

Low pass Filter reconstruct cosine wave Of lower frequency (fs fo)
11

Chap 0

Interpolation

The process of reconstructing a signal from its values at discrete instants of time
Zero order hold or One Point Linear or Two Point Band limited or Low pass Filtering

Chap 0

12

Digital to Analog Converters

n-bit DAC n Latches hold Binary Number n transistor switch Register network Voltage reference controls the range of output OP amp provides summing function

Concept: 4-bit DAC 1010B Eout ??

Bit 3 (1000B)
Eout = R/2R x Eref

Bit 1 (0010B)
Eout = R/8R x Eref

Total (1010B)
Eout = Eref/2 + Eref/8

Eout: 0 ~ (15/16 x Eref)

Chap 0

13

Implementing DAC

Usually Single Chip A Realistic Value of R in IC is 5K


Hope to design a DAC with Small, EqualValue Resistors

4 bit DAC

24R = 80K 28R = 1.28M 212R = 20.48M

Easy to implement with IC technology

8 bit DAC

12 bit DAC

Large R is hard to implement in IC

Needs very large area


14

Chap 0

Practical DAC based on R-2R ladder network

Resistive Ladder Network

Require twice R But small value

5K and 10K

Homework #4-2

Show that Eout = Eref x (bit3/2 + bit2/4 + bit1/8 + bit0/16)

R+R=2R

2R||2R=R Chap 0 15

Actual 8-bit DAC

Analog Devices AD558

DAC for PC prototype board

Chap 0

Separate Analog and Digital Ground To reduce noise

16

C Program for DAC

Generating sawtooth waveform

Only the LS 8 bits of 16-bit integer are used since this is 8-bit DAC

Chap 0

17

Vous aimerez peut-être aussi