Sunteți pe pagina 1din 21

Session 6

Mechatronics (12OE442)
Digital Control Architecture

Mechanical Engineering Department,


K L University

SESSION OUTCOMES
At the end of 6th session, Students will be able to:
1. Understand the digital control system composition
based on Microcontrollers/ PLCs
2. Understand interfacing issues in digital architecture
based on Microcontrollers / PLCs

Role of Digital Control Architecture in a Mechatronic


System

Role of Microcontroller/ PLC in a Digital Control Architecture

Stores data
Processes arithmetic/logic functions
Used for data acquisition
Essentially used in embedded control systems

CPU, MICROPROCESSOR, MICROCONTROLLER


Microprocessor:
CPU on a chip (memory, power source etc. need
to be externally arranged)
Used for PCs, Desktops, Laptops etc.
Microcontroller:
Computer on a Chip (usually devoid of display)
Used for embedded control systems

MICRO CONTROLLER
The Microcontroller, which is a single IC containing
specialized circuits and functions that are applicable to
Mechatronic system design
e.g. Microchips PIC, Motorolas 68HC11, and Intels
8096

Applications: Home appliances


Entertainment equipment
Telecommunication equipment
Automobiles
Trucks,
Airplanes
Toys
Office equipment
All of these powerful and interesting devices are
controlled by microcontrollers and the software
running on them.

Microcontroller based Digital Control Architecture: Composition

Microcontroller Board

Microcontroller Specifications
Microcontroller
ATmega328P
Operating Voltage 5V
Input Voltage
7-12V
(recommended)
Input Voltage
6-20V
(limit)
Digital I/O Pins
14 (of which 6 provide PWM output)
PWM Digital I/O
6
Pins
Analog Input Pins 6
DC Current per I/O
20 mA
Pin
DC Current for
50 mA
3.3V Pin
32 KB (ATmega328P)
Flash Memory
of which 0.5 KB used by bootloader
SRAM
2 KB (ATmega328P)
EEPROM
1 KB (ATmega328P)
Clock Speed
16 MHz

Programmable Logic Controller

A digitally operating electronic apparatus which uses a programmable


memory for the internal storage of instructions by implementing specific
functions such as logic sequencing, timing, counting, and arithmetic to
control, through digital or analogue input/output modules, various types of
machines or processes.

PLC VERSUS
MICROCONTROLLER
PROGRAMMABLE LOGIC
CONTROLLER (HITACHI)

Pin 13
LED

Digital pins
header
Reset
button

USB
connect
or

ATmega328
MCU
Analog pins
header

Barrel
jack

ARDUINO
MICROCONTROLLER

Power-ground
header

PLC vs. Microcontroller


Programmable Logic Controller
CPU is stand-alone, RAM,
ROM, I/O, timer are separate
designer can decide on the
amount of ROM, RAM and I/O
ports.
expensive
versatility
general-purpose
High processing power
High power consumption
Instruction sets focus on
processing-intensive operations
Typically 32/64 bit
Typically deep pipeline (5-20
stages)

Micro controller
CPU, RAM, ROM, I/O and timer are
all on a single chip
fixed amount of on-chip ROM, RAM,
I/O ports
for applications in which cost, power
and space are critical
single-purpose (control-oriented)
Low processing power
Low power consumption
Bit-level operations
Instruction sets focus on control and
bit-level operations
Typically 8/16 bit
Typically single-cycle/two-stage
pipeline

Digital Control Architecture: Meaning of Interfacing


Interfacing is required to resolve incompatibility between the
microprocessor and peripheral devices viz. sensors, keyboard,
actuators etc.
Peripheral devices may either supply input to or receive output
signals from the microprocessor.
But usually peripheral devices cannot be directly interfaced to
microprocessor due to lack of compatibility in signal forms and
levels.
Very commonly used interfaces are:
(i) Peripheral interface adapter e.g. Motorola MC6820
(ii) Asynchronous Communications Interface adapter e.g. MC6850

Digital Control Architecture: Interfacing issues


Certain actions that are often required of an interface circuit:
1)

Electrical Buffering/ Isolation: Buffering is required to isolate


microprocessor from the peripheral devices which operate at higher
power. Buffering devices provides isolation and /or current/ voltage
amplification.

2)

Timing Control: synchronization of data transfer rate between


microprocessor and the peripheral devices. Handshake lines are special
lines used for the purpose.

3)

Code conversion: for e.g. an LED display may require decoder to


convert BCD output from Microprocessor into binary code to operate a 7Segment LED display.

Digital Control Architecture: Interfacing issues

contd.

4) Serial to parallel and vice versa data transfer: If microprocessor is


receiving serial data transfer and it need to output in parallel data transfer
mode to the peripheral devices or vice-versa, an interface is required.
5) Conversion from Analogue to Digital and Vice-versa

Selection of Micro Controller


Factors of selecting micro controllers :
No of inputs / out put pins
Interfaces required
Memory requirements
The number of interrupts required
Processing speed required
low cost
Versatility
ease of programming,
small size

Case Study: Temperature Measurement System Control

Temperature Control

The temperature sensors gives a voltage proportional to temperature.


The output from the temperature sensor is connected to the ADC
The micro controller is programmed to convert temperature into BCD
output which can switch on the elements of a 2-digit seven-element
display.
Because of fluctuations in the temperature, a storage register is used to
hold data i.e. 74HCT273, flip-flop.

Case Study: EMG controlled Robot

Thank U & Queries, if any

S-ar putea să vă placă și