ME6702 Notes
ME6702 Notes
MECHATRONICS
It field of study that implies the synergistic integration of electronic engineering,
electrical engineering, control engineering and computer technology maintenance of a wide
range of engineering products and Processes".with mechanical engineering for the design,
manufacture, analyses and processes.
SYSTEM:
A system may be defined as a black box which has an input and an output. System
concerned only with their relationship between the input and output and not on the
process going inside the box.
Here, the input is the electric power and the output after processed by the system is rotation. The
system is motor.
MECHATRONICSYSTEM:
Actuators: Solenoids, voice coils, D.C. motors, Stepper motors, Servomotor, hydraulics,
pneumatics.
Sensors: Switches, Potentiometer, Photoelectric, Digital encoder, Strain gauge,
Thermocouple, accelerometer etc.
Input signal conditioning and interfacing: Discrete circuits, Amplifiers, Filters, A/D, D/D.
Digital control architecture: Logic circuits, Microcontroller, SBC, PLC, Sequencing and
timing, Logic and arithmetic, Control algorithm, Communication.
Output signal conditioning and interfacing: D/A D/D, Amplifiers, PWM, Power transistor,
Power Op- amps.
Graphical displays: LEDs, Digital displays
MEASUREMENTSYSTEM:
Example:
Temperature Sensor –Thermocouple
Input –Temperature
Output –E.M.F (ElectricalParameter).
Signal Conditioner:
A signal conditioner receives signal from the sensor and manipulates it into a suitable
condition for display. The signal conditioner performs filtering, amplification or other signal
conditioning on the sensor output.
Example:
Temperature measurement –Single Conditioner function
SYSTEM CONTROL:
If there is no feedback device to compare the actual value with desired one.
No control over its input
CLOSED LOOP CONTROL SYSTEM:
If there is feedback device to compare the actual value with desired one.
Elements of Closed Loop System:
It is used to control the process that are strictly ordered in a time or sequence
PRE WASHCYCLE:
Pre-wash cycle may involve the following sequence of operations.
Opening of valve to fill the drum when a current is supplied
Microprocessor is used to operate the switch for opening closing the valve.
Closing the valve after receiving the signal from a sensor when the required level of
water is filled in the washing drum.
Stopping the flow of water after the current is switched off by the microprocessor.
Switch on the motor to rotate for stipulated time.
Initiates the operation of pump to empty the water from the drum.
Pre-wash cycle involve swashing the clothes in the drum by cold water.
MAIN WASH CYCLE:
Main wash cycle involves washing the clothes in the drum by hot water and the sequence of
operations in main wash is as follows:
Cold water is supplied after the Pre-wash cycle is completed.
Current is supplied in large amount to switch on the heater for heating the coldwater.
Temperature sensor switches off the current after the water is heated to required
temperature.
Microprocessor or cam switch ON the motor to rotate the drum
Microprocessor or cam switches on the current to a discharge pump to empty the drum.
RINSE CYCLE:
Rinse cycle involveswashingoutthe clotheswithcoldwater a number oftimesandthe
sequenceofoperationsina Rinse cycle are as follows:
Openingof valve toallowcoldwaterintothe drumwhenthe microprocessor aregiven
signalstosupplycurrentafter the mainwashcycle iscompleted.
Switchesoffthe supplycurrentbythesignalsfrommicroprocessor
Operation of motor to rotate the drum
Operation of pump to empty the drum and respect this sequence a number of times.
SPINNING CYCLE:
Spinning cycle involves removing of water from the clothes and the sequence of
operations Is carried out.
Switching on the drum motor to rotate it at a higher speed than a rinsing cycle.
AUTOMATIC CAMERA:
ENGINE MANAGEMENT SYSTEM:
SENSORS
TRANSDUCERS:
It is an element which is subjected to physical change experience a
related change.
Example: Tactile Sensors.
SENSORS:
It is an element which is not subjected to physical change experience a
related change.
Example: LVDT
PERFORMANCE TERMINOLOGY:
STATIC CHARACTERISTICS:
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
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.
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.
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
STRAIN GAUGE:
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
MICRO SWITCH:
INCREMENTAL ENCODERS:
PRINCIPLE:
When a beam of light passes through slots in a disc, it is sensed by the
light sensor opposite to the light source.
When the disk is rotated, a pulsed output is produced by sensor with
number of pulses being proportional to the position of the disc and number of
pulses per second determines the velocity of the disk.
CONSTRUCTION & WORKING:
It consists three components light source, coded disk and photo detector
The disk is made up of plastic or glass.
The disk consists of opaque and transparent segment alternatively.
The wheel is between light and photo detector.
The photo detector receives the light signal alternatively which is
converted into electrical signal.
ABSOLUTE ENCODERS
PRINCIPLE:
The principle of operation is that they provide a unique output
corresponds to each rotational position of the shaft.
The output is in the form of binary numbers representing the
angular position.
PIEZOELECTRIC SENSORS:
Piezoelectric materials when stretched or compressed generate electric
charges with one face of the managerial becoming positively charged and the
opposite face negatively charged.
As a result a voltage is produced. The net charge q on a surface is
proportional to the amount x by which the charges have been displaced, and
since the displacement is proportional to the applied force F.
q = kx= SF
Where k is a constant and S a constant termed the charge sensitivity.
TACTILE SENSOR:
It is used on fingertips of robot hands and for touch display screen
It uses piezoelectric poly vinylidene fluoride (PVDF) film
Two layers are separated by soft film.
The lower PVDF film has an alternating voltage applied to it results in
mechanical oscillations.
Intermediate film transmits the vibration to upper film.
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.
The resistance of most metals increases over a limited temperature range
and the relationship between Resistance and Temperature is shown below.
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.
An Overview of Microprocessor
The first question comes in a mind "What is a microprocessor?”.
Let us start with a more familiar term computer. A digital computer is
an electronic machine capable of quickly performing a wide variety of
tasks. They can be used to compile, correlate, sort, merge and store
data as well as perform calculations.
A digital computer is different from a general purpose calculator
in that it is capable of operating according to the instructions that are
stored within the computer whereas a calculator must be given
instructions on a step by step basis. By the definition a programmable
calculator is a computer.
Historically, digital computers have been categorized according
to the size using the words large, medium, minicomputer and
microcomputer. In the early years of development, the emphasis was
on large and more powerful computers. Large and medium sized
computers were designed to store complex scientific and engineering
problems. These computers were accessible and affordable only to
large corporations, big universities and government agencies. In the
1960s’ computers were accessible & affordable only to large
corporations, big universities & government agencies, In late 1960s,
minicomputers were available for use in a office, small collage,
medium size business organization, small factory etc. As the
technology has advanced from SSI to VLSI & SLSI (very large scale
integration & super large scale integration) the face of the computer
ME6702/MECHATRONICS/UNIT-2 Page
1
has changed. It has now become possible to build the control
processing unit (CPU) with its related timing functions on a single chip
known as microprocessor. A microprocessor combined with memory
and input/output devices forms a microcomputer. As for as the
computing power is concerned the 32- bit microcomputers are as
powerful as traditional mainframe computers.
The microcomputer is making an impact on every activity of
mankind. It is being used in almost all control applications. For
example analytical and scientific instruments, data communication,
character recognition, musical instruments, household items, defence
equipments, medical equipments etc.
Computers communicate and operate in binary numbers 0 and
1 also known as bits. It is the abbreviation for the term binary digit.
The bit size of a microprocessor refers to the number of bit which can
be processed simultaneously by the arithmetic circuit of the
microprocessor. A number of bits taken as a group are this manner is
called word. For example, the first commercial microprocessor the
Intel 4004 which was introduced in 1971 is a 4-bit machine and is said
to process a 4-bit word. A 4-bit word is commonly known as nibble
and an 8-bit word is commonly known as byte. Intel 8085 is an 8-bit
microprocessor. It should be noted that a processor can perform
calculations involving more than its bit size but takes more time to
complete the operation. The short word length requires few circuitry
and interconnection in the CPU.
ME6702/MECHATRONICS/UNIT-2 Page
2
Microcontrollers
A µP does not have enough memory for program and data
storage, neither does it has any input and output devices. Thus when
a µP is used to design a system, several other chips are also used to
make up a complete system. For many applications, these extra chips
imply additional cost and increased size of the product. For example,
when used inside a toy, a designer would like to minimize the size and
cost of the electronic equipment inside the toy. Therefore, in such
applications a microcontroller is used more often than a
microprocessor.
A microcontroller is a chip consisting of a microprocessor,
memory and an input/output device. There are 4 bit as well as 32 bit
microcontrollers.
ME6702/MECHATRONICS/UNIT-2 Page
5
Later, Intel initialized the HMOS technology to fabricate the
8085A. Thus, Intel offers a high speed version of the 8085A called
8085AH.
The third generation introduced in 1978 is typically separated
by the Intel 8086 iAPX 8086 iAPX 80186, iAPX 80286 Zilog 78000,
and the Motorola 68000 which are 16- bit s with minicomputer like
performances. One of the most popular 16 bit µP has been introduced
by Intel, which is 8088. The 8088 has the same introduction set as the
8088. However, it has only an 8 bit data bus. The 8088 is the µP used
in the IBM PC and its clones.A precursor to
these microprocessors was the 16-bit Texas instruments 9900
microprocessor introduced in 1976. The latest microprocessor has the
word length of 32-bit. Example of 32-bit microprocessors are Intel
iAPX 80386, iAPX 432, Motorola MC68020, National semiconductor
NS 32032. The characteristic for few microprocessors introduced by
Intel are given in the Table. This shows that power of microprocessors
has increased tremendously with advancement in integrated circuit
technology & microprocessor systems architecture. Very large & cute
integration, VLSI allow extremely complex system consisting of as
many as a million of transistors on a single chip to be realized.
In 1980, the fourth generation µPs were evolved. Intel introduced
the first commercial 32 bit microprocessor, Intel 432. This µP was
discontinued by Intel due to some problem. Since 1985, more 32bit µPs
have been introduced. These include the Motorola MC
ME6702/MECHATRONICS/UNIT-2 Page
6
68020/68030/68040 and Intel 80386/80486. These processors are
fabricated using the low power version of HMOS technology called
HCMOS, and they include an on-chip RAM called the cache
memory to speed up program execution.
Table evaluation of major characteristics.
Lass 4-bit 8 8 16 32
ME6702/MECHATRONICS/UNIT- Page
2 7
Manufactures Intel Intel Intel Intel Intel
ME6702/MECHATRONICS/UNIT-2 Page
8
Intel 8085 Microprocessor
It is a 40-pin DIP(Dual in package) chip, base on NMOS technology,
on a single chip of silicon. It requires a single +5v supply between Vcc
at pin no 40 and GND at pin no 20. It can address directly 2 16 memory
locations or 6536 memory locations or 64k memory locations using 16
address line (A15-A0).
ME6702/MECHATRONICS/UNIT-2 Page
9
Pin no 28 to 21 gives as the higher order 8 bits of the address (A 15-
A8).these 8- address lines are uni-directional tri-state address lines
these address lines becomes tri-state under three conditions namely.
(a)During DMA (direct memory access )
operation (b)When a HALT instruction is
executed (c) When is being RESET.
A15-A8 at pin no 19 to pin no 12 pin no 19 to pin no 12, marked A7-
A0 is used for dual purpose. The during it operation shall move
from one state to the other. There are ten (10) different states for the
ME6702/MECHATRONICS/UNIT-2 Page
11
The manner of utilization of pins 19 to 12 is known as time
multiplexed mode of operation.
De multiplexing the Address bus AD 1 –AD0:
The 8085 A uses a multiplexed address-data bus. This is due to
limited number of pins on the 8085A-IC. Low-order 8-bits of the
memory address (or I/O address) appear on the AD bus during the
first clock cycle. (T1 state of an m/c cycle) It then becomes the data
bus during the second and third clock cycles (T 2 and T3 states). ALE,
When the BDB is in the input mode for READ operation, the
control signal. Output goes Low during T 2 state and goes
HIGH during T3 state. Note that the normal state of
is HIGH. Also note that for obvious reasons &
are not made active LOW simultaneously. Note further
whenever, the BDB is made to be in the
INPUT MODE by the , it issues the control signal output by
IO/ at pin no 34
O/ is an output tri-state control signal. It is active both way
whenever the address issued by the on the address lines refers to
the memory then the makes IO/ LOW throughout T1,T2,T3,T4,T5
& T6 states to indicate the external world that the address so sent
belongs to the memory and data on the BDB refers to the memory.
Whenever the address in the address lines. Refers to an I/O device
the makes IO/ control signal output HIGH to tell the external
world that the address in the address lines refer to I/O device and the
data in the BDB refers to an I/O device.
Note that IO/ signal is LOW or HIGH as the case may be
throughout six timing slots T1,T2,T3,T4,T5 & T6 states. It is for the user
to make use of the facilities give to develop proper interfacing circuitry.
ME6702/MECHATRONICS/UNIT-2 Page
15
Microprocessors and Microcontrollers/Architecture of Micro controllers Lecture Notes
Microcontroller
Contents
•Introduction
•Inside 8051
•Instructions
•Interfacing
Introduction
• Definition of a Microcontroller
• Difference with a Microprocessor
• Microcontroller is used where
ever Definition
• It is a single chip
• Consists of Cpu, Memory
• I/O ports, timers and other peripherals
Difference
CPU
MEMORY
CPU MEMORY
Where ever
• Small size
• Low cost
• Low power
Unit – 3 8255: (Programmable Peripheral Interface)
can be split into two parts PORT C lower (PC 0-PC3) and PORT C
upper (PC7-PC4) by the control word. The three ports are divided in
two groups Group A (PORT A and upper PORT C) Group B (PORT B
and lower PORT C). The two groups can be programmed in three
different modes. In the first mode (mode 0), each group may be
programmed in either input mode or output mode (PORT A, PORT B,
PORT C lower, PORT C upper). In mode 1, the second’s mode, each
group may be programmed to have 8-lines of input or output (PORT A
or PORT B) of the remaining 4-lines (PORT C lower or PORT C
upper) 3-lines are used for hand shaking and interrupt control signals.
The third mode of operation (mode 2) is a bidirectional bus mode
which uses 8-line (PORT A only for a bidirectional bus and five lines
(PORT C upper 4 lines and borrowing one from other group) for
handshaking.
The 8255 is contained in a 40-pin package, whose pin out is
shown below:
PIN Names
- Chip selected
- Read input
- Write input
A0 A1 – Port Address
Chip Select:
A low on this input selects the chip and enables the communication
between the 8255 A & the CPU. It is connected to the output of
address decode circuitry to select the device when it (Read). A
low on this input enables the 8255 to send the data or status
information to the CPU on the data bus.
(Write):
A low on this input pin enables the CPU to write data or control words
into the 8255 A.
A1 A0 Input operation
0 0 0 1 0 PORT A Data bus
0 1 0 1 0 PORT B Data bus
1 0 0 1 0 PORT C Data bus
Output operation
0 0 1 0 0 Data bus PORT A
0 1 1 0 0 Data bus PORT B
1 0 1 0 0 Data bus PORT C
1 1 1 0 0 Data bus control
PORTs A, B and C:
The 8255A contains three 8-bit ports (A, B and C). All can be
configured in a variety of functional characteristic by the system
software.
PORTA:
One 8-bit data output latch/buffer and one 8-bit data input latch.
PORT B:
One 8-bit data output latch/buffer and one 8-bit data input buffer.
PORT C:
One 8-bit data output latch/buffer and one 8-bit data input buffer (no
latch for input). This port can be divided into two 4-bit ports under the
mode control. Each 4-bit port contains a 4-bit latch and it can be used
for the control signal outputs and status signals inputs in conjunction
with ports A and B.
Group A & Group B control:
The functional configuration of each port is programmed by the
system software. The control words outputted by the CPU configure
the associated ports of the each of the two groups. Each control block
accepts command from Read/Write content logic receives control
words from the internal data bus and issues proper commands to its
associated ports.
Control Group A – Port A & Port C upper
Control Group B – Port B & Port C lower
The control word register can only be written into No read operation if
the control word register is allowed.
Operation Description:
Mode selection:
There are three basic modes of operation that can be selected by the
system software.
Mode 0: Basic Input/output
Mode 1: Strobes Input/output
Mode 2: Bi-direction bus.
When the reset input goes HIGH all poets are set to mode’0’ as input
which means all 24 lines are in high impedance state and can be used
as normal input. After the reset is removed the 8255A remains in the
input mode with no additional initialization. During the execution of the
program any of the other modes may be selected using a single
output instruction.
The modes for PORT A & PORT B can be separately defined, while
PORT C is divided into two portions as required by the PORT A and
PORT B definitions. The ports are thus divided into two groups Group
A & Group B. All the output register, including the status flip-flop will
be reset whenever the mode is changed. Modes of the two group may
be combined for any desired I/O operation e.g. Group A in mode ‘1’
and group B in mode ‘0’.
The basic mode definitions with bus interface and the mode definition