Mechatronics System
Zulfakar Bin Aspar
Faculty of Electrical Engineering (FKE)
zulfakar@fke.utm.my
019-7311350
Module 1
BHM4402
Electronics in
Mechatronics System
INTRODUCTION
3
COURSE OUTLINE
AIM:
This course introduces storage of digital information,
transmission of signals, programmable memories such as
EEPROM or FPGA, power electronics, control of electrical
motors and aspects of EMC and assessing the reliability of
electronic devices.
LEARNING OUTCOME:
1. Apply different concepts for transmitting and storing
digital information - FPGA
2. Install electrical circuits for power electronics and to adapt
these to changing conditions.
3. Assess the reliability of electronic devices.
4
COURSE OUTLINE (2)
Whats in this course:
Learning to use Altera Quartus II - (Xilinx)
FPGA implementation
EMC/EMF in circuit reliability
Hardware interfacing for control
Pre-Requisites
Digital System knowledge:
Number representation, coding, registers, state machines
Realization of simple logic circuits
Integrated circuit technologies
Designing with MSI components
Flip-Flops
Counters and sequential MSI components
Circuit theory
Electronic circuit theory
5
Material
Lecture notes
Will be posted in
Dropbox
Must read before class
Find material before
class
Marks for asking in
class
Textbooks
In progress
6
THIS SEMESTER APPROACH
o Tests 30%
2 out of 3
Practical test is an option
o Lab Project 20%
10% - demonstration of FPGA basic skills
10% - demonstration of electronic design skills
Simulation only
o Main Project 50%
Combination of FPGA and electronic circuits
Control application
Minimum one presentation
6
7
COURSE POLICY
Attendance is compulsory.
You are responsible for whatever is taught in the
lecture. If you miss a class, it is your responsibility
to find out about assignment, tests and exam from
DROPBOX AND EMAILS.
Punctuality is expected.
Makeup tests or evaluation will not be given except
in the case of life and death!
These reasons are not entertained:
Already bought ticket: test/evaluation can be in short notice
as if you work
Only official letters are acceptable
You are encouraged to collaborate (not copy) on
assignment problems with your "study buddies.
Plastic
Chip case
Module 1
Pins
Introduction
SEE4243
Digital Systems
Week 4:
Programmable Logic
Devices (PLDs)
Problems by Using Basic 10
Gates
o Many components on PCB:
o As no. of components rise, nodes
interconnection complexity grow
exponentially
o Growth in interconnection will cause
increase in interference, PCB size,
PCB design cost, and manufacturing
time
Solution: use PLDs
4-10
Types of Programmable Logic 11
Devices
o SPLDs (Simple Programmable Logic Devices)
ROM (Read-Only Memory)
PLA (Programmable Logic Array)
PAL (Programmable Array Logic)
GAL (Generic Array Logic)
4-12
Symbol Equivalent
x x x
x
x x
Buffer or inverter
4-13
AND PLD Notation
Programming is done by blowing the fuse
a b
a abc c abc
b
c
a b
a c
ab ab
b
c
a b c
a a+b+c a+b+c
b
c
a b
a c
a+b a+b
b
c
F1
F2
Programmable
OR array
Fm-1
X2 X1 X0 F1 F2
0 0 0 1 0
0 0 1 1 1
F1
0 1 0 1 1
F2
0 1 1 0 0
1 0 0 0 1
1 0 1 1 0
1 1 0 0 1
1 1 1 1 0
4-17
PLA Notation
X0
X1 Programmable
AND array
Xn-1 (decoder)
F1
F2
Programmable
OR array
Fm-1
F2 = X2 X0 + X1 X0 + X2 X1 X0
4-19
PLA Implementation
Try to implement both functions using minimum
number of total terms (product sharing). Hence F1
has 3-input term.
X0
X1
X2
F1
F2
F1 = X2 X0 + X2 X0 + X2 X1 X0 F2 = X2 X1 X0 + X2 X0 + X1 X0
4-20
PAL Notation
X0
X1 Programmable
AND array
Xn-1 (decoder)
F1
F2
Fixed
OR array
Fm-1
F2 = X2 X1 X0 + X2 X0 + X1 X0
4-22
PAL Implementation
X0
X1
X2
F1
F2
unused
F1 = X2 X0 + X2 X0 + X1 X0 F2 = X2 X1 X0 + X2 X0 + X1 X0
4-23
A Real PAL: 16L8
o Theres 64 AND gates
o Each AND gate can have 32
inputs (16 variables &
complements)
o Theres 8 outputs
o Dont count the I/O pins!
o Three common output
configs:
L = pure combinational
R = registered
V = macrocell
16 L 8
sixteen inputs eight outputs
output configuration
4-24
25
Sequential PALs
o16R8
oNotice 8 flip-flops
at output
4-25
GAL (Generic Array Logic)
o GAL can emulate a number of PALs
o No need for PAL anymore!
PAL GAL
Device Fuse Electrically erasable cell
technology
Reconfigurability One-time Erasable, reprogrammable
programmable
I/O Fixed function Selectable: input/output,
combinational/registered
4-27
OLMC = Output Logic 28
o OLMC = Output Macrocell
Logic Macrocell
o Simplified, equivalent circuits:
4-28
Simplified GAL
Representation
x0
x1
x2
OLMC
OLMC
OLMC
4-29
PALCE22V10 Organization
30
4-30
PALCE22V10 Macrocell
4-31
32
Problems Using SPLD
o Current trend is
Increasing gate count
Increase design complexity
Requirement for smaller size due to lower cost, lower power
and higher reliability
Fast prototyping for quick design verification
PROM, PLA and PAL not used much except in small designs!
o Solution:
CPLD for intermediate complexity
FPGA for very complex designs (up to millions of gates)
4-32
33
Advantages of CPLDs
o Reduced circuit board space
utilization,
A 44-pin CPLD is and significant cost
equivalent to 600
savings
gates
4-33
34
Advantages of CPLDs
o Easiest to modify
Modify the software to modify the hardware
o Easy to duplicate
Design
Design
idea
4-34
35
Advantages of CPLDs
o Reprogrammability
CPLD can be reprogrammed hundreds of times.
Design 1
Design 2
Design 3
o Number of I/Os
CPLDs have large amounts of programmable input/output
contacts.
4-35
36
Advantages of CPLDs
o Software and Language
Manufacturers of CPLDs supply design software (basic
software, like the Max II Plus +, is a free download)
VHDL is a standards-based language that most manufacturers
conform to.
o Simple Interface
Devices can be interfaced directly to a computer with a serial
or USB connection .
o In-circuit modifications
With the proper interface connections, the CPLD logic can be
edited in-circuit.
o Transportable design
As a designer you may easily exchange your designs and
4-36
design modifications (email, CD, web site, etc).
CPLDs and FPGAs
CPLD FPGA
Complex Programmable Logic Device
Field-Programmable Gate Array
4-37
38
CPLDs vs. FPGAs
o CPLD
architecture
4-39
Xilinx 9500-series macrocell (18 per40
Set control FB)
Programmable
inversion or XOR
product term
Up to 5
product
terms
Global clock or
product-term
clock
Reset control
OE control
4-40
41
FPGA architecture
4-42
Configurable Logic Block
(CLB)
4-43
Input/Output Block (IOB)
4-44
Interconnection Detail
connections
controlled by
RAM bits
4-45
Design Flow
Design Entry in schematic and/or HDL
(ABEL, VHDL, Verilog). Vendors include
1 Altera, Synopsys, Aldec (Xilinx
Foundation), Mentor, Cadence, Viewlogic,
etc.
4-46
Development Process
Design Specification
Design Entry
Design Modification
Design Compilation
Functional Verification
Timing Verification
Device Programming
Sytem Production
4-47
Problems common to CPLDs and 48
FPGAs
o Pin locking
Small changes, and certainly large ones, can cause
the fitter to pick a different allocation of I/O blocks
and pinout.
Locking too early may make the resulting circuit
slower or not fit at all.
o Running out of resources
Design may blow up if it doesnt all fit on a single
device.
On-chip interconnect resources are much richer than
off-chip; e.g., barrel-shifter example.
Larger devices are exponentially more expensive.
4-48
49
Q&A
50
Example 50
20102011-I
51
A Review on Control
o Open loop system
System run without intervention regardless
of the output status
System only response to the predetermine
inputs
o Close loop system
System run with possible intervention
based on output status
System can be interrupted and change
direction at any time by the user
52
WHY NEEDED
o Sensors, Transducers and Actuators
Feedback to the system for future
response
Useful information and response to the
user
Safety by avoiding hazardous contacts
Complementary to undetected by
human senses
AUTOMATE the process to increase
productivity
53
AUTO FEEDING MACHINE
54
DATA ACQUISITION
o Icing on the cake, add value to
system, analysis for future use
o improvement, remote monitoring and
control, quick response
o 1. Data collection in memory
o 2. Large data using database
o 3. Human Machine Interface
o 4. SCADA