Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views113 pages

ECE Mechtronics Notes

The syllabus for OMR351 - Mechatronics covers various topics including an introduction to mechatronics, 8085 microprocessor architecture, programmable peripheral interfaces, programmable logic controllers, and actuators. It emphasizes the importance of sensors and transducers, control systems, and the design process in mechatronic systems. The document also includes references and textbooks for further reading.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views113 pages

ECE Mechtronics Notes

The syllabus for OMR351 - Mechatronics covers various topics including an introduction to mechatronics, 8085 microprocessor architecture, programmable peripheral interfaces, programmable logic controllers, and actuators. It emphasizes the importance of sensors and transducers, control systems, and the design process in mechatronic systems. The document also includes references and textbooks for further reading.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 113

SYLLABUS

OMR351 - MECHATRONICS

UNIT I INTRODUCTION 9

Introduction to Mechatronics – Systems – Concepts of Mechatronics approach


– Need for Mechatronics – Emerging areas of Mechatronics – Classification of
Mechatronics. Sensors and Transducers: Static and dynamic Characteristics of
Sensor, Potentiometers – LVDT – Capacitance Sensors – Strain gauges – Eddy
current sensor – Hall Effect sensor – Temperature sensors – Light Sensors.

UNIT II 8085 MICROPROCESSOR 9

Introduction – Architecture of 8085 – Pin Configuration – Addressing Modes


–Instruction set, Timing Diagram of 8085.

UNIT III PROGRAMMABLE PERIPHERAL INTERFACE 9

Introduction – Architecture of 8255, Keyboard interfacing, LED display –


interfacing, ADC and DAC Interface, Temperature Control – Stepper Motor
Control – Traffic Control interface.

UNIT IV PROGRAMMABLE LOGIC CONTROLLER 9

Introduction – Basic structure – Input and output processing – Programming –


Mnemonics – Timers, Counters and internal relays – Data handling – Selection
of PLC.
UNIT V ACTUATORS AND MECHATRONIC SYSTEM DESIGN 9

Types of Stepper and Servo motors – Construction – Working Principle –


Advantages and Disadvantages. Design process-stages of design process –
Traditional and Mechatronics design Concepts – Case studies of Mechatronics
systems – Pick and place Robot – Engine Management System – Automatic
car park barrier.

TOTAL: 45 PERIODS

TEXT BOOKS:
1. Bolton, “Mechatronics”, Printice Hall, 2008
2. Ramesh S Gaonkar, “Microprocessor Architecture, Programming, and
Applications with them 8085”, 5th Edition, Prentice Hall, 2008.

PREPARED BY S.NIRMALA,AP/ECE 1
REFERENCES:

1. Michael B.Histand and Davis G.Alciatore, “Introduction to Mechatronics


and Measurement systems”, McGraw Hill International edition, 2007.
2. Bradley D.A, Dawson D, Buru N.C and Loader A.J, “Mechatronics”,
Chapman and Hall, 1993.
3. Smaili.A and Mrad.F , “Mechatronics Integrated Technologies for
Intelligent Machines”, Oxford University Press, 2007.
4. Krishna Kant, “Microprocessors & Microcontrollers”, Prentice Hall of
India, 2007.

PREPARED BY S.NIRMALA,AP/ECE 2
UNIT-I- INTRODUCTION
PART A
1) Define mechatronics?
Mechatronics brings together the areas of technology involving sensors and measurement
system, drive and actuation system, analysis of behavior of the system, control system and
microprocessor system.
2) What is meant by system in mechatronics?
The system is a group of physical components combined to perform a specific function. Any
mechatronics devices consist of system.
3) What are the main applications of mechatronics?
Washing machines, dish washers, micro ovens, cameras, atm and camcorders.

4) What are the types of control systems?


a) Closed loop system
b) Open loop system

5) Obtain the basic function of control system?

a) To minimize the error between the actual and desired output


b) To minimize the time response to load changes in the system.

6) Name elements of feedback system?


a) Forward path
b) Feedback path
c) Error detecting device
d) Amplifier
e) Compensating network

PREPARED BY S.NIRMALA,AP/ECE 1
7) What is a sensor?
A sensor is an element in measurement system that acquires a physical parameter and changes
it into signal.
8) What is hysteresis?
Hysteresis is defined as the difference in the output for a given input when this value is
approached from the opposite direction.
9) State the dynamic characteristics of simplified measuring system?
1) Speed of response
2) Lag
3) Fidelity
4) Dynamic error

10) Name few materials used in binding of strain gauge?

a) Ceramic cement
b) Epoxy
c) Nitrocellulose

PART B

1. What are the basic elements of a closed loop control system?

If there is feedback device to compare the actual value with desired one, then the
system is called closed loop control system.

PREPARED BY S.NIRMALA,AP/ECE 2
Elements of Closed Loop System:

The elements of closed loop control system are Comparison Unit, Control Unit,
Correction Unit, Process Unit, Measurement Device

i. Comparision element

This element compares the required or reference value of the variable condition being controlled
with the measured value and produces an error signal.

Error signal = reference value-measured value

ii. Control element

This element decides the corrective action to be taken when an error signal is received by it.

iii. Correction element

Correction element is an actuator that produces a change in a process to correct or change


the controller condition.

iv. Process element

An element that controls the process is known as process element.

Eg. Room temperature of a house is being controlled

v. Measurement element

The measurement element produces a signal related to the variable condition of the process
that is being controlled.

2. Explain the static and dynamic characteristic of a sensor?

Range and Span:


 The range of a transducer defines the limits between which the input can vary.

PREPARED BY S.NIRMALA,AP/ECE 3
 The difference between the limits (maximum value - minimum value) is known as span.
 For example a load cell is used to measure force. An input force can vary from 20 to 100
N. Then the range of load cell is 20 to 100 N. And the span of load cell is 80 N (i.e., 100-
20)
Error:
 The algebraic difference between the indicated value and the true value of the measured
parameter is termed as the error of the device.
 Error = Indicated value — true value
 For example, if the transducer gives a temperature reading of 30°C when the actual
temperature is 29° C, then the error is + 1°C. If the actual temperature is 3 1° C, then the
error is — 1°C.
Accuracy:
 Accuracy is defined as the ability of the instrument to respond to the true value of the
measure variable under the reference conditions.
 For example, a thermocouple has an accuracy of ± 1° C. This means that reading given
by the thermocouple can be expected to lie within + 1°C (or) — 1°C of the true value.
 Accuracy is also expressed as a percentage of the full range output (or) full scale
deflection.
 For example, a thermocouple can be specified as having an accuracy of ±4 % of full
range output. Hence if the range of the thermocouple is 0 to 200°C, then the reading
given can be expected to be within + 8°C (or) — 8°C of the true reading.
Sensitivity:
 The sensitivity is the relationship showing how much output we can get per unit input.
Sensitivity = Output / Input

PREPARED BY S.NIRMALA,AP/ECE 4
Precision:
 It is defined as the degree of exactness for which the instrument is intended to
perform.
Hysteresis error:
 When a device is used to measure any parameter plot the graph of output Vs value of
measured quantity.
 First for increasing values of the measured quantity and then for decreasing values of
the measured quantity.
 The two output readings obtained usually differ from each other.

Repeatability:
 The repeatability and reproducibility of a transducer are its ability to give the same
output for repeated applications of the same input value.
Reliability:
 The reliability of a system is defined as the possibility that it will perform its assigned
functions for a specific period of time under given conditions.
Stability:
 The stability of a transducer is its ability to give the same output when used to
measure a constant input over a period of time.
Drift:
 The term drift is the change in output that occurs over time.

PREPARED BY S.NIRMALA,AP/ECE 5
Dead band:
There will be no output for certain range of input values. This is known as dead band. There
will be no output until the input has reached a particular value.
Dead time:
 It is the time required by a transducer to begin to respond to a change in input
value.
Resolution:
 Resolution is defined as the smallest increment in the measured value that can be
detected. The resolution is the smallest change in the input value which will produce an
observable change in the input.

Backlash:

 Backlash is defined as the maximum distance (or) angle through which any part of a
mechanical system can be moved in one direction without causing any motion of the
attached part.
 Backlash is an undesirable phenomenon and is important in the precision design of gear
trains.
Dynamic characteristics
Response time:
 This is the time which elapses after a constant input is applied to the transducer up to the
point at which the transducer gives an output corresponding to some specified
percentage, e.g.95%, of the value of the input.
Time constant:
 This is the 63.2% response time. The time constant is a measure of the inertia of the
sensor and so how fast it will react to changes in its input. The bigger the time constant,
the slower the reaction to a changing input signal.
Rise time:
 This is the time for the output to rise to some specified percentage of the steady state
output. Often the rise time refers to the time taken for the output to rise from 10% of the
steady state value to 90 or 95% of the steady state value.
Settling time:
 This is the time for the output to settle to within some percentage, example 2% of the
steady state value.

PREPARED BY S.NIRMALA,AP/ECE 6
3. Explain the construction and working of potentiometer sensor and LVDT sensor.
Potentiometer
Principle:
It works on variable resistance transduction principle Linear or Rotary potentiometer is a
variable resistance displacement transducer which uses the variable resistance transduction
principle in which the displacement or rotation is converted into a potential difference due to the
movement of sliding contact over a resistive element

Construction & working:


 A resistor with three terminals.

 Two end terminal & one middle terminal (wiper)


 Two end terminal are connected to external input voltage
 One middle and one end terminal as output voltage
 The slider determines the magnitude of the potential difference developed
Characteristics:
 Resistance element = Precision Drawn wire with a diameter of about 25 to 50 microns,
and wad over a cylindrical or a flat mandrel of ceramic, glass or Anodized Aluminium.
2mm to 500 mm in case of linear pot.
 Wipers (Sliders) = Tempered phosphor bronze, beryllium copper or other precious alloys.
 Wire Material = Strong, ductile and protected from surface corrosion by enamelling or
oxidation. Materials &e alloys of copper nickel, Nickel chromium, and silver palladium.
 Resistance range = 20Ω to 200KΩ and for plastic 500Ω to 80KΩ
 Accuracy = Higher temperature coefficient of resistance than the wire and so temperature
changes have a greater effect Accuracy.
Linear variable differential transformer:
 It consists of three symmetrically spaced coils.
PREPARED BY S.NIRMALA,AP/ECE 7
 The centre coil is primary coil and other two are secondary coil

 Secondary coils are connected in series opposition and equally positioned with respect to
primary coil

 The output voltage is proportional to the displacement of the core from null position

PREPARED BY S.NIRMALA,AP/ECE 8
4. Explain the construction and working of eddy current and Hall Effect sensor.
Principle:
When a current carrying semiconductor, plate is placed in a transverse magnetic field, it
experiences a force (Lorentz force). Due to this action a beam of charged particles are forced to
get displaced from its straight path. This is known as Hall Effect.
A current flowing in a semiconductor plate is like a beam of moving charged particles
and thus can be deflected by a magnetic field. The side towards which the moving electron
deflected becomes negatively charged and the other side of the plate becomes positively charged
or the electrons moving away from it.

This charge separation produces an electrical voltage which continues until the Lorentz
force on the charged particles from the electric field balances the forces produced by the
magnetic field. The result is a traverse potential difference known as Hall voltage.

Current is passed through leads 1 and 2 of the semiconductor plate and the output leads are
connected to the element faces 3 and 4.

PREPARED BY S.NIRMALA,AP/ECE 9
 These output faces are at same potential when there is no transverse magnetic field
passing through the element and voltage known as Hall voltage appears when a
transverse magnetic field is passing through the element.
 This voltage is proportional to the current and the magnetic field.
 The direction of deflection depends on the direction of applied current and the direction
of magnetic field
Eddy current proximity sensor:
Principle:
When a coil is supplied with alternating current, an alternating magnetic field is produced
which induces an EMF on it. If there is a metal near to this alternating magnetic field, on EMF is
induced in it. The EMF cause current to flow. This current flow is eddy current.

Construction & working:


 It has two identical coils.
 One reference coil & another sensing coil which senses the magnetic current in the
object.
 Eddy current start to flow due to AC (conducting object) close to sensor
 Eddy current produce a magnetic field to oppose the magnetic field generated by
sensing coil.
 Due to this opposition reduction flux is created. To detect 0.001mm

PREPARED BY S.NIRMALA,AP/ECE 10
5. Explain the construction and working of capacitive and strain gauge sensor.

Capacitive Sensors:
It is used for measuring, displacement, velocity, force etc.
Principle:
It is passive type sensors in which equal and opposite charges are generated on the plates
due to voltage applied across the plate which is separated by dielectric material.
Formula:

By Changing the Distance between Two Plates:


 The displacement is measured due to the change in capacitance

PREPARED BY S.NIRMALA,AP/ECE 11
By Varying the Area of Overlap:
 The displacement causes the area of overlap to vary
 The capacitance is directly proportional to the area of the plates and varies linearly
with changes in the displacement between the plates

By Varying the Dielectric Constant:


 The change in capacitance can be measured due to change in dielectric constant as a
result of displacement.
 When the dielectric material is moved due to the displacement, the material causes the
dielectric constant to vary in the region where the two electrodes are separated that
results in a charge in capacitance

Push Pull Sensor:


 Push pull displacement sensor is used to overcome the non-linearity error.
 The sensor consists of three plates with the upper pair forming one capacitor and the
lower pair forming another capacitor.
 The displacement moves central plate between the two other plates.
 If the central plate moves downwards.
 The plate separation of the upper capacitor increases and the separation of the lower
one decreases.

PREPARED BY S.NIRMALA,AP/ECE 12
Strain gauge:
 Strain gauges are passive type resistance sensor whose electrical resistance change when
it is stretched or compressed (mechanically strained) under the application of force.
 The electrical resistance is changed due to the change in length (increases) and cross
sectional area (decreases) of the strain gauge.
 This change in resistance is then usually converted into voltage by connecting one, two
or four similar gauges as an arm of a Wheatstone bridge (known as Strain Gauge Bridge)
and applying excitation to the bridge. The bridge output voltage is then a measure of
strain, sensed by each strain gauge.
Unbonded Type Strain Gauges:
 In unbonded type, fine wire filaments (resistance wires) are stretched around rigid and
electrically insulated pins on two frames.
 One frame is fixed and the other is movable.
 The frames are held close with a spring-loaded mechanism.
 Due to the relative motion between two frames, the resistance wires are strained.
 This strain is then can be detected through measurement of the change in electrical
resistance since they are not cemented with the surfaces, they can be detached and reused.
Bonded Type Strain Gauges:
 Bonded type strain gauges consist of resistance elements arranged in the form of a grid
of fine wire, which is cemented to a thin paper sheet or very thin Bakelite sheet, and
covered with a protective sheet of paper or thin Bakelite.
 The paper sheet is then bonded to the surface to be strained. The gauges have a bonding
material which acts an adhesive material during bonding process of a surface with the
gauge element.
Classification of Bonded Type Strain Gauges:
 Fine wire gauges
 Metal foil gauges
 Semiconductor filament type
PREPARED BY S.NIRMALA,AP/ECE 13
Fine Wire Gauges:
 Wire of 3 to 25 microns diameter is arranged in the form of grid consisting of parallel
loops

Metal Foil Gauges:


 A thin foil of metal, deposited as a grid pattern onto a plastic backing material using
polyimide
 Foil pattern is terminated at both ends with large metallic pads
 Entire gauge size 5- 15mm

Semiconductor Filament Type:


 The gauges are produced in wafers from silicon or germanium crystals
 Special impurities such as boron is added
 It is mounted on an epoxy resin backing with copper on nickel leads
 Filament about 0.05mm thick 0.25mm wide and 1.25 to 12mm length

PREPARED BY S.NIRMALA,AP/ECE 14
6. Explain any four temperature sensors.
Bimetallic Strips:
 A Bimetallic thermostat consists of two different metal strips bounded together and they
cannot move relative to each other.
 These metals have different coefficients of expansion and when the temperature changes
the composite strips bends into a curved strip, with the higher coefficient metal on the
outside of the curve.
 The basic principle in this is all metals try to change their physical dimensions at
different rates when subjected to same change in temperature.
 This deformation may be used as a temperature- controlled switch, as in the simple
thermostat.

Resistance Temperature Detectors (RTDs):


 The materials used for RTDs are Nickel, Iron, Platinum, Copper, Lead, Tungsten,
Mercury, Silver, etc.
PREPARED BY S.NIRMALA,AP/ECE 15
 The resistance of most metals increases over a limited temperature range and the
relationship between Resistance and Temperature is shown below.

 The Resistance temperature detectors are simple and resistive elements in the form of
coils of wire
 The equation which is used to find the linear relationship in RTD is

Constructional Details of RTDs:


 The platinum, nickel and copper in the form wire are the most commonly used
materials in the RTDs.
 Thin film platinum elements are often made by depositing the metal on a suitable
substrate wire- wound elements involving a platinum wire held by a high temperature
glass adhesive inside a ceramic tube.

Thermistors:
 Thermistor is a semiconductor device that has a negative temperature coefficient of
resistance in contrast to positive coefficient displayed by most metals.
 Thermistors are small pieces of material made from mixtures of metal oxides, such as
Iron, cobalt, chromium, Nickel, and Manganese.
 The shape of the materials is in terms of discs, beads and rods.
 The thermistor is an extremely sensitive device because its resistance changes rapidly
with temperature.
 The resistance of conventional metal-oxide thermistors decreases in a very non-linear
manner with an increase in temperature.

PREPARED BY S.NIRMALA,AP/ECE 16
 The change in resistance per degree change in temperature is considerably larger than
that which occurs with metals.
 The resistance-temperature relationship for a thermistor can be described by an equation
of the form
Rt = Keβ/t
Where Rt, is the resistance at temperature t, with K and β being constant. Thermistors
have many advantages when compared with other temperature sensors.

 The simple series circuit for measurement of temperature using a thermistor and the
variation of resistance with temperature for a typical thermistor.

 The thermistor is an extremely sensitive device because its resistance changes


rapidly with temperature.
PREPARED BY S.NIRMALA,AP/ECE 17
Thermocouples:
 Thermocouples are based on the See back Effect.
 The thermocouple temperature measurement is based on a creation of an
electromotive force (emf).

 "When two dissimilar metals are joined together an e.m.f will exist between the two
points A and B, which is primarily a function of the junction temperature. The above said
to be principle is See back effect..
 The thermocouple consist of one hot junction and one cold junction
 Hot junction is inserted where temperature is measured
 Cold junction is maintained at a constant reference temperature.

PREPARED BY S.NIRMALA,AP/ECE 18
UNIT II
8085 MICROPROCESSOR AND 8051 MICROCONTROLLER
PART – A
1. What is stack and what is the use of stack pointer?

The stack is a reserved area of the memory in the RAM where temporary information may be
stored. A 16-bit stack pointer is used to hold the address of the most recent stack entry.
2. Mention the use of ALE.

The ALE signal is used to demultiplex (separate) AD 0 – AD7 lines to A0 – A7 (address lines)
and D0 – D7 (data lines). The separation of address lines and data lines is achieved by
connecting an external latch to AD0 – AD7 lines and enabling the latch when signal is active.
3. List the 8085 flags.
Various flags are: S (Sign flag), Z (Zero flag), AC (Auxiliary carry flag), P (Parity flag), CY
(Carry flag).
4. What is the function of program counter in 8085 microprocessors?
Program counter stores the address of the next instruction to be fetched. Thus, it is used as
pointer to the instruction.
5. What is trap interrupt and its significance?

This interrupt is a non-maskable interrupt. It is unaffected by any mask or interrupt enable.


TRAP has the highest priority. TRAP interrupt is edge and level triggered. This means that the
TRAP must go high and remain high until it is acknowledged. This avoids false triggering
caused by noise and transients.
6. List the control and status signals of 8085 and mention its need.
 ALE (Address Latch Enable)
 ̅R̅D̅ and ̅W̅̅̅R̅ (Read and Write)
 IO/M̅ , S0 S1
 READY

7. Define the function of parity flag and zero flag in 8085.

Parity is defined by the number of one’s present in the accumulator. After an arithmetic or
logical operation if the result has an even number of ones, i.e., even parity, the flag is set. If the
parity is odd, flag is reset. Zero flag – the zero flag sets if the result of operation in ALU is zero
and flag resets if result is non zero. The zero flag is also is also set if certain register content
becomes zero following an increment or decrement operation of that register.

PREPARED BY S.NIRMALA,AP/ECE 19
8. List the five interrupts pins available in the 8085.
The five interrupt pins are: TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.

9. What is interrupt?

Interrupt is an external signal that causes a microprocessor to jump to a specific subroutine.


10. What is Microcontroller?
A device which contains the microprocessor with integrated peripherals like memory, serial
ports, parallel ports, timer/counter, interrupt controller, data acquisition interfaces like ADC,
DAC is called microcontroller.
11. What are the differences between a Microcontroller and Microprocessor?
Microprocessor Microcontroller

It is termed as general- p u r p o s e It is termed as special purpose


digital computer. digital Controller.

It contains the CPU, memory, It possesses all features of microprocessor


addressing circuits and interrupt and additionally it includes timers, parallel
handling circuit. and serial I/O and the internal RAM and
ROM.

It has one or two types of bit It has many bit handling instructions.
handling Instructions.

Memory and I/O access time is large Memory and I/O access time is less.

12. What are the various types of 8085 instructions?


 Data transfer group – MOV A, B
 Arithmetic group – ADD B
 Logical group- ANA B
 Branch group – JMP LABEL
 Stack I/O and Machine Control group – PUSH, POP, HLT.

PREPARED BY S.NIRMALA,AP/ECE 20
13. What are the different types of addressing modes?
The addressing modes specify the location of the operand (data). The different types are as
follows
 Immediate addressing
 Register addressing
 Direct addressing
 Indirect addressing
 Implicit addressing
14. Define stack and stack related instructions?

The stack is a group of memory locations in the R/W memory that is used for the temporary
storage of binary information during the execution of the program. The stack related
instructions are PUSH and POP
15. What is subroutine?
Subroutine is group of instructions stored as a separate program in memory and it is called
from the main program whenever required.

PREPARED BY S.NIRMALA,AP/ECE 21
PART – B
1.Draw and explain the architecture of 8085.

 It consists of various functional blocks.


 Registers
 Arithmetic and logic unit
 Instruction decoder and machine cycle encoder
 Address buffer
 Address/Data buffer
 Increment / Decrement address latch
 Interrupt control

PREPARED BY S.NIRMALA,AP/ECE 22
 Serial control
 Serial I/O control
 Timing and control circuitry
Registers
It has eight addressable 8-bit registers A,B,C,D,E,H,L,F and two 16-bit registers PC
and SP
These registers can be classified as,

1. General purpose registers


2. Temporary registers
(a) Temporary data register (b) W and Z registers
3. Special purpose registers
(a) Accumulator (b) Flag registers (c) Instruction registers
4. 16-bit registers
(a) Program counter (PC) (b) Stack pointer (SP)
General purpose registers:
 B, C, D, E, H, L are 8-bit general purpose registers can be used as a separate (or) as 16-
bit register pairs BC, DE, HL.
 When used in register pair mode the higher order byte resides in the first register
and the low order byte in the second.
 HL pair also functions as a data pointer (or) memory pointer. These are also called
scratched registers as user can store data in them.
 To store and read data from these registers’ bus access is not required, it is an internal
operation.
 Used to store intermediate results and use them when required.
Temporary registers:

(a) Temporary data register:


 The ALU has two inputs
 One input is supplied by the accumulator and other from temporary data register.
 The programmer cannot access this temporary data.
(b) W and Z registers:

PREPARED BY S.NIRMALA,AP/ECE 23
 W and Z registers are temporary registers.
 These registers are used to hold 8-bit data during execution of some instructions.
 These registers are not available for programmer since 8085 uses them internally.
Special purpose registers:

(a) Register A (Accumulator)


 It is a tri state 8-bit register.
 It is extensively used in arithmetic, logic, load and store operations as well as
input/output (I/O) operations.
 Most of the times the result of arithmetic and logical operations is stored in the
register A.
(b) Flag register:

 It is an 8-bit register in which five of the bits carry significant information in the form
of flags.
 S – Sign flag; Z – Zero flag; AC – Auxiliary carry flag; P – Parity flag; CY – carry flag.
S- Sign flag:

 After the execution of arithmetic (or) logical operations if bit D7 of the result is 1, the
sign flag is set.
 In a given byte if D7 is 1, the number will be viewed as negative number.
 If D7 is 0, the number will be considered as positive number.
Z – Zero flag:
 The zero flag sets if the result of operation is ALU is zero and flag resets if result is
non zero.
 The zero flag is also set if certain register content becomes zero following as
increment (or) decrement operation of that register.
AC – Auxiliary carry register:

 This flag is set if there is an overflow out of bit 3 i.e., carry from lower nibble to higher
nibble (D3 bit to D4 bit).
 This flag is used for BCD operations and it is not available for the programmer.
P – Parity flag:
 Parity flag is defined as the number of one’s present in the accumulator.
CY – carry flag:
 This flag is set if there is an overflow out of bit 7.
 The carry flag also serves as a borrow flag for subtraction.

PREPARED BY S.NIRMALA,AP/ECE 24
© Instruction registers:
 In a typical processor operation, the processor first fetches the opcode of
instruction from memory.
 The CPU stores this opcode in a register called the instruction register.
 This opcode is further sent to the instruction decoder to select one of the 256
alternatives.
16-bit registers:

(a) Program counter (PC):


 Program counter is sequence of instructions
 The PC is a special purpose register which at a given time stores the address of the
next instruction to be fetched.
 Program counter acts as a pointer to the next instruction.
 The Pc increments depends upon the nature of the instruction, for one-byte instruction it
increments program counter by one, for two-byte instruction it increments PC by two and
so on.
(b) Stack pointer (SP):
 The stack pointer is a reserved area of the memory in the RAM where temporary
information may be stored.
 A 16-bit stack pointer is used to hold the address of the most recent stack entry.
Arithmetic logic unit (ALU):
 The 8085’s ALU performs arithmetic and logical functions on 8-bit variables.
 The arithmetic unit performs addition and subtraction.
 The logic unit perform logical operations such as complement, AND, OR, EX- OR,
rotate, clear etc.,
 The ALU also looks after the branching decisions.
Instruction decoder:
 The processor first fetches the opcode of instructions from memory and stores this
opcode in the instruction register.
 It is then sent to the instruction decoder.
 The instruction decoder decodes it and accordingly gives the timing and control signals
which control the register, the data buffers, ALU etc.,
 The 8085 executes seven different types of machine cycles
 It gives the information about which machine cycle is currently executing in the
encoded from on the S0, S1 and IO/𝑀̅ lines
PREPARED BY S.NIRMALA,AP/ECE 25
 This task is done by machine cycle encoder.
Address buffer:
 This is an 8-bit unidirectional buffer.
 It is used to drive external high order address bus (A15 – A8).
 It is also used to tri-state the high order address bus under certain conditions such as
reset, hold, halt, and when address lines are not in use.
Address/Data buffer:
 This is an 8-bit bi-directional buffer.
 It is used to drive multiplexed address/data bus ie, lower order address bus (A7-A0)
and data bus (D7-D0).
 It is also used to tri-state the high order address bus under certain conditions such as
reset, hold, halt, and when address lines are not in use.
 The address and data buffers are used to drive external address and data buses
respectively.
 Due to these buffers the address and data buses can be tri-stated when they are not in
use.
Increment/Decrement address latch:
 This 16-bit register is used to increment (or) decrement the contents of PC (or) AP as
a part of execution of instruction related to them.
Interrupt control:
 The processor fetches, decodes and execute instructions in a sequence.
Serial I/O control:
 In serial communication one bit is transferred at a time over a single line.
 The 8085 serial I/O control provides two lines, SOD and SID for serial
communication.
 The serial output data (SOD) line is used to send data serially and serial input data (SID)
line is used to receive data serially.
Timing and control circuitry:
 The control circuitry in the processor 8085 is responsible for all the operations.
 The control circuitry and operations in 8085 are synchronized with the help of clock
signal.
 Control circuitry also generates signals required to interface external devices to the
processor 8085.

PREPARED BY S.NIRMALA,AP/ECE 26
2. Draw and explain the timing diagram of memory read and write operation.

Memory read cycle:


 The 8085 executes the memory read cycle to read the contents of R/W memory or ROM.
 The length of this machine cycle is 3T-states(T1-T3)
 In this machine cycle processor places the address on the address lines from the stack
pointer, general purpose register pair or program counter and through the read process,
reads the data from the addressed memory location.
 Memory read cycle is similar to the opcode fetch machine cycle.
 However they use only states T1 to T3 and the status signal values (IO/𝑀̅ =0, S1=1,
S0=0) appropriate for memory read machine cycle are issued in T1.
The following section describes the memory read machine cycle in step by step manner.
Step 1: (State T1)
 In T1 state, microprocessor places the address on the address lines from the stack pointer,
general purpose register pair or program counter and activates ALE signal in order to
latch low-order byte of address.
 During T1, 8085 sends status signal: IO/M=0, S1=1, S0=0 for memory read
machine cycle.
PREPARED BY S.NIRMALA,AP/ECE 27
Step 2: (State T2)
 In T2, 8085 sends RD signal low to enable the addressed memory location.

The memory device then places the contents of addressed memory location of the data
bus (AD0-AD7).
Step 3: (State T3)

During T3, 8085 loads the data from the data bus into specified register (F, A, B, C, D, E, H and
L) and raises RD to high which disables the memory device.
Memory write cycle:

 The 8085 executes the memory write cycle to store the data into data memory or stack
memory.
 The length of this machine cycle is 3T-states(T1-T3)
 In this machine cycle processor places the address on the address lines from the stack
pointer general purpose register pair and through the write process, stores the data into
the addressed memory location.
 The memory write timing diagram is similar to the memory read timing diagram, except
the instead of RD, WR signal goes low during T2 and T3.
 The status signals for memory write cycle are: IO/𝑀̅ =0, S 1=0, S 0=1. The

following section describes the memory write machine cycle in step by step manner.

PREPARED BY S.NIRMALA,AP/ECE 28
Step 1: (State T1)

 In T1-state, the 8085 places the address on the address lines from stack pointer or
general-purpose register pair and activates ALE signal in order to latch low-order byte of
address.
 During T1, 8085 sends status signals: IO/𝑀̅ = 0, S1=0, S0=1 for memory write

machine cycle.
Step 2: (State T2)

 In T2, 8085 places data on the data bus and sends WR signal low for writing into the
addressed memory location.
Step 3: (State T3)

 During T3, WR signal goes high, which disables the memory device and terminates the
write operation.
3. What are the different addressing modes in 8085 microprocessors? Explain it with an
example?
Addressing mode specifies the location of operand (data). Every instruction of a program
has to operate on a data. The method of specifying the data to be operated by the instruction is
called Addressing. The 8085 has the following 5 different types of addressing.
a. Immediate Addressing
b. Direct Addressing
c. Register Addressing
d. Register Indirect Addressing
e. Implied Addressing
a. Immediate Addressing:
In immediate addressing mode, the data is specified in the instruction itself.
The data will be a part of the program instruction. All instructions that have ‘I’ in their
mnemonics are of immediate addressing type.
Example: MVI A, 01H- Move the data 01H given in the instruction to A register.

b. Direct Addressing:
In direct addressing mode, the address of the data is specified in the instruction. The data
will be in memory. In this addressing mode, the program instructions and data can be stored
indifferent memory blocks. This type of addressing can be identified by 16-bit address present in
the instruction.
Example:LDA 4500H- Load the data available in memory location 4500H in A register.
c. Register Addressing:
PREPARED BY S.NIRMALA,AP/ECE 29
In register addressing mode, the instruction specifies the name of the register in which
the data is available. This type of addressing can be identified by register names in the
instruction.
Example: MOV A, B -Move the content of B register to A register.

d. Register Indirect Addressing:


In register indirect addressing mode, the instruction specifies the name of the register in
which the address of the data is available. The data will be in memory and the address will be in
the register pair. This type of addressing can be identified by letter ‘M’ present in the instruction.
Example: MOV A, M - The content of memory (data) addressed by HL pair is moved to A
register.
e. Implied Addressing:
In implied addressing mode, the instruction itself specifies the type of operation and location of
data to be operated. This type of instruction does not have any address, register name, immediate
data specified along with it.
Example: CMA - Complement the content of accumulator

4. Explain the different types of instruction in 8085.


An instruction is a command given to the microprocessor to perform specified operation
on a given data. The instruction set of a microprocessor is the collection of instructions that the
microprocessor is designed to execute. It is classified into
i. Data Transfer Instructions.
ii. Arithmetic Instructions.

iii. Logical Instructions.

iv. Branching / Control Transfer Instructions.

v. Stack & I/O Machine Control Instructions.

i. Data transfer instructions:


The data transfer instructions move the data between registers or between registers and
memory. It copies the data from source location to destination location. No flags will be
affected.
Move instruction:
 MOV Rd, Rs
 MOV M, Rs
 MOV Rd, M

PREPARED BY S.NIRMALA,AP/ECE 30
This instruction copies the contents of the source register into the destination register.
The contents of the source register are not altered. If one of the operands is a memory location,
its location is specified by the contents of the HL registers.
Example: MOV B, C - This instruction moves the content of C register to B register.
MOV B, M -This instruction moves the content of memory location pointed by HL
register to B register.
Move immediate 8-bit:
MVI Rd, data
MVI M, data
The 8-bit data is stored in the destination register or memory. If the operand is a
memory location, its location is specified by the contents of the HL registers.
Example: MVI A, 01 - The data 01 will move to A register.
MVI M, 01 – The data 01 will move to the memory location pointed by HL registers.
Load accumulator:
LDA 16-bit address
The contents of a memory location, specified by a16-bit address in the operand, are
copied to the accumulator. The contents of the source are not altered. This is a 3-byte instruction,
the second byte specifies the low-order address and the third byte specifies the high-order
address.
Example: LDA 4000 –The content of memory location 4000 is loaded into A register. Store
accumulator:
STA 16-bit address
The contents of the accumulator are copied into the memory location specified by the
operand. This is a 3-byte instruction, the second byte specifies the low-order address and the
third byte specifies the high-order address.
Example: STA 4500–The content of A register is loaded into memory location 4500.
Exchange:
XCHG
The contents of register H are exchanged with the contents of register D, and the
contents of register L are exchanged with the contents of register E.
Example: XCHG: This instruction exchanges the content of H and L with D and E
ii. Arithmetic instructions:
The arithmetic instructions include addition, subtraction, increment and decrement
operations.
Addition:
ADD REGISTER OR MEMORY TO ACCUMULATOR

PREPARED BY S.NIRMALA,AP/ECE 31
ADD Rs
ADD M
The contents of the operand (register or memory) are added to the contents of the
accumulator and the result is stored in the accumulator. If the operand is a memory location, its
locations specified by the contents of the HL registers. All flags are modified to reflect the result
of the addition.
Example: ADD B – The content of A register is added with the content of B register and the
result is stored in A register.
ADD M -The content of A register is added with the content of memory
Location pointed by HL register and the result is stored in A register.
Add register to accumulator with carry:
ADC R
ADC
M
The contents of the operand (register or memory) and the Carry flag are added to the
contents of the accumulator and the result is stored in the accumulator. If the operand is a
memory location, its location is specified by the contents of the HL registers. All flags are
modified to reflect the result of the addition.
Example: ADC B -The content of A register is added with the content of B register and also
Carry and the result is stored in A register.
ADD IMMEDIATE TO ACCUMULATOR
ADI 8-bit data
The 8-bit data (operand) is added to the contents of the accumulator and the result is stored in the
accumulator. All flags are modified to reflect the result of the addition.
Example: ADI 45 – The data 45H is immediately added with the content of A register and result
Is stored in A register.
Subtraction:
SUBTRACT REGISTER OR MEMORY FROM ACCUMULATOR
SUBRs
SUB M
The contents of the operand (register or memory) are subtracted from the contents of the
accumulator and the result is stored in the accumulator. If the operand is a memory location, its
locations specified by the contents of the HL registers. All flags are modified to reflect the result
of the subtraction.
Example: SUB B – The content of A register is subtracted with the content of B register and the
result is stored in A register. SUB M -The content of A register is subtracted with the content of
memory location pointed by HL register and the result is stored in A register.
SUBTRACT SOURCE AND BORROW FROM ACCUMULATOR:
SBB R
PREPARED BY S.NIRMALA,AP/ECE 32
SBB
M
The contents of the operand (register or memory) and the Borrow flag are subtracted from the
contents of the accumulator and the result is placed in the accumulator. If the operand is a
memory location, its location is specified by the contents of the HL registers.
All flags are modified to reflect the result in accumulator.
Example: SBB B - The content of A register is subtracted with the content of B register and also
Borrow flag and the result is stored in A register. SBB M- The content of A register is subtracted
with the content of memory location pointed by HL register and also Borrow and the result is
stored in A register.
Subtract immediate from accumulator:
SUI 8-bit data

PREPARED BY S.NIRMALA,AP/ECE 33
The 8-bit data (operand) is subtracted from the contents of the accumulator and the result is
stored in the accumulator. All flags are modified to reflect the result of the subtraction.
Example: SUI 45 -The data 45H is immediately subtracted with the content of A register and
Result is stored in A register.
Increment register or memory
INR R
INR M
The content of the designated (register or memory) are incremented by 1 and the result is stored
in the same place. If the operand is a memory location, its location is specified by the contents of
the HL registers.
Example: INR B – The content of B register is incremented by 1. INR M – The content of
memory location pointed by HL register is incremented by 1.
INCREMENT REGISTER PAIR:
INX R
The contents of the designated register pair are incremented by1 and the result is stored in the
same place.
Example: INX H – The HL register pair is incremented by 1 and showing the next memory
location.
Decrement register or memory
DCR R
DCR
M
The contents of the designated (register or memory) are decremented by 1 and the result is stored
in the same place. If the operand is a memory location, its location is specified by the contents of
the HL registers.
Example: DCR B – The content of B register is decremented by 1.
DCR M –The content of memory location pointed by HL register is decremented by 1.
Decrement register pair:
DCX R
The contents of the designated register pair are decremented by1 and the result is stored in the
same place.
Example: DCX H – The HL register pair is decremented by 1 and showing the previous
Memory location.
iii. Logical instructions:
The logical instructions include AND, OR, XOR, Complement operations.
Logical AND:
PREPARED BY S.NIRMALA,AP/ECE 34
Logical AND register or memory with accumulator
ANA R
ANA
M
The contents of the accumulator are logically AND with the contents of the operand (register or
memory), and the result is placed in the accumulator. If the operand is a memory location, its
address is specified by the contents of HL registers, Z, P are modified to reflect the result of the
operation. CY is reset. AC is set.
Example: ANA B - The content of A register is AND with the content of B register and the result
is stored in A register. ANA M - The content of A register is AND with the content of memory
location pointed by HL register and the result is stored A register.
Logical and immediate with accumulator
ANI 8-bit data
The contents of the accumulator are logically AND with the 8-bit data (operand) and the result
is placed in the accumulator. S, Z, P are modified to reflect the result of the operation. CY is
reset. AC is set.
Example: ANI 45 -The data 45H is immediately ANDed with the content of A register and
result is stored in A register.
Exclusive or register or memory with accumulator
XRA R
XRA M
The contents of the accumulator are Exclusive OR with the contents of the operand (register or
memory), and the result is placed in the accumulator. If the operand is a memory location, its
address is specified by the contents of HL registers.S, Z, P are modified to reflect the result of
the operation. CY and AC are reset.
Example: XRA B -The content of A register is XOR with the content of B register and the result
is stored in A register. XRA M -The content of A register is XOR with the content of memory
location pointed by HL register and the result is stored A register.
Exclusive or immediate with accumulator
XRI 8-bit data
The contents of the accumulator are Exclusive OR with the8-bit data (operand) and the result is
placed in the accumulator. S Z, P are modified to reflect the result of the operation. CY and AC
are reset.
Example: XRI 45 -The data 45H is immediately XOR with the content of A register and result is
stored in A register.
LOGICAL OR REGISTER OR MEMORY WITH ACCUMULATOR
ORA R
ORA
PREPARED BY S.NIRMALA,AP/ECE 35
M
The contents of the accumulator are logically OR with the contents of the operand
(register/memory), and the Result is placed in the accumulator. If the operand is a memory
location, its address is specified by the contents of HL registers.S, Z, P are modified to reflect the
result of the operation. CY and AC are reset.
Example: ORA B -The content of A register is OR with the content of B register and the result is
stored in A register. ORA M- The content of A register is OR with the content of memory
location pointed by HL register and the result is stored A register.
Logical or immediate with accumulator:
ORI 8-bit data
The contents of the accumulator are logically OR with the 8-bit data (operand) and the result is
placed in the accumulator. S, Z, P are modified to reflect the result of the operation. CY and AC
are reset.
Example: ORI 45 - The data 45H is immediately OR with the content of A register and result is
stored in A register.
Complement accumulator:
CMA
The contents of the accumulator are complemented. No flags are affected.

iv. Branching (control transfer) instructions:


The branching instructions are used to change the execution order. They are divided into
conditional jump/call or unconditional jump/call.
JUMP UNCONDITIONALLY
JMP 16-bit address
The program sequence is transferred to the memory location specified by the 16-bit address given in
the operand.
Example: JMP 4000
JUMP
CONDITIONALLY
The program sequence is transferred to the memory location specified by the 16- bit address
given in the operand based on the specified flag of the PSW.
Example:
OPCODE DESCRIPTION FLAG STATUS
JC Jump on Carry CY = 1

JNC Jump on no Carry CY = 0

PREPARED BY S.NIRMALA,AP/ECE 36
JP Jump on Positive S=0

JM Jump on Minus S=1

JZ Jump on Zero Z =1

JNZ Jump on no Zero Z=0

JPE Jump on parity even P=1

JPO Jump on parity odd P=0

Unconditional subroutine call:


CALL 16-bit address
The program sequence is transferred to the memory location specified by the 16-bit address
given in the operand. Before the transfer, the address of the next instruction after CALL the
contents of the program counter is pushed onto the stack. Example: CALL 4000
CONDITIONAL SUBROUTINECALL:
The program sequence is transferred to the memory location specified by the 16-bit address
given in the operand based on specified flag of the PSW. Before the transfer, the address of the
next instruction after the call the contents of the program counter is pushed onto the stack.
Unconditional return from subroutine:
RET
The program sequence is transferred from the subroutine to the calling program. The two bytes
from the top of the stack are copied into the program counter, and program execution begins at
the new address.
Example: RET
CONDITIONAL RETURN FROM SUBROUTINE:

The program sequence is transferred from the subroutine to the calling program based on the
specified flag of the PSW. The two bytes from the top of the stack are copied into the program
counter, and program execution
begins at the new address.

PREPARED BY S.NIRMALA,AP/ECE 37
Example: RZ

OPCODE DESCRIPTION FLAG STATUS

RC Return on Carry CY = 1

RNC Return on no Carry CY = 0

RP Return on Positive S=0

RM Return on Minus S=1

RZ Return on Zero Z =1

RNZ Return on no Zero Z=0

RPE Return on parity even P=1

RPO Return on parity odd P=0

v. Stack i/o,machine control instructions:


These instructions are used to manipulate the stack to perform the input /output and to alter
the internal control flags. Unless specified the flags are not affected.
Stack instruction:
PUSH :
Example: PUSH PSW
The contents of register A and the contents of condition flags which form the PSW are pushed
onto the stack.
Pop instruction:
Example: POP PSW The contents of register A and the contents of condition flags which form
the PSW are restored from the stack.
I/O instruction:
IN port
The data placed on the 8-bit bidirectional data bus by the specified port is moved to register A.
PREPARED BY S.NIRMALA,AP/ECE 38
OUT port
The contents of register A are placed on the 8- b i t data bus is transferred to the specified port.
Machine control instruction:
EI
The interrupt system is enabled.
DI
The interrupt system is disabled.
NOP
No Operation is performed. No
flags are affected.
HLT
The processor is stopped. No
flags are affected.

5. Explain with block diagram the architecture of 8051 microcontroller.


a. Memory Organization
 Program Memory
 Data Memory
b. Program Status Word
 The Program Status Word (PSW) contains several status bits that reflect the
current state of the CPU.
 It contains the Carry bit, the Auxiliary Carry (for BCD operations), the two-
register bank select bits, the Overflow flag, a parity bit, and two user-definable
status flags.
c. Interrupt Structure
The 8051 provides 4 interrupt sources Two
external interrupts
Two timer interrupts

d. Port Structures
 The 8051 contains four I/O ports
 All four ports are bidirectional

PREPARED BY S.NIRMALA,AP/ECE 39
 Each port has SFR (Special Function Registers P0 through P3) which works like a
latch, an output driver and an input buffer
 Both output driver and input buffer of Port 0 and output driver of Port 2 are used for
accessing external memory
 Accessing external memory works like this
Port 0 outputs the low byte of external memory address (which is time- multiplexed
with the byte being written or read)
Port 2 outputs the high byte (only needed when the address is 16 bits
wide)
Port 3 pins are multifunctional. The alternate functions are activated
with the 1 written in the corresponding bit in the port SFR.

PREPARED BY S.NIRMALA,AP/ECE 40
PREPARED BY S.NIRMALA,AP/ECE 41
e. Timer/Counters
 The 8051 has two 16-bit Timer/Counter registers
 Timer 0
 Timer 1
 Both can work either as timers or event counters

 Both have four different operating modes from which to select.


 Mode 0 (13-bit Timer)
 Mode 1 (16-bit Timer)
 Mode 2 (8-bit Timer with Auto-Reload)
 Mode 3 (Two 8-bit Timers)
6. Explain the interrupt structure of 8051 microcontroller.
 8051 provides 4 interrupt sources
o 2 external interrupts
o 2 timer interrupts
 They are controlled via two SFRs, IE and IP
 Each interrupt source can be individually enabled or disabled by setting or clearing a bit
in IE (Interrupt Enable). IE also exists a global disable bit, which can be cleared to disable
all interrupts at once.
 Each interrupt source can also be individually set to one of two priority levels by setting
or clearing a bit in IP (Interrupt Priority)
 A low-priority interrupt can be interrupted by high-priority interrupt, but not by another
low-priority one
 A high-priority interrupt can’t be interrupted by any other interrupt source
 If interrupt requests of the same priority level are received simultaneously, an internal
polling sequence determines which request is serviced, so within each priority lever there
is a second priority structure

PREPARED BY S.NIRMALA,AP/ECE 42
External Interrupts
 External interrupts ~INT0 and ~INT1 have two ways of activation
o Level-activated
o Transition-activated
Timer 0 and Timer 1 Interrupts
 Timer interrupts are generated by TF0 and TF1 flags in their respective Timer/Counter
registers.

PREPARED BY S.NIRMALA,AP/ECE 43
UNIT – III PROGRAMMABLE PERIPHERAL INTERFACE
PART – A

1. What is key debouncing?


When a key press is found, the microprocessor waits for at least 10ms before it accepts
the key as input. It is called key debouncing.
2. Name any two types of ADCs.
 Single Ramp or Single Slope
 Dual slope
 Successive approximation
 Flash
3. What is the bit set Reset mode of 8255 PPI?
The individual bits of port C can be set or reset by sending out a single OUTPUT
instruction to the control register. When port C is used for control/status operation, this
feature can be used to set or reset individual bits.
4. What are the applications of D/A converter interfacing with 8255?
 Temperature control
 Air conditioning control
 Washing machine control
 Traffic light control
5. What is keyboard interfacing?
A keyboard consists of number of key switches used for entering data, event etc., using
this keyboard, the input data is applied to the microprocessor is known as keyboard
interfacing.
6. State the purpose and importance of NOP instructions.
NOP: Perform NO Operation
 This instruction simply used up three clock cycles and
increments the instructions.
 Pointer to pointer to the next instruction.
 It can also be used to hold a place in a program for instruction that will
be added later.

PREPARED BY S.NIRMALA,AP/ECE 44
7. Define PPI.
8255 is widely used, programmable, parallel I/O device. It can be programmed to transfer
data under various conditions from simple I/O to interrupt I/O.
8. Name any two types of ADC.
 Successive approximation ADC
 Dual slope ADC
 Flash type ADC
9. Name the modes available in 8255 A Control Word Format.
 BSR Mode
 I/O Mode
o Mode 0: Simple I/O Mode.
o Mode 1: I/O with Handshaking Mode.
o Mode 2: Bidirectional data transfer mode.
10. Show the control word format of 8255 in BSR mode.

PREPARED BY S.NIRMALA,AP/ECE 45
PART - B

1. Draw the functional block diagram of 8255 ppi and explain each block.

It has 40 pins of 4 groups.

1. Data bus buffer

2. Read Write control logic

3. Group A and Group B controls

4. Port A, B and C
Data bus buffer:
This is a tri state bidirectional buffer used to interface the 8255 to system data bus. Data is
transmitted or received by the buffer on execution of input or output instruction by the CPU.

• Control word and status information are also transferred through this unit.

PREPARED BY S.NIRMALA,AP/ECE 46
Read/Write control logic

This unit accepts control signals (RD, WR) and also inputs from address bus and issues
commands to individual group of control blocks

(Group A, Group B). It has the following pins.

a) CS – Chip select: A low on this PIN enables the communication between CPU and 8255.

b) RD (Read) – A low on this pin enables the CPU to read the data in the ports or the status
word through data bus buffer.

c) WR (Write): A low on this pin, the CPU can write data on to the ports or on to the control
register through

the data bus buffer.

d) RESET: A high on this pin clears the control register and all ports are set to the input
mode

e) A0 and A1 (Address pins): These pins in conjunction with RD and WR pins control the
selection of one of the

3 ports.

Group A and Group B controls

These blocks receive control from the CPU and issues commands to their respective ports.

Group A - PA and PCU (PC7 –PC4)


Group B - PCL (PC3 – PC0)
• Control word register can only be written into no read operation of the CW register is
allowed.
PORTS

a) Port A: This has an 8- b i t latched/buffered O/P and 8bit input latch. It can be
programmed in 3 modes – mode 0,

mode 1, mode 2.

b) Port B: This has an 8-bit latched / buffered O/P and 8- b i t input latch. It can be
programmed in mode 0, mode1.

PREPARED BY S.NIRMALA,AP/ECE 47
c) Port C: This has an 8- b i t latched input buffer and 8 bit outp ut latched/buffer.
This port can be divided into two 4

bit ports and can be used as control signals for port A and port B. it can be programmed in
mode 0.

Modes of Operation of 8255

These are two basic modes of operation of 8255. I/O mode and Bit Set-Reset mode (BSR).

• In I/O mode, the 8255 ports work as programmable I/O ports, while in BSR mode only port C
(PC0-PC7) can be used to set or reset its individual port bits.

• Under the I/O mode of operation, further there are three modes of operation of 8255, so as
to support different types of applications, mode 0, mode 1 and mode 2.

BSR Mode: In this mode any of the 8-bits of port C can be set or reset depending on D0 of the
control word.

2. Explain with a neat diagram the stepper motor control using 8051 microcontrollers.
Stepper Motor Control using 8051 Microcontroller Circuit Design:
T h e complete board consists of transformer, control circuit, keypad and stepper motor as
shown in snap. The given figure shows the block diagram of project.

The circuit has inbuilt 5 V power supply so when it is connected with transformer it will give the
supply to circuit and motor both. The 8 Key keypad is connected with circuit through which user
can give the command to control stepper motor. The control circuit includes micro controller
89C51, indicating LEDs, and current driver chip ULN2003A. One can program the controller to
control the operation of stepper motor. He can give different commands through keypad like, run
clockwise, run anticlockwise, increase/decrease RPM, increase/decrease revolutions, stop motor,
change the mode, etc. before we start with project it is must that we first understood the
PREPARED BY S.NIRMALA,AP/ECE 48
operation of unipolar stepper motor.

Unipolar stepper motor: -


In the construction of unipolar stepper motor there are four coils. One end of each coil is tied
together and it gives common terminal which is always connected with positive terminal of
supply. The other ends of each coil are given for interface. Specific color code may also be
given. Like in my motor orange is first coil (L1), brown is second (L2), yellow is third (L3),
black is fourth (L4) and red for common terminal.
By means of controlling a stepper motor operation we can

1. Increase or decrease the RPM (speed) of it

2. Increase or decrease number of revolutions of it

3. Change its direction means rotate it clockwise or anticlockwise


To vary the RPM of motor we have to vary the PRF (Pulse Repetition Frequency). Number of
applied pulses will vary number of rotations and last to change direction we have to change pulse
sequence.
So all these three things just depends on applied pulses. Now there are three different modes to
rotate this motor
1. Single coil excitation

2. Double coil excitation

3. Half step excitation

The table given below will give you the complete idea that how to give pulses in each mode

SCA
D
PREPARED BY S.NIRMALA,AP/ECE 49
Stepper motor has 6 pins. In these six pins, 2 pins are connected to the supply of 12V and the
remaining are connected to the output of the stepper motor. Stepper rotates at a given step angle.
Each step-in rotation is a fraction of full cycle. This depends on the mechanical parts and the
driving method.
Similar to all the motors, stepper motors will have stator and rotor. Rotor has permanent magnet
and stator has coil. The basic stepper motor has 4 coils with 90 degrees rotation step. These four
coils are activated in the cyclic order. The below figure shows you the direction of rotation of
the shaft. There are different methods to drive a stepper motor. Some of these are explained
below.

Pulses for stepper motor module


Note: - In half step excitation mode motor will rotate at half the specified given step resolution.
Means if step resolution is 1.8 degree then in this mode it will be 0.9 degree. Step resolution
means on receiving on 1 pulse motor will rotate that much degree. If step resolution is 1.8 degree
then it will take 200 pulses for motor to compete 1 revolution (360 degree).
Now let me give you the specification of the stepper motor that I have used.
Max rated voltage: - 5 V Max rated current per coil: – 0.5 Amp Step resolution: - 1.8 degree /
pulse Max RPM: - 20 in single/double coil excitation mode and 60 in half step mode Torque: –
1.5 Kg/cm2
RPM calculation: -
One can calculate the exact RPM at which motor will run. We know that motor needs 200 pulses
to complete 1 revolution. Means if 200 pulses applied in 1 second motor will complete 1
revolution in 1 second. Now 1 rev. in 1 sec means 60 rev. in 1 minute. That will give us 60
RPM. Now 200 pulses in 1 sec means the PRF is 200 Hz. And delay will be 5 millisecond (ms).
Now let’s see it reverse.

PREPARED BY S.NIRMALA,AP/ECE 50
* If delay is 10 ms then PRF will be 100 Hz. * So, 100 pulses will be given in 1 sec * Motor will
complete 1 revolution in 2 second * So the RPM will be 30.
In same manner as you change delay the PRF will be changed and it will change RPM Full Step
Drive: In this method two coils are energized at a time. Thus, here two opposite coils are excited
at a time.
Half Step Drive: In this method coils are energized alternatively. Thus, it rotates with half step
angle. In this method, two coils can be energized at a time or single coil can be energized.
Thus, it increases the number of rotations per cycle. It is shown in the below figure.

PREPARED BY S.NIRMALA,AP/ECE 51
3. Explain in detail about the traffic light controller using 8086.

Traffic light controller interface module is designed to simulate the function of four-
way traffic light controller. Combinations of red, amber and green LED’s are provided to
indicate Halt, Wait and Go signals for vehicles. Combination of red and green LED’s are
provided for pedestrian crossing. 36 LED’s are arranged in the form of an intersection. A typical
junction is represented on the PCB with comprehensive legend printing.

At the left corner of each road, a group of five LED’s (red, amber and 3 green) are
arranged in the form of a T-section to control the traffic of that road. Each road is named
North (N), South(S), East (E) and West (W). LED’s L1, L10, L19 & L28 (Red) are for the
stop signal for the vehicles on the road N, S, W, & E respectively. L2, L11, L20 & L29 (Amber)
indicates wait state for vehicles on the road N, S, W, & E respectively. L3, L4 & L5 (Green) are
for left, strait and right turn for the vehicles on road S. similarly L12-L13-L14, L23-L22-L21 &
L32-L31-L30 simulates same function for the roads E, N, W respectively. A total of 16 LED’s
(2 Red & 2 Green at each road) are provided for pedestrian crossing.

L7-L9. L16-L18, L25-L27 & L34-L36 (Green) when on allows pedestrians to cross and
L6-L8, L15-L17, L24-L26 & L33-L35 (Red) when on alarms the pedestrians to wait. To
minimize the hardware pedestrian’s indicator LED’s (both red and green are connected to same
port lines (PC4 to PC7) with red inverted. Red LED’s L10 & L28 are connected to port lines
PC2 & PC3 while L1 & L19 are connected to lines PC0 & PC1 after inversion. All other LED’s
(amber and green) are connected to port A & B.

Working: - 8255 is interfaced with 8086 in I/O mapped I/O and all ports are output ports. The
basic operation of the interface is explained with the help of the enclosed program. The enclosed
program assumes no entry of vehicles from North to West, from road East to South. At the
beginning of the program all red LED’s are switch
ON, and all other LED s are switched OFF. Amber LED is switched ON before switching
over to proceed state from Halt state. The sequence of traffic followed in the program is given
below.

a) From road north to East From road east to north From road south to west From road west to
south From road west to north

b) From road north to East From road south to west From road south to north From road south
to east

c) From road north to south From road south to north Pedestrian crossing at roads west & east

d) From road east to west From road west to east Pedestrian crossing at roads north &
south

SCA
PREPARED BY S.NIRMALA,AP/ECE 52
D

4. Explain in detail with relevant diagrams the led display interfacing.

Seven segment LED display is very popular and it can display digits from 0 to 9 and
quite a few characters like A, b, C, H, E, e, F, n, o,t,u,y, etc. Knowledge about how to interface a
seven-segment display to a micro controller is very essential in designing embedded systems. A
seven-segment display consists of seven LEDs arranged in the form of a squarish ‘8’ slightly
inclined to the right and a single LED as the dot character. Different characters can be
displayed by selectively glowing the required LED segments.

Seven segment displays are of two types, common cathode and common anode. In
common cathode type, the cathode of all LEDs are tied together to a single terminal which is
usually labeled as ‘com ‘and the anode of all LEDs are left alone as individual pins labeled as a,
b, c, d, e, f, g & h (or dot). In common anode type, the anode of all LEDs are tied together as a
single terminal and cathodes are left alone as individual pins. The pin out scheme and picture of
a typical 7 segment LED display is shown in the image below.

The circuit diagram shown below is of an AT89S51 microcontroller based 0 to 9 counter which
has a 7 segment LED display interfaced to it in order to display the count. This simple circuit
illustrates two things. How to setup simple 0 to 9 up counter using 8051 and more importantly
how to interface a seven segment LED display to 8051 in order to display a particular result. The
common cathode seven segment display D1 is connected to the Port 1 of the microcontroller
(AT89S51) as shown in the circuit diagram. R3 to R10 are current limiting resistors. S3 is the
reset switch and R2,C3 forms a debouncing circuitry. C1, C2 and X1 are related to the
clock circuit. The software part of the project has to do the following tasks.

 Form a 0 to 9 counter with a predetermined delay (around 1/2 second here).


PREPARED BY S.NIRMALA,AP/ECE 53
 Convert the current count into digit drive pattern.
 Put the current digit drive pattern into a port for displaying.

The circuit diagram shown above is of an AT89S51 microcontroller based 0 to 9 counter which
has a 7 segment LED display interfaced to it in order to display the count. This simple circuit
illustrates things. How to setup simple 0 to 9 up counter using 8051 and more importantly two
how to interface a seven segment LED display to 8051 in order to display a particular result. The
common cathode seven segment display D1 is connected to the Port 1 of the microcontroller
(AT89S51) as shown in the circuit diagram. R3 to R10 are current limiting resistors. S3 is the
reset switch and R2,C3 forms a debouncing circuitry. C1, C2 and X1 are related to the
clock circuit. The software part of the project has to do the following tasks.

 Form a 0 to 9 counter with a predetermined delay (around 1/2 second here).


 Convert the current count into digit drive pattern.
 Put the current digit drive pattern into a port for displaying.
Digit drive pattern.
Digit drive pattern of a seven segment LED display is simply the different logic
combinations of its terminals ‘a’ to ‘h‘ in order to display different digits and

characters. The common digit drive patterns (0 to 9) of a seven-segment display are shown in the
table below.

PREPARED BY S.NIRMALA,AP/ECE 54
Digit a B C d e f G

0 1 1 1 1 1 1 0

1 0 1 1 0 0 0 0

2 1 1 0 1 1 0 1

3 1 1 1 1 0 0 1

4 0 1 1 0 0 1 1

5 1 0 1 1 0 1 1

6 1 0 1 1 1 1 1

7 1 1 1 0 0 0 0

8 1 1 1 1 1 1 1

9 1 1 1 1 0 1 1

PREPARED BY S.NIRMALA,AP/ECE 55
UNIT – IV PROGRAMMING LOGIC
CONTROLLERS
PART – A

1. Define a programmable logic controller.


 A programmable logic controller (PLC) is a microprocessor-based controller that
uses
 Programmable memory to store instructions and to implement functions such as
logic, sequencing, timing, Counting and arithmetic in order to control machines
and process
2. What are the main component parts of a PLC?
 Central processing unit (CPU)
 The input/output unit
 The programming device
 Memory unit.
3. List various types of PLC programming devices.
 Use of hand held programmer
 Terminal with video display unit
 A personal computer with appropriate software.
 List down the types of buses required in a PLC.
 Data buses for communications data between elements.
 The address buses to read the address of locations for accessing stored data.
 Control buses for internal control actions.
4. What is ALU? State its function.
The ALU is responsible for data manipulation and performs arithmetic and logical
operations such as addition and subtraction. In addition, the ALU contains a number of
control inputs, which specify the data manipulation function to be performed. ALU is
combinational logic circuit, whose output is an instantaneous function of its data and
control inputs.

PREPARED BY S.NIRMALA,AP/ECE 56
5. What is meant by program scan?
A PLC does control the machine by taking repeated snapshots of the input state and reads
to take the values, and energize or de-energize outputs according to the user programme.
This process is known as a program scans
6. What is meant by a “retentive timer”?
A retentive timer accumulates time as and when it receives the power and time due to
loss of power which will not be accounted for the timer coil operation. Retentive on delay
timer will hold its accumulated value when the timer rung goes false and will continue
timing where it left off when the timer rung goes true again.
7. What are counters?
Counters allow a number of occurrences of input signals to count or record the number of
times some event occurs. PLCs include some form of counting element and are set to
some preset number value. When this value of input pulse has been received, it will
operate its contact, the normally open contacts would be closed and a normally closed
contact would be opened
8. Write down various types of counters.
 Down counters
 Up-counters
9. What are the types of memory?
 Random Access Memory
 Read Only Memory (ROM)
10. List down the different types of timers.
 On delay timer
 Off delay timer
 Retentive timer
 Pulse delay

PREPARED BY S.NIRMALA,AP/ECE 57
11. What is an ‘internal relay’ in a PLC?
Most PLCs have an area of memory allocated for internal storage that is used to
hold data, which behave like relays. Is can able to switch ON and OFF. But this
is for only internal purpose. This will not exist in the real world.
12. Explain latching with ladder diagram.
A ladder latch circuit is used to hold an output energized, even when the input INI lease.
The output coil maintains its status until a different condition occurs which is used to
reset the coil to OFF
13. List down general application of PLCs for control.
 Control of a process motor, vibrating machine.
 Control of two pneumatic pistons.
 Detection, sorting and packaging unit.
14. What are the factors to be considered for selecting PLC?
 System definition
 Choosing the input and output hardware
 Analog Input /Output module
 Input and Output timing consideration

PART - B

1. With the help of block diagram, explain the main components of a plc. Definition
of plc:
A programmable logic controller (PLC) Program is a specially designed digital operating
microprocessor-based controller that uses a programmable memory for internal storage of
instructing and for internal storage of instructing and for implementing function such as logic,
sequencing, timing, counting and arithmetic in order to control machines and processes.
Basic components of plc:

The PLC hardware system consists of the basic components are

 Processor
 Memory
 Power Supply
 Input I Output modules

PREPARED BY S.NIRMALA,AP/ECE 58
 Programming device
 Monitor

Processor:

 It is the heart of PLC


 He processor processes the signals from input module and generates controlling
signals for the system
 It also scans and solve the logic of the user program
 It consists of ALU, microprocessor unit, memory unit and system power supply

Memory:

 The memory unit contains the program stored in it


 The programs were written with control actions to be executed by the microprocessor
for the input given
 RAM is a temporary storage device used to store ladder diagram and for testing
and evaluation
 Then it is stored in ROM where changes cannot do

Power Supply:

 The purpose of a power supply unit is to convert the main A.C voltage into a low –
level D.C voltage (5V).
PREPARED BY S.NIRMALA,AP/ECE 59
 The D.C. voltage is supplied to the processor and the circuits in the input and output
interface modules.
 The power supply should be free from heavy loads, noises and voltage fluctuations.

Input / Output Modules:

 The Input module receives information from extended devices and sends to processor and
communicates the processed information to the external devices through output modules.
 The Input devices are mechanical switches, photo sensors, temperature sensors, flow
sensors, other type of sensors keypads etc.,
 The output devices may include solenoid valves, Relays, contactors, lights, Horns,
 Heating elements, fans, Motor starter, signal Amplifiers. Conveyor belt, lift, automatic
door etc.,
 I/O devices are also called peripheral devices.

Programming Device:

 It is used to enter the required program into the memory of the CPU
 The program is developed in programming device and stored into memory unit

Central Processing Unit:

 The CPU controls and processes all the operations within the PLC.
 It is supplied with a clock with a frequency of typically between 1 to 8 MHz.
 This frequency determines the operating speed of the PLC and provides the timing
and synchronization for all elements in the system.
 The information within the PLC is carried by means of digital signals.
 The processor is a microprocessor that executes a program to perform the
operations specified in a ladder diagram or a set of Boolean equations.
 The CPU consists of the following units

PREPARED BY S.NIRMALA,AP/ECE 60
Arithmetic and Logic Unit (ALU):

 This unit performs data manipulation and arithmetic and logical operations on input I
variable data and determines the proper state of the output variables.
 The arithmetic operation includes addition, subtraction etc., and logic operations include
AND, OR, AND, EXCLUSIVE - OR.

Memory Unit:

 Memory termed registers located within the microprocessor and used to store
information involved in a program execution.
 These programs contain control actions to be executed by the microprocessor for the
given input. There are several memory elements in a PLC system.
 System Read-only Memory (ROM) gives permanent storage for the operating system
and fixed data wed by the CPU.
 RAM for the user to develop program and acts a temporary memory.
 In addition, temporary buffer stores for the I/O channels.

Control Unit:

 A control unit is used to control the timing of operations.


 The processor functions under a permanent supervisory operating system that directs the
overall operations from data input and output to execution of user programs.
 The controller can perform only one operation at a time. So, it scans each of the inputs
sequentially, evaluates the ladder diagram program, provide each output(s), and then
repeat the whole process.
 Hence, the timing control's necessary for a PLC system.
PREPARED BY S.NIRMALA,AP/ECE 61
Memory Unit:

 The sequence of instructions to be executed, programs are stored in the memory unit.
 During entering and editing including Debugging, the program is stored in the temporary
storages called RAM (Random Access memory).
 Once the program is completely finished (free & from errors).
 It may be 'burned' into ROM
 When the ROM is plugged into the PLC, the device is ready to be placed into service
in the industrial environment.
 For network programmed PLCs, the final PLCs program is downloaded into a special
reprogrammable
 ROM (EPROM, PROM, and EEPROM) in the PLC.
 Memory may be either volatile type or Non-volatile type.

Volatile Memory:

 Volatile memory or temporary memory or Application memory is the use r memory,


where the user can enter and edit the program.
 Volatile memory will lose all its programmed contents if operating power is removed
or lost.
 here for necessary to provide a battery backup power to all times.

Non Volatile Memory:

 Non-volatile memory or permanent memory or system memory is (used) a system


memory that stores the monitor a booting program, lookup tables etc.,
 This usually programmed and supplied by the manufacturer.
 This controls the operation of PLC.
 It does not lose its content during power failure.
 It does not require any battery.
 The ROM memory offers the CPU to use only fixed amount of data.

The Different Types of ROMS are

 Mask programmed ROM


 PROM
 EPROM
 EEPROM

Mask Programmed ROM:

 It is a special type of ROM which is programmed during manufacturing.


PREPARED BY S.NIRMALA,AP/ECE 62
 The programmed content stored by this type of ROM memory cannot be altered.

PROM:

 PROM stands for programmable Read only memory.


 It is a special type of ROM usually programmed by manufacturer during manufacturing.
 It has the disadvantage of requiring special programming device and once
programmed Cannot be erased or altered.

EPROM:

 EPROM stands for electrically programmable Read only Memory.


 Here, the user programs electrically.
 One can erase the program completely by shining UV light source or quartz window
in package.
 After the program chip is erased completely, program changes can be made.
 When the program developed in RAM, the manufacturers usually load it in EPROM
to make permanent storage.

EEPROM:

 EEPROM - Electrically Erasable programmable Read-only memory.


 Even though, it is a non-volatile memory, it offers some programming flexibility as
RAM.
 One can erase the program completely by electrical signals.
 Program changes can be made very easily with the use of a PC with EEPROM
software.
 It can be electrically programmable by the user.
Buses:

 A set of parallel lines that provides communication between various devices of a


system is termed as a Bus.
 The bus system carries information and data’s to and from the CPU, Memory and I/O
units.
 The information is transmitted in binary form as 0 or 1
 Digital signals or electrical signals are flowing inside the bus.
 It might be tracks on a printed circuit board (PCB) or wires in a ribbon cable.
 The PLC system contains four buses.
 They are namely Data Bus, Address Bus, Control bus and system bus.

Data Bus:

PREPARED BY S.NIRMALA,AP/ECE 63
 The data bus contains 8, 16 or 32 parallel signal lines for sending data between the
various devices of a system.
 An 8-bit microprocessor has an internal data bus which can handle 8-bit numbers.

Address Bus:

 The Address bus contains 16, 20, 24 or 32 parallel signal lines to carry the Address
of the memory locations for accessing stored data.
 Every memory location is given a distinct unique address to locate easily and accessed
by the CPU either to read or write data.

Control Bus:

 The Control bus contains 4 to 10 parallel signal lines to carry the signals used by the CPU
that are related to internal Control actions. Typical control bus signals are Memory read
Memory write, I/O Read and I/O write.

I/O System Bus:

 The I/O system bus provide the communication between the I/O ports and I/O units
Input / Output Unit:

 The I/O units provide the interface between the system and the outside world, allowing
for connections to be made through I/O channels to input / output devices.
 Programs are entered from a program panel through I/O unit.

2. Explain the input / output processing of plc.

 The sourcing and sinking are used to describe the way in which DC devices are
connected to PLC

Sourcing:

 If a switch is connected to the positive of the battery and current flows from positive to
negative, it is said to be the sourcing the current. So, the input device receives current
from the input module.
 For the PLC, input unit, hence input module is the source of the current. For the PLC
output unit, output module is the source of current as it supplies current to the output
devices. Sourcing output units for interfacing with solenoids.

PREPARED BY S.NIRMALA,AP/ECE 64
 Here, the input device supplies current to the input module. For the PLC input unit,
hence the input module is the sink for the current. Sinking input units are used for
interfacing with electronic equipment.
 So, if a switch is connected to the negative of the battery and current flows from positive
to negative, by conventional current flow direction, it is said to be the sinking for
Current. For the PLC output unit, the current flows from output device to the output
module then the output module is the sink for current.

Steps involved in input / output processing:

The sequence followed by a PLC when carrying out a program can be as follows:

 Scan the inputs associated with one rung of the ladder program
 Solve the logic operation involving those inputs.
 Set / Reset the outputs for that rung
 Move on the next rung and repeat the operations 1, 2, 3

The two methods of Input/ Output processing operations are

 Continuous updating
 Mass Input / Output copying

Continuous Updating:

PREPARED BY S.NIRMALA,AP/ECE 65
The sequence followed thus in continuous updating is as follows:

 Fetch and decode the first program instruction


 Scan there relevant inputs
 Fetch and decode the second program instruction
 Scan the relevant inputs etc. For the remaining program instructions
 Update outputs
 Report the entire sequence.

Mass Input / Output Copying:

The sequence followed in Mass I/O copying is thus:

 Scan all the inputs and copy into RAM


 Fetch and decode and execute all the program instructions in sequence
 Copy all the output instructions to RAM
 Update all outputs.
 Repeat the sequence

3. Discuss how plc logic gate system can be formed with ladder diagram.
Instruction Code

Mnemonics:

PREPARED BY S.NIRMALA,AP/ECE 66
AND Logic Function:

 AND logic circuit represents series circuit


 AND gate is composed with two inputs and one output.
 AND gate produce output when both the inputs are HIGH state.

INPUT(A) INPUT(B) OUTPUT

0 0 0

PREPARED BY S.NIRMALA,AP/ECE 67
0 1 0

1 0 0

1 1 1

SCA
D
OR Logic Function:

 OR logic circuit represents the parallel circuit.


 OR Gate is composed of two or more inputs and one output.
 OR operation is like addition of binary numbers.
 OR gate produce output when any one input are HIGH state.

PREPARED BY S.NIRMALA,AP/ECE 68
INPUT(A) INPUT(B) OUTPUT

0 0 0

0 1 1

1 0 1

1 1 1

NOT Logic Function:

 NOT function is also known as Inverter.


 NOT gate is composed of single input and a single output.
 The bubble, or circle, at the output is the standard symbol used to represent inversion.
 In NOT gate, there is an output, when there is no input and no output when there is an
input

PREPARED BY S.NIRMALA,AP/ECE 69
NAND Logic Function:

 NAND is a combination of AND and NOT gates.


 Arrangement shows AND gate is followed by NOT gate. Hence it is called NOT AND
gate.
 Both the inputs A and B have to be at LOW state to get the output at HIGH state.
 NAND Gate is composed of two or more input with a single output.
 Any one input is in LOW state also output will be HIGH state

INPUT(A) INPUT(B) OUTPUT

0 0 1

0 1 1

1 0 1

1 1 0

PREPARED BY S.NIRMALA,AP/ECE 70
NOR Logic Function:

 NOR is a combination of OR and NOT gates.

 Arrangement shows OR gate is followed by NOT gate. Hence it is called NOT OR gate.
 Both the inputs A and B have to be at LOW state to get the output at HIGH state.
 NOR Gate is composed of two or more input with a single output.
 Any one input is in HIGH state also output will be LOW state

INPUT(A) INPUT(B) OUTPUT

0 0 1

0 1 0

1 0 0

1 1 0

PREPARED BY S.NIRMALA,AP/ECE 71
Exclusive OR (XOR) Logic Function:

When both the inputs are at LOW state the output will be at LOW state
 When both the inputs are at HIGH state the output will be at LOW state
 When any one input is HIGH state the output will be at HIGH state

INPUT(A) INPUT(B) OUTPUT

0 0 0

0 1 1

1 0 1

1 1 0

4. Explain the following

(i) Timers

PREPARED BY S.NIRMALA,AP/ECE 72
(ii) Internal relay
(iii) Counters
(iv) Latching
(i). Timer:
A timer is a special counter ladder function that allows the PLC to perform timing operations based
on a precise internal clock.

Types of Timers:

 Delay ON Timers or ON delay timers


 Delay OFF Timers or OFF delay timers
 Pulse Timers
 Cascaded Timers
 ON-OFF Cycle Timers
 One Shot Timers

Delay ON Timers:

 The term delay is used to indicate that this timer burns on, after waiting for a fixed time
delay period.
 When there is an input, the timer is energized and starts timing, after some pre-set
value, the timer contacts are closed to output.
 TON is used to denote ON-delay.

PREPARED BY S.NIRMALA,AP/ECE 73
Delay OFF Timers:

 OFF delay timers are maintained as ON for a fixed time of delay period before turning
off.
 TOF is used to denote OFF-delay.

Pulse Timers:

 Pulse timer switches is another type of Timer which comes either ON or OFF for a
fixed period of time as a function of pulses.
 TP is used to denote Pulse Timers.

Cascaded Timers:

 Cascading means more elements are linked together to form a system.


 The cascading timers are linked together to give longer delay times which is easily
achieved than just one timer.

PREPARED BY S.NIRMALA,AP/ECE 74
ON – OFF Cycle Timer:

 Timers producing an output for some period and no output for some period and an
output for some period.
 The timer is designed to switch an output for T sec and off for another T second

(ii). INTERNAL RELAY:

 An internal relay behaves like relays with their associated contacts, buy they are not
actual relays whose simulations are controlled by the PLC software.
 Internal relays can be very useful in the implementation of switching
sequences.
 They are often used when there are programs with multiple input conditions.
 They are also known as Auxiliary relays or markers.

PREPARED BY S.NIRMALA,AP/ECE 75
 In using an internal relay, it has to be activated on one rung of a program and then its
output used to operate switching contacts on another rung of a

program. \

(iii). COUNTERS:

 Counters are used to count a specified number of contact operations.

Types of Counters:

 Up Counters
 Down Counters

Up Counters:

 Up counters count up from the zero to pre – set value


 The events are added until the pre – set value is reached
 When the counter reaches the set value, its contacts change state

Down Counters:

 Down counters count down from the pre – set value to zero
PREPARED BY S.NIRMALA,AP/ECE 76
 The events are subtracted until the pre – set value is reached
 When the counter reaches the Zero value, its contacts change state

(iv). LATCHING:

 It is necessary to hold an output coil energized, even when the input ceases
 The term latch is used for the circuit used to carry out such an operation.
 Latch circuit is a self – maintaining circuit that maintains its output in an energized
state until the next input is updated

5. Draw and explain the ladder diagram for the data handling system. Data
handling:
The steps involved in data handling with a PLC system are

 Moving data from one memory location to another


 Comparison of Magnitudes of data
 Arithmetic operations
 Data conversion

Data Movement:

Instruction: MOV

Function: To copy a value from one address to another

Program: LD
X400 MOV
D1
D2

PREPARED BY S.NIRMALA,AP/ECE 77
 When there is an input to X400,
 The data moves from the designated source address to the designated
destination address.
 The data transfer might move a constant into a data register

Data Comparison:

The data comparison instruction gets the PLC to compare two data values. It
compares a pre – set value (1) to the input value (2)
Instruction:

< or LES

= or EQU

> or GRT

< or LEQ

≠ or <> or NEQ

> or GEQ

For data comparison the typical instruction will contain the data transfer instruction to

compare the data from source address and designation address

PREPARED BY S.NIRMALA,AP/ECE 78
 It is required to sound an alarm if a sensor indicates a temperature above 90˚C and
remain sounding until the temperature falls below 75˚C.
 For this, the ladder diagram is shown above.
 The input temperature data is inputted to the source address and the destination
address contains the set value.
 When the temperature rises 90˚C or higher, the data value in the source address
becomes >the destination address value and there is an output to the alarm which latches
the input
 When the temperature falls to 75˚C or lower, the data value in the source address
becomes < the destination address value and there is an output to the relay which then
opens the contacts and so switches the alarm off.

Data Arithmetic Operations:

 PLCs are offered with the ability to carry out the arithmetic operations such as
addition, subtraction, multiplication and division only.
 They cannot carry out exponential functions.
 Addition and subtraction operations are used to alter the value of data held in data
registers.
 Multiplications are used to multiply some input before adding to or subtracting
it from another.

Code Conversions:

 All the internal operations in the CPU of a PLC are carried out through binary
numbers.
 Most PLCs provide BCD-to-binary and binary-to-BCD conversion for use.

PREPARED BY S.NIRMALA,AP/ECE 79
 When a decimal (input) signal is given, BCD conversion is used.

PREPARED BY S.NIRMALA,AP/ECE 80
 Similarly, when a decimal output is required, Decimal conversion is used.
 The data at the source address is in BCD and converted to binary and placed at the
destination address

7. Devise a system, using a plc that could be used with a conveyor belt which is used to
move an item to work station. The presence of the item at the work station is detected by
means of breaking a contact activated by a beam of light to a photo-sensor. There it stops
for 100sec for an operation to be carried out and then starts moving. The motor for the belt
is started by a normally open start switch and stopped by a normally closed switch.

I1 – Photo sensor output

I2 – Start button for motor for the belt I3 –


Stop button
M1,M2 – Memory coil
T1 – Timer for 100 sec

PREPARED BY S.NIRMALA,AP/ECE 81
UNIT – V

ACTUATORS AND MECHATRONIC SYSTEM DESIGN

PART – A

1. Compare and the contrast the traditional design of a watch with that of a
mechatronics based digital watch.
S. No Traditional Design Mechatronics Design

1. It is based on traditional It is based on Mechanical,


systems such as mechanical, Electronics, Computer
hydraulic and pneumatic technology and control
systems. engineering.

2. It is less flexible. It is more Flexible.

3. It is less accurate. It is more accurate.

2. Write down the applications of stepper motors.


 Floppy disc head drives
 Printer carriage drives
 Positioning of printer heads and pens in X-Y plotters
 NC and CNC machine tool slide drives
 Automatic teller machines (ATM)
 Camera iris control mechanisms
 Recording heads in computer disc drives
 Paper feed motors in typewriters and printers.

PREPARED BY S.NIRMALA,AP/ECE 82
3. What is servo motor?
A servomotor is a rotary actuator that allows for precise control of angular position. It consists
of a motor coupled to a sensor for position feedback, through a reduction gearbox.
4. Write down the applications of Servo motor.
 A servomotor is a rotary actuator or linear actuator that allows for precise control of
angular or linear position, velocity and acceleration.
 Servomotors are used in applications such as robotics, CNC machinery or
automated manufacturing.
5. What are the axes of a pick and place robot?
 The robot has three axes about which motion can occur.
 Rotation in a clockwise or counter clockwise direction of the unit on its base.
 Arm extension or contraction and arm up or down.
 Gripper can open or close.
6. What is the use of PLC in automatic car park system?
An illustration of the use of a PLC in the coin operated barriers for a car park. The in- barrier is
to open when the correct money is inserted in the collection box and the out – barrier is to open
when a car is detected at the car park side of the barrier.

7. What are the advantages of the microprocessor-controlled system?


The microprocessor-controlled system can cope easily with giving precision and programmed
control. The system is much more flexible. This improvement in flexibility is a common
characteristic of Mechatronics systems when compared with traditional systems.

8. Write about the engine speed sensor?


The engine speed sensor is an inductive sensor and consists of a coil for which the inductance
changes as the teeth of the sensor wheel pass it and so results in an oscillating voltage.
9. What are the number of stages in the design process?
The design process can be considered as a number of stages. They are,
 The need
 Analysis of the problem
 Preparation of a specification
 Generation of possible solutions
 Selections of a suitable solution
PREPARED BY S.NIRMALA,AP/ECE 83
 Production of a detailed design
 Production of working drawings.

10. How do the movements of robot take place?

Clockwise rotation of the unit might result from the piston in a cylinder being extended and the
counter clockwise direction by its retraction. Likewise, the upward movement of the arm might
result from the piston in a linear cylinder being extended and the downward motion from it
retracting, the extension of the arm by the piston in another cylinder extending and its return
movement by the piston retracting.

PART – B

1. Case study on pick and place robot.


The basic from of a pick and place robot is shown in Figure. The robot has three axes
about which motion can occur. The following movements are required for this robot.

1. Clock wise and anticlockwise rotation of the robot unit of its base.

2. Linear movement of the arm horizontally i.e., extension or contraction of


arm.
3. Up and down movement of the arm and
4. Open and close movement of the gripper.

PREPARED BY S.NIRMALA,AP/ECE 84
The foresaid movements can be obtained by pneumatic cylinders which are operated by
solenoid valves with limit switches. Limit switches are used to indicate when a motion is
completed.

The clockwise rotation of the robot unit on its base can be obtained from a piston and
cylinder arrangement during pistons forward movement. Similarly counter clockwise rotation
can be obtained during backward movement of the piston in cylinder. Linear movement of the
arm can result during forward and backward movement of the piston in a cylinder.

The upward movement of the arm can result from forward movement of the piston in a
cylinder whereas downward movement from its retardation. The griper can also be operated in a
similar way as explained above i.e., gripper is opened during forward movement of the piston
and closed during backward movement of the piston in the cylinder. Figure 5.16 shows a
mechanism used for this purpose.

PREPARED BY S.NIRMALA,AP/ECE 85
A microcontroller used to control the solenoid valves of various cylinders is shown in
Figure. The micro controller used of this purpose is M68HC11 type. A software program is used
to control the robot.

TRIAC opt isolator consists of LED and TRIAC. If the input of the LED is 1, it glows
and activates the TRIAC to conduct the current to the solenoid valve. Otherwise TRIAC will not
conduct the current to the solenoid valve.

2. Case study on engine management system

An electronic engine management system is made up of sensors, actuators, and related


wiring that is tied into a central processor called microprocessor or microcomputer (a smaller
version of a computer)

Electronic management systems monitor and gather data from a number of sensors in the
engine and continuously adjust the fuel supply and injection timing. This minimizes emissions
and maximizes fuel efficiency and engine output at any given workload. The electronic engine
management generally consists of the following basic components: An electronic control unit
(ECU), a fuel delivery system (typically fuel injection), an ignition system and a number of
sensors. Figure 5.21 shows the various components in the typical engine management system.

1. Electronics control unit (ECU):


The sensors provide feedback to the ECU to indicate how the engine is running so
that the ECU can make the necessary adjustments to the operation of the fuel delivery and / or
ignition system.

2. Fuel delivery system:


This system consists high pressure fuel pump which is mounted in or near the
tank. The fuel line the pump passes through a filter before it runs forward to the engine bay.
The fuel line connects to a fuel rail that feeds each of the injectors. At the end of the rail is a fuel
pressure regulator, with surplus fuel heading back to the tank in the return line.

3. Ignition system:
Ignition system consists of ignition coil, distributor and spark plug. These
components are connected with the ECU to receive the signal for proper timed operation.
4. Various sensors:
Engine sensors fall into five broad categories. Throttle – Position Sensors,
Exhaust Gas Oxygen Sensors, Manifold Absolute Pressure Sensors, Temperature Sensors and
Speed / Timing Sensors. All these sensor functions are centrally controlled by microcontroller as
shown in Figure.

PREPARED BY S.NIRMALA,AP/ECE 86
a. Throttle – Position Sensors:
A throttle – position sensor sends the signal to ECU about the throttle opening and
the force applied by the driver. Then the ECU controls the fuel delivery and spark timing based
on the throttle position. Two common throttle – position sensors are potentiometric and Hall –
effect sensors.

b. Exhaust Gas Oxygen (EGO) Sensors:


Exhaust gas oxygen (EGO) sensors are places within the engine’s exhaust system.
The amount of oxygen in the exhaust gas indicates whether or not the ECU has directed the fuel
delivery system to provide the proper air – to fuel ratio. If the relative amount of air is too high
or too low, engine power, smoothness, fuel efficiency and emissions will all suffer.

c. Manifold Absolute Pressure (MAP) Sensors:


Manifold Absolute Pressure (MAP) Sensors measure the degree of vacuum in the
engine’s intake manifold. The amount of vacuum depends on engine rpm and throttle opening.
The most common MAP sensors are piezoresistive and variable capacitor sensors.

d. Temperature Sensors:
Temperature sensors are used to report engine temperature to the driver / operator
via dash panel mounted temperature gauge, report engine temperatures to the ECU to activate /
de – activate cooling fans in water – cooled engines, to richen fuel mixtures for easier starting in
cold weather and to lean out mixtures for maximum fuel economy. Two common temperature
sensors are thermistors or thermodiodes.
PREPARED BY S.NIRMALA,AP/ECE 87
e. Engine Speed / Timing Sensors:
Speed / Timing sensors provide information to the ECU regarding engine speed
and the crank position. This information is used by the ECU to control fuel and ignition, as well
as to make sure that engine speed does not exceed safe operating limits. It is also used to control
the fuel injectors and spark plugs. Most common speed/timing sensors are variable reluctance,
optical crankshaft position and Hall Effect sensors.

f. Exhaust Gas regulation (EGR) Valve Position Sensor:


The signal from EGR valve position sensor is used to adjust the air fuel mixture.
The exhaust gases introduced by the EGR valve into the intake manifold reduce the available
oxygen and thus less fuel is needed in order to maintain low hydro carbon level in the exhaust.

g. Mass Air flow (MAF) sensor:


MAF sensor is used to measure engine load to squirt in the right amount of petrol,
and fire the spark at just the right moment. The amount of power being developed depends on
how much air the engine is breathing. Most common airlflow sensors are Hot Wire Airflow
sensor and V and Airflow Meter.

h. Knock Sensor:
The knock sensor is used to identify the sounds of knocking and sends signal to
ECU to avoid knocking. It is screwed into the engine block and is designed to separate out the
special noise which means that knocking is occurring. Many Electronic Fuel Injection (EFI)
engines run ignition timing very close to knocking.

The comparison of traditional and mechatronics approach in engine management is given


in Table.

Table Traditional Vs Mechatronics approach in Engine Management

Sl.No. Traditional approach Mechatronics approach

1. The cam operated rocker arm mechanism The valve operation is controlled by the
controls the valve operation. The rotation signal received from electronic control
of cam is based on the crank rotation. unit. The timing of valve operation is
preprogrammed in the micro controller.
2. The engine speed regulation is based on the The engine speed regulation is based on
governor-controlled throttle valve. The the input signal from and MAF sensor.
governor is actuated by the speed of the Based on the sensor information the
crank shaft. The speed control has not throttling valve is controlled by
affected on the engine temperature and air microcontroller.
flow rate.

PREPARED BY S.NIRMALA,AP/ECE 88
3. Spark timing of the spark plug is controlled Spark timing of the spark plug is
by the ignition coil and distributor at controlled by the ignition coil that
constant pre set intravel receives signal from the
microcontroller through a timing
sequence program

3. Case study on automatic car park barrier.

Consider an automatic car park barrier operated by coin inserts. The system uses a PLC
for its operation. There are two barriers used namely in barrier and out barrier. In barrier is used
to open when the correct money is inserted while out barrier opens when a car is detected in front
of it. It consists of a barrier which is pivoted at one end, two solenoid valves A and B and a
piston cylinder arrangement.

Solenoid valves are used to control the movement of the piston. Solenoid A is used to
move the piston upward in turn barrier whereas solenoid B is used to move the piston downward.
Limit switches are used to detect the foremost position of the barrier. When current flows
through solenoid A, the piston in the cylinder moves upward and causes the barrier to rotate
about its pivot and rises to let a car through.

PREPARED BY S.NIRMALA,AP/ECE 89
When the barrier hits the limit switch, it will turn on the timer to give a required time
delay. After that time delay, the solenoid B is activated which brings the barrier downward by an
operating piston in the cylinder. This principle is used for both the barriers.

Figure shows the ladder program for that PLC system.

4. Stages in designing mechatronics systems

The design process consists of the following stages (refer Figure):


Stage 1: Need for design
The design process begins with a need. Needs are usually arising from dissatisfaction
with an existing situation. Needs may come from inputs of operating or service personal or from
a customer through sales or marketing representatives.
They may be to reduce cost, increase reliability or performance or just change because of public
has become bored with the product.

Stage 2: Analysis of problem


Probably the most critical step in a design process is the analysis of the problem i.e., to
find out the true nature of the problem. The true problem is not always what is seems to be at the
first glance. Its importance is often overlooked because this stage requires such a small part of
the total time to create the final design. It is advantageous to define the problem as broadly as
possible. If the problem is not accurately defined, it will lead to a waste of time on designs and
PREPARED BY S.NIRMALA,AP/ECE 90
will not fulfill the need.

Stage 3 : Preparation of specification


The design must meet the required performance specifications. Therefore, specification
of the requirements needs to be prepared first. This will state the problem definition of
special technical terms. Any constraints placed statement includes all the functions required of
the design, together with any desirable features. The following are some of the statements about
the problem.

Mass and dimensions of design. Type


and range of motion required. Accuracy
of the element.
Input and output requirements of elements. Interfaces.
Relevant standards and code of practice, etc.,

Stage 4 : Generation of possible solution


This stage is often known as conceptualization stage. The conceptulisation step is to
determine the elements, mechanisms, materials, process of configuration that in some
combination or other result in a design that satisfies the need. This is the key step for employing
inventiveness and creativity.

A vital aspect of this step is synthesis. Synthesis is the process of taking elements of the
concept and arranging them in the proper order, sized and dimensioned in the proper way.

Outline solutions are prepared for various models which are worked out in sufficient
details to indicate the means of obtaining each of the required functions.

State 5 : Selection of suitable or Evaluation :


This stage involves a thorough analysis of the design. The evaluation stage involves
detailed calculation. Often computer calculation of the performance of the design by using an
analytical model. The various solutions obtained in stage 4 are analysed and the most suitable is
selected.

Need for design

Analysis of problem

Preparation of specification

PREPARED BY S.NIRMALA,AP/ECE 91
Generation of possible solution

Evaluation

Production of detailed design

Implementation of design

Production of working drawing

Stages in designing mechatronics systems

Stage : 6 : Production of detailed design

The detail of selected design has to be worked out. It might have required the extensive
simulated service testing of an experimental model or a full size prototype in order to determine
the optimum details of design.

Stage : 7 : Production of working drawing


The finalized drawing must be properly communicated to the person who is going to
manufacture. The communication may be oral presentation or a design report. Detailed
engineering drawings of each components and the assembly of the machine with complete
specification for the manufacturing process are written in the design report.

Stage 8 : Implementation of design


The components as per the drawings are manufactured and assembled as a whole system.

5. Explain the types of Stepper motors with suitable diagrams.


The stepper motor is a device that produces rotation through equal angels when digital
pulses are supplied as input.

In other words, the stepper motor transforms the electrical pulses in to equal increments of
rotary shaft motion.

Example : If 1 pulse produces a rotation of 60, then for complete rotation of 3600, there
will be 60 pulses needed.

PREPARED BY S.NIRMALA,AP/ECE 92
Stepper motor

Variable reluctance Permanent magnet Hybrid

Stepper motor Stepper motor Stepper motor

Variable Reluctance Stepper Motor


Construction :
The rotor is made up soft steel and it is cylindrical in shape with four poles.

Usually the number of poles on the rotor is less than number of poles on the stator. The
stator poles have windings and it is switched by means of electronic switching device.

The function of the switching device is to switch the control windings in the stator of
stepper motor.

SCA
Working:

When current is switched to a pair of windings in stator, a magnetic field is producing.


The line of force passes from stator poles to nearest set of poles on the rotor.

The rotor will move until the rotor and stator lineup. This is termed as position of
minimum reluctance. This motor generally gives step angels of 7.50 or 150.

PREPARED BY S.NIRMALA,AP/ECE 93
Permanent Magnet Stepper Motor

Construction:

The Stator has four poles. Each pole is wound with a field winding, the coils on
opposite pair of poles being in series.

The rotor is a permanent magnet and when current is switched to a pair of stator poles,
the rotor will move to lineup with it.

Working :

Thus for the currents given in the situation shown in Figure 2.81, the rotor moves to 450
position.

If the current is switched so that the polarities are reversed, the rotor will move a further
450 in order to line up again.

Thus, by switching currents through the coils, the rotor rotates by 450 steps.

With this type of motor, step angle of 1.80, 7.50, 150, 300, 340 or 900 can be achieved.

Hybrid Stepper Motor

It combines the features of both the variable reluctance and permanent magnet motors.

PREPARED BY S.NIRMALA,AP/ECE 94
Construction:

The Permanent magnet is encased in iron caps which are cut to have teeth.

Working :

The rotor sets itself in minimum reluctance position if a pair of stator coils is energized. In
this stepper motor, step angles of 0.90 and 1.80 are achieved.

Applications :

High – accuracy positioning applications. Example in computer hard disc drives.

Advantages :

(i) These stepper motors combine the features of both variable reluctance and permanent
magnet motors.
(ii) Minimum step angle can be achieved.
Disadvantages :

When it is connected with microprocessor output port, it is must to include protection to


avoid damage to microprocessor.

6. Explain the Construction and working principle of AC and DC servomotors AC


Servomotors.

Basically an AC servomotor is a two phase induction motor.

PREPARED BY S.NIRMALA,AP/ECE 95
Vr = Reference Winding
Vc = Control winding
Construction :

It consists of two stator windings namely reference winding and control winding as
shown in Figure 2.87.

These two windings are placed at 9

The rotor is squirrel cage or drag – cup type having small diameter in order to reduce
the inertia.

Operation :

The two windings are excited by voltage of magnitude and 900 phase shift.
It develops a magnetic field of constant magnitude rotating at synchronous speed.
The direction of rotation depends upon the phase relationship between Vr and Vc.
The rotating magnetic field interacts with the currents and produces torque in the
direction of rotation.
Control scheme for an AC servomotor

Control scheme for an AC servomotor is shown in the Figure.

PREPARED BY S.NIRMALA,AP/ECE 96
The reference winding is excited by a reference voltage source.

The control winding is supplied by a Zener amplifier having variable magnitude and
polarity.

Advantages:

Drift – free AC amplifier


Low rotor inertia.
Rugged construction
Rotor withstands at higher temperature.
Disadvantages
More expensive
Cannot work at open loop
Required more maintenance.
DC servomotors:

DC motors which are used in servo systems are called DC servomotors.


In DC servomotors, field windings may be connected either in series with the armature or
separate from the armature.This motor provides high starting torque due to low inertia.

This low inertia can be achieved by reducing armature diameter with increasing armature
length so that desired output power can be achieved.

Two different modes:

Armature control mode

Field control mode


Armature control of DC servomotor:
In which the speed of the DC servomotor is controlled by armature current with field
current constant.

PREPARED BY S.NIRMALA,AP/ECE 97
Ra - Armature resistance ()

La - armature winding inductance (H) Ia -


Armature current (A)

PREPARED BY S.NIRMALA,AP/ECE 98
If - Field current (A) Ea -
Applied voltage (V) Eb -
Back emf (V)
θ - Angular displacement
Tm - Motor torque (N-m)
F0 - Viscous friction coefficient (N-m rad-1/sec) J
- Moment of inertia (kg-m2)
The flux Φ is proportional to the field current If.

Φ ∞ If

= Kf If (Kf = constant)

Then, Tm Ia Φ

Tm = K1 Ia Φ

Substitute Φ = Kf If in the above equation.

Tm = K1 Ia KF IF.

The field current is constant; hence the flux is constant.

Tm = KT Ia.

[KT = K1 Ia IF. Where K1 - motor torque constant)

When the armature is rotating, a voltage proportional to product of the flux and the angular
velocity.

As constant flux,

 This is an armature-controlled servomotor.


 Its speed is controlled by an armature voltage.
 The differential equation for an armature circuit is.

PREPARED BY S.NIRMALA,AP/ECE 99
 As the armature current flows, it produces torque.
By taking Laplace transforms, we can get the transfer function of DC servomotor is

Field control of DC servomotor:

In which the armature current is maintained constant and speed of the DC servomotor is
controlled by field voltage.

Rf - Resistance of field winding ()

La - armature winding inductance (H) Ia -


Armature current (A)
If - Field current (A) Ea -
Applied voltage (V) Eb -
Back emf (V)
θ - Angular displacement
Tm - Motor torque (N-m)
F0 - Viscous friction coefficient (N-m rad-1/sec) J
- Moment of inertia (kg-m2)

PREPARED BY S.NIRMALA,AP/ECE 100


PREPARED BY S.NIRMALA,AP/ECE 101
PREPARED BY S.NIRMALA,AP/ECE 102
PREPARED BY S.NIRMALA,AP/ECE 103
PREPARED BY S.NIRMALA,AP/ECE 104
PREPARED BY S.NIRMALA,AP/ECE 105
PREPARED BY S.NIRMALA,AP/ECE 106
PREPARED BY S.NIRMALA,AP/ECE 107
PREPARED BY S.NIRMALA,AP/ECE 108
PREPARED BY S.NIRMALA,AP/ECE 109
PREPARED BY S.NIRMALA,AP/ECE 110
PREPARED BY S.NIRMALA,AP/ECE 111

You might also like