Unit 5
Unit 5
Basic circuit:
Process of Analog to Digital Conversion:
1. Sampling and Holding
2. Quantizing - Breaking down analog value in to a set of finite states
3. Encoding - Assigning a digital word or number to each state and matching it to
the input signal
Sampling and Holding
The circuit is an analog device that samples the voltage of a continuously varying analog
signal and holds (freezes) its value at a constant level for a specified minimum period of
time.
Measuring analog signals at uniform time intervals
Ideally twice as fast as what we are sampling
Digital system works with discrete states
Taking samples from each location
The signal is only defined at determined times
The sampling times are proportional to the sampling period (Ts)
Settling time:
This is usually expressed as the time taken to settle within half LSB. Generally settling time
will be 500ns.
Stability:
The ability of a DAC to produce a stable output all the time is called as Stability. The
performance
of a converter changes with drift in temperature, aging and power supply variations. So all the
parameters such as offset, gain, linearity error & monotonicity may change from the values
specified in the datasheet. Temperature sensitivity defines the stability of a D/A converter.
Quantization error
Quantization is representing the sampled values of the amplitude by a finite set of
levels, which means converting a continuous-amplitude sample into a discrete-time signal.
For any system, during its functioning, there is always a difference in the values of its
input and output. The processing of the system results in an error, which is the difference of
those values.
The difference between an input value and its quantized value is called a Quantization
Error. A Quantizer is a logarithmic function that performs Quantization (rounding off the
value). An analog-to-digital converter (ADC) works as a quantizer.
The following figure illustrates an example for a quantization error, indicating the
difference between the original signal and the quantized signal.
5.2.TYPES OF ADC
1.1 FLASH TYPE ADC:
This is the simplest possible A/D converter. It is at the same time, the fastest and most
expensive technique. Figure shows a 3 bit A/D converter. The circuit consists of a resistive
divider network, 8 op-amp comparators and a 8-1ine to 3-1ine encoder (3-bit priority encoder).
The Comparator and its truth table are shown in Figure below
A small amount of hysteresis is built into the comparator to resolve any problems that might
occur if both inputs were of equal voltage as shown in the truth table. From the Figure, at each
node of the resistive divider, a comparison voltage is available. Since all the resistors are of
equal value, the voltage levels available at the nodes are equally divided between the reference
voltage VR and the ground. The purpose of the circuit is to compare the analog input voltage
Va with each of the node voltages. The truth table for the flash type A/D converter is shown
above.
Advantages of flash type A/D converter
The number of comparators required almost doubles for each added bit.
Larger the value of n (number of bits), the more complex is the priority encoder.
comparator
Fig.5 Counter type ADC
The N bit counter generates an n bit digital output which is applied as an input to the
DAC. The analog output corresponding to the digital input from DAC is compared with the
input analog voltage using an op-amp comparator. The op-amp compares the two voltages and
if the generated DAC voltage is less, it generates a high pulse to the N-bit counter as a clock
pulse to increment the counter. The same process will be repeated until the DAC output equals
to the input analog voltage.
If the DAC output voltage is equal to the input analog voltage, then it generates low
clock pulse and it also generates a clear signal to the counter and load signal to the storage
resistor to store the corresponding digital bits. These digital values are closely matched with
the input analog values with small quantization error. For every sampling interval the DAC
output follows a ramp fashion so that it is called as Digital ramp type ADC. And this ramp
looks like stair cases for every sampling time so that it is also called as staircase approximation
type ADC.
Fig.6 Digital output and analog input for a counter type ADC
Conversion time of ADC is the time taken by the ADC to convert the input sampled analog
value to digital value. Here the maximum conversion of high input voltage for a N bit ADC is
the clock pulses required to the counter to count its maximum count value. So
By observing the above conversion time of Counter type ADC it is illustrated that the sampling
period of Counter type ADC should be as shown below.
Ts >= (2N-1) T
There may be clash or aliasing effect if the next input is sampled before completion of
one operation.
Instead of counting up in binary sequence, this register counts by trying all values of
bits starting with the MSB and finishing at the LSB.
The register monitors the comparators output to see if the binary count is greater or less
than the analog signal input and adjusts the bits accordingly
Fig.7 Successive Approximation ADC Circuit
Elements:
DAC = Digital to Analog Converter
Comparator
Algorithm
Uses an n-bit DAC and original analog results
Example 1:
5-bit ADC, Vin=0.6V, Vref=1V
Cycle 1 => MSB=1
SAR = 1 0 0 0 0
VDAC = Vref/2^1 = .5 Vin > VDAC SAR unchanged = 1 0 0 0 0
Cycle 2
SAR = 1 1 0 0 0
VDAC = .5 +.25 = .75 Vin < VDAC SAR bit3 reset to 0 = 1 0 0 0 0
Cycle 3
SAR = 1 0 1 0 0
VDAC = .5 + .125 = .625 Vin < VDAC SAR bit2 reset to 0 = 1 0 0 0 0
Cycle 4
SAR = 1 0 0 1 0
VDAC = .5+.0625=.5625 Vin > VDAC SAR unchanged = 1 0 0 1 0
Cycle 5
SAR = 1 0 0 1 1
VDAC = .5+.0625+.03125= .59375
Table 2:Input vs Voltage
Bit 4 3 2 1 0
Advantages
Capable of high speed and reliable
Capable of output the binary number in serial (one bit at a time) format.
High resolution
No precision external components needed
Disadvantages
Higher resolution successive approximation ADC’s will be slower
Speed limited.
5.3.TYPES OF DAC
(1)
Where,
𝑉𝑜 = output voltage
𝑑1 𝑑2……. 𝑑𝑛 = n-bit binary fractional word with the decimal point located at the left
𝑑1 = most significant bit (MSB) with a weight of 𝑉𝐹𝑆/2
𝑑𝑛 = most significant bit (MSB) with a weight of 𝑉𝐹𝑆/2n
One of the simplest circuits is shown in Figure uses a summing amplifier with a binary
weighted resistor network. It has n- electronic switches 𝑑1 𝑑2……. 𝑑𝑛 controlled by binary
input word. These switches are single pole double throw (SPDT) type. If the binary input to a
particular switch is 1, it connects the resistance to the reference voltage (-𝑉𝑅). And if the input
bit is 0, the switch connects the resistor to the ground. From Figure (a) the output current 𝐼𝑜 for
an ideal op-amp can be written as
(2)
Comparing equation (1) with (2) it can be seen that if 𝑅𝑓 = R then K = 1 and 𝑉𝐹𝑆= 𝑉𝑅 .
The circuit shown in Figure uses a negative reference voltage. The analog output
voltage is therefore positive staircase as shown in Figure for a 3-bit weighted resistor DAC. It
may be noted that
Although the op-amp in Figure is connected in inverting mode, it can also be connected
in non-inverting mode.
The op-amp is simply working as a current to voltage converter.
The polarity of the reference voltage is chosen in accordance with the type of the switch
used. For example, for TTL compatible switches, the reference voltage should be = 5
V and the output will be negative.
The accuracy and stability of a DAC depends upon the accuracy of the resistors and the
tracking of each other with temperature. There are however a number of problems associated
with this type of DAC. One of the disadvantages of binary weighted type DAC is the wide
range of resistor values required. It may be observed that for better resolution, the input binary
word length has to be increased. Thus, as the number of bit increases, the range of resistance
value increases. For 8-bit DAC, the resistors required are 20R, 21 R, 22 R… 27 R. the largest
resistor is 128 times the smallest one for only 8-bit DAC. For a 12-bit DAC, the largest
resistance required is 5.12 MΩ if the smallest is 2.5 kΩ. The fabrication of such a large
resistance is IC is not practical. Also the voltage drop across such a large resistor due to the
bias current would also affect the accuracy. The choice of smallest resistor value as 2.5 kΩ is
reasonable; otherwise loading effect will be there. The difficulty of achieving and maintaining
accurate ratios over such a wide range especially in monolithic form restricts the use of
weighted resistor DACs to below 8-bits.
Fig.12 (a)A simple weighted resistor DAC (b) Transfer characteristics of a 3-bit DAC
Wide range of resistors are required in binary weighted resistor type DAC. This can be
avoided by using R-2R ladder type DAC where only two values of resistors are required. It is
well suited for integrated circuit realization. The typical value of resistor ranges from 2.5kΩ to
10kΩ.
For simplicity, consider a 3-bit DAC as shown in Figure, where the switch position
𝑑1 𝑑2 𝑑3 corresponds to the binary word 100. The circuit can be simplified to the equivalent
form of Figure (b) and finally to Figure (c). then, voltage at node C can be easily calculated by
the set procedure of network analysis as
Fig.13 (a) R-2R ladder DAC (b) Equivalent circuit of (a), (c) Equivalent
circuit of (b)
The switch position corresponding to the binary word 001 in 3 bit DAC is shown in
Figure (a). The circuit can be simplified to the equivalent form of Fig(b). The voltages at the
nodes (A,B,C) formed by resistor branches are easily calculated in a similar fashion and the
output voltage becomes
Fig.14 (a) R-2R ladder DAC for switch positons 001 (b) Equivalent circuit
In a similar fashion, the output voltage for R-2R ladder type DAC corresponding to
other 3-bit binary words can be calculated.
Digital Voltmeter
An instrument used to measure potential difference between two ends of a conductor and
display result in digital form.
Types:
Ramp type DVM
Advantages:
1. Errors on account of parallax and approximations are entirely eliminated
2. Operating speed is increased
3. Data can be fed to memory devices for storage and future computation.
4. Size reduced after the advent of ICs and easily portable.
Ramp Type DVM
Principle:
Input voltage is converted into digital equivalent by counting the time taken for the ramp wave to
decrease from the magnitude of input voltage to 0V.
Construction:
The block diagram of the Ramp-type ADC can be
divided into two sections as follows:
1. Voltage to time conversion section
2. Time measurement section
Voltage to time conversion section
In the voltage to time conversion section, the analog input voltage is fed to the attenuation
circuit. The attenuated signal is compared with the the ramp signal generated by the ramp generator
given in the block diagram by the input comparator 'C1'. Similarly, The ramp signal generated is
compared with 0V via a zero- crossing detector 'C2'. A sample rate multivibrator is connected to the
ramp generator whose purpose is to provide an initiating pulse for the ramp generator to start the
next ramp voltage for the next measurement. It is also used to reset the counter before generating the
next ramp voltage
Time measurement section
In the time measurement section, there is counter which is triggered by a gating pulse.
The inputs of the gating pulse are (i) Output of 'C1' (ii) Output of 'C2' (iii) Clock pulse from the
oscillator. The counter is reset after each successful completion of time measurement by
a control signal from the sample rate multivibrator. The count produced is displayed by connecting
suitable display device..
Operation
Initially, the attenuated signal is compared with a negative going ramp signal generated by the ramp
generator. When the ramp voltage coincides with the input signal, the output of 'C1' becomes low.
This point is called coincidence point. This initiates the counting process ( start of count ). The
counter continues to count until the ramp voltage reduces and crosses zero (0V). This is detected by
zero crossing detector 'C2'. The output of 'C2' becomes high which ends the counting process (end of
count).
DVM
Merits:
Demerits:
accuracy of output greatly depends on linearity of the ramp.(since only one ramp is used)
Digital Storage Oscilloscope
Block Diagram
The block diagram of digital storage oscilloscope is shown in the Fig.
1. Roll mode
2. Store mode
3. Hold or save mode.
Advantages
i) It is easier to operate and has more capability. ii) The storage time is
infinite.
iii) The display flexibility is available. The number of traces that can be stored and recalled
depends on the size of the memory.
iv) The cursor measurement is possible.
v) The characters can be displayed on screen along with the waveform which can indicate
waveform information such as minimum, maximum, frequency, amplitude etc.
vi) The X-Y plots, B-H curve, P-V diagrams can be displayed.
vii) The pretrigger viewing feature allows to display the waveform before trigger pulse.
viii) Keeping the records is possible by transmitting the data to computer system where the further
processing is possible
ix) Signal processing is possible which includes translating the raw data into finished information
e.g. computing parameters of a captured signal like r.m.s. value, energy stored etc.
Examples of where these devices are used abound. A few of these examples are shown below:
Ø monitoring temperature, pressure, strain and other physical phenomena in aircraft flight tests (even
including logging info from Arinc 429 or other serial communications buses)
Ø Monitoring temperature, pressure, strain and other physical phenomena in automotive and in-vehicle
tests including monitoring traffic and data transmitted on the vehicles CAN bus.
Ø Environmental monitoring for quality control in food processing, food storage, pharmaceutical
manufacturing, and even monitoring the environment during various stages of contract assembly or
semiconductor fabrication
Ø Monitoring stress and strain in large mechanical structures such as bridges, steel framed buildings,
towers, launch pads etc.
Ø Monitoring environmental parameters in temperature and environmental chambers and test facilities.
Ø A data logger is a self-contained unit that does not require a host to operate.
Ø Also, data loggers usually have some form of on-board intelligence, which provides the user
with diverse capabilities.
Ø For example, raw data can be analyzed to give flow rates, differential temperatures, and other
interpreted data that otherwise would require manual analysis by the operator the operator
has a permanent recording on paper,
Ø Many data loggers of this type also have the ability to record data trends, in addition to
simple digital data recording
.
VIRTUAL INSTRUMENTATION
It is the use of customizable software and modular measurement hardware to create user-defined
measurement systems.
• Virtual instrumentation is an inter disciplinary field that merges sensing, hardware and
software technologies in order to create flexible and sophisticated instruments for control
and monitoring applications
• Virtual Instrumentation is the use of customizable software and modular measurement
hardware to create user defined measurement systems called virtual instruments.
• Virtual instrument provides all the software and hardware needed to accomplish the
measurement or control task
Definition for VI:
“Virtual instrumentation combines mainstream commercial technologies, such as the PC, with
flexible software and a wide variety of measurement and control hardware.”
➢ Engineers use virtual instrumentation to bring the power of flexible software and PC
technology to test, control and design applications making accurate analog and digital
measurements.
➢ . Industries with automated processes, such as chemical or manufacturing plants use
virtual instrumentation with the goal of improving system productivity, reliability, safety,
optimization and stability.
The sensor module detects physical signal and transforms it into electrical form, conditions the
signal, and transforms it into a digital form for further manipulation. Through a sensor interface,
the sensor module communicates with a computer. Once the data are in a digital form on a
computer, they can be processed, mixed, compared, and otherwise manipulated, or stored in a
database. Then, the data may be displayed, or converted back to analog form for further process
control.
a) Sensor module
• The sensor module performs signal conditioning and transforms it into a digital form for
further manipulation.
• Once the data are in a digital form on a computer, they can be displayed, processed,
mixed, compared, stored in a database, or converted back to analog form for further
process control.
• The database can also store configuration settings and signal records.
• The sensor module interfaces a virtual instrument to the external, mostly analog world
transforming measured signals into computer readable form.
A sensor module principally consists of three main parts:
· the sensor,
· the signal conditioning part, and
· the A/D converter.
The sensor detects physical signals from the environment. If the parameter being measured is not
electrical, the sensor must include a transducer to convert the information to an electrical signal,.
b) Sensor interface
• There are many interfaces used for communication between sensors modules and
the computer
• According to the type of connection, sensor interfaces can be classified as wired
and wireless.
Wired Interfaces are usually standard parallel interfaces, such as General Purpose Interface Bus
(GPIB), Small Computer Systems Interface (SCSI), system buses (PCI eXtension for
Instrumentation PXI or VME Extensions for Instrumentation (VXI), or serial buses (RS232 or
USB interfaces)
Wireless Interfaces are increasingly used because of convenience. Typical interfaces include
802.11 family of standards, Bluetooth, or GPRS/GSM . Wireless communication is especially
important for implanted sensors where cable connection is impractical or not possible
c) Processing Module
i) Analytic processing
• Analytic functions define clear functional relations among input parameters. Some of the
common analyses used in virtual instrumentation include spectral analysis, filtering,
windowing, transforms, peak detection, or curve
• Artificial intelligence technologies could be used to enhance and improve the efficiency,
the capability, and the features of instrumentation in application areas related to
measurement, system identification, and control .
• These techniques exploit the advanced computational capabilities of modern computing
systems to manipulate the sampled input signals and extract the desired measurements.
• Artificial intelligence technologies, such as neural networks, fuzzy logic and expert
systems, were applied in various applications, including sensor fusion to high-level
sensors, system identification, prediction, system control, complex measurement
procedures, calibration, and instrument fault detection and isolation
• Various nonlinear signal processing, including fuzzy logic and neural networks, are also
common tools in analysis of biomedical signals
d) Database interface
Virtual instrumentation is being increasingly accepted in biomedical field. In relation to the role
of a virtual instrument, we may broadly classify biomedical applications of virtual
instrumentation in four categories
You can monitor the current time value at the ET output of the Timer block.
The timer value starts at T#0s and ends when the value of duration PT is
reached. The ET output is reset as soon as the signal state at the IN input
changes to 0
The Q output is set when the result of the logic operation (RLO) at input IN
changes from 0 to 1 (positive signal edge).
Timer Example
Consider the short ladder logic program in Figure for control of a heating oven. The system
is started with a Start button that seals in the Auto mode. This can be stopped if the Stop button
ispushed. (Remember: Stop buttons are normally closed.) When the Auto goes on initially the
TON timer is used to sound the horn for the first 10 seconds to warn that the oven will start,
and after that the hornstops and the heating coils start. When the oven is turned off the fan
continues to blow for 300s or 5 minutes after.
Counter Example
The program in Figure is used to remove 5 out of every 10 parts from a conveyor with a
pneumatic cylinder. When the part is detected both counters will increase their values by
1. When thesixth part arrives the first counter will then be done, thereby allowing the
pneumatic cylinder to actuate for any part after the fifth. The second counter will
continue until the eleventh part is detected and then both of the counters will be reset.
Instrument Standards
These standards play a crucial role in maintaining the quality and consistency of instrumentation
systems, facilitating their integration and interoperability, and ensuring their compliance with regulatory
requirements. They provide a common language and framework for manufacturers, users, and regulators,
helping to reduce technical uncertainties, promote innovation, and enhance the competitiveness of the
instrumentation industry.
A standard is a physical representation of a unit of measurement. A known accurate measure of
physical quantity is termed as standard. These standards are used to determine the accuracy of other physical
quantities by the comparison method.
Example, the fundamental unit of mass in the International System is the Kilogram and defined as the
mass of a cubic decimetre of water at its temperature of maximum of density of 4oC.
Different standards are developed for checking the other units of measurements.
and all these standards are preserved at the International Bureau of Weight and Measures at Serves, Paris.
Classification of Standards
Standards are classified into four types, based on the functions and applications.
1) International standards
2) Primary standards
3) Secondary standards
4) Working standards
1) International Standard International standards are defined and established upon internationally. They are
maintained at the International Bureau of Weights and measures and are not accessible to ordinary users for
measurements and calibration. They are periodically evaluated and checked by absolute measurements in
terms of fundamental units of physics.
International Ohms It is defined as the resistance offered by a column of mercury having a mass of
14.4521gms, uniform cross sectional area and length of 106.300cm, to the flow of constant current at the
melting point of ice.
2) Primary Standards
Primary standards are maintained by the National Standards Laboratories (NSL) in different parts of the
world. The principle function of primary standards is the calibration and verification of secondary standards.
They are not available outside the National Laboratory for calibration. These primary standards are absolute
standards of high accuracy that can be used as ultimate reference standards.
3.Secondary Standards
These standards are basic reference standards used in industrial laboratories for calibration of instruments.
Each industry has its own secondary standard and maintained by same industry. Each laboratory periodically
sends its secondary standard to the NSL for calibration and comparison against the primary standards.
Certification of measuring accuracy is given by NSL in terms of primary standards.
4.Working Standards
The working standards are used for day-to-day use in measurement laboratories. So this standard is the
primary tool of a measurement laboratory.These standards may be lower in accuracy in comparison with
secondary standard. It is used to check and calibrate laboratory instruments for accuracy and performance.
Example, a standard resister for checking of resistance value manufactured.
2
7