Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Chapter analog I/O

Voltage
logical
continuous
t

Sampling is a function of time


Voltage is sampled during these time periods
voltage

time
T = (Sampling Frequency) -1

Sampling time

V t
Vma x

Analog Inputs
V t2

V t1
V min
t

where,

t1 t2

V t = the actual voltage over time


= sample interval for A/D converter
t = time
t 1, t 2 = time at start,end of sample

V t 1 , V t 2 = voltage at start, end of sample


Vmin , Vmax = input voltage range of A/D converter
N = number of bits in the A/D converter

Some relationships
(1)

R = 2N
VERROR

V m ax Vmin

2R

Vin V min

VI = I NT R 1
Vm a x Vm in
VC

VI

= V m ax Vmi n + Vmin
R 1

(2)

(3)

(4)

where,
R = resolution of A/D converter
V = the integer value representing the input voltage
I
VC = the voltage calculated from the integer value
V
= the maximum quantization error
ERR OR

An Example

Given,
N = 10
Vma x = 10V
Vm in = 10V
Vin = 4.564V
Calculate,
R = 2

VERROR

= 1024
Vma x Vm in
= 0.0098V
=

2R

Vin Vmin

R = 746
VI = I NT
Vm a x Vm in
VC

VI

= Vm ax V m in + Vmin = 4.570V
R

Aliasing

f AD 2f signal

where,

f
= sampling frequency
AD
f signal = maximum frequency of the input

Analog Output Relationship


(5)

R = 2N
VERROR

V m ax Vmin

=
2R

(6)

Vdesired Vmin

R
VI = INT

Vma x Vmin

(7)

V I

Voutpu t = Vma x Vm in + Vm in
R

(8)

where,
R = resolution of A/D converter
V ERR OR = the maximum quantization error
V I = the integer value representing the desired voltage
Voutput = the voltage output using the integer value
V

des ired

= the desired output voltage

An Example

Given,
N = 8
V m ax = 10V
V m in = 0V
Vdesired = 6.234V
Calculate,
N

R = 2 = 256
VERROR

Vma x Vm in

= 0.020V
=

2R

Vin Vmin

R = 160
VI = INT
Vm a x Vm in
VI
VC = Vm ax Vm in + Vmin = 6.250V
R

Electrical Noise

Insulated wires

Two conductor
shielded cable
cross section

Metal sheath
Insulating cover

1" or less typical

You might also like