Académique Documents
Professionnel Documents
Culture Documents
Technical note
Abstract
The degree of Mechatronics Engineering was first introduced in 2002 at the University of Auckland by the Department of Mechanical
Engineering. Teaching such a degree requires an integrated approach to topics such as applied mechatronics, mechanical design, control
and software engineering. The use of field programmable gate array (FPGA) with associated software enables students to learn various
digital design techniques, simulate and quickly implement them into the design of mechatronics systems. This paper presents a FPGA-
based rapid prototyping platform for teaching applied electronics, hardware description languages and motor control concepts. The plat-
form is based on Altera’s University Program UP2 Development Kit. The approach used in the application of FPGA is to accurately
reflect current practice in industry rather than the more traditional TTL or CMOS chips and breadboard based approach to quickly
prototype a digital system.
Ó 2007 Elsevier Ltd. All rights reserved.
0957-4158/$ - see front matter Ó 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.mechatronics.2007.05.001
458 K.C. Aw et al. / Mechatronics 17 (2007) 457–461
and analyze products before they build them, select sensors tions, and hardware description language (Verilog). It is
and actuators, write control software and design mechani- important to be aware that FPGA is by no means a
cal components, whilst being part of and coordinating replacement of other existing systems such as microproces-
design teams from different engineering disciplines. sor, microcontroller or computer but to complement their
skills sets. The approach used in the application of FPGA
1.2. Mechatronics at the University of Auckland is to accurately reflect current practice in industry rather
than the more traditional breadboard based approach
The Department of Mechanical Engineering at UoA has [10]. Rather than being limited to a few TTL or CMOS
recently introduced the Bachelor of Engineering (B.E.) in chips that will fit on a small breadboard, designs containing
Mechatronics Engineering and the first students graduated tens of thousands of gates are possible. This enables rapid
at the end of 2004. The aim is to bridge the technology gap prototyping of a digital system.
between Mechanical and Electronics Engineering gradu-
ates. It has been widely acknowledged that all mechanical 2. Altera’s University Program UP2 Development Kit
engineers must be mechatronics engineers regardless of
their specialization [6]. The initial curriculum was devel- The University Program UP2 Development Kit was
oped in such a way that 50% of the courses taken by Mech- developed to meet the needs of universities teaching digital
atronics students were identical to Mechanical logic design with software development tools and FPGA.
Engineering. The remaining 50% are specialization courses The development kit provides all of the necessary tools
related to mechatronics such as, digital electronics, ana- for creating and implementing digital logic designs, and
logue electronics, microprocessor and microcontroller, includes the following components:
software engineering, industrial automation and mecha-
tronics design. (This has changed in 2006 resulting in an (i) MAXPLUSÒ II university development software that
even greater electronics and software proportion.) It is offers a full spectrum of logic design capabilities: a
important that the curriculum is designed in such a manner variety of design entry methods for hierarchical
that it allows students to gain experience in handling low- designs, logic synthesis, timing-driven compilation,
level components [7]. At UoA, the curriculum is designed partitioning, functional and timing simulation, linked
to allow students to obtain knowledge and skills from com- multi-device simulation, timing analysis, automatic
partmentalized subjects in year 2 and year 3 with year 1 error location, and device programming and verifica-
being identical for all engineering students. At year 4, stu- tion [11].
dents are allowed to select different elective subjects. How- (ii) UP2 Education Board contains two devices:
ever, mechatronics design is a compulsory subject at year 4. a. An EPF10K70 device in a 240-pin power quad flat
Mechatronics design is important as it allows students to pack (RQFP) package.
collectively apply what they have learned in previous years. b. An EPM7128 device in a 84-pin plastic J-lead chip
There are few lectures for this subject. It consists of a carrier (PLCC) package.
range of projects that demonstrate the application and inte-
gration of knowledge taught in earlier years to create prac- During introductory lectures, students were made aware
tical intelligent products or systems. The broad based that there are two main competing companies producing
approach making use of design-and-build projects encour- FPGAs: Xilinx and Altera. They were also briefly intro-
ages creativity and excitement about the subject [8,9]. It duced to several types of FPGA architectures and associ-
stretches over two semesters and consists of four projects ated development boards provided by both companies
with each running approximately 6 weeks. An average of such as Xilinx’s Spartan-3E and Altera’s UP3 Cyclone.
3 h laboratory time is allocated in each week for students The Altera’s UP2 and Xilinx Spartan-3E Development
to access equipment and hardware. Each project provides Boards are entry level boards. However, the UP2 Develop-
the opportunity to use different types of control systems ment Board is adopted here due to existing availability and
such as microcontrollers, microprocessors, field program- it contains two architecturally simple devices (i.e.
mable gate arrays (FPGA) and desktop computers. The EPF10K70 and EPM7128) that can easily be introduced
aim is to provide the students with a wide variety of expe- to undergraduates from Mechanical Engineering. How-
riences in implementing different systems in an attempt to ever, the devices on the UP2 Development Board lack
increase their competitiveness in the tight job market when resources such as limited logic elements and will impede
they graduate. At the end of each project, each student has the development of large and complex systems for graduate
to write a formal report detailing their design and demon- projects. Furthermore MAXPLUS II lacks features offered
strate the project to the instructor. by Altera’s newer Quartus II software. (However, this will
In this paper, we will discuss the first project in mecha- soon change with the planned acquisition of the recently
tronics design that utilizes Altera University Program UP2 introduced DE-2 Educational Development Kit by Altera
Development Kit. This project will require Mechatronics that contains a powerful CycloneÒ II FPGA with rich
students to apply prior learned knowledge of electrome- input/output (I/O) support, capable of supporting both
chanical actuators, electronic circuit design, logical opera- undergraduate courses and graduate projects.)
K.C. Aw et al. / Mechatronics 17 (2007) 457–461 459
The reasons for choosing an FPGA design are: the input switches to turn the stepper motor. Students
are required to only use standard discrete components
(i) To provide students with tools to achieve rapid pro- available in the laboratory such as transistors, diodes,
totyping of digital systems that is essential in the cur- opto-isolators and resistors to build the interface and dri-
rent electronic industry reflecting current industry ver circuit.
practice. The implementation in the FPGA is expected to be hier-
(ii) To provide an environment for students to design archical with Verilog hardware description language
and implement digital logic circuits such as truth (HDL) used to build the different component logic blocks.
tables, excitation tables, state diagrams, Karnaugh Different component logic blocks will together create larger
map and Boolean equations into actual real life system blocks which will in turn be interconnected to real-
applications. ize the finite state machines of the system. Students are also
(iii) To use a hardware description language such as Ver- expected to calculate the required biasing condition to the
ilog HDL to describe the behaviour of a digital sys- constructed interface and driver circuit, providing opportu-
tem, synthesis and actual hardware implementation nity to apply their prior electronic knowledge.
as an alternative design platform. This project, which is the first in a series of projects in
(iv) To provide students with the opportunity to be mechatronics design, will subsequently be expanded. In
exposed to this alternative technology instead of tra- subsequent projects, students are required to use a sensor
ditional use of discrete logic devices or microproces- and analogue-to-digital converter for determining the posi-
sor to implement digital control. tion, speed and acceleration of the stepper motor with data
acquisition using computers, etc. This allows students to
The UP2 Education Board also contains on-board I/O build a larger system progressively over the semester.
devices such as switches, light emitting diodes and 7-seg-
ment displays, making the board sufficient to teach basic 3.1. System overview
introductory undergraduate courses [12]. In addition, there
are expansion header pins that allow interfacing with exter- Four main blocks are used, namely the ‘‘control-
nal circuits. The board also carries an oscillator running at ler_block’’, ‘‘slow_clock block’’, ‘‘LED_display block’’
25.175 MHz that can be used to clock the devices. and the ‘‘step_output block’’ as shown in Fig. 1. The ‘‘con-
A Byte Blaster II parallel port cable is required to con- trol block’’ takes the inputs from 8 switches and a push-
nect the board to the computer that runs the MAXPLUS II button. The 8 switches are used to input the amount of
software. This cable sends programming or configuration turning steps (1 step is 1.8°); a positive 8-bit binary repre-
data between the MAXPLUS II software and the FPGA sents a clock-wise rotation and a negative 8-bit binary rep-
on the UP2 Education Boards. resents a counter clock-wise rotation. The push-button will
start the stepper motor turning according to the input by
3. Stepper motor control project the 8 switches. The ‘‘slow_clock block’’ is a frequency divi-
der that reduces the high clock frequency provided by the
In order to complete the project in 6 weeks or less (a crystal to a lower frequency. The ‘‘step_output block’’ pro-
total of 18 h or less), a moderately complex system will vides the proper step sequences driving the stepper motor.
be implemented. This project requires students to apply Finally, the ‘‘LED_display block’’ controls two 7-segment-
knowledge and skills previously acquired such as: display indicating the amount of steps provided by the 8
switches.
(i) Digital logic design – finite state machine.
(ii) Hardware description languages – i.e. Verilog HDL
or VHDL.
LED
(iii) Hierarchical design technique in the implementation display
using FPGA. 8 block 8 7-segment
(iv) Electronics circuit design – i.e. interface and drive display
circuit.
8 switches
(v) Motors and actuators – i.e. stepper motor. 8
Controller
block
Each student is expected to use the FPGA on the UP2 Push-button
board as the main component to generate the appropriate
waveforms to a driver circuit to turn the stepper motor. Stepper motor
On-board switches and pushbuttons on the UP2 board will interface
circuit
be used as command input to the FPGA to determine the Slow clock Step output
number of turning steps and to start/stop the stepper From on-board block block
4
oscillator
motor respectively. The 7-segment display will be used
to display the number of turning steps determined by Fig. 1. Block diagram of the project.
460 K.C. Aw et al. / Mechatronics 17 (2007) 457–461
VCC1 VCC2
+5V
+12V
R1 R2 Com
IN4004
FPGA
10K70
Stepper
BD139 motor
Opto-isolator, ISQ 74
Fig. 4. Stepper motor interface and drive circuit for one phase (four
Fig. 2. The component logic blocks in the ‘‘controller_block’’. duplicates are required for the stepper motor).
K.C. Aw et al. / Mechatronics 17 (2007) 457–461 461
4. Discussion and conclusion student course feedback for the mechatronics design course
is encouraging with an improving approval rate from an
This paper presents a FPGA-based rapid prototyping initial 64.2% in 2004 to 86.5% in 2006.
platform as part of teaching mechatronics design of Mech-
atronics Engineering at the University of Auckland. The
platform is based on Altera’s University Program UP2 References
Development Kit. FPGA offers an alternative method to
[1] Kyura N, Ohno YH. Mechatronics – an industrial perspective. Proc
quickly prototype a large digital system without the need IEEE/ASME Trans Mech 1996;1(1):10–5.
of using the traditional TTL or CMOS chips on a bread- [2] Bishop RH, Ramasubramaniam MK. What is mechatronics? In:
board. However, students have to be informed that FPGA Bishop RH, editor. The mechatronics handbook. CRC Press; 2002.
has its weaknesses especially when implementing a system p. 1.
requiring large and fast computational tasks. In this case [3] Giurgiutiu V, Lyons J, Rocheleau D, Liu W. Mechatronics/micro-
controller education for a mechanical engineering students at the
a microprocessor or microcontroller will be more suitable. University of South Carolina. Mechatronics 2005;15:1025–36.
Nevertheless, it offers an alternative for embedded digi- [4] Siegwart R. Hands-on mechatronics education. In: Proceeding of
tal control which has traditionally been either microproces- IFAC conference, September 2000, p. 1113.
sor or microcontroller based. This FPGA project also [5] Isermann R. Mechatronics design approach. In: Bishop RH, editor.
demonstrates that mechatronics students could learn The mechatronics handbook. CRC Press; 2002. p. 2.
[6] Craig K. Is anything really new in mechatronics education? IEEE
hardware description language, digital design, as well as Robotics & Automation Maganize 2001;8(2):12–9.
knowledge of integration between electronics and electro- [7] Shiller Z, Berman S. A bottom up approach to teaching mechatron-
mechanical systems. It has been proven to be a very flexible ics. In: Proceedings of IEEE conference on mechatronics, July 2006,
tool for the teaching of mechatronics design. FPGA-based p. 377–81.
projects such as the control of temperature chamber, [8] Nelson D, Yampanis M, Devasia S, Meek S. Hands-on mechatronics
education: learning by doing. In: Proceedings, ASME international
inverted pendulum, and smart mobile robot have been mechanical engineering congress & exposition, November 1995.
planned for coming years. [9] Siegwart RY, Buchi R, Buhler P. Mechatronics education at ETH
In subsequent projects (project number 2–4), students zurich based on hands on experience. In: Sixth UK mechatronics
will be further exposed by expanding this project with the forum international conference, September 1998.
use of microprocessor, microcontroller and/or desktop [10] Hamblen JO, Furman MD. Rapid prototyping of digital sys-
tems. Kluwer Academic Publishers; 2003.
computer, hence widening their experience and ultimately [11] Altera, Maxplus II Programmable Logic Development System,
enhance their capabilities when facing the tough job mar- September 1997.
ket upon graduation. [12] Altera, University Program UP2 Development Kit User Guide, July
Since Mechatronics Engineering at UoA is new, limited 2003.
data on student course feedback is available. The yearly