50% found this document useful (2 votes)
3K views

Chapter 1 - Microprocessor Based Instrumentation System

This document discusses microprocessor-based instrumentation systems. It defines a microprocessor and instrumentation system. A microprocessor-based instrumentation system uses the logical and computing capabilities of a microprocessor to improve accuracy and efficiency. Examples are given of open-loop and closed-loop control systems. Open-loop systems provide output to a human operator for control, while closed-loop systems continuously monitor and control variables without human intervention. Benefits of microprocessor-based systems include complete automation, added intelligence, reduced costs, and improved responsiveness to changes.

Uploaded by

Suroj Burlakoti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
3K views

Chapter 1 - Microprocessor Based Instrumentation System

This document discusses microprocessor-based instrumentation systems. It defines a microprocessor and instrumentation system. A microprocessor-based instrumentation system uses the logical and computing capabilities of a microprocessor to improve accuracy and efficiency. Examples are given of open-loop and closed-loop control systems. Open-loop systems provide output to a human operator for control, while closed-loop systems continuously monitor and control variables without human intervention. Benefits of microprocessor-based systems include complete automation, added intelligence, reduced costs, and improved responsiveness to changes.

Uploaded by

Suroj Burlakoti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

Chapter – 1
Microprocessor Based Instrumentation System
Microprocessor: A Microprocessor is a multipurpose programmable, clock driven,
register based electronic device fabricated using signal integrations from SSI to VLSI that
reads binary instructions from a storage device called memory, accepts binary data as
input, processes data according to those instructions and provide result s as output.

Instrumentation System: The system which is defined as the assembly of various


instruments and other components interconnected to measure, analyze and control
physical quantities such as electrical, thermal, mechanical etc.

Microprocessor based Instrumentation System: Any instrumentation systems centered


around a microprocessor are known as microprocessor based system. Logical and
computing power of microprocessor has extended the capabilities of many basic
instruments, improving accuracy and efficiency of use. Microprocessor is versatile device
for use in any instrumentation system. Examples are ATM, automatic washing machine,
fuel control, oven etc.

Why microprocessor?
 Can be used in any system.
 Can be used in specific applications and specific design.
 Logical and computational power of microprocessor has been used to develop
more accurate and efficient system.

Why, not Microprocessor?


 Complexity in interfacing.
 Need to learn complex machine dependent language.
 Need of an expensive microprocessor development system.
But all these problems are accepted if system designed sells a number of units so that
the development cost spreads out.

Features for selecting microprocessor


 How fast the data has to be processed
 Cost-amount of memory intelligence
 Complexity of work
 Field for which system is designed

1.1 Basic Features of Microprocessor Based System


 Three components: Microprocessor, I/O, and memory
 Decision making power based on previous entered values
 Repeatability of readings
 User friendly (Signal readout)
 Parallel processing
 Timeshare and multiprocessing
References: Gaonkar, Hall & Fowler | 1
Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

 Data storage, retrieval and transmission


 Effective control of multiple equipments on time sharing basis
 A lot of processing capability

1.2 Open Loop and Closed Loop Microprocessor Based System


Any instrumentation system can be controlled by microprocessor in two ways
open loop control system and closed loop control system.

Open loop control system


 Microprocessor gives output of control variable in the form of some display to
human operator and then on the basis of displayed information, the human
operator makes changes in the necessary control inputs.
 Example: pressure and temperature monitoring system in any chemical
processing plant
 It is simple, low cost and used when feedback is not critical.

Data / Address / Control Bus Microprocesor

Pressure (Analog
Signal) RAM Panel
ADC Panel
Memory Interface

Fig: Block diagram of pressure monitoring system - Open loop control

 Upper and lower limit of desired pressure is set


 Pressure is converted to digital form to be fed to microprocessor
 The microprocessor compares a sample of pressure measurement with present
pressure limits.
 If sample is beyond limits, the microprocessor indicates in form of come
alarm or lamp.
 So, according to output signal, human operator makes necessary changes.

Closed loop control system


 Microprocessor monitors the process variables continuously and then supplies
the output signal to the electromechanical devices, which in turn controls the
values of process variables.
 Example: automatic temperature control system in an oven
 Accurate and Adaptive
 No human operator required

References: Gaonkar, Hall & Fowler | 2


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

DAC
To Heater
Control System

Port RAM

Data / Address / Control Bus Microprocesor

Panel
port Panel
Interface

ADC
Temperature of
Oven

Fig: Block diagram of automatic temperature control system – Closed loop


control

 In microprocessor, upper and lower limits of temperature are set.


 Every sample of temperature measurement from transducer is compared by
the processor.
 If temperature exceeds the preset higher limit, the microprocessor transmits an
output signal to a system which in turn turns off the supply to some of the
heater elements.
 If temperature is less than the preset lower limit, the microprocessor transmits
signal to system so that it turns on the supply to the heater element of the
oven.

1.3 Benefits of Microprocessor Based System


 Complete automation
 Added intelligence
 Reduced manpower
 Flexibility to modify
 Economic design
 Reduced circuit complexity
 Reduced operating costs (eg. Fuel savings)
 Reduced product wearing; furnish more uniform operation; tighter control
enforce ment.
 Improved responsiveness to changes in process: production rates, product
specifications, addition of new products.
 Incorporate strategies to minimize production upsets; resulting from plant
equipment failures by anticipated process conditions and improved plant
safety.

References: Gaonkar, Hall & Fowler | 3


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

 Improved timely information to plant operation and maintenance managers to


enable them to keep a plant running longer and more efficiently.
 Improved integration and interaction of plant operation through coordinated
strategy.
 Relational database management
 Statistical process control capabilities
 Information exchange with other plant system for process synchronization.

1.4 Microcomputer on Instrumentation Design

Process / Multiplexer
Analog
Plant / (to sequentially feeds
Transducer
System the outputs one at atime)

Signal Conditioner
And
Magnetic Disk Print Out ADC

Computer Digital
Data Logger
Produces O/P Computer Software

Data Operator Command


Monitor
Display Through I/O
Device

Data
Communica-
tion

Remote Indicator
Fig: A typical digital computer based instrumentation system

A process or plant or system may have to simultaneously measure multiple


variables like pressure, temperature, velocity, viscosity, flow rate etc. A computer
based measurement system has the capability of processing all inputs and present the
data in real time. A digital computer is fed with a sequential list of instructions
termed as computer program for suitable processing and manipulation of data.

Advantages:
 Suitably programmed to automatically carry out the mundane tasks of drift
correction, noise reduction, gain adjustments, automatic calibration etc.
 These instruments have signal conditioning and display which are
compact, rugged and reliable and are suited for performing in wide
conditions like industrial, consumer, military, automobile etc.
References: Gaonkar, Hall & Fowler | 4
Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

 Built in diagnostic subroutines to detect only or detent and correct.


 Real time measurement, processing and display.
 Lower cost, higher accuracy, and more flexibility.

Disadvantages:
 They cannot replace the program themselves.
 Software update
 Prone to virus problem, so may become in-operational.

1.5 Interfacing With Microprocessor


The primary function of microprocessor is to accept data from input devices such
as keyboard and A/D converters, read instructions from memory, process data
accordingly to the instructions, and send the results to output devices such as
LEDs, printers and video monitors. These input and output devices are called
peripherals or I/Os. Designing the logic circuits (hardware) and writing
instructions (software) to enable the microprocessor to communicate with these
peripherals is called interfacing, and the logic circuits are called I/O ports of
interfacing devices.

1.5.1 PC Interfacing Techniques


PC provides several interfaces for attaching peripherals to it. PC compatible
devices are interfaced to a PC through an internal expansion slot, a parallel
port or a serial port. Latest PCs have USB for connecting the peripherals.
1) I/O Buses
PC brings out the system bus signals through expansion slots
known as I/O buses on the motherboard that is an I/O bus
interfaces an external device directly to the system bus. Video
card, sound card, network card etc. are inserted into the slots for
various applications.

2) Parallel and Serial Ports


Basic PC configuration includes one parallel port (LPT1) and two
serial ports (COM1 and COM2). However, additional ports can be
created by adding expansion cards. For industrial measurement and
control operations, remote data acquisition system compatible for
serial port are used.

3) USB ports
Universal serial bus used for connecting number of peripheral
devices such as printer, scanner, digital cameras, and pen drives
etc. It is faster compared to traditional parallel and serial ports.

1.5.2 Review of Address Decoding


The R/W memory is made of registers and each register has a group of flip flops or field-
effect transistors that store bits of information; these flip flops are called memory cells.
The number of bits stored in a register is called a memory word. In a memory chip, all
References: Gaonkar, Hall & Fowler | 5
Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

registers are arranged in a sequence and identified by binary numbers called memory
address.
To communicate with memory, the MPU should be able to:
- Select the chip
- Identify the register
- Read from or write into the register
The address decoding circuit enables MPU to select an address within memory chip or
I/O chip and then read or write into it through the available data bus and thus avoid
contention or data collision within the data bus.

Microprocessor is connected with memory and I/O devices via common address and data
bus. Only one device can send data at a time and other devices can only receive that data.
If more than one device sends data at the same time, the data gets garbled. In order to
avoid this situation, ensuring that the proper device gets addressed at proper time, the
technique called address decoding is used.

In address decoding method, all devices like memory blocks, I/O units etc. are assigned
with a specific address. The address of the device is determined from the way in which
the address lines are used to derive a special device selection signal known as chip select
( ( ). If the microprocessor has to write or to read from a device, the signal to that
block should be enabled and the address decoding circuit must ensure that signal
to other devices are not activated.

Depending upon the no. of address lines used to generate chip select signal for the device,
the address decoding is classified as:

a) I/O mapped I/O


In this method, a device is identified with an 8 bit address and operated by I/O related
functions IN and OUT for that IO/M’ = 1. Since only 8bit address is used, at most
256 bytes can be identified uniquely. Generally low order address bits A0-A7 are used
and upper bits A8-A15 are considered don’t care. Usually I/O mapped I/O is used to
map devices like 8255A, 8251A etc.

b) Memory mapped I/O


In this method, a device is identified with 16 bit address and enabled memory related
functions such as STA, LDA for which IO/M’ = 0, here chip select signal of each
device is derived from 16 bit address lines thus total addressing capability is 64K
bytes . Usually memory mapped I/O is used to map memories like RAM, ROM etc.

Depending on the address that are allocated to the device the address decoding are
categorized in the following two groups.

References: Gaonkar, Hall & Fowler | 6


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

a) Unique Address Decoding:


If all the address lines on that mapping mode are used for address decoding then that
decoding is called unique address decoding. It means all 8-lines in I/O mapped I/O and
all 16 lines in memory mapped I/O are used to derive signal. It is expensive and
complicated but fault proof in all cases.

 If A0 is high and A1- A7 are low and if becomes low, the latch gets enabled.
 The data to the LED can be transferred in only one case and hence the device has unique
address of 01H.

Eight I/P switch interfacing at 53H. (01010011)

References: Gaonkar, Hall & Fowler | 7


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

b) Non Unique Address decoding:


If all the address lines available on that mode are not used in address decoding then that
decoding is called non unique address decoding. Though it is cheaper there may be a
chance of address conflict.

- If A0 is low and is low. Then latch gets enabled.


- Here A1-A7 is neglected that is any even address can enable the latch.

1.5.3 Memory Interfacing


 A memory chip requires address lines to identify a memory register. The
number of address lines required is determined by the number of registers
in a chip (2n = number of registers where n is the number of address lines).
 A memory chip requires a chip select ( ) signal to enable the chip.
The remaining address lines (from above step) of the microprocessor
can be connected to the CS signal through an interfacing logic.
 Thus, all address lines are responsible to select a specific register within a
memory chip.

Example: Design an address decoding circuit for two RAM chips each of 4K X 8 at address
2050H.
Step 1: Calculate the number of address pins
Here both memory devices are of 4K X 8 memory which is 4KB. That means 2 n = 4KB (4X1KB
= 22X210 = 212). Therefore, 4KB memory requires 12 address lines.
n = log (memory capacity in bytes) / log (2)
n = log (4X1024) / log (2) = 12

References: Gaonkar, Hall & Fowler | 8


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

Step 2: Memory Mapping

Memory Address A A A A A A A A A A A A A A A A
Block 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0
5 4 3 2 1 0

RAM Start:2050H 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0

End:304FH 0 0 1 1 0 0 0 0 0 1 0 0 1 1 1 1

ROM Start:3050H 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0

End:404FH 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1

Here RAM1 requires 12 address lines that is 111111111111 (FFFH). The starting address of
RAM1 is 2050H; we can calculate the end address of RAM1 by adding RAM1 addresses with its
base address that is 2050H + FFFH = 304FH.
Similarly RAM2 requires 12 address lines that is 111111111111 (FFFH). The next address of the
RAM1’s end address is the starting address of RAM2 that is 304FH + 01H = 3050H. Now we
can calculate the end address of RAM2 by adding RAM2 addresses with its starting address that
is 3050H + FFFH = 404FH.
Step 3: Decide decoder pins
Here, bit A12 in address lines for RAM1 and RAM2 referring to start address are different, so
we require a 1X2 decoder. If we refer the end address, bits A12, A13 and A14 are different; in
this case we should use 3X8 decoder. Address lines A0 through A11 are used by RAM1 and
RAM2 as both having 12 address pins. Rest of the address lines (A15 if 3X8 decoder and A13,
A14 and A15 if 1X2 decoder) will be decoded to generate chip enable signals for decoder.

References: Gaonkar, Hall & Fowler | 9


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

Step 4: Draw a decoding circuit

References: Gaonkar, Hall & Fowler | 10


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

1.5.4 Programmed I/O, Interrupt Driven I/O and Direct Memory Access
(DMA)
Programmed I/O or Polling:
The microprocessor is kept in a loop (programmed) to check whether data are
available. For example to read a data from an input keyboard in a single board
microcomputer, the microprocessor can keep polling the port until a key is
pressed.

Interrupt Driven I/O:


When a peripheral is ready to transfer data, it sends an interrupt signal to the
microprocessor. The microprocessor stops the execution of the current
program, accepts the data from the peripheral and then returns to the program.
The processor is free to perform other tasks rather than being hold in a polling
loop.

References: Gaonkar, Hall & Fowler | 11


Instrumentation II Chapter 1: Microprocessor Based Instrumentation System

Direct Memory Access (DMA):


This type of data transfer is employed when the peripheral is much faster than
the microprocessor. The DMA controller sends a HOLD signal to the
microprocessor, the microprocessor releases its data bus and the address bus
to the DMA controller, and data are transferred at high speed without the
intervention of the microprocessor.

References: Gaonkar, Hall & Fowler | 12

You might also like