Conversion Devices
محمد محمد حيمة.د
m_heima@yahoo.com
بسم هللا الرحمن الرحيم
نحمده ونصلي على رسوله الكريم
Data Acquisition System Overview
Conversion Devices
In the last few years, industrial PC I/O interface products have become
increasingly reliable, accurate and affordable. PC-based data
acquisition and control systems are widely used in industrial and
laboratory applications like monitoring, control, data acquisition and
automated testing.
Selecting and building a DA&C (Data Acquisition and Control)
system that actually does what you want it to do requires some
knowledge of electrical and computer engineering.
Transducers and actuators
Signal conditioning
Data acquisition and control hardware
Computer systems software
Data Acquisition System Introduction I
A data acquisition system consists of many
components that are integrated to:
Sense physical variables (use of transducers)
Condition the electrical signal to make it readable
by an A/D board
Convert the signal into a digital format acceptable
by a computer
Process, analyze, store, and display the acquired
data with the help of software
Data Acquisition System Introduction II
A data acquisition system II consists of many
components that are integrated to:
Convert the output signal of computer into an analog
format this is done by the use of D/A board.
Condition the electrical signal to make it readable by
the transducers
Transfer the signal by the use of transducers into real
physical form.
Block Diagram of Data Acquisition System I
Block Diagram of Data Acquisition System II
Transducers
Sense physical phenomena and translate it into electric signal.
Temperature Displacement
Pressure Level
Light Electric
signals
Force ON/OFF switch
Transducers and Actuators
محوالت الطاقة والمشغالت الميكانيكية
A transducer converts temperature, pressure, level,
length, position, etc. into voltage, current,
frequency, pulses or other signals.
An actuator is a device that activates process
control equipment by using pneumatic, hydraulic
or electrical power. For example, a valve actuator
opens and closes a valve to control fluid rate.
Signal Conditioning
Signal conditioning circuits improve the quality of
signals generated by transducers before they are
converted into digital signals by the PC's data-
acquisition hardware.
Examples of signal conditioning are signal scaling,
amplification, linearization, cold-junction
compensation, filtering, attenuation, excitation,
common-mode rejection, and so on.
Signal Conditioning
One of the most common signal
conditioning functions is amplification.
For maximum resolution, the voltage range
of the input signals should be approximately
equal to the maximum input range of the
A/D converter. Amplification expands the
range of the transducer signals so that they
match the input range of the A/D converter.
For example, a x10 amplifier maps
transducer signals which range from 0 to 1 V
into the range 0 to 10 V before they go into
the A/D converter.
Signal Conditioning
Electrical signals are conditioned so they
can be used by an analog input board. The
following features may be available:
Amplification
Isolation
Filtering
Linearization
Data Acquisition
Data acquisition and control hardware
generally performs one or more of the
following functions:
analog input,
analog output,
digital input,
digital output and
counter/timer functions.
1st Conversion Devices
1st Voltage to Current Conversion V/I
ICVS (Transconductance Amplifier)
Vin
Neglecting VIO, the (-) +
and (+) terminals are at _
the same voltage, Vin. IL RL
Therefore, VR1 = Vin. I=0
Since I = 0, I1 R1
IL = I1 = Vin/R1
Current independent
of RL
Floating load
1st Voltage to Current Conversion V/I
ICVS (Transconductance Amplifier)
R1 R2
Vin + Vo
_
For grounded load R3 R4
If R2/R1 = R4/R3
RL IL
V-IN
IL Ii
R3
Constant-Current Source
IL
Ri RL
For the basic constant- _
current circuit, the op- Ii
amp has a very high VIN +
Zin, thus, IL = Ii.
If RL changes, IL
remains constant as VIN
IL Ii
long as VIN and Ri are Ri
held constant.
ICVS Example
IL
Load Given: Vin = 2 V, R1 = 2 k
I1 R1 Vo(max) = 10 V
_
+ Find: iL , gm and RL(max)
Vin +
_ Solution:
IL = I1 = Vin/R1 = 2 / 2000 = 1 mA
Note: gm = Io/Vin = 1/R1 = 1 / 2000
If RL > RL(max) the op amp = 0.5 mS
will saturate
The output current, iL is
RL(max) = Vo(max)/iL = 10 V / 1 mA
independent of the load = 10 k
resistance.
2nd Current to Voltage Conversion I/V
VCIS (Transresistance Amplifier)
V0=I R
I should not be too large otherwise offset voltage will be too high.
IF
RF
General Equations: Iin
IF = Iin
_
A V0
Vo = -IFRF +
Rm = Vo/Iin = RF
VCIS (Transresistance Amplifier) Summary
Transresistance Amplifiers are used for low-power applications
to produce an output voltage proportional to the input current.
Photodiodes and Phototransistors, which are used in the
production of solar power are commonly modeled as current
sources.
Current to Voltage Converters can be used to convert these
current sources to more commonly used voltage sources.
Current to Voltage Converter Example
IF RF
Given: Iin = 10 mA
_
RF = 200
+
Iin + VO Find: IF , Vo and Rm
-
Solution:
IF = Iin = 10 mA
Vo = -IFRF = 10 mA * 200
=2V
Rm = Vo/Iin = RF = 200
Current to Voltage Converter I/V
Rf
Ii
Since the inverting Vin If
_
terminal is at virtual Vout
ground, +
Vout = -If Rf = -Ii Rf
As the amount of light
changes, the current
through the photocell Circuit for sensing light level
changes; thus and converting it to a
proportional output voltage
Vout = | Ii| Rf
3rd Digital to Analog converter (D/A)
The opposite of analog to digital conversion is digital to
analog (D/A) conversion. This operation converts digital
information into analog voltage or current. D/A devices
allow the computer to control real-world events.
Analog output signals may directly control process
equipment. The process can give feedback in the form of
analog input signals. This is referred to as a closed loop
control system with PID control.
Analog outputs can also be used to generate waveforms. In
this case, the device behaves as a function generator.
Analog Outputs (D/A)
What is a DAC ?
A digital-to-analog converter (DAC) is a circuit
that produces an analog current or voltage that
is proportional to an analog reference (voltage or
current) and an N-bit binary word.
Vout = k x Vref x (Binary Word)
In English
DACs generate piecewise continuous signals
from digital code.
OR
DAC converters are devices that receive a
binary word from the microprocessor and
convert it to a scaled analog voltage (or current).
DAC Configuration
N-Bit Binary Word
Analog Reference Digital to Analog Analog
Voltage (Vref) Converter (D/A) Output (Vout)
DAC Types
Multiplying DAC
- reference source is external to the DAC
package
Non-multiplying DAC
- reference source is inside the DAC package
DAC Circuit Types
Two types of DAC Circuits:
1. Binary weighted
2. R-2R ladder
The binary weighted resistor network
Comprises of a register and resistor network
Output of each bit of the register will depend on whether a 1 or a
0 is stored in that position
e.g. for a 0 then 0V output
for a 1 then 5V output
Resistance R is inversely proportional to binary weight of each
digit
R
MSB
2R RL VL
4-bit
registe 4R
r
8R
LSB
Buffering the resistor network
Best solution is to follow the resistor network with a
buffer amplifier
Has high impedance, practically no current flows
All input currents sum at S and go through Rf
Vo = -IfRf
MSB R I1 Rf
2R I2 If
4-bit register
4R I3 -
S I
LSB 8R I4 +
Vo
Vo = -If Rf = -( I1+ I2+ I3+ I4 ) Rf
N-Bit Binary Weighted DAC
Binary Weighted Principles
N
bi
I 0 VR i 1
i 12 R
I 0 sum of currents leaving junction
R resistance corresponding to MSB
N number of input bits
b1 MSB
Principles Cont’d
V0 = -Rf I0
V0 = voltage output from amplifier
Rf = feedback resistance
Resolution= VR / 2N
Note: For a gain of 1, R = 2Rf
Example
Find output voltage and current for a binary
weighted resistor DAC of 4 bits where :
R = 10 kΩ, Rf = 5 kΩ and VR = 10 Volts. Applied
binary word is 1001.
Solution
Rf = (R/2)
I i
Vo
8R 4R 2R R
4-bit 3-bit 2-bit 1-bit
MSB
VR
Solution Cont’d
10 V 1 0 0 1
Io
2 *10 2 *10 2 *10 23 *104
0 4 1 4 2 4
I 0 - 0.001125 A
V0 - R f I 0
V0 (5 )(0.001125 A) 5.625 V
3
Solution Cont’d
Binary input = 1001 = 9
From example, V0 = 5.625V
V0/VR = 5.625V/10V = 9/16
D/A Example 2
Calculate the output voltage for an input
code word 0110 if a logic 1 is 10V and a
logic 0 is 0V, and R = RF=1k
I1 = I 4 = 0
I2 = 10 V / 2R = 10 / 2k = 5 mA
I3 = 10 V / 4R = 10 / 4k = 0.25 mA
Vo = -If x Rf = -(0.0075) x 1000 = -7.5 volts
Vo = -If Rf = -( I1+ I2+ I3+ I4 ) Rf
The weighted resistor network
Seldom used when more than 6 bits in the code word
to illustrate the problem consider the design of an 8-bit
DAC if the smallest resistor has resistance R
what would be the value of the largest resistor?
what would be the tolerance of the smallest resistor?
Very difficult to manufacture very accurate resistors over
this range
Limitations of the Binary Weighted D/C
Has problems if bit length is longer than 8 bits
For example, if R = 10 k Ohms
R8 = 28-1(10 k Ohms) = 1280 kΩ
If VR = 10 Volts,
I8 = 10V/1280 k Ohms = 7.8 A
Op-amps to handle those currents are
expensive because this is usually below
the current noise threshold.
Limitations Cont’d
If R = 10 Ohms and Vref = 10 V
I = VR/R = 10 V / 10 Ω = 1 A
This current is more than a typical op-amp can handle.
Intuitively, the resistance values must be accurate to less
than one part in 2N for the RN input to be meaningful. This
is difficult to do, especially in IC’s.
The R-2R Ladder Resistor Network
Has a resistor network which requires resistance values
that differ 2:1 for any sized code word
The principle of the network is based on Kirchhoff's
current rule
The current entering N must leave by way of the two
resistors R1 and R2
I N R2
R1
The R-2R Ladder Resistor Network
Works on a current dividing network
A B
I R I1
2R 2R 2R
I1 I2
Resistance to right of B = 1/(1/2R + 1/2R)
Resistance to right of A = R +2R/2 = 2R
Current divides I1 = I/2 I2 = I/4 divides again
The R-2R Ladder Resistor Network
The network of resistors to the right of A have an
equivalent resistance of 2R, and so the right hand
resistance can be replaced by a copy of the network
I I/2 R I/4 R I/8
Bit Current
3 I/2
2 I/4
2R 2R 2R 2R
1 I/8
0 I/16
I1=I/2 I2=I/4 I3=I/8
bit 3 bit 2 bit 1
bit 0
The R-2R Ladder Resistor Network
I R R R The state of the bits
is used to switch a
voltage source
Vs 2R 2R 2R 2R 2R
I/2 I/4 I/8 I/16
Rf
+
Vo
4-bit register
MSB
LSB
Vo -R f (b3 I 2 b2 I 4 b I 8 b0 I 16)
1
Example
I R R R
Vs 2R 2R 2R 2R 2R
I/2 I/4 I/8 I/16
Rf
+
Vo
4-bit register
MSB
LSB
Vo -R f (b3 I 2 b2 I 4 b I 8 b0 I 16)
1
For the circuit shown above with I = 10 mA and Rf = 2k,
calculate the output voltage V0 for an input code word 1110.
Example
I = 10mA
Rf = 2k
input code word 1110
Vo = -2000( 0.01/2 + 0.01/4 + 0.01/8 + (0 x 0.1)/8 )
= - 2000 * (0.04 + 0.02 + 0.01) / 8
= 17.5 volts
R/2R ladder DAC
Most popular single
package DAC
Resolves BWL problems
Only two resistor values
Equations governing R/2R
N
bi
Vo VR i ; where b1 is MSB
i 1 2
N
VR bi
Ii 2R
i 1 2
i 1 ; where b1 is MSB
VR
Resolution N ; where N is number of bits
2
1
Vo fs VR 1 N ; where N is number of bits
2
Principles of Operation
Binary Switch true Inverting Op-amp used
ground w/ LOW input to generate analog
Binary Switch op- output voltage
amp virtual ground w/ HI Performed many times
input per second semi-
Splits current at each bit continuous DAC
After multiplication of
binary word Io
DAC Errors
Resolution:
Increases (improves) as number of bits increases
Most microcontrollers use 8 bit DAC
Some 12 bit DAC used in high end applications
Overshoot & Settling Time:
Time for DAC to come w/in 0.5 LSB {Vo ± 0.5*(VR /2N)} of new voltage
after binary change
Typical current output of DAC’s conversion times is (10 ns to 1 μs)
Absolute Accuracy Error:
Difference between theoretical and actual output
Conversion Speed:
Rapidly fluctuating inputs require high conversion speed to be interpreted
accurately
DAC Errors Cont’d
Saturation:
Use of op-amps requires that input voltage and scaling voltages be bounded to the
specifications of the op-amp.
Non-Monotonicity:
Certain conditions where increased input results in decrease V o
Differential Non-Linearity:
Deviation of actual converter step size from the ideal predicted wave step
Gain Error:
Gain too low = same analog output; gain too high = too large an output
Offset Error:
Constant error of DAC
Reference Voltage
Internal / external
Applications of DAC
Control Systems
Digital Audio
Digital Telephones
Cruise Control
Waveform Generation
وآخر دعوانا ان الحمد
هلل رب العالمين