All Units Notes
All Units Notes
INTRODUCTION
1.1. MECHATRONICS
1.2. SYSTEM :
A system may be defined as a black box which has an input and an output. System
concerned only with the relationship between the input and output and not on the process
going inside the box.
2
Input signal conditioning and interfacing: Discrete circuits, Amplifiers, Filters, A/D,D/D.
Digital control architecture: Logic circuits, Microcontroller, SBC, PLC,
Sequencing and timing, Logic and arithmetic, Control algorithm,Communication.
Output signal conditioning and interfacing: D/A D/D, Amplifiers, PWM, Power transistor,
Power Op -amps.
Graphical displays: LEDs, Digital displays, LCD,CRT.
Sensor:
A sensor consists of transducer whose function is to convert the one form of energy
into electrical form of energy. A sensor is a sensing element of measurement system that
converts the input quantity being measured into an output signal which is related to the
quantity.
SignalConditioner:
A signal conditioner receives signal from the sensor and manipulates it into a suitable
condition for display. The signal conditioner performs filtering, amplification or other signal
conditioning on the sensor output.
DisplaySystem:
A display system displays the data (output) from the signal conditioner by analog or
digital. A digital system is a temporary store such asrecorder.
3
Open loop controlsystem:
If there is no feedback device to compare the actual value with desired one. No
control over its input
4
1.7. SENSORS AND TRANSDUCERS
Measurement is an important subsystem of a mechatronics system. Its main function
is to collect the information on system status and to feed it to the micro-processors for
controlling the wholesystem.
Measurement system comprises of sensors, transducers and signal processing devices.
Sensors in manufacturing are basically employed to automatically carry out the
production operations as well as process monitoring activities. Sensor technology has the
following important advantages in transforming a conventional manufacturing unit into a
modern one.
1. Sensors alarm the system operators about the failure of any of the sub units of manufacturing
system. It helps operators to reduce the downtime of complete manufacturing system by
carrying out the preventativemeasures.
2. Reduces requirement of skilled and experiencedlabours.
3. Ultra-precision in product quality can beachieved.
Sensor
It is defined as an element which produces signal relating to the quantity being.
measured. According to the Instrument Society of America, sensor can be defined as “A
device which provides a usable output in response to a specified measurand.”
Here, the output is usually an „electrical quantity‟ and measurandis a „physical
quantity, property or condition which is to be measured‟. Thus in the case of, say, a variable
inductance displacement element, the quantity being measured is displacement and the sensor
transforms an input of displacement into a change ininductance.
Transducer
It is defined as an element when subjected to some physical change experiences a
related change or an element which converts a specified measured into a usable output by
using a transduction principle.
It can also be defined as a device that converts a signal from one form of energy to
another form.
A wire of Constantan alloy (copper-nickel 55-45% alloy) can be called as a sensor
because variation in mechanical displacement (tension or compression) can be sensed as
change in electric resistance. This wire becomes a transducer with appropriate electrodes and
input-output mechanism attached to it. Thus we can say that „sensors are transducers‟.
1. Range
The range of a sensor indicates the limits between which the input can vary. For
example, a thermocouple for the measurement of temperature might have a range of 25- 225
°C.
2. Span
The span is difference between the maximum and minimum values of the input.
Thus, the above-mentioned thermocouple will have a span of 200 °C.
5
3. Error
Error is the difference between the result of the measurement and the true value of the
quantity being measured. A sensor might give a displacement reading of 29.8 mm, when the
actual displacement had been 30 mm, then the error is –0.2mm.
4. Accuracy
The accuracy defines the closeness of the agreement between the actual measurement
result and a true value of the measurand. It is often expressed as a percentage of the full range
output or full–scale deflection. A piezoelectric transducer used to evaluate dynamic pressure
phenomena associated with explosions, pulsations, or dynamic pressure conditions in motors,
rocket engines, compressors, and other pressurized devices is capable to detect pressures
between 0.1 and 10,000 psig (0.7 KPa to 70 MPa). If it is specified with the accuracy of about
±1% full scale, then the reading given can be expected to be within ±
0.7 MPa.
5. Sensitivity
Sensitivity of a sensor is defined as the ratio of change in output value of a sensor to
the per unit change in input value that causes the output change. For example, a general
purpose thermocouple may have a sensitivity of 41µV/°C.
6. Nonlinearity
The nonlinearity indicates the maximum deviation of the actual measured curve of a
sensor from the ideal curve. Figure 1 shows a somewhat exaggerated relationship between
the ideal, or least squares fit, line and the actual measured or calibration line. Linearity is often
specified in terms of percentage of nonlinearity, which is definedas:
Nonlinearity (%) = Maximum deviation in input ⁄ Maximum full scale input
The static nonlinearity defined by Equation is dependent upon environmental factors,
including temperature, vibration, acoustic noise level, and humidity. Therefore it is important
to know under what conditions the specification isvalid.
7. Hysteresis
The hysteresis is an error of a sensor, which is defined as the maximum difference in
output at any measurement value within the senso's specified range when approaching the
point first with increasing and then with decreasing the input parameter. Figure shows the
hysteresis error might have occurred during measurement of temperature using a
thermocouple. The hysteresis error value is normally specified as a positive or negative
percentage of the specified input range.
6
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
8. Resolution
9. Stability
Stability is the ability of a sensor device to give same output when used to measure
aconstantinputoveraperiodoftime.Theterm„drift‟isusedtoindicatethechangeinoutput that
occurs over a period of time. It is expressed as the percentage of full rangeoutput.
10. Deadband/time
The dead band or dead space of a transducer is the range of input values for which
thereis no output. The dead time of a sensor device is the time duration from theapplication of
an input until the output begins to respond orchange.
11. Repeatability
It specifies the ability of a sensor to give same output for repeated applications of
same input value. It is usually expressed as a percentage of the full range output:
Repeatability = (maximum – minimum values given) X 100 ⁄ full range
7
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS
• Differentialtransformers
• Eddy current proximitysensors
• Inductive proximityswitch
• Opticalencoders
• Pneumatic sensors
• Proximity switches(magnetic)
• Hall effectsensors
B. Velocity andmotion
• Incrementalencoder
• Tachogenerator
• Pyro electricsensors
C. Force
• Strain gauge loadcell
D. Fluidpressure
• Diaphragm pressuregauge
• Capsules, bellows, pressuretubes
• Piezoelectric sensors
• Tactilesensor
E. Liquidflow
• Orificeplate
• Turbinemeter
F. Liquidlevel
• Floats
• Differentialpressure
G. Temperature
• Bimetallicstrips
• Resistance temperaturedetectors
• Thermistors
• Thermo-diodes andtransistors
• Thermocouples
• Lightsensors
• Photodiodes
• Photoresistors
1. Potentiometer Sensors
Figure shows the construction of a rotary type potentiometer sensor employed to
measurethelineardisplacement.Thepotentiometercanbeoflinearorangulartype.Itworks on the
principle of conversion of mechanical displacement into an electrical signal. The sensor has a
resistive element and a sliding contact (wiper). The slider moves along this conductive body,
acting as a movable electriccontact.
8
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS
VA = I RA
Applications of potentiometer
These sensors are primarily used in the control systems with a feedback loop to
ensure that the moving member or component reaches its commanded position.
9
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS
2. StrainGauges
The strain in an element is a ratio of change in length in the direction of applied load
to the original length of an element. The strain changes the resistance R of the element.
Therefore, we cansay,
∆R/R α ε;
∆R/R = G ε
where G is the constant of proportionality and is called as gauge factor. In general, the value
of G is considered in between 2 to 4 and the resistances are taken of the order of
100 Ω.
Resistance strain gauge follows the principle of change in resistance as per the
equation. It comprises of a pattern of resistive foil arranged as shown in Figure 5.These
foilsaremadeofConstantanalloy(copper-nickel55-45%alloy)andarebondedtoabacking material
plastic (polyimide), epoxy or glass fiber reinforced epoxy. The strain gauges are secured to
the workpieceby using epoxy or Cyanoacrylate cement Eastman910
SL. As the workpiece undergoes change in its shape due to external loading, the resistance of
strain gauge element changes. This change in resistance can be detected by a using a
Wheatstone‟s resistance bridge as shown in Figure 6. In the balanced bridge we can have a
relation,
R2/ R1 = Rx / R3
whereRx is resistance of strain gauge element, R2 is balancing/adjustable resistor, R1 and R3
are known constant value resistors. The measured deformation or displacement by the stain
gauge is calibrated against change in resistance of adjustable resistor R2 which makes the
voltage across nodes A and B equal to zero.
10
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS
Figure 17.Shows the schematic of three-plate capacitive element sensor and displacement
measurement of a mechanical element connected to the plate 2.
12
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
of RVDT sensor.
Eddy current proximity sensors are used to detect non-magnetic but conductive
materials. They comprise of a coil, an oscillator, a detector and a triggering circuit. Figure 10
shows the construction of eddy current proximity switch. When an alternating current is
passed thru this coil, an alternative magnetic field is generated. If a metal object comes in the
close proximity of the coil, then eddy currents are induced in the object due to the magnetic
field. These eddy currents create their own magnetic field which distorts the magnetic field
responsible for their generation. As a result, impedance of the coil changes and so the
amplitude of alternating current. This can be used to trigger a switch at some pre-determined
level of change in current.
Eddy current sensors are relatively inexpensive, available in small in size, highly
reliable and have high sensitivity for small displacements.
Inductive proximity switches are basically used for detection of metallic objects.
13
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
Figure shows the construction of inductive proximity switch. An inductive proximity sensor
has four components; the coil, oscillator, detection circuit and output circuit. An alternating
current is supplied to the coil which generates a magnetic field. When, a metal
objectcomesclosertotheendofthecoil,inductanceofthecoilchanges.Thisiscontinuously
monitored by a circuit which triggers a switch when a preset value of inductance change
isoccurred.
7. Opticalencoders
8. Pneumatic Sensors
Pneumatic sensors are used to measure the displacement as well as to sense the proximity of an
object close to it. The displacement and proximity are transformed into change in air pressure.
Figure 23. Shows a schematic of construction and working of such a sensor. It comprises of
three ports. Low pressure air is allowed to escape through port A. In the absence of any obstacle /
object, this low pressure air escapes and in doing so, reduces the pressure in the port B. However
when an object obstructs the low pressure air (Port A), there is rise in pressure in output port B.
This rise in pressure is calibrated to measure the displacement or to trigger a switch. These
14
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
sensors are used in robotics, pneumatics and for tooling in CNC machine tools.
Reed Switch
15
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
9. Hall effectsensor
Hall effect sensors work on the principle that when a beam of charge particles passes
through a magnetic field, forces act on the particles and the current beam is deflected from its
straight line path. Thus one side of the disc will become negatively charged and the other side
will be of positive charge. This charge separation generatesapotential difference which is the
measure of distance of magnetic field from the disccarrying current. The typical application of
Hall effect sensor is the measurement of fluid level in a container. The container
comprisesofafloatwithapermanentmagnetattachedatitstop.Anelectric circuit with a current
carrying disc is mounted in the casing. When the fluid level increases, the magnet will come
close to the disc and a potential difference generates. This voltage triggers a switch to stop the
fluid to come inside the container. These sensors are used for the measurement of
displacement and the detection of position of an object. Hall effect sensors need necessary
signal conditioning circuitry. They can be operated at 100 kHz. Their non-contact nature of
operation, good immunity to environment contaminants and ability to sustain in severe
conditions make them quite popular in industrial automation.
16
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
Fig 28:Tachogenerator
An alternating current (AC) generator can also be used as a techognerator. It comprises of rotor
coil which rotates with the shaft. Figure shows the schematic of AC generator. The rotor rotates
in the magnetic field produced by a stationary permanent magnet or electromagnet. During this
process, an alternating emf is produced which is the measure of the angular velocity of the
rotor. In general, these sensors exhibit nonlinearity error of about ± 0.15% and are employed for
the rotationsup to about 10000rev/min.
Pyroelectric sensor comprises of a thick element of polarized material coated with thin film
electrodes on opposite faces as shown in figure. Initially the electrodes are in electrical
equilibrium with the polarized material. On incident of infra red, the material heats up and
reduces its polarization. This leads to charge imbalance at the interface of crystal and
electrodes. To balance this disequilibrium, measurement circuit supplies the charge, which is
calibrated against the detection of an object or its movement.
Intrusiondetector
Optothermaldetector
Pollutiondetector
Positionsensor
Solar cellstudies
Engine analysis
Tactile sensors
Piezoelectric sensor
Orifice plate:
19
UNIT I : MECHATRONICS, SENSORS ANDACTUATORS SPR1304-INDUSTRIAL MECHATRONICS
Turbine meter
turbine flow meter has an accuracy of ±0.3%. It has a multi blade rotor mounted centrally in
the pipe along which the flow is to be measured. Figure 2.4.12 shows the typical arrangement
of the rotor and a magnetic pick up coil. The fluid flow rotates the rotor. Accordingly the
magnetic pick up coil counts the number of magnetic pulses generated due to the distortion of
magnetic field by the rotor blades. The angular velocity is proportional to the number of pulses
and fluid flow is proportional to angular velocity.
Direct measurements involve the use of floats however the indirect methods employ load
cells. Potentiometers or LVDT sensors can be used along with the floats to measure the
height of fluid column. Force sensed by the load cells is proportional to the height of fluid
column.
1. Bimetallic strips
Bimetallic strips are used as thermal switch in controlling the temperature or heat in a
manufacturing process or system. It contains two different metal strips bonded together. The
metals have different coefficients of expansion. On heating the strips bend into curved strips
with the metal with higher coefficient of expansion on the outside of the curve. Figure shows a
typical arrangement of a bimetallic strip used with a setting-up magnet. As the strips bend, the
soft iron comes in closer proximity of the small magnet and further touches. Then
20
the electric circuit completes and generates an alarm. In this way bimetallic strips help to
protect the desired application from heating above the pre-set value of temperature.
RTDs work on the principle that the electric resistance of a metal changes due to changein its
temperature. On heating up metals, their resistance increases and follows a linear relationship
as shown in Figure 2.5.2. The correlationis
Where Rtis the resistance at temperature T (°C) and R0 is the temperature at 0°C and α is the
constant for the metal termed as temperature coefficient of resistance. The sensor is usually
made to have a resistance of 100 Ω at 0°C
Figure shows the construction of a RTD. It has a resistor element connected to a Wheatstone
21
bridge. The element and the connection leads are insulated and protected by a sheath. A small
amount of current is continuously passing though the coil. As the temperature changes the
resistance of the coil changes which is detected at the Wheatstone bridge.
RTDs are used in the form of thin films,wire wound or coil. They are generally made of metals
such as platinum, nickel or nickel-copper alloys. Platinum wire held by a high- temperature
glass adhesive in a ceramic tube is used to measure the temperature in a metal furnace. Other
applications are:
Air conditioning and refrigerationservicing
FoodProcessing
Stoves andgrills
Textileproduction
Plasticsprocessing
Petrochemicalprocessing
Microelectronics
Air, gas and liquid temperature measurement in pipes andtanks
Exhaust gas temperaturemeasurement
Thermistors
Thermistors follow the principle of decrease in resistance with increasing temperature. The
material used in thermistor is generally a semiconductor material such as a sintered metal
oxide (mixtures of metal oxides, chromium, cobalt, iron, manganese and nickel)
ordopedpolycrystalline ceramic containing barium titanate (BaTiO3) and other compounds. As
the temperature of semiconductor material increases the number of electrons able to move
about increases which results in more current in the material and reduced
resistance.Thermistors are rugged and small in dimensions. They exhibit nonlinear response
characteristics.
Thermistors are available in the form of a bead (pressed disc), probe or chip. Figure 41 shows
the construction of a bead type thermistor. It has a small bead of dimension from 0.5 mm to 5
mm coated with ceramic or glass material. The bead is connected to an electric circuit through
two leads. To protect from the environment, the leads are contained in a stainless steel tube.
Applications of Thermistors
To monitor the coolant temperature and/or oil temperature inside theengine
To monitor the temperature of anincubator
Thermistors are used in modern digitalthermostats
To monitor the temperature of battery packs whilecharging
To monitor temperature of hot ends of 3Dprinters
To maintain correct temperature in the food Handling and processing industry
equipments
To control the operations of consumer appliances such as toasters, coffee makers,
22
refrigerators, freezers, hair dryers,etc.
Thermocouple
Thermocouple works on the fact that when a junction of dissimilar metals heated, it produces
an electric potential related to temperature. As per Thomas Seebeck (1821), when two wires
composed of dissimilar metals are joined at both ends and one of the ends is heated, then there
is a continuous current which flows in the thermoelectric circuit. Figure shows the schematic
of thermocouple circuit. The net open circuit voltage (the Seebeck voltage) is a function of
junction temperature and composition of two metals. It is given by, ΔVAB = αΔT
Applications of Thermocouples
To monitor temperatures and chemistry throughout the steel makingprocess
Testing temperatures associated with process plants e.g. chemical productionand
petroleumrefineries
Testing of heating appliancesafety
Temperature profiling in ovens, furnaces andkilns
Temperature measurement of gas turbine and engineexhausts
Monitoring of temperatures throughout the production and smelting process inthe steel,
iron and aluminumindustry
A light sensor is a device that is used to detect light. There are different types of light
sensorssuch as photocell/photoresistor and photo diodes being used in manufacturing and
other industrial applications.
Photoresistor is also called as light dependent resistor (LDR). It has a resistor whose
resistance decreases with increasing incident light intensity. It is made of a high resistance
semiconductor material, cadmium sulfide (CdS). The resistance of a CdSphotoresistor varies
23
inversely to the amount oflight incident upon it.Photoresistor follows the principle of p
hotoconductivity which results from the generation of mobile carriers when photons are
absorbed by the semiconductor material.
Figure shows the construction of a photo resistor. The CdS resistor coil is mounted on a
ceramic substrate. This assembly is encapsulated by a resin material. The sensitive coil
electrodes are connected to the control system though lead wires. On incidence of high
intensity light on the electrodes, the resistance of resistor coil decreases which will be used
further to generate the appropriate signal by the microprocessor via lead wires.
Photoresistors are used in science and in almost any branch of industry for control, safety,
amusement, sound reproduction, inspection and measurement.
Photo diodes
Photodiode is a solid-state device which converts incident light into an electric current. It is
made of Silicon. It consists of a shallow diffused p-n junction, normally a p-on-n configuration.
When photons of energy greater than 1.1eV (the bandgap of silicon) fall on the device, they are
absorbed and electron-hole pairs are created. The depth at which the photons are absorbed
depends upon their energy. The lower the energy of the photons, the deeper they are absorbed.
Then the electron-hole pairs drift apart. When the minority carriers reach the junction, they are
swept across by the electric field and an electric current establishes.
24
Photodiodes are one of the types of photodetector, which convert light into either current or
voltage. These are regular semiconductor diodes except that they may be either exposed to detect
vacuum UV or X-rays or packaged with a opening or optical fiber connection to allow light to
reach the sensitive part of the device.
Figure shows the construction of Photo diode detector. It is constructed from single crystal
silicon wafers. It is a p-n junction device. The upper layer is p layer. It is very thin and formed
by thermal diffusion or ion implantation of doping material such as boron. Depletion region is
narrow and is sandwiched between p layer and bulk n type layer of silicon. Light irradiates at
front surface, anode, while the back surface is cathode. The incidence of light on anode
generates a flow of electron across the p-n junction which is the measure of light intensity.
25
2. SIGNALCONDITIONING
2.1. INTRODUCTION
The output signal from sensor of a measurement system has to be processed in a suitable form for
next stage of operation.
Example:
Too small amplified
Interference removed
Non- linear Linearisation
Analog Digital
Digital Analog
Resistance change Current change
Voltage change Suitable current change
The above changes are referred as signal conditioning
Output from thermocouple is small voltage (few millivolts) – a signal conditioning module is used
to convert into suitable size current signal
Interfacing with Microprocessor
Input & output devices are connected to a microprocessor system through ports.
Interface is used to make connections between devices a& a port.
Input from sensors, switches, & keyboards and output to displays & actuators.
Simplest interface is a piece of wire.
Interface consists of signal conditioning & protection (prevent from damage)
1. Protection to prevent damage to next element (microprocessor) – high current or
voltage. Current limiting resistors, fuses to break when there is high current.
2. Getting the signal into the right type of signal.
Converting signal into d.c voltage or current.
(Resistance change of strain gauge converted to voltage change, done by
Wheatstone bridge)
3. Getting the level of the signal right. (Thermocouple signal – few millivolts, fed into
an analog to digital converter, input for a microprocessor, to be made larger i.e volts rather than
millivolts, operational amplifier used).
4. Eliminating or reducing noise. (Filters used to eliminate mains noise from signal).
5. Signal manipulation: making it a linear function of some variable. Flowmeter, signals will
be nonlinear – signal conditioner used to next elementto make it linear.
2
Fig 1: Op-amp
It is the basics of many signal conditioning modules.
High gain d.c. amplifier, gain being order of 100000 or more, supplied as an integrated circuit on a
silicon chip.
Consists of 2 inputs, Inverting input (-) & Non-inverting input (+).
Output depends on the connections made to these inputs.
Few other inputs are, negative voltage supply, a positive voltage supply & two inputs termed
offset null (enable to made corrections for non-ideal behaviour of the amplifier).
INVERTING AMPLIFIER
Connections made to the amplifier when used as an inverting amplifier.Input is taken to inverting
input throughresistor R1 with Non-inverting input,connected to ground.Afeedback path provided
from output through R2 to the inverting input.OA – 100000 & change in o/p is + 10VThis is
virtually Zero & so X is at virtually earth potential (virtual earth) Potential difference across (Vin –
VX), Vin= I1R1. 1 For ideal OA with infinite gainOP has high impedance b/w I/P terminals.
3
:
Fig 3: Inverting op-amp circuit
Virtually no current flows through X, considering I/P impedance as infinite for Ideal OA & hence
no current through X.Potential difference across R2 (VX – Vout), is Current I1 through R1 must be
through R2…-Vout = I1R2 2. Since Vx is 0Potential difference across R2 is –Vout. Dividing
2 by 1Voltage gain of circuit=Vout/ Vin = R2/R1
Voltage gain is determined by relative values of R2& R1Negative sign indicates O/P is inverted
(180° out of phase) w.r.t I/p
NON-INVERTING AMPLIFIER
OA connected as Non- Inverting amplifier.O/P considered to be taken from across a potential
divider circuit consisting R1 in serieswith R2. Vx is then fraction of R1/ (R1 + R2) of the O/P
Used when the feedback loop is ashort circuit R2 = 0Vol gain is 1The I/P to circuit is into a large
resistance
4
Fig 4: Non-inverting op-amp circuit
SUMMING AMPLIFIER
In inverting amplifier, X is a virtual earth.Sum of the currents entering X must equal that leaving
it.
𝐕𝐀 𝐕𝐁 𝐕𝐂
IA= 𝐑𝐀, IB= 𝐑𝐁, IC= 𝐑𝐂
Same current I passing through the feedback resistor.Potential difference across R2 = (VX – Vout)
Since VX = 0, – Vout& I = – Vout / R2
If 𝐑𝐀 = 𝐑𝐁 = 𝐑𝐂= 𝐑𝟏 , Then
5
Fig 5: Summing circuit
INTEGRATING AMPLIFIER
An inverting amplifier circuit with feedback through capacitor is considered. Current is the
movement of charge q IA = Cv, v = Voltage across it, then the current through the capacitor
Potential difference across C is (VX – Vout) , as VX = 0, virtual
Rearranging
The current through the feedback resistance must be equal to that from V1 through R1
Rearranging
By substituting VX
LOGRATHMIC AMPLIFIER
Some sensors have O/P, non-linear.O/P from thermocouple is not a perfectlyLinear function of the
temp difference between its junction.A signal conditioner – linearise O/P, Done by OA circuit
7
having non-linearityRelationship b/w its I/P & O/P, I/P is Non-linear & O/P is Linear.Logarithmic
amplifier – example of such sensorFeedback loop contains a diode (transistor with a grounded
base), has Non-linearity characteristics.
K – Propotionality constant. If the I/P Vin =is provided by a sensor with an I/P t,
A & a – constants
COMPARATOR
A comparator indicates which of 2 voltages isthe larger.An OA is used with no feedback or other
components can be used as comparator.One of the Voltage is applied to I/P & other toNon-
Inverting I/P.When 2 I/P are equal there is no O/P.When non-inverting I/P is greater than
invertingI/P by more than a small fraction of a volt, O/P Jumps to positive saturation voltage of
+10V When Inverting I/P is greater than Non-InvertingI/P, O/P jumps to a steady negative
saturation Voltage of -10V.Used to determine when a voltage exceeds a certain level,The O/P
being used to perhaps initiate some action
8
Fig 9: Relationship b/w O/P voltage & difference b/w I/P voltage
DIGITAL SIGNALS
O/P from most sensors tends to be in analogue form
When a microprocessor is used as part of measurement or control system, the analogue o/p
from sensor has to converted to digital form, before used as an i/p to microprocessor.
Most actuators operates with analogue form before it can be used as an i/p by the actuator.
Fig 10:
Clock supplies regular time signal pulses to the ADC
Every time it receives a pulse & it samples the analogue signal
Result of sampling is a series of narrow pulses (C)
9
Clock, supplies time signals, sampling occurs
Sampled & held, used to hold each sampled value until next pulse occurs
10
Uses a summing up amplifier.Reference voltage is connected to resistor by means of electronic
switches(binary 1)Value of i/p resistances depend on which bit in the word responding to.
MULTIPLEXER
Multiplexer is a device that has multiple inputs and a single line output. The select lines determine
which input is connected to the output, and also to increase the amount of data that can be sent over
a network within certain time. It is also called a data selector.
11
The single pole multi-position switch is a simple example of non-electronic circuit of multiplexer,
and it is widely used in many electronic circuits.. The multiplexer is used to perform high-speed
switching and is constructed by electronic components.
Multiplexers are capable of handling both analoganddigital applications.. In analog applications,
multiplexers are made up of of relays and transistor switches, whereas in digital applications, the
multiplexers are built from standard logic gates. When the multiplexer is used for digital
applications, it is called a digital multiplexer.
MULTIPLEXER TYPES
2-1 multiplexer ( 1select line)
4-1 multiplexer (2 select lines)
8-1 multiplexer(3 select lines)
16-1 multiplexer (4 select lines)
Microprocessor-
First generation of processor: 4-bitMicroprocessor
The first microprocessor was introduced in 1971 by Intel Corp. It was named Intel 4004 as it was
a 4 bit processor. It was a processor on a single chip. It could perform simple arithmetic and logic
operations such as addition, subtraction, Boolean AND & Boolean OR. It had a control unit
capable of performing control functions like fetching an instruction from memory, decoding it,
and generating control pulses to execute it. It was able to operate on 4 bits of data at a time. This
first microprocessor was quite a success in industry. Soon other microprocessors were also
introduced. Intel introduced the enhanced version of 4004, the 4040. Some other 4 bit processors
are International’s PPS4 and Toshiba’s T3472.
Second generation of processor: 8-bitMicroprocessor
Applications of Multiplexers
Multiplexers are used in various applications wherein multiple-data need to be transmitted by using
single line.
Communication System
A communication system has both a communication network and a transmission system. By using
a multiplexer, the efficiency of the communication system can be increased by allowing the
transmission of data, such as audio and video data from different channels through single lines or
cables.
12
Computer Memory
Multiplexers are used in computer memory to maintain a huge amount of memory in the
computers, and also to reduce the number of copper lines required to connect the memory to other
parts of the computer.
Telephone Network
In telephone networks, multiple audio signals are integrated on a single line of transmission with
the help of a multiplexer.
Transmission from the Computer System of a Satellite
Multiplexer is used to transmit the data signals from the computer system of a spacecraft or a
satellite to the ground system by using a GSM satellite.
De-multiplexer
De-multiplexer is also a device with one input and multiple output lines. It is used to send a signal
to one of the many devices. The main difference between a multiplexer and a de-multiplexer is that
a multiplexer takes two or more signals and encodes them on a wire, whereas a de-multiplexer does
reverse to what the multiplexer does.
Types of De multiplexer
De-multiplexers are classified into four types
1-2 demultiplexer (1 select line)
1-4 demultiplexer (2 select lines)
1-8 demultiplexer (3 select lines)
1-16 demultiplexer (4 select lines)
1-8 De-multiplexers
The demultiplexer is also called as data distributors as it requires one input, 3 selected lines and 8
outputs. De-multiplexer takes one single input data line, and then switches it to any one of the
output line. 1-to-8 demultiplexer circuit diagram is shown below; it uses 8 AND gates for
achieving the operation. The input bit is considered as data D and it is transmitted to the output
lines. This depends on the control input value of the AB. When AB = 01, the upper second gate F1
is enabled, while the remaining AND gates are disabled, and the data bit is transmitted to the output
giving F1= data. If D is low, the F1 is low, and if D is high, the F1 is high. So the value of the F1
depends on the value of D, and the remaining outputs are in low state.
13
Fig 18: Demultiplexer
Applications of De multiplexer
De multiplexers are used to connect a single source to multiple destinations. These applications
include the following:
Communication System
Mux and demux both are used in communication system to carry out the process of data
transmission. A De-multiplexer receives the output signals from the multiplexer and at the receiver
end it converts them back to the original form.
Arithmetic Logic Unit
The output of the ALU is fed as an input to the De-multiplexer, and the output of the demultiplexer
is connected to a multiple register. The output of the ALU can be stored in multiple registers.
Serial to Parallel Converter
This converter is used to reconstruct parallel data. In this technique, serial data is given as an input
to the De-multiplexer at a regular interval, and a counter is attached to the demultiplexer at the
control input to detect the data signal at the output of the demultiplexer. When all data signals are
stored, the output of the demux can be read out in parallel.
This is the basic information about multiplexer and demultiplexers. Hope you might have got some
fundamental concepts about this topic by observing the logic circuits and their applications. You
can write your views about this topic in the comment section below.
14
Fig 19: Microprocessor-based system
A typical microprocessor consists of arithmetic and logic unit (ALU) in association with control
unit to process the instruction execution. Almost all the microprocessors are based on the principle
of store-program concept. In store-program concept, programs or instructions are sequentially
stored in the memory locations that are to be executed. To do any task using a microprocessor, it is
to be programmed by the user. So the programmer must have idea about its internal resources,
features and supported instructions. Each microprocessor has a set of instructions, a list which is
provided by the microprocessor manufacturer. The instruction set of a microprocessor is provided in
two forms: binary machine code and mnemonics.
Microprocessor communicates and operates in binary numbers 0 and 1. The set of instructions in
the form of binary patterns is called a machine language and it is difficult for us to understand.
Therefore, the binary patterns are given abbreviated names, called mnemonics, which forms the
assembly language. The conversion of assembly-level language into binary machine-level language
is done by using an application called assembler.
15
Technology Used:
16
Based on architecture:
Reduced Instruction Set Computer (RISC)processors
Complex Instruction Set Computer (CISC)processors
For example, after an addition of two numbers, if the result in the accumulator is larger than 8-bit,
the flip-flop uses to indicate a carry by setting CY flag to 1. When an arithmetic operation results in
zero, Z flag is set to 1. The S flag is just a copy of the bit D7 of the accumulator. A negative number
has a 1 in bit D7 and a positive number has a 0 in 2’s complement representation. The AC flag is set
to 1, when a carry result from bit D3 and passes to bit D4. The P flag is set to 1, when the result in
accumulator contains even number of 1s.
Instruction Register/Decoder
It is an 8-bit register that temporarily stores the current instruction of a program. Latest instruction
sent here from memory prior to execution. Decoder then takes instruction and decodes or interprets
the instruction. Decoded instruction then passed to next stage.
Control Unit
Generates signals on data bus, address bus and control bus within microprocessor to carry out the
instruction, which has been decoded. Typical buses and their timing are described as follows:
Data Bus: Data bus carries data in binary form between microprocessor and other
external units such as memory. It is used to transmit data i.e. information, results of arithmetic etc
between memory and the microprocessor. Data bus is bidirectional in nature. The data bus width of
8085 microprocessor is 8-bit i.e. 28 combination of binary digits and are typically identified as D0 –
D7. Thus size of the data bus determines what arithmetic can be done. If only 8-bit wide then
largest number is 11111111 (255 in decimal). Therefore, larger numbers have to be broken down
into chunks of 255. This slowsmicroprocessor.
Address Bus: The address bus carries addresses and is one way bus from microprocessor
to the memory or other devices. 8085 microprocessor contain 16-bit address bus and are generally
identified as A0 - A15. The higher order address lines (A8 – A15) are unidirectional and the lower
order lines (A0 – A7) are multiplexed (time-shared) with the eight data bits (D0 – D7) and hence,
they arebidirectional.
18
Control Bus: Control bus are various lines which have specific functions for coordinating
and controlling microprocessor operations. The control bus carries control signals partly
unidirectional and partly bidirectional. The following control and status signals are used by
8085processor:
I. ALE (output): Address Latch Enable is a pulse that is provided when an address
appears on the AD0 – AD7 lines, after which it becomes0.
II. RD (active low output): The Read signal indicates that data are being read from
the selected I/O or memory device and that they are available on the data bus.
WR (active low output): The Write signal indicates that data on the data bus are to be written into a
selected memory or I/Olocation.
III. IO/M (output): It is a signal that distinguished between a memoryoperationand an
I/O operation. When IO/M= 0 it is a memory operation andIO/M = 1 it is an I/O operation
IV. S1 and S0 (output): These are status signals used to specify the type of operation
being performed; they are listed in Table1.
Table 1
a) Sign Flag(S):
After execution of any arithmetic and logical operation, if D7 of the result is 1, the
19
sign flag is set. Otherwise it is reset. D7 is reserved for indicatingthe sign; the remaining is
the magnitude ofnumber.
If D7 is 1, the number will be viewed as negative number. If D7 is 0,the
number will be viewed as positivenumber.
b) Zero Flag (z):
If the result of arithmetic and logical operation is zero, then zero flag isset
otherwise it isreset.
Address Bus:
The address bus is a group of 16 lines generally identified as A0 toA15
The address bus is unidirectional: bits flow in one direction-from the MP
Uperipheraldevices.
TheMPUusestheaddressbustoperformthefirstfunction:identifyingaperipheral or a
memorylocation.
Data Bus:
The data bus is a group of eight lines used for dataflow.
These lines are bi-directional - data flow in both directions between the MPUand
memory and peripheraldevices.
The MPU uses the data bus to perform the second function: transferring binary
information.
The eight data lines enable the MPU to manipulate 8-bit data ranging from 00to
FF (28 = 256 numbers).
21
The largest number that can appear on the data bus is11111111.
Control Bus:
The control bus carries synchronization signals and providing timingsignals.
The MPU generates specific control signals for every operation itperforms.
These signals are used to identify a device type with which the MPU wants to
communicate.
Pin Description
The following describes the function of each pin:
A6 - A1s (Output 3 State)- Address Bus: The most significant 8 bits of the memory address
or the 8 bits of the I/0 address,3 stated during Hold and Halt modes.
AD0 - AD7 (Input/Output 3state) Multiplexed Address/Data Bus; Lower 8 bits of the memory
22
address (or I/0 address) appear on the bus during the first clock cycle of a machine state. It then
becomes the data bus during the second and third clock cycles. 3 stated during Hold and Halt
modes.
ALE (Output)- Address Latch Enable: It occurs during the first clock cycle of a machine state
and enables the address to get latched into the on chip latch of peripherals. The falling edge of
ALE is set to guarantee setup and hold times for the address information. ALE can also be used
to strobe the status information. ALE is never 3stated.
SO, S1 (Output)-Data Bus Status. Encoded status of the bus cycle:
S1 S0
0 0 HALT 0
1 WRITE 1 0
READ 1
1FETCH
S1 can be used as an advanced R/W status.
RD (Output 3state)- READ; indicates the selected memory or 1/0 device is to be read and that
the Data Bus is available for the data transfer.
WR (Output 3state)- WRITE; indicates the data on the Data Bus is to be written into the selected
memory or 1/0 location. Data is set up at the trailing edge of WR. 3stated during Hold and Halt
modes.
READY (Input)-If Ready is high during a read or write cycle, it indicates that the memory or
peripheral is ready to send or receive data. If Ready is low, the CPU will wait for Ready to go
high before completing the read or write cycle.
25
Fig 26:8051 architecture
ALU:
All arithmetic and logical functions are carried out by the ALU. Addition, subtraction
with carry, and multiplication come under arithmetic operations. Logical operations are
AND,OR and exclusive OR (XOR) come under logical operations.
Program Counter (PC):
A program counter is a 16-bit register and it has no internal address. The basic function
of program counter is to fetch from memory the address of the next instruction to be executed.The
PC holds the address of the next instruction residing in memory and when a command is
encountered, it produces that instruction. This way the PC increments automatically, holding the
address of the next instruction.
Registers:
Registers are usually known as data storage devices. 8051 microcontroller has 2 registers, namely
Register A and Register B. Register A serves as an accumulator while Register B functions as a
general purpose register. These registers are used to store the output of mathematical and logical
instructions. The operations of addition, subtraction, multiplication anddivision are carried out by
Register A. Register B is usually unused and comes into picture only when multiplication and
division functions are carried out by Register A. Register A also involved in data transfers
between the microcontroller and external memory.
26
Special Function Registers (SFRs):
1. Serial Port Data Buffer(SBUF)
2. Timer/Counter Control(TCON)
3. Timer/Counter Mode Control(TMOD)
4. Serial Port Control(SCON)
5. Power Control(PCON)
6. Interrupt Priority(IP)
7. Interrupt Enable Control(IE)
RAM:
The 8051 microcontroller is composed of 128 bytes of internal RAM. This is a volatile
memory since its contents will be lost if power is switched off. These 128 bytes of internal RAM
are divided into 32 working registers which in turn constitute 4 register banks (Bank 0-Bank 3)
with each bank consisting of 8 registers (R0 - R7). There are 128 addressable bits in the internal
RAM.
The 8051 microcontroller has four 8-bit input/output ports. These are:
PORT P0: When there is no external memory present, this port acts as a general purpose
input/output port. In the presence of external memory, it functions as a multiplexed address anddata
bus. It performs a dual role.
PORT P1: This port is used for various interfacing activities. This 8-bit port is a normal I/O port
i.e. it does not perform dual functions.
PORT P2: Similar to PORT P0, this port can be used as a general purpose port when there is no
external memory but when external memory is present it works in conjunction with PORT PO as
an address bus. This is an 8-bit port and performs dual functions.
27
PORT P3: PORT P3 behaves as a dedicated I/O port
Interrupt Control
An event which is used to suspend or halt the normal program execution for a temporary period
of time in order to serve the request of another program or hardware device is called an
interrupt. An interrupt can either be an internal or external event which suspends the
microcontroller for a while and thereby obstructs the sequential flow of a program. There are two
ways of giving interrupts to a microcontroller – one is by sending software instructions and the
other is by sending hardware signals. The interrupt mechanism keeps the normal program
execution in a "put on hold" mode and executes a subroutine program and after the subroutine is
executed, it gets back to its normal program execution. This subroutine program is also called an
interrupt handler. A subroutine is executed when a certain event occurs.
In 8051, 5 sources of interrupts are provided. They are:
a) 2 external interrupt sources connected through INT0 and INT1
b) 3 external interrupt sources- serial port interrupt,Timer Flag 0 and Timer Flag 1.
The pins connected are asfollows:
1. ALE (Address Latch Enable) - Latches the address signals on PortP0
2. EA (External Address) - Holds the 4K bytes of programmemory
3. PSEN (Program Store Enable) - Reads external programmemory
4. RST (Reset) - Reset the ports and internal registers upon startup
Serial Data Communication:
A method of establishing communication among computers is by transmitting and
receiving data bits is a serial connection network. In 8051, the SBUF (Serial Port Data Buffer)
register holds the data; the SCON (Serial Control) register manages the data communication and
the PCON (Power Control) register manages the data transfer rates. Further, two pins - RXD and
TXD, establish the serial network.The SBUF register has 2 parts – one for storing the data to be
transmitted and another for receiving data from outer sources. The first function is done using
TXD pin and the second function is done using RXD pin.
There are 4 programmable modes in serial data communication. They are:
1. Serial Data mode 0 (shift registermode)
2. Serial Data mode 1 (standardUART)
3. Serial Data mode 2 (multiprocessormode)
4. Serial Data mode3
Data Pointer (DPTR):
The data pointer or DPTR is a 16-bit register. It is made up of two 8-bit registers called
DPH and DPL. Separate addresses are assigned to each of DPH and DPL. These 8-bit registers
are used for the storing the memory addresses that can be used to access internal and external
data/code.
Stack Pointer (SP):
The stack pointer (SP) in 8051 is an 8-bit register. The main purpose of SP is to access
the stack. As it has 8-bits it can take values in the range 00 H to FF H. Stack is a special area of
data in memory. The SP acts as a pointer for an address that points to the top of the stack.
Data and Address Bus:
A bus is group of wires using which data transfer takes place from one location to another
within a system. Buses reduce the number of paths or cables needed to set up connection
between components.
28
There are mainly two kinds of buses - Data Bus and Address Bus
Data Bus:
The purpose of data bus is to transfer data. It acts as an electronic channel using which
data travels. Wider the width of the bus, greater will be the transmission of data.
Address Bus:
The purpose of address bus is to transfer information but not data. The information tells from
where within the components, the data should be sent to or received from. The capacity or
memory of the address bus depends on the number of wires that transmit a single address bit.
Pin Diagram:
One of the most useful features of the 8051 is that it contains four I/O ports (P0 - P3)
Port 0 (pins 32-39):P0(P0.0~P0.7)
8-bit R/W - General Purpose I/O Or acts as a multiplexed low byte address and data bus for
external memory design
Port 1(pins1-8) :P1(P1.0~P1.7)
Only 8-bit R/W - General Purpose I/O
Port 2 (pins 21-28):P2(P2.0~P2.7)
8-bit R/W - General Purpose I/O Or high byte of the address bus for external memory design
Port 3 (pins 10-17):P3(P3.0~P3.7)
29
General Purpose I/O
if not using any of the internal peripherals (timers) or external interrupts. Each port can be used
as input or output (bi-direction)
Table 3:
PSEN (out): Program Store Enable, the read signal for external program memory (active low).
ALE (out): Address Latch Enable, to latch address outputs at Port0 and Port2
EA (in): External Access Enable, active low to access external program memory locations 0 to 4K
RXD,TXD: UART pins for serial I/O on Port 3
XTAL1 & XTAL2: Crystal inputs for internal oscillator.
30
3. SYSTEM MODELS
This chapter determines how the systems behave with time when subjected to some
disturbance. E.g. A microprocessor switches on a motor. The speed will not attain
immediately but it will take some +time to attain full speed. In order to understand the
behavior of the systems, mathematical models are needed. These models are equations which
describe the relationship between the input and output of a system. The basis for any
mathematical model is provided by the fundamental physical laws that govern the behavior of
the system. In this chapter a range of systems will be considered including mechanical,
electrical, thermal & fluid examples. Systems can be made up from a range of building
blocks from a number of basic building blocks.
Fig 1: Spring
The spring when stretched stores energy, the energy being released when the spring springs
back to its original length.
The energy stored when there is an extension x is:
E= kx2/2=
DASHPOT
Dashpotsbuildingblocksrepresentthetypesofforcesexperienced when we push the object
through a fluid or move an object against frictionalforces.
c : speed of the body. It is a type of forces when we push an object through a fluid or move an
object against friction forces.Thus the relation between the displacement x of the piston,
2
i.e. the output and the force as input is a relationshipdepending on the rate of change of
the output
Fig 2: Dashpot
MASSES
Fig 3: Masses
F=ma
m: mass, a: acceleration
3
Energy stored in the mass when its moving with a velocity v, its called kinetic energy, and
released when it stops moving:
E=mv2/2
ROTATIONAL SYSTEM
For rotational system, the equivalent three building blocks are: a Torsion spring, a rotary
damper, and the moment of inertia. With such building blocks, the inputs are torque and the
outputs angle rotated
With a torsional spring the angle θ rotated is proportional to the toque T.Hence
With a torsional spring T = kθ
With the rotary damper a disc is rotated in a fluid and the resistive toque T is proportional to
the angular velocity ω, and since angularvelocity is the rate at which angle changes. With a
rotary damper a disc is rotated in a fluid and the resistive torque T is:
The moment of inertia building block exhibits the property that the greater the moment of
inertia I the greater the torque needed to produce an angular acceleration α.Thus, since
angular acceleration is the rate of change of angular velocity.
The moment of inertia has the property that the greater the moment of inertia I, the greater the
torque needed to produce an angular acceleration
The power dissipated by rotary damper when rotating with angular velocity wis
4
Table 1: summary of mechanical building blocks
5
The net fore is the force applied to the mass to cause it to accelerate thus net force applied to
mass=ma
ILLUSTRATIONS
MATHEMATICAL MODEL FOR A MACHINE MOUNTED ON THE GROUND
Used to study the basics for studying the effects of ground disturbances on the displacements
of a machine bed.
ILLUSTRATION
Example: Derive the differential equations describing the motion of the mass m, in fig. when
a force F is applied for the system in Figure
6
Consider the free body diagram For the mass m2, Force F & Force exerted by upper spring is
due to stretched by
For the free body diagram ofmass m1, the force exerted by the upper spring is,
by the lower spring then the net force acting on the mass.
Rotary Systems
Spring, dashpot and mass are the basic building blocks for mechanical systems where forces
and straight line displacement are involved without rotation. If rotation involves, then the
equivalent three building blocks are a torsional spring, a rotary damper and the moment of
inertia (inertia rotating mass). Inputs for such building blocks are torque and outputs are
angle rotated. The same analysis procedures can also be applied to rotary system, so just one
rotational mass block and just the torque acting on the body are considered. Torsional spring
angle θrotated is proportional to torque T.
Fig 8: Rotating a mass on the end of a shaft: (a) physical situationb) building block model.
7
Greater the MOI, Greater the torque needed to produce angular acceleration α
Capacitors
Capacitors are used to stored charge to increase the voltage by iV. A capacitor consists of
two parallel plates separated by insulating material and capacitor act as a strong device of
energy. The voltage equation for a capacitoris
1
V= idt
𝐶
Where C - capacitor
Inductors:
It consists of a coil wire. When current flows through the wire, a magnetic field surrounding
the wire is produced. Any attempt to change the density of this magnetic field leads to the
induction of voltage. The inductor equation
𝑑𝑖
V=L
𝑑𝑡
8
Table 2: summary of electrical building blocks
HYDRAULIC SYSTEMS
1. Hydraulicresistance(R)
It is the resistance to flow which occurs as a result of a liquid flowing through valves or
changes in pipe diameter. The relationship between the volume flow rate and resistance
element and theresulting pressure difference
9
Fig 10: Hydraulic resistance
2. HYDRAULICCAPACITANCE
This term is used to describe energy storage with a liquid when it is stored in the form of
potential energy.h = height of liquid.
P = pressure difference
But V = Ah, A – Cross – sectional area of the container and h – height of liquid in it.
10
Thus if the liquid is assumed to be incompressible (density does not changes).
Thus
Integrating the above equation
3. Hydraulic Inertance
Hydraulic inertance – equivalent of inductance in electrical systems or a spring in mechanical
systems.To accelerate a fluid and so increase its velocity a force is requires. Consider a block
of liquid of mass m as shown in fig. The force acting on the liquid is
This net force causes the mass to accelerate with acceleration and so
11
If the liquid has a density ρ then m = Alρ
P1P2
R
m: mass of the gas; P1-P2: pressure Rm R:resistance
difference;
12
Pneumatic inertance: is due to the pressure drop necessary to accelerate a block ofgas.
According to Newton’s second law the net force is ma = Since the force is provided by
the pressure
difference , then if A is the cross-sectional. Areaofthe block of gas being accelerated.
But m, the mass of the gas being Accelerated. But the volume of flow
13
3.5. BUILDING UP A MODEL FOR A FLUID SYSTEM
Example 1:
For the shown simple hydraulic system derive an expression for the height of the fluid in the
container. Consider the system consist of a capacitor, the liquid inthe container, with a resistor
and a valve.
14
Example 2:
For the shown hydraulic system derive expression for the fluid level in the twocontainers
15
Example 3:
Fig 15:Bellows
This equation describes how the pressure in the bellows P2 varies with time when there is an
input of a pressure P1.
16
3.6. THERMAL SYSTEM BUILDING BLOCKS
For thermal system, there are only two building blocks.
1. Thermal Resistance. 2. Thermal Capacitance.
Thermal resistance
If Q is the rate of heat flow and (T2-T1) is the temperature difference, thenRth
T 2−T 1
Qth= 𝑅𝑡ℎ
The value of Rthdepends on mode of heat transfer. In case ofconduction through solid
T 2−T 1 L
Q = KA , For this Rth = 𝐾𝐴
𝐿
Q1= rate of flow of heat into the system. Q2= rate of flow of heat out from thesystem
M=mass C=specificheat. Ch= thermalcapacitance
dT
Rate of change of temperature
𝑑𝑡
Example 1:
17
Example 2:
Consider the figure which shows a thermal system consisting of an electric free in a room.
The fire emits heat at the rate q1 and the room loses heat at the rate q2. Assuming that the air
in the room is at a uniform temperature T and that there is no heat storage in the walls of the
room, derive an equation describing how the room temperature will change with time.
18
Fig 17: Thermal system with an electric fire
19
Table 3: Summary of Mechanical, electrical, Fluid And thermal systems
Open loop control is essentially just a switch on-switch off form of control.E.g: an electric
fire is either switched on or switched off in order to heat a room.With closed-loop control
systems, a controller is used to compare the output of a system with the required condition
and convert the error into a control action designed to reduce the error.Error may arise as a
result of some changes in the conditions being controlled or because the set value is changed,
E.g: if there is a step input to the system to change the set value to a new value.
In this, the control modes, a discussion on how they termed, which occur with continuous
processes.
E.g: pneumatic system or operational amplifier systems.
Computer systems are rapidly replacing these nowadays.Digital control, when the computer
is in the feedback loop and exercising control in this way.Many processes not only involve
controlling some variable, E.g: temperature, to a required value but also involve the
sequencing of operations.
A domestic washing machine where a number of actions have to be carried out in a
predetermined sequence is an example.Manufacture of a product which involves the
assembly of a number of parts in a specific sequence by some controlled event-based or a
combination of the two. With a clock-based system the actions are carried out at specific
20
times, with an event-based system the actions are carried out when there is feedback to
indicate a particular event has occurred.
The term programmable logic controller (PLC) is used for a simple controller based on a
microprocessor and operates by examining the input signal from sensors and carrying out
logic instructions which have been programmed into its memory.
The output after such processing is signals which feed into correcting/actuator units.
Thus it can carry sequences of operations.
The main difference between a PLC and a computer is that programming is predominantly
concerned with logic and switching operations.
Interfacing for input and output devices is inside the controller.
In many processes, mixture of continuous and discrete control are there.
E.g: domestic washing machine – sequence control for various parts of washing cycle with
feedback loop control of temp for hot water & level of water
In any control system there are lags.
E.g: a change in the condition being controlled does not immediately produce a correcting
response from the control system.
Because time is required for the system to make the necessary responses.
E.g: control of temperature in a room by means of a central heating system, a lag will occur
between the room temperature falling below the required temperature and the control system
responding and switching on the heater.
This is not only lag, even when the control system has responded there is a lag in room
temperature responding as time is taken for the heat to transfer from the heater to the air in
the room
21
considered to be “looking-back”, summing all the errors and thus responding in changes that
have controlled.
The controller can achieve these modes by means of pneumatic circuits, analogue electronic
circuits involving operational amplifiers or by the programming of a microprocessor or
computer.
Two step mode
E.G: Bimetallic thermostat
Used with a simple temperature control system.
This is just a switch which is switched on or off according to the temperature.
If the room temperature is above the required then the bimetallic strip is in an off
position and the heater is off.
If the room temperature falls below the required temperature then the bimetallic strip
moves into an position and the heater is switched fully on. The controller in this case can be
in only two positions, on or off as indicated in fig..
Fig 17:
22
A large dead band results in large fluctuations of the temperature about the set temperature, a
small dead band will result in an increased frequency of switching.
The bimetallic element shown in fig has a permanent magnet for a switch contact, this has the
effect of producing a dead band.
CLASSIFICATION OF CONTROLLERS
• Two position or ON-OFF controllers
• Proportional (P) controllers
• Proportional (P) + Integral (I) i.e. PI controllers
• Proportional (P) + Derivative(D) i.e. PD controllers
• Proportional (P) + Integral (I) + Derivative (D) i.e. PID controllers
A sensor measures and transmits the current value of the process variable(PV) back to
thecontroller.
▪ Controller error(e(t)) at current time t is computed as set-point(SP)
23
minus measured process variable as in (1).
e(t) = SP – PV (1)
▪ The controller uses this e(t) in a control algorithm to compute a new controller output
signal.
▪ The controller output signal is sent to the final control element (e.g.valve, pump,
heater, fan) causing it to change.
▪ The change in the final control element causes a change in a manipulated variable
▪ The change in the manipulated variable (e.g. flow rate of liquid or gas) causes a
change in the PV
PID CONTROLLER
A proportional-integral-derivative controller (PID controller or three term controller) is a
control loop feedback mechanism widely used in industrial control systems and a variety of
other applications requiring continuously modulated control. A PID controller continuously
calculates an error value e(t) as the difference between a desired set point (SP) and a
measured process variable (PV) and applies a correction based on proportional, integral, and
derivative terms (denoted P, I, and D respectively) which give the controller its name.
The first theoretical analysis and practical application was in the field of automatic steering
systems for ships, developed from the early 1920s onwards. It was then used for automatic
process control in manufacturing industry, where it was widely implemented in pneumatic,
and then electronic, controllers. Today there is universal use of the PID concept in
applications requiring accurate and optimized automatic control.PID control is widely used in
all areas where control is applied.
• P – Controller = P depends on the present error
• I – Controller = I on the accumulation of past errors
• D Controller = D isapredictionoffutureerrors, based on current rate of change
24
Fig20 :Proportional controller
With the two-step method of control, the controller output iseither an on or an off signal,
regardless of the magnitude of the error. With the proportional mode, the size ofthecontroller
output is proportional to the size of the error. This means the correction element of the
control system, e.g.a valve, will receive a signal which is proportional to the size of the
correction required.
Figure shows how the output of such a controller varies with the sizeand sign of
theerror. The linear relationship
betweencontrolleroutputanderrortendstoexistonlyo.veracertain range of errors, this range being
called theproportionalband.Withintheproportionalbandtheequationofthestraightline can be
represented by
Change in controller output from set point = K,e
whereeistheerrorandKPaconstant.K,isthusthe gradientofthe straight line in Fig.
Thecontrolleroutputisgenerallyexpressedasapercentageof
thefullrangeofpossibleoutputswithintheproportionalband.This output can then correspond to,
say, a correction valve changingfromfullyclosed'tofullyopen.'Similarly,theerroris expressed as a
25
percentage of the full-range value, i.e. the error
rangecorrespondingtotheOto100%controlleroutput.Thus
% change in controller output from set point
100
Kp = 𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙 𝑏𝑎𝑛𝑑
With the derivative mode of control the change in controller output from the set point value is
proportional to the rate of change with time of the error signal. This can be represented by the
equation
de
Iout =I0= KD dt
Where I0 is the set point output value, Iout the output value that will occur when the error e is
de
the rate . It is usual to express these controller outputs as a percentage of full range. KD is
dt
the constant of proportionality.
Hence the transfer function is KDs. With derivative control, as soon as the error signal begins
to change there can be quite a large controller output. Since it is proportional to the rate of
change of the error signal and not its value. Rapid initial responses to error signals thus occur.
26
Fig 22: Derivative mode
27
Fig 23: PD mode
Hence
lou•K,.e+Kodi+lo
whereIoistheoutputat tbesetpoint,Ioutbeoutputwhenthe
errorise,K»istheproportionalityconstantandKothederivative constant. de/dJis the rate of
change of error. The system bas a transfer function givenby
(J-.-loXs)=K.,E(s)+KoSE(s)
HencethetransferfunctionisK,+Kor.Thisisoftenwrittenas: transferfunction•Ko(s+T�)
K1istheconstantofproportionalityand,whenthecontrolleroutputisexpressedasapercentageandtheer
rorasapercentage, hasunitsofs-•.Integratingthe aboveequation gives
K is the constant of proportionality and when the controller output is expressed as a
percentage and the error as a percentage has unit of s. integrating the above equation gives
28
Fig 24:Integral mode
IN -1, = J:K,edt
1�isthecontrolleroutputatzerotime.J.,.istheoutputatumer,The transfer function is obtained
bytaking Laplacetransforn.Thus
(/...-1,Xs)•tKaE(s)and so
Transferfunction= tK1
Figure1llustralcstheactionofanintegralcontrollerwhen
thereisaconstanterrorinputlothecontroller.'Wecanconsider the graphs in two ways.
When the controller output is constant
theerroriszero;whenthecontrolleroutputvariesataconstant rate the error has a constant
value. The alternative way of consideringthegraphsisin_termsofthe areaunderthe
errorgraph.
29
Fig 25: Integral controller
Proportional plus Integral Control (PI)
KI Kp 𝐾𝑝 1
Transfer function = Kp + = ds t = (s + 𝑇1)
s 𝑠
Where T1 = Kp/ KI and is the integral time constant.
Fig shows how the system reacts when there is an abrubt change to a constant error. The error
gives rise to a proportional controller output which remains constant since the error does not
change. There is then superimposed on this a steadily increasing controller output due to the
integral action.
PID Controllers
Combining all three modes of control (proportional, Intergral and derivative) enables a
controller to be produced which has no offset error and reduces the tendency for oscillations.
30
Such a controller is known as a three-mode controller or PID controller. The equation
describing its action can be written as
Where Iout is the output from the controller when there is an error e which is changing with
time t, I0 is the set point output when there is no error, Kp is the proportionality constant, KI
the integral constant and KD the derivative constant. One way of considering a three-mode
controller is an a proportional controller which has integral control to eliminate the offset
error and derivative control to reduce time lags. Taking the laplace transform gives
And so
Transfer function =
31
.
Fig 28: Digital control
The digital output, generally offer processing by an DAC since correction elements generally
require analog signals, can be used to initiate the corrective action.
Sequence of operation
1) Samples the measuredvalue.
2) Compares this measured value with the set value and stored
valuesofpreviousinputsandoutputstoobtaintheoutputsignal.
3) Send the output signal toDAC
4) Waits until the next samples time before repeating thecycle.
32
involve the use of a tacho-generator giving a signal proportional to the rotational speed of the
motor shaft and hence the rate at which the displacement is changing and the displacement
might be monitoring using a rotary potentiometer.
Adaptive control system can take a number of forms. The three commonly used forms are:
1. Gain schedulingcontrol
2. Self – tuningcontrol
3. Model – reference adaptivecontrol.
34
4. PROGRAMMABLE LOGIC CONTROLLER
4.2. BASICSTRUCTURE
The fig. shows the basic internal structure of a PLC. It consists essentially of a central processing unit
(CPU), memory and input/output (I/0) circuitry. The CPU controls and processes all the operations
within the PLC. It is supplied with a clock of frequency typically between 1 and 8 MHz. This
frequency determines the operating speed of the PLC and provides the timing and synchronization for
all elements in the system. A bus system carries information and data to and from the CPU, memory
and input/output units. There are several memory elements: a system ROM to give permanent storage
for the operating system and fixed data; RAM for the user's program, and temporary buffer storage
for I/0 channels. The programs in RAM can be changed by the user. However, to prevent the loss of
these programs during power failure, a battery is likely to be used in the PLC to hold the RAM
contents for a period of time.
2
Fig 2: Basic Architecture of PLC
After a program has been developed in RAM, it may be loaded into an EPROM memory chip and so
made permanent. The I/0 unit provides the interface between the system and the outside world.
Programs are entered into the system through input devices like key pad or sometimes through
Personal Computer (PC) which is loaded with an appropriate software package. The I/0 channels have
signal conditioning and isolation units, so that sensors and actuators can be generally directly
connected to them without the need for any other circuitry. The figure shows the basic form of an
input channel. Common input voltages are 5V and 24VCommon output voltages are
24V and 240V.
3
There are three types of output
1) Relay type.
2) Transistortype.
3) Triac type
1) RelayType
Withrelaytype,thesignalfromthePLCoutputisusedtooperatearelayandsoisable to switch currents of the
order of few amperes in an external circuit. The relay isolates the PLC from the external circuit and
can be used for both d.c and a.c switching Relays are relatively slow to operate.
2) Transistor type
The transistor type of output (fig) uses a transistor to switch current through the external circuit. This
provides a faster switching action. Optoisolators are used with transistor switches to provide isolation
between the external circuit and the PLC. The transistor output is only for D.C. switching.
4
3) Triactype:
Triac outputs can be used to control external loads which are connected to the a.c. power supply. Opto
isolators are again used to provide isolation.
There are two methods that can be used for I/O processing:
1. Continuous updating
In this method, the CPU scans input channels as they occurring the program instructions. Each input
is examined individually and its effect on the program determined. there involves a time delay,
typically about 3 ms, when each input is scanned in order to ensure that only valid input signals are
read by the microprocessor. This delay enable CPU to avoid counting an input signal twice, A
number of inputs may have to be scanned, each with a 3ms delay, before the program has the
instruction for a logic operation to be executed and an output to occur. The outputs are latched so that
they retain their status until the next update. The 3ms built-in delay for each input is, for ensuring
the signals read by the CPU is the valid one. or more frequently, if there is contact bounce at a switch.
5
4.4. PROGRAMMING
Ladder diagram
PLC’sareprogrammedusingladderdiagramtechniques.Aspecialstandardschematic representation of the
physical components arrangement (hardware) and its way of connections made between them is called
as ladder diagram. These are line diagram the represent both the system hardware and the
processcontroller.
A ladder diagram consists of two vertical lines called power power rails are connected along with I/O
devices and other components as horizontal lines between the two vertical lines known as rungs.
3. A ladder diagram must read from left to right and from top to bottom. whenthe scanning of first
rung is completed then the second rung starts from left toright.
4. Each rung must start with an input and must end with anoutput.
5. Each rung must have more than one input but only oneoutput.
6. The input must always located at the rung left and the output at the right end of the rung.
7. Electrical devices are shown in their normalcondition.
Ladder diagram can be entering from a monitor screen by using mouse. When entered, they
translated by the PLC into machine language for microprocessor to understand it. The nature of input
determines whether the output is to be energized or not.
The Ladder programming is one of the basic forms of programming commonly used with
PLC’s. In this type of programming, each program task being specified as though a rung of ladder.
Circuits are connected between these two vertical lines as horizontal lines, i.e. the rungs of the ladder.
Fig. shows the basic symbols that are used in the ladder diagram.
6
Fig 7: Ladder Programme
Ladder Symbols
Precede outputs and depending on, the different PLC manufacturer, different notations are used. For
example, the Mitsubishi F series of PLC’s precedes inputs elements by an X and output elements by a
Y and uses the following numbers: Numbering schemes are followed for inputs and outputs and
depending on, the different PLC manufacturer, different notations are used. For example, the
Mitsubishi F series of PLC’s precedes inputs elements by an X and output elements by a Y and uses
the following numbers:
Inputs X300 - 307,310 -313
7
X600 - 607,610 - 61 3
(24 possible inputs) Outputs Y330-337
Y 430 - 437
(1 6 possible outputs)
To illustrate the drawing of a ladder diagram, consider a situation where the output from the PLC is to
energies a solenoid when a normally open start switch connected to the input is activated by being
closed (Fig. (a)). the program required is shown in Fig.(b).
Starting with the input, we have the normally open symbol 11. This might have an input addressX400.
The line terminates withthe output, the solenoid, with the symbol
0. This might have the output address Y430. To indicate the end of the program the end rung is
marked. When the switch is closed the solenoid is activated. This might, for example, be a solenoid
valve which opens to allow water to enter avessel.
8
1. And function
2. OR function
Consider a situation shown in Fig.
If either one of the switch A or B is closed, then the lamp will be lit. If both switches are opened
simultaneously, then lamp will be put off. This situation Corresponds to an OR system. The ladder
diagram representing the OR function is shown in fig.(b) The switches A and B are represented as
output.
3. Nor function
Consider a situation show in Fig. (a) When neither A nor B have an input (i.e., neither switch A nor
switch B is opened) the lamp will be lit. When there is input to A or B (i.e., if switch A or B is
opened) the lamp will be put off. This situation corresponds to a NOR system. The ladder diagram
representing NOR function is shown in Fig. (b) Switch A and B are represented as input 1 and input
9
2; and lamp is represented as output. In this case the switches A and B are normally closed. When
input occurs, the corresponding switch is opened. There will be output if neither of the input occurs.
There will not be output if any of the input occurs.
4. NAND Function
Consider a situation show in Fig. (a)
The lamp will not be lit, when both A and B have input simultaneously (i.e., when both are opened
simultaneously the lamp will be lit if both inputs did not occur simultaneously (i.e., when both are not
opened simultaneously). The ladder diagram is shown in Fig. (b)
10
5. EXCLUSIVE-OR (XOR)function
Consider a situation shown in Fig. (a) In this system, there will be output (i.e., the lamp will be lit) if
any one of the input occurs. There will not be output if both inputs occur or if both do not occur. The
ladder diagram is shown in Fig (b) Note that, it is represented, each input by two sets of contacts, one
normally open and one normally closed.
4.6. LATCHING
There are often situation where it is necessary to hold a coil energized, even when the
input which energized it ceases. The term latch circuit is used for the circuit used to carry out such
and operation. It is a self-maintaining circuit in that, after being energizedher input is received. It
remembers its last state.
An example of a latch circuit is shown in Fig (a) when input 1 is energized and closes,
there is an output. However, when there is an output, a set of contacts associated with the output is
energized and closes. These contact OR the input 1 contacts. Thus, even if input 1 contact open, the
circuit will still maintain the output energized. The only way to release the output is by operating the
11
normally closed contact input 2.As an example of the use of a latching circuit, consider the
requirement for a PLC to control a motor so that when the start signal button is momentarily pressed
the motor starts and when the stop switch is used the motor switches off, signal lamps indicating
when the motor is off and when on. Figure shows a possible program. With no inputs, the signal lamp
for the motor indicates that it is off.
The motor contacts which are normally closed have the off lamp on. When the start button is pressed,
the normally open contacts are closed and the motor switched on. This is latched on by the motors
contact in parallel with the start contacts. Also, other motor contacts which are normally closed opens
and the off lamp goes off and motor contacts which are normally open closes and the on lamp goes
on. The motor is stopped by the stop switch which opens the previously closed contacts.
4.7. SEQUENCING
There are often control situations where sequences of outputs are required, with the switch from one
output to another being controlled by sensors.
12
Fig 17: Sequencing
Consider the requirement for a ladder program for a pneumatic system (Fig) with double solenoid
valves controlling two double-acting cylinders A and B if limitswitches a-, a+, b-, b+ are used to
detect the limits of the piston rod movements in the cylinders and the cylinder activation sequence
A+, B+, A-, B- is required. Fig. shows a possible program. A start switch input has been included in
the first rung. Thus cylinder extension for A, i.e., the solenoid A+ energized, only occurs when the
start switch is closed and the b- switch is closed, this switch indicating that the B cylinder is retracted.
When cylinder A is extended, the switch a+, which indicates the extension of A, is activated. This
then leads to an output to solenoid B+ which results in B extending. This closes the switch indicating
the extension of B, i.e. the b+ switch, and leads to the output to solenoid A-. and the retraction of
cylinder A. This retraction closes limit switch a-and so gives the output to solenoid B- which results
in B retracting. This concludes the program cycle and leads to the first rung again, which await the
closure of the start switch before being repeated.
13
Fig 18: Sequencing of Cylinder in a engine
4.8. MNEMONICS
Each horizontal rug on the ladder in a ladder program represents a line in the program and the
entire ladder gives the complete program in 'ladder language'. The programmer can enter the program
into the PLC using a keyboard with the graphic symbols for the ladder elements, or using a computer
screen and a mouse to select symbols, and the program panel or computer then translates these
symbols into machine language that can be stored in the PLC memory.
There is an alternative way of entering a program and that is to translate the ladder program
into mnemonics, each code corresponding to a ladder element, and then enter these into the
programming panel or computer. These are then translated into machine language. The mnemonics
used by different PLC manufacturers differ.
14
....I -Used in conjunction with other instructions to indicate the inverse
OR1 -An OR NOT logic function
AN1 -An AND NOT logic function
LDI - Start a rung with a closed contact
ANB -AND used with two sub-circuits
ORB -OR used with two sub-circuits
RST -Reset shift register/counter
SHF -Shift
K - Insert a constant
END -End ladder
The following examples show how individual rungs on a ladder are entered.
An AND System
An OR System
An NAND System
15
An NOR System
An XOR System
4.9. TIMERS
When timer circuits are activated, they result in closing or opening of input contacts after
some preset time. Fig. shows part of a program involving a delay-on timer. When input occurs, the
timer is activated, and after some preset time, the contacts associated with timers close and output
occurs. When we want to introduce larger time delays, it may not be possible with one timer circuit,
hence we may cascade more timers as shown in Fig.
16
Fig 20: On-Off cyclic timer
Normally PLC’s are provided with delay-on timer. The diagram shown in Fig. Explains how
a delay-off timer can be devised. When the input contacts are momentarily closed, the output is
energized and the timer is activated. The outputs contacts and latch the input and keep the output on.
After the reset time of the timer, the timer contact breaks the latch circuits and hence the output is put
off.
17
relay IR2. The contacts of the two relays are to control the output. Another use of internal relays is for
the starting of multiple outputs.
Another example of use of internal relay is resetting a latch. Fig. shows the ladder diagram.
When the input 1 is momentarily pressed, the output occurs. Then the output is latched. The output
can be unlatched by opening the internal relay contact. This can happen by the close of input
2contacts.
18
4.11. COUNTERS
As the name implies, counters are used for counting operations. It is an in-built operation in
any PLC. For example, in a packaging section of an industry, assume that the finished products are
passing along a conveyor into boxes. The counters can be used to count how many products have
passed into one box, so that the next box can be replaced after a particular count.
Two types of counters are possible, namely, up-counter and down-counter. In the down
counter the counter counts down a preset value to zero, whereas in the up counter the counter starts
from zero and count up to a preset value. In both the cases, as tie counter operation comes to an end,
its 'contact' changes state, i.e., it may close or open.
The counter is basically represented by a rectangle spanning two lines. (Refer fig.) One line is
used to reset the counter. The other line is used as 'OUT' line and the symbol K10 indicates that the
counter contact will change state on the 10th count. When the input 1 closes momentarily, the counter
is reset to the set value, in this case '10'. Now the counter starts counting as the input 2 closes and
opens. When the input 2closes and opens for 10 times, then the counter contact close and the output is
switched on. In case, before 10 pulses are received from input 2, if input 1 momentarily closes, then
the counter will reset back to10.
19
Fig 25: Lader programmer for counters
Example: Draw a ladder diagram to direct 6 items along path 1 for packaging in a box and then 12
items along path 2for packaging in another box. Two counters are used. One counter is used to count
six and another to count twelve. When input1 momentarily closes, both counters are reset and preset
to their respective counts 6 and 12. As items pass up to the junction in the paths, input 2contacts can
be made to close and open. After 6 items pass into one box, counter 1 contact closes and activates the
output which in turn closes one path and opens another. Counter 1also has contacts which close and
enables counter 2 to start counting. When counter 2 has counted 12 items it resets both counters and
opens counter 1 contacts which deactivates the output and the items will start falling into 6 items box.
20
array. In shift registers the bits are shifted along the register array by one bit when there is a suitable
input fed to the register. Consider a 4 bit shift register with its bit sequence as
Assume. a 0 is fet to this shift register, then the bits are shifted along the register by one bit and the
When the 'shift register' function is selected at the control panel of a PLC, then a number of
auxiliary registers are automatically grouped together to form a shift register. In Mitsubishi PLC a
programming function 'SFT' is to be used against the auxiliary relay number, which is the first in the
register array. For example if it is a 4- bit register to be formed, and if we select M 140 to be the first
relay number then automatically, the 4consecutive relays fromM140 will be assigned to form a 4-bit
shift register, i.e. M140, MI41, MI42 andMI43. A shift register has three inputs, namely OUT SFT1
and RST. OUT is used to load data into the first element of the shift register. SFT in used to shift the
bits by one bit and RST (Reset) in used to clear all the bits of the shift register to 0.
When contact input 2 close then master relay MC2 is activated and simultaneously the block
program rungs controlled by the relay MC2 follows. If there are no inputs to input 1 &2, then the next
input to be checked is for input 9 whose controlled output is OUT 6. Therefore this branching
program operates as -there is input I, then branch to follow MC1
21
controlled path, input 2, then branch to follow MC2 controlled path, otherwise neither input occurs
follow the rest of the program & ignore the branches.
Jumps
Conditional Jump is a function provided in PLCs. If a certain condition exists, then a section of the
program is ignored and the program control is jumped. In the ladder diagram shown, program A is
followed by input1 and the conditional jump relay CJP. If input 1 is OFF,theprogram B follows. The
end of program B is indicated by EJP end of jump relay coil. If input 1 is ON, then the program jumps
to the program 'C' skipping program B.
22
Fig 27: Jump control
Data movement
Data movement instruction has move instruction, source address of the data and destination
address of the data. For example, to move from Dl to D2.
23
Fig 28: Data movement
Data Comparison:
Data comparisons include less than (<or LES), equal to (=orEQU), less than or equal to (or
LEQ), greater than (> or GRT), greater than or equal to ( or GEQ) and not equal to (# or <> orNEQ)
For example to compare the data available in Dl & D2, the ladder program rung would be of
the form shown in fig.
Example: Draw a ladder diagram that the alarm keeps sounding when the sensor temperature is
above 80°C and stops sounding when the temperature falls below 70°C. The sensor temperature is fed
as input data to the source address. The destination address has the set value, here it 80°C. When the
input temperature rises to 80°C or above, the source data becomes greater than or equal to destination
data and output alarm sound which in turn is latched in the input. When the temperature falls to 70°C
or lower, the source data is less than or equal to destination data (shown in second rung of the ladder)
and IR output occurs. Now in the first line (the ladder, the IR contact opens and alarm is switched off.
24
Arithmetic Operations:
Addition and subtraction operations are commonly found in all PLCs. Even more arithmetic
operations are possible in some PLCs. ADDISUB instruction contains address of the addend, augend
and the result registers along with the arithmetic operation to be performed. These operations may be
used to change the preset values of the timers orcounters.
25
Fig 31: Code conversion
Example : Draw a ladder diagram to show the speed of motor increasing at a steady rate from zero to
its maximum value:
26
4.16. SELECTION OF A PLC:
The factors to be considered in selecting a PLC for a particular task are:
1. Input/output capacity and its expansion capability for future needs.
2. Types of inputs/outputs required, i.e. isolation, on-board power supply for I/O, signal
conditioning, etc.
3. The size of memory required.
4. The speed and power of the CPU. This is related to the number of instructions that can be
handled by a PLC. As the types of I10 increases or/and the number of I/0 increases, the faster CPU is
required.
27
5. DESIGN OF MECHATRONICS SYSTEMS
2
Mechanical layout is to be made whether physically all component can be
accommodated.
Also whether components are accessible for replacement / maintenance are to be
checked.
4
5.3. CASE STUDY 1 - PICK AND PLACE ROBOT
The robot has three axes and about these three axes only motion occurs. The
following movements are required for this robot.
1. Clockwise and Anti-clockwise rotation of the robot unit on itsbase
2. Horizontal linear movement of the arm to extend orcontraction
3. Up and down movement of the armand
4. Open or close movement of thegripper
The above movements are accomplished by the use of pneumatic cylinders
operated by solenoid controlled values with limit switches. The limit switches are used to
indicate when a motion is completed. Thus, a clockwise rotation of the robot unit can be
obtained from a piston and cylinder arrangement during its extension and that of counter
clockwise during its retraction, Likewise, the upward and downward movement of the arm
can be obtained from a piston and cylinder arrangement during the extension and retraction
of a pistonrespectively
5
Similarly,thegrippercanbeopenedorclosedbythepistoninalinearcylinderduring its
extension is shown in figure. Another figure shows the micro controller used to control the
solenoid values and hence the movements of the robot unit. The type of microcontroller
used in M68C11. A software program is used to control the robot. Eight c port lines PC0, -
PC7, are used to sense the position of eight separate limit switches used for eight different
robotic movements. Also one line from port D is used to start or stop the robot operation.
The switch in its one position will provide +5V (a logic high signal), tothe corresponding
port lines and the switch in its position will provide 0V (a logic low signal), to the port lines.
So the two positions of a switch will provide either a logic high or logic low to the
corresponding PC0, - PC7, and PD0, lines. Eight part B lines (PB0,-PB7,)
areusedtocontroleight differentmovements.TheseareBaseCW,BaseCEW,Armextends, Arm
retract, Arm up, Arm down Gripper close and Gripper open of the robot. PB0,is connected
to the Triacopto isolator through aresistor.
6
5.4. CASE STUDY 2 - AUTOMATIC CAR PARK SYSTEM
The main requirement of the system is that, the in-barrier is to be opened to allow
the car inside if correct money (coin) is inserted in the collectionbox.
The out barrier is to be opened to allow the car outside, if the car is detected at the
car park side of thebarrier.
The automatic car park barrier along with the mechanism to lift and lowerit.
When the current flows through the solenoid A & the piston in the cylinder extends
to move upward and causes the barrier to rotate about its pivot and thus the barrier
raisesto allow the carinside.
When the current flows through the solenoid A ceases, the spring on the solenoid
valve makes the contacts to open and thus makes the valve to its originalposition.
When the current flows through solenoid B, the piston in the cylinder moves
downward end causes the barrier to getdown.
Limit switches are used to detect when the barrier is down and also when fullyup.
This control can be controlled byPLC
7
Six inputs (X400 to X405) is required for the PLC to sense the six limit switch
position namely coin-operated switch, entrance barrier up switch, down switch, car
at exit barrier switch, exit barrier up switch, Exit barrier downswitch
Whenever, a switch is operated, 0V signal is provided to the corresponding inputs
andotherwise+24vsignalisprovidedtotheinputs.Fouroutputs(Y430toY433)are
required to operate the two solenoid valves A andB.
Program:
LD X400
OR Y430
ANI M100
ANI Y431
OUT Y430
LD X401
OUT T450
K10
LD T450
OUT M100
LD M100
OR Y431
ANI X402
ANI Y430
OUT Y431
LD X403
OR Y432
ANI M101
ANI Y433
OUT Y432
LD X404
OUT T451
K10
LD T451
OUT M101
LD M101
OR Y433
ANI X405
8
ANI Y432
OUT Y433
END
10
Fig 6: Ladder circuit engine management system
11
Elements of Autonomous Mobile Robot:
Locomotion
Sensorperception
Knowledge representation
Planning
Autonomy
Collaboration
Locomotion:
Locomotion is the act of moving from place to place. Locomotion relies on the
physical interaction between the vehicle and its environment. It is concerned with
the interaction forces, along with the mechanisms and actuators that generatethem.
The different types of locomotionare:
LeggedLocomotion
Snake Locomotion
Free-FloatingMotion
WheeledLocomotion
Sensor Perception:
The robots have to sense their environment in order to navigate in it, detect hazards,
and identifygoals.
Sensor fusion is an important capability, as no single sensor will be able to identify
or classify all aspects of thearenas.
The simulated victims are represented by a collection of different sensory
signatures. They have shape and colourcharacteristics.
Some simulated victims have motions such as waving, and some emit sounds such
as low moans, calls for help, or simpletapping.
All of the signals of life should be detected, identified, investigated further, and if
confirmed as a victim, the location should bemapped.
For obstacle detection, the sensors need to see far and only a logic response is
required.
Common sensors used in mobile robots for detecting obstacles are the digital infra-
red (IR) sensor.
Line tracing is normally required to distinguish between a white surface and a black
one in order to provide guidance by thedemarcation.
For direction monitoring the obvious sensor to use is a compass, which echoes the
bearing of the mobile robot in realtime.
Proximity sensors are used to sense the presence of an object close to a
mechatronicsdevice.
12
Knowledge Representation:
In the mobile robot applications, the robots are expected to communicate to humans
the location of victims andhazards.
They would be providing a map of the environment they have explored, with the
simulated victim and hazard location clearlyidentified.
The environment that the robots operate in is three-dimensions, hence they should
be able to map inthree-dimensions.
The area may change dynamically during operationtime
Planning:
The planning or behaviour generation elements of the robots build on the
knowledge representation and the sensingelements.
The robots mustbe able to navigate around obstacles, make progress in their mission
take into account time as a limiting resource, and make time critical decisions.
The planner should make use of an internal map generated by the robot and find
alternative routes to exit the arenas that may be quicker or avoid arm that have
become no longertraversable
Autonomy:
The robots are designed to operate withhumans.
The level of interaction may vary significantly, depending on the robot's design and
capabilities, or on thecircumstances.
Robots may communicate back to humans to request decisions, but should provide
the human with meaningful communication of thesituation.
The human should provide the robot with high level commands, such as "go to the
room on the left" rather that joystick the robot in thatdirection.
Collaboration:
The final element to be evaluated in the robot's overall capabilities is collaboration
among teams of robots.Multiple robots, either homogeneous or heterogeneous in
design and capabilities, should be able to more quickly explore thearea.
The issues to be examined are how effectively they maximize coverage given
multiple robots, whether redundancy is an advantage, and whether or how they
communicate among themselves to assignresponsibilities.
The human may make the decisions about assignments for each robot a priority, but
that would not be as desirable as seeing the robots jointly decide how to attack the
problem when confronted in thefield.
13
5.7. CASE STUDY 5 - AUTOMATIC CAMERA
The modern camera is likely to have automatic focusing and exposure. The basic
aspects of a microprocessor-based system that cannot be used to control the focusing and
exposure. When the switch is operated to activate the system and the camera pointed at the
object being photographed, the microprocessor takes the input from the range sensor and
sends an output to the lens position drive to move the lens to achieve focusing. The lens
positionis fedbacktothemicroprocessorsothatthefeedbacksignalcan’tbeusedtomodify the lens
position according to the inputs from the rangesensor.
The light sensor gives an input to the microprocessor which then gives an output to
determine, if the photographer has selected the shutter controlled rather than aperture
controlled mode, the time for which the shutter will be opened. When the photograph has
been taken, the microprocessor gives an output to the motor drive to advance the film
ready for the nextphotograph.
The program for the microprocessor is a number of steps where the microprocessor
is making simple decisions of the form: is there an input signal of a particular input line or
notandifthereisoutputasignalonaparticularoutput line.Thedecisionsarelogicdecisions with the
input and output signals either being low or high to give on-offstates.
14
A few steps of the program for the automatic camera might be of the form:
begin:
if battery check input OK
then continue
otherwise stop
loop
read input from range sensor calculate lens
movement output signal to lens position drive
input data from lens position
encoder
compare calculated output with actual output stop output when lens in
correct
position
send in-focus signal to viewfinder
display
etc.
15