Mechatronics - Unit Notes
Mechatronics - Unit Notes
com
om
.c
INTRODUCTION
ul
pa
• 1969 -The ‘mechatronics’ word introduced by Tessturo Mori. He was a senior engineer of Japanese
company Yaskawa Electric Corporation.
jin
• 1971 – the company was granted the trademark rights on the word.
om
.c
• 1991 -2000 – Communication technology was added. Remote
operation and robotics were developed .
ul
pa
• 1996 – 1st journal IEEE on mechatronics was released.
jin
• After 2000, finds application in aerospace, defence, bio-mechanics,
automotive electronics, banking(ATM) etc.,
.re
w
w
w
www.rejinpaul.com
om
DEFINITION
.c
•Mechatronics is “ the synergistic integration
ul
of mechanics and mechanical engineering,
pa
Electronics, computer technology, and IT to
produce or enhance products and system”
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
om
Elements of mechatronics system
Actuators and
.c
sensors
ul
Signals and
conditioning
pa
jin Digital logic
systems
.re
Software and data
acquisition systems
w
w
Computers and
display devices
w
www.rejinpaul.com
Elements of mechatronics system
• Actuators and sensors
om
• Actuators – pneumatic & Hydraulic actuator, electromechanical actuators,
electrical motor such as DC motor, AC motor, stepper motor, servo motor & piezo
electric actuators
.c
• Sensors – linear and rotational sensor, acceleration sensor, force, torque and
pressure sensor, temperature sensor, proximity sensors, light sensors
ul
• Signals and conditioning
• Two types: input and output
pa
• Input signal conditioning devices: discrete circuits, amplifiers, analog to
digital(A/D) convertors, Digital to Analog (D/A) convertors.
• Output signal conditioning devices: amplifiers, Digital to Analog (D/A) convertors,
jin
display decoders (DD) convertors, power transistors.
.re
w
w
w
www.rejinpaul.com
om
Elements of mechatronics system
• Digital logic systems
• Logic circuits, micro controllers, programmable logic controllers(PLC), sequencing
.c
and timing controls, control algorithm.
ul
• Software and data acquisition systems
•
pa
Data logger, computer with plug in boards
om
Examples of mechatronics systems
• NC and CNC machine tools, flexible manufacturing system, Prototyping
.c
& robots
• Photo copiers, laser printers & fax machines
ul
• Automatic washing machines automatic ovens
pa
• Automatic teller machine (ATM)
• Coin counter
jin
• Automatic/digital camera, digital watch
• CT scan system, automatic blood testing equipment
.re
• Automatic sliding door
w
w
w
www.rejinpaul.com
om
Advantages of Mechatronics systems
• Cost effective and good quality products
.c
• High degree of flexibility to modify or redesign
ul
• Very good performance characteristics
• Wide area of applications
pa
• Greater productivity in case of manufacturing organization
• Posibility or remote controlling as well as centralized monitoring and
control
jin
• Greater extend of machine utilization
.re
w
w
w
www.rejinpaul.com
om
Disadvantages of Mechatronics systems
.c
• High initial cost
ul
• Multi-disciplinary engineering background required to design and
implementation
pa
• Need of highly trained workers
• Complexity in identification and correction of problem in the system
jin
.re
w
w
w
www.rejinpaul.com
om
System
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Measurement system
.c
ul
pa
jin
.re
w
w
w
om
Control systems
.c
•A control system refers to a group of physical
ul
component connected or related in such a
pa
manner as to command direct or regulate
itself or another system.
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
Cooling level control system
jin
.re
w
w
om
.c
ul
pa
jin
.re
w
om
TYPES OF CONTROL SYSTEM
.c
•Open loop control system
ul
•Closed loop or feedback control system
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Open loop control system
.c
• Open loop system are systems in which the output of
ul
a system is not used as a variable to control the
pa
system.
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
Element of open loop control systems
pa
jin
.re
w
om
Closed loop control system
.c
• Closed loop system uses on a feed back loop to control the operation of
ul
the system.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
Room heating (Closed loop) control system
w
w
w
Open loop system • Closed loop system
www.rejinpaul.com
• It does not uses feedback • It uses feedback system
om
• It is less accurate • It is more accurate
• It is simple in construction
• It is complicated in
.c
• Presence of non-linearity causes
malfunctioning construction
ul
• It perform accurately even
pa
• The response is slow because in presence of non-
manual control linearity
• Easy maintenance because of no
jin
complex electronic circuit
• Cost is less
• It perform task faster than
open loop
.re
• It is difficult to maintain
and repair
w
• Cost is more
w
w
Automatic tank level control system
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Sequential controllers
.c
• A sequential control involve sequential execution of well defined
operations.
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
The working of modern automatic washing
om
machine is
.c
• Step 1 : pre-wash cycle-(Cold water wash)
ul
• Step 2: main wash cycle- (Hot water wash)
pa
• Step 3: rinse cycle- (Number of preset time)
jin
• Step 4: spin cycle- (Drain the water from clothes)
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
om
.c
ul
pa
jin
.re
w
w
om
Concept of mechatronic approach
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Emerging area of mechatronics
om
• Machine vision
• Automation and robotics
.c
• Development of unmanned vehicles
• Design of subsystem for automotive engineering
ul
• Sensing and control system
pa
• Operation and maintenance of CNC machine
• Expert system and artificial intelligence
jin
• Industrial electronics and consumer products
• Medical mechatronics and medical imaging systems
.re
• Micro/nano mechatronics
• Computer integrated manufacturing (CIM) system
w
w
w
www.rejinpaul.com
Need for mechatronics
om
• Dynamic market conditions
.c
• Producing next generation products
ul
• Integration of modern technologies in products
• Variety in product ranges
pa
• Batch production runs
• Change in design perspective
jin
• Product quality and consistency
• Ease of reconfiguration of the process
.re
• Demand for increased flexibility
w
w
w
www.rejinpaul.com
Classification of Mechatronics
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Working of a four stroke SI engine
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
om
.c
ul
UNIT II
pa
8085 MICROPROCESSOR AND
8051 MICROCONTROLLER
jin
.re
w
w
w
www.rejinpaul.com
om
MICROPROCESSOR
• It is a semiconductor component that incorporates the functions of a central
.c
processing unit (CPU) on a single integrated circuit (IC) . i.e., the central
ul
processing unit (CPU) built on a single IC is called microprocessor.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
MICROPROCESSOR
• It is multipurpose, programmable and clock driven,
.c
• Register based electronic device that reads binary instructions from a
ul
storage device called memory,
• Accept binary data as input, process the data according to the instruction
pa
and provides results as output.
jin
.re
w
w
w
www.rejinpaul.com
om
Functional Block diagram of Microprocessor
.c
ul
ALU Register Array
pa
Control
jin
.re
Microprocessor
w
w
w
www.rejinpaul.com
om
Functional Block diagram of Microprocessor
.c
• ALU (Arithmetic and Logic Unit)
•
ul
It carries out arithmetic and logic operations on 8 bit word.
• Arithmetic operation – addition, subtraction , multiplication , division etc.,
pa
• Logic operation - AND,OR,EX-OR
• The content of accumulator and temporary register are the input to the ALU.
• ALU output is stored in accumulator
jin
.re
w
w
w
• Register array www.rejinpaul.com
• Register is a storage unit within the microprocessor used to store the data,
om
address of instruction of any program.
• Microprocessor contained 6 general purpose register it has 8- bit memory
• Registers are B,C,D,E,H and L
• To hold 16-bit data a combination of two 8-bit registers can be used.
.c
• The combination of two 8-bit registers is known as Register Pair (BC, DE and HL).
• These Registers are used to store data temporarily during execution of the
ul
program.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• Control Unit
• The timing and control unit acts as the brain of a computer.
ul
• It controls all operations of the CPU.
pa
• It controls input, output and all other devices connected to the CPU.
jin
.re
w
w
w
www.rejinpaul.com
om
Evolution of Microprocessor
.c
• First generation Microprocessor
• 1st Microprocessor, Intel 4004, a 4 bit PMOS Microprocessor introduced in
ul
1971 by the Intel corporation, USA.45 instructions and 2300 transistors
• It has limited memory-simple aplications.
pa
• An enhanced version of Intel 4004 is Intel 4040.
• e.g., Toshiba’s 73472, Rockwell International’s PPS-4 National IMP-4 etc.,
jin
.re
w
w
w
www.rejinpaul.com
om
Evolution of Microprocessor
.c
• Second generation Microprocessor
• In 1972, Intel introduced 8- bit Microprocessor named as Intel 8008, which
ul
also uses PMOS technology.
• But this technology was slow and not compatible with TTL logic
pa
• In 1973, Intel introduced more powerful and fast 8- bit NMOS
Microprocessor called Intel 8080-3 power supplies.
jin
• 1975-Intel 8085 is the improved version of Intel 8080
.re
w
w
w
www.rejinpaul.com
om
.c
• Third generation Microprocessor
• In 1978 Intel introduced a 16- bit Microprocessor called Intel 8086.
ul
• Other 16- bit Microprocessor are Intel 80186, Intel 80286, zilog’s z8000,
Motorola’s 68000, 68010 etc.,
pa
• Forth generation Microprocessor
• In 1980-32bit-Iapx432-not popular
jin
• In 1985 Intel introduced a 32- bit Microprocessor called Intel 60386-desktop -
386MP
.re
• Fifth generation Microprocessor
• Intel i860 is a 64 bit RISC microprocessor
w
w
w
www.rejinpaul.com
om
Architecture of 8085
.c
• Three main section
• ALU
ul
• Timing and Control unit-
pa
• Set of register
jin
.re
w
w
w
ARCHITECTURE OFwww.rejinpaul.com
8085
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• ALU
• Addition, Subtraction, Logical AND,OR…etc
ul
• Timing and Control Unit
pa
• timing and control signals –execution of instructions
• Controls the entire operation of the microprocessor
• Register
•
•
jin
1- 8 bit Accumulator….i.e.-register A (ACC)
6-8 bit general purpose register (B,C,D,E,H & L)
.re
• 1- 16 bit register –SP(Stack Pointer)
• 1 -16 bit –PC (Program Counter)
• Instruction register
w
• Temporary register
•
w
Flag register
w
www.rejinpaul.com
om
.c
• Flag register
• Carry flag (CY) – it is set, If carry or borrow occurs during the arithmetic
ul
operation.
• Parity flag (P) – it is set, if the result has even number of it otherwise made 0.
pa
• Auxiliary carry flag (AC) – Binary coded decimal operations (BCD)
• Zero flag (z) – is set if the result becomes 0
jin
• Sign flag (S) – is set if the result becomes –ve, if +ve, it is set to 0
• 2 bit (don’t care )
.re
w
w
w
www.rejinpaul.com
om
Pin diagram
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Signals in 8085
• 6 group of signals
.c
• Address bus (A15-A8)-
• unidirectional
ul
• Data bus (AD7-AD0)
• bi-directional both data and
pa
address
• Control and Status signals
jin
• ALE (Address Latch Enable)
• RD,WR,IO/M,S0,S1
.re
• Power supply and Clock frequency
• VCC +5
• VSS-Ground
w
• X1,X2
w
• CLK
w
www.rejinpaul.com
om
.c
• Externally initiated signals
•
ul
INTR
• INTA
pa
• TRAP
• RST 7.5,RST6.5,RST 5.5
• READY
•
•
•
HOLD
RESET IN jin
.re
RESET OUT
• HLDA
• Serial I/O Ports
w
• SID
• SOD
w
w
www.rejinpaul.com
om
ADRESSING MODES IN 8085
.c
• Direct addressing
ul
• Register addressing
• Register indirect addressing
pa
• Immediate addressing
• Implicit addressing
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• Direct addressing
• LDA 240H (Load register A with the contents of memory location 240FH)
ul
• STA 2400H (Store the content of the accumulator in the memory location
2400H)
pa
• Register addressing
• MOV B, D (move the content of register D to register B)
jin
• INX H (increment the content of [H-L] register pair
.re
w
w
w
www.rejinpaul.com
om
.c
• Register indirect addressing
• LXI H, 2500H (Load H-L pair with 2500H)
ul
• MOV A, B (move the content of the memory location, whose address is in H-L
pair(H-L Pair) to accumulator)
pa
• HLT (halt)
• Immediate addressing
jin
• MVI A, 05 (Move 05 in register A)
• 3E, 05 (the code format of an instruction)
.re
w
w
w
www.rejinpaul.com
om
.c
• Implicit addressing
•
ul
There are certain instruction which operate the content of the accumulator.
• Such instruction do not require the address of the operand
pa
• CMA
• RAL
• RAR
jin
.re
w
w
w
www.rejinpaul.com
om
Instruction sets 8085
.c
• Data transfer group
ul
• Arithmetic group
• Logical group
pa
• Branch group
• Stack, I/O and Machine control group
jin
.re
w
w
w
www.rejinpaul.com
Data transfer group
om
.c
• MOV r1,r2
ul
• MOV r, M (Move the content of memory to
register)
pa
• MOV M, r
• MVI r1, data (Move
• MVI M, data jin
Immediate DATA to register)
.re
• LDA data (Load accumulator direct)
• STA addr (store accumulator direct)
w
om
.c
• LHLD addr (Load HL pair direct)
ul
• SHLD addr (Store HL pair direct)
• STAX xp ( store accumulator Indirect)
pa
jin
.re
w
w
w
www.rejinpaul.com
Arithmetic group
om
.c
• ADD r • INR r
ul
• ADD M • INR M
• ADI data • DCR r
pa
• ADC r • DCR M
• ADC M
• SUB r
• SUB M
jin
.re
• SUI data
• SBB r
w
• SBB M
w
w
www.rejinpaul.com
Logical group
om
.c
• ANA r • CMA (complement acc)
ul
• ANA M • CMC(complement carry)
• ANI data • CMP r (compare)
pa
• ORA r • CMP M
• ORA M • CPI data
• ORI data
• XRA r
jin• RLC (rotate)
• RRC
.re
• XRA m • RAL
• XRI data • RAR
w
w
w
www.rejinpaul.com
Branch group
om
.c
• Two branch instruction
•Conditional
ul
•The conditional branch instructions
transfer the program to the specified
pa
label when certain condition is
satisfied
•Unconditional jin
•The Unconditional branch instructions
.re
transfer the program to the specified
label when certain condition is not
w
satisfied
w
w
www.rejinpaul.com
om
.c
• Conditional jumb addr (label)
• If the condition is true and the program jumps to the specified label, the
ul
execution of a conditional jump takes 3 machine cycles and 10 states
• If the condition is not true, only two machine cycles and 7 states are required
pa
for the execution of the instruction.
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• JZ addr (label) [jump if the result is zero]
ul
[PC] address (label), jump if z=0
pa
Machine cycle – 2/3
States – 7/10
jin
Addressing mode – Immediate
Flags - None
.re
w
w
w
www.rejinpaul.com
om
.c
• JNZ addr [ jump if the result is not zero]
[PC] address (label), jump if z=1
ul
• JC addr [ jump if there is a carry ]
pa
[PC] address (label), jump if CS = 1
[PC] jin
• JNC addr [ jump if there is no carry ]
address (label), jump if CS = 0
.re
w
w
w
www.rejinpaul.com
om
.c
• JP addr [ jump if the result is plus)
[PC] address (label), jump if S = 0
ul
• JM addr [ jump if the result is minus)
pa
[PC] address (label), jump if S = 1
• JPE addr [ jump if even parity)
[PC]
jin
address (label), jump if P = 0
.re
w
w
w
• JPE addr [ jump if odd parity) www.rejinpaul.com
[PC] address (label), jump if P = 1
om
•CALL addr (label)
• Call the subroutine identified by the operand
.c
• CC addr (call subroutine if carry status CS=1)
• CNC addr (call subroutine if carry status CS=0)
ul
• CZ addr (call subroutine if result is zero)
• CNZ addr (call subroutine if result is not zero)
pa
• CP addr (call subroutine if result is plus)
• CM addr (call subroutine if result is minus)
• CPE addr (call subroutine if even parity)
•
jin
CPOE addr (call subroutine if odd parity)
.re
w
w
w
www.rejinpaul.com
om
.c
• Unconditional
• RET(Return from Subroutine)
ul
• CALL addr
pa
• RSTn (Restart)
jin
.re
w
w
w
www.rejinpaul.com
om
Stack ,I/O and Machine control Group
.c
• PUSH rp [push the content of register pair to stack)
ul
• PUSH PSW [push the program status to word]
• POP rp [pop the content of register pair which was saved from the
pa
stack]
• POP PSW
• IN PORT
• OUT PORT
jin
.re
• EI (enable interrupts)
w
w
w
www.rejinpaul.com
om
.c
• DI(disable interrupts)
ul
• HLT (halt)
• NOP( notion oper)
pa
• RIM(read interrupts mask)
• SIM (set interrupts mask)
jin
.re
w
w
w
www.rejinpaul.com
om
SIM(Set Interrupts Mask)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
RIM (Read Interrupts Mask)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Timing diagram of 8085
.c
• Opcode fetch cycle (4T or 6T)
ul
• Memory Read cycle (3T)
• Memory write cycle (3T)
pa
• I/O read cycle (3T)
• I/O write cycle (3T)
jin
• Interrupt acknowledge (6T or 12T)
• Bus idle cycle (2T or 3T)
.re
w
w
w
www.rejinpaul.com
om
Opcode fetch cycle
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Memory Read cycle
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Memory write cycle
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
I/O read cycle
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
I/O write cycle
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Microcontroller
.c
• A Microcontroller is a small computer on a single integrated circuit
containing a processor core, memory and programmable
ul
input/output peripherals.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Features Microcontroller
.c
• 8 bit CPU
ul
• On chip oscillator
• 4Kb of ROM
pa
• 128 bytes of RAM
• 21 special functions register
• 32 I/O lines
jin
• 64 KB address space for external data memory
.re
• 64 KB address space for program memory
• 2 16-bit timer/counter
w
w
w
www.rejinpaul.com
om
Block diagram of 8051
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
UNIT 3
.c
ul
PROGRAMMABLE PERIPERAL INTERFACE
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Content
.c
• Introduction
ul
• Architecture of 8255
• Keyboard interfacing
pa
• LED display –interfacing
• ADC and DAC interface
• Temperature Control
• Stepper Motor Control
jin
.re
• Traffic Control interface
w
w
w
www.rejinpaul.com
om
Introduction
• To communicate with the outside world, microprocessor use peripherals
(I/O devices)
.c
• Input devices – Keyboards, A/D converters etc.,
ul
• Output devices – CRT, Printers, LEDs etc.,
• Peripherals are connected to the microprocessors through electronic
pa
circuit known as interfacing circuits.
jin
.re
w
w
w
www.rejinpaul.com
om
Microprocessors unit with I/O devices
.c
ul
pa
Input Output
Micro
devices devices
(keyboard) jinprocessors
(LED)
.re
Input Output
w
peripherals peripherals
w
w
www.rejinpaul.com
om
.c
• Some of the general purpose interfacing devices
•
ul
I/O ports
• Programmable peripherals interface (PPI)
pa
• DMA controllers
• Interrupt controller
• CRT controller
jin
• Some of the special purpose interfacing devices
.re
• Keyboard
• Display
• Floppy Disc controllers
w
w
w
www.rejinpaul.com
Peripheral interfacing Chips are used
om
generation of I/O ports
.c
• Programmable peripherals interface Inter 8255 (PPI)
• Programmable Interrupt controller (PIC) Intel 8259
ul
• Programmable communication interface (PCI) Intel 8251
•
pa
Keyboard display Controller Intel 8279
• Programmable counter /Inverter timer Intel 8253
• A/D and D/A Converter Interfacing
jin
.re
w
w
w
www.rejinpaul.com
om
Advantages
.c
• To perform specific functions by giving a control word to the internal
register.
ul
• Control word –instructions informs the peripheral about various
pa
functions to perform.
• Format (CW) specified by the manufacturer.
jin
.re
w
w
w
www.rejinpaul.com
om
Microprocessors unit with I/O devices
.c
ul
pa
Input
Micro Output
devices PPI 8279
proce device
(key
board)
8255
jin ssors Display
(LED)
.re
Peripheral Display
w
Interface Interface
w
w
www.rejinpaul.com
om
Address Space Partitioning
.c
• The Microprocessors uses 16 bit wide address bus for addressing
memories and I/O devices.
ul
• Using 16 bit wide address bus, it can access 216 = 64k bytes of
pa
memory and I/O devices
• Two schemes for the allocation of addresses to memories and I/O
devices
jin
• Memory mapped I/O
• I/O mapped I/O
.re
w
w
w
www.rejinpaul.com
om
Memory mapped I/O
.c
• It has only one address space
ul
• Address space is defined as the set of all possible addresses that a
microprocessor can generate
pa
• Some addresses assigned to memories and Some addresses to I/O
devices
jin
• Memory locations are assigned with addresses from 8000 to 84FF
• I/O devices are assigned with addresses from 8500 to 85FF
.re
w
w
w
www.rejinpaul.com
om
I/O mapped I/O scheme
.c
• In this scheme, addresses assigned to memories locations can also be
assigned to I/O devices
ul
• Since the same address may be assigned to memories locations or an
pa
I/O devices
• The microprocessor has a signal to distinguish whether the address
on the address bus is for memories locations or an I/O devices
jin
.re
w
w
w
www.rejinpaul.com
om
I/O mapped I/O scheme
.c
• When signal is high, then address on the address bus is for an I/O
devices
ul
• When signal is low, then address on the address bus is for memory
pa
locations
• Two extra instruction IN and OUT are used to address I/O devices.
jin
• The IN instruction is used to read the data of an input devices.
• The OUT instruction is used to send the data of an input devices.
.re
• This scheme is suitable for a large system.
w
w
w
www.rejinpaul.com
om
PROGRAMMABLE PERIPHERALS INTERFACE INTER
8255 (PPI)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Operating mode of 8255
.c
• Bit Set Reset (BSR) Mode
ul
• I/O Mode
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Bit Set Reset (BSR) Mode
.c
ul
pa
jin
.re
w
w
w
om
I/O Mode
.c
• The 8255 has the following 3 modes of operation
• Mode 0 – Simple Input/output
ul
• Mode 1 – Input / Output with the Handshake or strobed
pa
• Mode 2 – Bi-directional I/O
jin
.re
w
w
w
www.rejinpaul.com
om
I/O Mode
.c
Mode 0 – Simple Input/output
• Port A and port B are used as two simple 8-bit I/O port
ul
• Port C as two 4-bit port
pa
• Features
• Outputs are latched
• Inputs are buffered not latched
jin
• Ports do not have handshake or interrupt capability
.re
w
w
w
www.rejinpaul.com
om
I/O Mode
• Mode 1 – Input / Output with the Handshake
• Input or output data transfer is controlled by handshaking signals.
.c
• Handshaking signals are used to transfer data between devices whose data
transfer speeds are not same.
ul
• Port A and Port B are designed to operate with the Port C.
• When Port A and Port B are programmed in Mode 1, 6 pins of port C is used for
pa
their control.
jin
.re
w
w
w
www.rejinpaul.com
om
I/O Mode
• D0-D7 data bus
– bi directional, tri state data bus line
.c
– It is used to transfer data and control word from 8085 to 8255
• RD (Read)
ul
– When this pin is low, the CPU can read data in the port or status word through
pa
the data buffer
• WR (write)
jin
– When this pin is low, the CPU can write data in the port or in the control register
through the data buffer
.re
w
w
w
www.rejinpaul.com
om
I/O Mode
• Mode 2 – Bi-directional I/O
.c
• Port A can be programmed to operate as a bidirectional port.
ul
• The mode 2 operation is only for port A
pa
• When port A is programmed in Mode 2, the Port B can be used in either
Mode 1 or Mode 0.
• Mode 2 operation the port a is controlled by PC3 to PC7 of port C.
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
PIN DIAGRAM
jin OF 8255
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
PROGRAMMING and OPERATION of 8255
.c
• Programming in MODE 0
ul
• D7 –set to 1
• D6,D5,D2- all set to 0 –MODE 0
pa
• D4,D3,D1 and D0- determine weather the corresponding ports are to
configured as input or output
jin
.re
w
w
w
A B GROUP Awww.rejinpaul.com
GROUP B
D4 D3 D1 D0 PORT A PORTC U PORT B PORT C L
om
0 0 0 0 OUT OUT OUT OUT
0 0 0 1 OUT OUT OUT IP
.c
0 0 1 0 OUT OUT IP OUT
ul
0 0 1 1 OUT OUT IP IP
0 1 0 0 OUT IP OUT OUT
pa
0 1 0 1 OUT IP OUT IP
0 1 1 0 OUT IP IP OUT
0
1
1
0
1
0
jin 1
0
OUT
IP
IP
OUT
IP
OUT
IP
OUT
.re
1 0 0 1 IP OUT OUT IP
1 0 1 0 IP OUT IP OUT
w
1 0 1 1 IP OUT IP IP
w
1 1 0 0 IP IP OUT OUT
1 1 0 1 IP IP OUT IP
w
1 1 1 0 IP IP IP OUT
www.rejinpaul.com
Programming in MODE 1
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• IBF- input buffer full
ul
• INTR- interrupt request
• INTE-interrupt enable
pa
• OBF-output buffer full
jin
• INTR-interrupt request
• INTE-interrupt enable
.re
w
w
w
www.rejinpaul.com
om
Programming in MODE 2
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Interfacing cable
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
Basic Key operation
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
2 X 2 Key operation
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
om
INTERFACING-keyboard
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
LED Operation
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Microprocessor interface to LED (Common
om
anode)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Microprocessor interface to 7 segment
om
LED (Parallel)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Microprocessor interface to 7 segment LED
om
(serial)
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
Serial interface of 7
pa
segment LED to
Microprocessor
software flowchart
jin
.re
w
w
w
www.rejinpaul.com
om
INTERFACE-LED display
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
ADC INTERFACE
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
BLOCK diagram of ADC 0808
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
PIN diagram of ADC 0808
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
DAC INTERFACE
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Pin diagram of DAC
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Pin diagram of DAC
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
INTERFACING diagram for DAC
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
TEMPERATURE CONTROL
.c
• Temperature sensor –convert temp to electrical signal by thermistor
ul
• Transducer convert physical data into electrical signal
• Physical data –temp, light, flow, speed etc…
pa
• LM34 & LM35 –temperature sensor by NATIONAL SEMICONDUCTOR
CO-OPERATION
jin
.re
w
w
w
www.rejinpaul.com
• LM34 • LM35
om
• Output voltage is linearly • Output voltage is linearly
proportional to Fahrenheit temp proportional to Celsius temp
• No external calibration • No external calibration
.c
• 10mV for each degree of • 10mV for each degree of
ul
Fahrenheit temp Centigrate temp
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
STEPPER MOTOR CONTROL interface
• Digital motor used to translate electrical pulse into mechanical
.c
movement
• Center tap winding connected to 12 V supply
ul
• Motor can be excited by grounding four terminals of the two windings
pa
• ROTOR-Stepper motor has permanent magnet rotor .It is also known as
shaft
• STEP ANGLE-It is minimum degree of rotation associated with a single
step
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Stepper Motor Interface
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Excitation Table
.c
Step X1 X2 X3 X4
ul
1 0 1 0 1
pa
2 1 0 0 1
3 1 jin 0 1 0
.re
4 0 1 1 0
w
1 0 1 0 1
w
w
www.rejinpaul.com
om
Traffic Light Control System
• Allow traffic from W to E and E to W transition for 20 seconds
.c
• Give transition period of 5 seconds (yellow bulbs ON)
• Allow traffic from N to s and S to n for 20 seconds
ul
• Give transition period of 5 seconds (yellow bulbs ON)
pa
• Repeat the process
jin
.re
w
w
w
www.rejinpaul.com
om
Traffic Light Control System
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Interfacing diagram for Traffic Light Control
om
System
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
UNIT 4
pa
PROGRAMMABLE LOGIC CONTROLLER
jin
.re
w
w
w
www.rejinpaul.com
om
Content
.c
• Introduction
ul
• Basic structure
• Input and output processing
pa
• Programming
• Mnemonics
jin
• Timers, counters and internal relays
• Data handling
.re
• Selection of PLC
w
w
w
www.rejinpaul.com
om
PROGRAMMABLE LOGIC CONTROLLER
.c
• A Programmable Logic Controller(PLC) is a digital computer used for
automation of typically industrial electromechanical processes, such
ul
as control of machinery on factory assembly lines, amusement rides
or light fixtures.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Applications
.c
• Automated manufacturing process equipment and machinery
ul
• Packaging and filling equipment
• Chemical mixing
pa
• Conveyor systems and distillation etc.,
jin
.re
w
w
w
www.rejinpaul.com
om
Features and specification
• They are rugged and designed to withstand vibration, temperature,
.c
humidity and noise
• The interfacing for inputs and outputs is inside the controller.
ul
• They are easily programmed and have an easily understood
programming language.
pa
• Programming is primarily concerned with logic and switching operation.
jin
.re
w
w
w
www.rejinpaul.com
om
Hardwired motor circuit
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Hardwired motor circuit with PLC
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Basic structure
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• PLC is designed as a replacement for the hardwired relay and timer
logic, where PLC provides ease and flexibility of control based on
ul
programming and executive logical instruction.
pa
• The internal functions such as timers, counter and shift registers
making sophisticated control possible using even the smallest PLC.
jin
.re
w
w
w
www.rejinpaul.com
om
• PLC capable of performing function such as
• counting,
• logistics,
.c
• numerical application,
• comparing and processing of signals.
ul
• A PLC is divided in to 4 parts. They are
pa
• Input/output module (I/O)
• Central processing Unit (CPU)
• Memory
• Programming unit
jin
.re
w
w
w
www.rejinpaul.com
i) Input/output module (I/O)
om
• It is used to transfer the data between external devices and CPU
• It is incorporated into PLC in two ways
.c
I. Fixed I/O – it is a small unit that comes in one piece with processor i.e., the
I/O terminals cannot be changed in fixed I/O
ul
II. Modular I/O – it is packed together i.e., there are several compartment of
I/O module are plugged together.
pa
jin
.re
w
w
w
www.rejinpaul.com
Central processing Unit (CPU)
om
• It is consisting of a microprocessor which interrupts the input signal and
carries out the control actions according to the program stored in the
memory, communicating the decision as an action signal to the output.
.c
• It scan the total information package stored in the memory and input and
output devices continuously.
ul
• During the scan the CPU executes instruction based on input data, sends
appropriate output responses to the output devices, updates data
pa
acquisition systems and indicate condition changes
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• Scan time for larger unit depends on the size of the memory and
configuration of the system
ul
• Power supply unit is needed to convert the AC voltage to the low DC
pa
voltage necessary for the processor and to supply power to other
circuit in the input and output interface module.
jin
.re
w
w
w
www.rejinpaul.com
om
Memory Unit
.c
• The memory in PLC stores the digital control logic, the process
program and the necessary instruction to operate the system.
ul
• The memory used in PLC are
pa
• Non-volatile memory
• Volatile memory
jin
• According to purpose of usage
• RAM –volatile memory
.re
• ROM- permanent storage
w
w
w
www.rejinpaul.com
om
Programming unit
.c
• It is used to enter the required program into the memory of the
processor
ul
• There are normally 3 approaches followed by the program
pa
• Use of hand held programmer
• Terminal with video display unit
• PC with appropriate software
jin
.re
w
w
w
Architecture www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
• Buses
• Data buses – it is used for communicating data b/n elements
.c
• Address buses-it is used to read the address of locations for accessing stored
data
ul
• Control buses- it is used for internal control action carried by the CPU
• System buses- it is used for communication b/n Input/output ports and
pa
input/output units
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• Memory
• RAM
ul
• ROM
pa
• PROM
• EPROM
• Electrically EPROM
jin
.re
w
w
w
www.rejinpaul.com
om
Optoisolator
.c
• Electrical connection from the external world is usually by means of
optoisolator
ul
• When a digital pulses passes through the LED, a pulse of Infrared
pa
radiation is produced.
• This pulses is detected by the phototransistor and gives rise to a
voltage in that circuit.
jin
.re
w
w
w
www.rejinpaul.com
Optoisolator
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Input channel with optoisolator
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
• Common input voltage is 5V and 24V
ul
• Output voltage is 24V and 240V
• Output are often specified as being of
pa
• Relay type
• Transistor type
• Triac type
jin
.re
w
w
w
www.rejinpaul.com
om
Relay type of output
.c
ul
pa
jin
.re
w
w
om
.c
ul
pa
jin
.re
w
w
om
Triac type of output
.c
ul
pa
jin
.re
w
w
om
Programming
.c
• The programming of PLC is based on the ladder diagram.
ul
• Ladder diagram involve writing a program in a similar maner to
drawing a switching circuit.
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
Switch controlling Solenoid www.rejinpaul.com
om
.c
ul
pa
jin Ladder Diagram for
.re
Switch Control
w
w
to enter a vessel
Temperature Control System www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Logic functions
.c
ul
pa
An AND System
jin
.re
w
w
An OR System
w
www.rejinpaul.com
om
.c
ul
pa
NOT System
jin
.re
w
NOR System
w
w
www.rejinpaul.com
om
.c
NAND System
ul
pa
jin
.re
w
w
XOR System
w
www.rejinpaul.com
Cylinder Sequencing
om
A+, B+, A- and B-
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
List of Mnemonics used for the Mitsubishi f
om
Series PLC
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Mnemonics for Logic system
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Mnemonics for Logic system
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Timer
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Timer circuit programmed to cause an output to go
om
ON for 0.5s, then OFF for 0.5s, then OFF for 0.5s and
so on
.c
ul
pa
jin ON-OFF
.re
cycle timer
w
w
w
www.rejinpaul.com
om
Internal relay
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Counter
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Master control relay
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
JUMP Instruction
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Data handling
.c
• Data movement
ul
• Data comparison
• Arithmetic operation
pa
• Code conversion
jin
.re
w
w
w
www.rejinpaul.com
om
Data Movement
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Controlling the speed of motor
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Selection of PLC
• System definition
.c
• Choosing the I/O hardware
• I/O timing consideration
ul
• Analog I/O module –resolution, voltage level
pa
• Conversion speed
• Analog closed control
• Communication
jin
• Counter, encoders and positioning
.re
• Selecting suppliers
w
w
w
www.rejinpaul.com
om
.c
UNIT 5
ul
ACTUATORS AND MECHATRONICS SYSTEMS DESIGN
pa
jin
.re
w
w
w
www.rejinpaul.com
om
CONTENT
.c
❖Types of stepper and servo motors – construction, working principle
❖Design process - Stages in designing mechatronics system
ul
❖Traditional and mechatronic design concept
❖Possible design solution
pa
❖Case studies of mechatronics systems
❖Pick and place robot
jin
❖Engine management system
❖Automatic car park barrier
.re
w
w
w
www.rejinpaul.com
Stages in designing mechatronics system
om
Need for design
.c
Analysis of problem
ul
Preparation of specification
pa
jin
Generation of possible solution
.re
Evaluation
w
Implementation of design
www.rejinpaul.com
om
Traditional design
.c
ul
A mechanical system
pa
Mechanical jinHydraulic Electrical
.re
linkages , drives and motors,
etc., pneumatic switches
w
actuators etc.,
w
w
www.rejinpaul.com
om
Mechatronic design
.c
A
ul
mechanical
system
pa
Hydraulic
Mechanical
linkages ,
drives etc.,
jin and
pneumatic
Electrical
motors,
.re
switches
actuators etc.,
w
Electronic
w
components,
computers & IT
w
systems
www.rejinpaul.com
Comparison of traditional and mechatronics
om
design
.c
ul
Traditional design Mechatronics design
• It is based on a traditional • It is based on mechanical,
pa
systems such as mechanical, electronics, computer
hydraulic and pneumatic technology and control
systems engineering.
• Less flexible
• Less accurate
jin • More flexible
• More accurate
.re
• More complicate mechanism in • Less complicate mechanism in
design design
w
om
Possible design solution
.c
• Timer switch
ul
• Windscreen wiper motion
• Weighing scales
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Timer switch
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Possible solution for timer switch
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Windscreen wiper motion
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
Possible solution for Windscreen wiper
om
motion
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Weighing scales
.c
ul
pa
jin
.re
w
w
w
om
.c
ul
pa
jin
.re
w
w
om
.c
ul
pa
jin
.re
w
om
Case studies
.c
• Pick and place robot
ul
• Autonomous mobile robot
• Wireless surveillance balloon
pa
• Engine management system
• Automatic car park barrier
jin
.re
w
w
w
www.rejinpaul.com
om
Pick and place robot
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
om
.c
ul
pa
jin
.re
w
w
w
om
Autonomous mobile robot
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Elements of autonomous mobile robot
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Wireless surveillance balloon
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Applications of wireless surveillance Ballon
.c
• Border security (TARS) in military
ul
• Enhancing battle field situational awareness
• Coastal surveillance
pa
• Platform for mounting telecommunication, television, radio
transmitters etc.,
jin
• Aerial platform for scientific instrument testing
.re
w
w
w
www.rejinpaul.com
Engine Management System
om
.c
ul
pa
jin
.re
w
w
w
www.rejinpaul.com
om
Basic components
• Electronic control unit
• Fuel delivery system
.c
• Ignition system
ul
• Various sensors
•
pa
Throttle position sensors
• Exhaust gas oxygen sensors
• Manifold absolute pressure sensors
•
•
•
Temperature sensors
jin
Engine speed/Timing sensors
Exhaust gas regulation sensors
.re
• Mass sir flow sensors
w
w
w
www.rejinpaul.com
om
.c
ul
pa
jin
.re
w
w
w