ET ZC 344
Instrumentation and control
BITS Pilani Balasubramanian M
Assistant Professor Gr-I
Pilani | Dubai | Goa | Hyderabad
BITS Pilani
Pilani Campus
3.1 Digital Signal Processing
• Digital signal conditioning in process control means finding a way to
represent analog process information in a digital format.
• Use of computers in control system is particularly valuable:
1. A computer can control multivariable process control systems.
2. Nonlinearities in sensor output can be linearized by the computer.
3. Complicated control equations can be solved quickly and modified as needed.
4. Networking of control computers allows a large process control
complex to operate in a fully integrated fashion.
ET ZC 344 Instrumentation and control 3 BITS-Pilani
Digital Information
• The use of digital techniques in process control requires that process
variable measurements and control information be encoded into a digital
form.
• Using an assemblage of digital levels to construct a binary number, often
called a word.
• The individual digital levels are referred as bits of the word.
ET ZC 344 Instrumentation and control 4 BITS-Pilani
Conversion Table
ET ZC 344 Instrumentation and control 5 BITS-Pilani
Boolean Algebra
• Boolean Algebra is mathematical procedure that
allows the combinations of true/false conditions in
various logical operations by equations so that
conclusions can be drawn.
ET ZC 344 Instrumentation and control 6 BITS-Pilani
Example
FIGURE 3.1 System for illustrating
Boolean applications to control. • The alarm conditions are:
1. Low level with high pressure
2. High level with high temperature
3. High level with low temp. and high pressure.
Solution is….
➢ D=A’*B will give D=1 for condition 1.
➢ D=A*C will give D=1 for condition 2
➢ D=A*C’*B will give D=1 for condition 3.
• D= A’*B+A*C+A*C’*B
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 7 BITS-Pilani
Some more Boolean Theorems
• a+0=a
• ab+ab’=a
• a*1=a
• (a+b)*(a+b’)=a
• a+a’=1
• ab+a’c=(a+c)*(a’+b)
• a*a’=0
• (a+b)*(a’+c)=ac+a’b
• a*(b+c)=ab+ac
• ab+a’c+bc=ab+a’c
• a+bc=(a+b)*(a+c)
• (a+b)(a’+c)(b+c)=
• a+a’b=(a+b)
• (a+b)(a’+c)
• a(a’+b)=ab
ET ZC 344 Instrumentation and control 8 BITS-Pilani
More Named Theorems
Involution (a’)’ = a
DeMorgan’s (a+b)’ = a’ * b’ (a*b)’=a’ + b’
DeMorgan’s Laws are particularly important in circuit design.
It says that you can get rid of a complemented output by complementing
all the inputs and changing ANDs to ORs.
ET ZC 344 Instrumentation and control 9 BITS-Pilani
Quick overview of AND, OR, NOT Gates
ET ZC 344 Instrumentation and control 10 BITS-Pilani
BITS Pilani
Pilani Campus
3.2 Computer Interface and Tri State Buffers
ET ZC 344 Instrumentation and control 13 BITS-Pilani
Computer Interface
Generic model of a computer bus system.
The term Interface refers to the hardware
connections and software operations
necessary to input and output data using
connections to the bus.
No other equipment could raise the line
to the 1/0 state during its data transfer
operations.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 12 BITS-Pilani
Tri - State Buffers
• Isolation of a bus line is accomplished by making all connections via
a special digital device called a tri-state buffer.
• This device acts like a simple switch.
• When the switch is closed, the logic level on its input is impressed
upon the output.
• When open, the output is placed in a high-impedance state - that is,
an open circuit.
ET ZC 344 Instrumentation and control 13 BITS-Pilani
Tri - State Buffers
• Tri-state buffers allow multiple signals to share a single digital line in the bus.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 14 BITS-Pilani
BITS Pilani
Pilani Campus
3.3 Comparators
ET ZC 344 Instrumentation and control 19 BITS-Pilani
Comparator
• A basic comparator compares
voltages and produces a digital
output.
• The most elementary form of
communication between the
analog and digital is a device
(usually an IC) called a
comparator.
• The comparator is extensively
used for alarm signals to
computers or digital processing
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved. systems.
ET ZC 344 Instrumentation and control 16 BITS-Pilani
Open Collector comparators
• A) Open Collector Comparator: Even if
there is base-emitter current in the
transistor, no voltage will show up on the
collector until it is connected to a supply
through some collector resistor.
• B) an external resistor is connected from
the output to an appropriate power supply.
This is called a collector pull-up resistor.
• Now the output terminal will show either a
0(0V) if the internal transistor is ON or 1
(Vs) if the internal transistor is OFF.
• Many comparators use an open-collector
Copyright ©2006 by Pearson Education, Inc.
output.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 17 BITS-Pilani
Advantages of open collector comparators
1. It is possible to use a different power source for the output.
Example: To activate a +12 V relay with the output of a comparator that
operates on +5V. By using an open-collector model, you can connect the
pull-up resistor to a +12 V supply and power the relay directly from the output.
2. It is possible to OR together several comparators’ outputs by connecting
all open collector outputs together and then using a common pull-up resistor.
If any one of the comparator’s output transistors is turned ON, the common
output will go low.
ET ZC 344 Instrumentation and control 18 BITS-Pilani
Hysteresis Comparator
• When using comparators, there is often a problem if the signal voltage has
noise or approaches the reference value too slowly.
• The comparator output may “jiggle” back and forth between high and low as
the reference level is reached.
A comparator output will “jiggle” when a noisy signal passes through the reference voltage level.
ET ZC 344 Instrumentation and control 19 BITS-Pilani
• Such may cause problems with the equipment designed to interpret the
comparator output signal.
• This problem can often be solved by providing a deadband or hysteresis
window to the reference level around which output changes occur.
• Once the comparator has been triggered high, the reference level is
automatically reduced so that the signal must fall to some value below
the old reference before the comparator goes to the low state.
ET ZC 344 Instrumentation and control 20 BITS-Pilani
Under the condition that Rf>>R
ET ZC 344 Instrumentation and control 21 BITS-Pilani
• The deadband or hysteresis is given by (R/Rf)Vₒ, and is thus selectable
by choice of the resistors, as long as this relation is satisfied.
ET ZC 344 Instrumentation and control 22 BITS-Pilani
BITS Pilani
Pilani Campus
3.4 Digital to Analog Converter
ET ZC 344 Instrumentation and control 29 BITS-Pilani
DACs
• A unipolar DAC converts a digital word into an analog voltage by scaling the analog
output to be zero when all bits are zero and some maximum value when all bits are one.
• This can be mathematically represented by treating the binary number that the word
represents as a fractional number.
ET ZC 344 Instrumentation and control 24 BITS-Pilani
DACs
• The output of the DAC can be defined as a scaling of some reference
voltage:
V =V [b 2−1 +b 2−2 +......+b 2−n ]
out R 1 2 n
where Vout = Analog output voltage
VR=reference voltage
b1b2….bn = n-bit binary word
• The minimum Vout is zero, and the maximum is determined by the size
of binary word because, with all bits set to one, the decimal equivalent
approaches VR as the number of bits increases.
ET ZC 344 Instrumentation and control 25 BITS-Pilani
DACs
V out = N / 2 n V R
This is based on noting that the expression in brackets is really just
the fraction of total counting states possible with the n bits being used.
where N= base 10 whole number equivalent of DAC input.
ET ZC 344 Instrumentation and control 26 BITS-Pilani
Bipolar DAC
• Some DACs are designed to output a voltage that ranges from plus to minus
some maximum when the input binary ranges over the counting states.
• Although computer frequently use 2s complement to represent negative
numbers, this is not common with DACs.
• Instead, a simple offset-binary is frequently used, wherein the output is simply
biased by half the reference voltage .
ET ZC 344 Instrumentation and control 27 BITS-Pilani
• The bipolar DAC relationship is then given by
V = N / 2 V − 1 / 2V
n
out R R
• Notice that if N=0, the output will be given by the minimum value,
Vout(min) = -VR/2.
• However , the maximum value for N is equal to 2n − 1 ,so that the
maximum value of output voltage will be
V (max) = (2 −1) / 2 V −1/ 2V =1/ 2V −V / 2n
n n
out R R R R
ET ZC 344 Instrumentation and control 28 BITS-Pilani
Conversion Resolution
• It is a function of the reference voltage and the number of bits in the word.
• The more bits, the smaller the change in analog output for a 1 bit change in
binary word, and hence the better the resolution.
• The smallest possible change is simply given by
V out = V R 2 − n
where Vout = smallest output voltage;
VR = reference voltage;
n = number of bits in the word
ET ZC 344 Instrumentation and control 29 BITS-Pilani
BITS Pilani
Pilani Campus
3.5 Characteristics of DAC
ET ZC 344 Instrumentation and control 38 BITS-Pilani
DAC Characteristics
A generic DAC diagram, showing typical input and output signals.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 31 BITS-Pilani
• Offset : Because the DAC is usually implemented with op amps, there may be
the typical offset voltage with a zero input. Typically, connections will be provided
to facilitate a zeroing of the DAC output with a zero word input.
ET ZC 344 Instrumentation and control 32 BITS-Pilani
• Data Latch: Many DACs have a data latch built into their inputs. When a
logic command is given to latch data, whatever data are on the input bus
will be latched into the DAC, and the analog output will be updated for
that input data. The output will stay at that value until new digital data are
latched into the input.
In this way , the input of the DAC can be connected directly onto the data bus
of a computer, but it will be updated only when a latch command is given
by the computer.
ET ZC 344 Instrumentation and control 33 BITS-Pilani
• Conversion time: A DAC performs the conversion of digital input to
analog output virtually instantaneously. From the moment that the digital
signal is placed on the inputs to the presence of the analog output
voltage is simply the propagation time of the signal through internal
amplifiers. Typically, settling time of the internal amplifiers will be a few
microseconds.
ET ZC 344 Instrumentation and control 34 BITS-Pilani
DAC Structure
• A DAC is used as a black box, and no knowledge of the internal workings
is required.
• The simplest conversion uses a series of op amps for input for which the
gains have been selected to provide an output.
• The most common variety, however, uses a resistive ladder network to
provide the transfer function.
ET ZC 344 Instrumentation and control 35 BITS-Pilani
• With the R-2R choice of resistors, it can
be shown through network analysis that
the output voltage is given by equations.
The switches are analog electronic
switches.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 36 BITS-Pilani
Data Output Boards
• It is now common and convenient to obtain a printed circuit board that plugs into
a personal computer expansion slot and is complete data output system.
• The board has all necessary DACs, address decoding, and bus interface.
• In most cases, the supplier of the board also provides elementary software-often
written in C,BASIC, or assembly language-as necessary to use the board for data
input.
ET ZC 344 Instrumentation and control 37 BITS-Pilani
BITS Pilani
Pilani Campus
3.6.1 Data Acquisition Systems
Hardware
ET ZC 344 Instrumentation and control 48 BITS-Pilani
Data Acquisition Systems
• Special PCBs called data acquisition systems (DASs) have been developed
for the purpose of providing for input and output of analog data.
• These are used when the PC is to be used in a control system.
ET ZC 344 Instrumentation and control 39 BITS-Pilani
DAS hardware
• Typical layout of a data-acquisition board for use in a personal computer expansion slot.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 40 BITS-Pilani
FIGURE 3.30 An analog multiplexer acts as a multiposition switch
for selecting particular inputs to the ADC.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 41 BITS-Pilani
Address Decoder/command processor:
• The computer can select to input a sample from a given channel by sending an
appropriate selection on the address lines and control lines of the computer bus.
• These are decoded to initiate the proper sequence of commands to the MUX,
ADC, and S/H.
• Another common feature is the ability to program the DAS to take a number of
samples from a channel with a specified time between samples.
• In this case, the computer is notified by interrupt when a sample is ready for
input.
ET ZC 344 Instrumentation and control 42 BITS-Pilani
BITS Pilani
Pilani Campus
3.6.2 Data Acquisition Systems
Software
ET ZC 344 Instrumentation and control 55 BITS-Pilani
DAS Software
• Generally, the DAS is mapped into a
base port address location in the PC
system.
• In the PC, this address can be 000H to
FFFH, but many addresses are reserved
for use by the processor and other
peripherals.
• A common address for input/output(I/O)
systems such as the DAS is port 300H.
• Software for data acquisition involves
operations to start the ADC, test the
EOC, and input the data.
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458 | All rights reserved.
ET ZC 344 Instrumentation and control 44 BITS-Pilani
• The end - of - converter (EOC) is provided in a status register in the
DAS. The contents of this status register can be read by the processor
by a port input of a base + offset address.
• The appropriate bit is then tested by the software to deduce whether the
EOC has been issued.
• Once the EOC has been issued, the software can input the data itself by
a read of an appropriate address, again a base + offset, which enables
tri states, placing the ADC output on the data bus.
ET ZC 344 Instrumentation and control 45 BITS-Pilani
• If the DAS fails, the computer will be locked in the loop waiting for the
EOC to be issued.
• One way to resolve this is to add an additional timer loop for a time
greater than the conversion time of the ADC.
• If the EOC is not detected prior to time - out, an error is announced, and
the computer is returned to an error handling routine.
• In some cases, the EOC detection is handled by an interrupt service
routine. In this way the computer is free to execute other software until
the interrupt occurs.
• Then the data is input. Again, there needs to be a system to detect that
an EOC was not provided to protect against DAS failure.
ET ZC 344 Instrumentation and control 46 BITS-Pilani
THANK YOU
ET ZC 344 Instrumentation and control 47 BITS-Pilani