You are on page 1of 6

A Competition-Based Approach for Undergraduate Mechatronics Education

Using the Arduino Platform


Radhika Grover1,2, Shoba Krishnan1, Terry Shoup3, and Maryam Khanbaghi1
1
Department of Electrical Engineering, 2Department of Computer Engineering, 3Department of
Mechanical Engineering
1
E-mail: rgrover@scu.edu
images, and 3-D simulations. Students design simple
Abstract
experiments and work on group projects to implement
This paper describes the content of an undergraduate class
systems such as a DC motor controller and an escalator. In
in mechatronics at Santa Clara University. Designing an
[8], remote users can access a web-based virtual laboratory
undergraduate course in mechatronics poses a challenge as it
containing models of intelligent gate systems, wheel
integrates subareas in mechanics, computer science,
pendulum systems, and conveyor systems, among others. In
electronics and control systems. The problem is compounded
recent years, the low-cost Arduino has become a popular
when students are from different fields of engineering and
prototyping platform, especially among hobbyists and also
have diverse backgrounds and skills. We describe a
for educational purposes [4, 11]. In [4], the author describes
competition-based framework that has been integrated with
the development of a biped robot with real-time motion
rigorous labs to develop skills in core areas that are needed to
control using MATLAB and Arduino. The MATLAB
complete a course capstone project successfully. Students
program on the PC sends commands to the Arduino board,
learn the basics of mechatronics and, in the project, develop a
which controls the servos, and the board sends feedback from
mobile robot. The project varies from year to year. Our
the sensors on the robot back to the PC. A robot swarm built
course is based on the low-cost Arduino platform. This paper
using Arduinos called LumiBots, which trace their path with
briefly discusses pedagogical strategies and tools that have
a UV LED on a glow-in-the-dark mat, is described in [11].
been used at other schools, and then focuses on describing the
At Santa Clara University, we have used a competition-
lecture, laboratory, and project components of our course.
based approach to create an undergraduate course in
The results are encouraging and indicate that our course
mechatronics. The learning objectives for this course are
structure provides an effective means for learning
described in [12]:
mechatronics.
- Introduce components and technologies needed to
Keywords develop electromechanical devices with embedded
Mechatronics, robots, Arduino processors.
1. Introduction - Review the theory of operation of mechanical,
Mechatronics is a synergistic discipline that combines electrical and software components, and how these
elements from electronics, programming, control systems, components can operate as part of actuation, sensing
and mechanics. A large number of schools have introduced and control subsystems.
mechatronics courses in their curricula. These courses vary - Learn techniques for analog and digital sensing,
widely in the pedagogical approaches and tools used. filtering, timing and logical control, power
Some of the learning approaches discussed in literature use amplification and actuation.
a bottom-up [1] or a competition-based [3, 5-7] curriculum. We have developed a set of lectures and labs that focus on
Semester-long robotics and mechatronics laboratories, developing core skills to meet these objectives. The project
followed by a capstone project that is completed over two- provides motivation and an opportunity to apply these skills.
semesters, are described in [1]. The robotics laboratory is Although it is more common to use microcontroller chips
focused on control of single-axis and multi-axis systems. In such as the PIC Microchip and Atmel AVR directly, we have
the mechatronics lab, experiments consist of building a opted for the Arduino platform due to the greater flexibility
proximity sensor, a driver for a stepper motor, and a digital offered by the latter. Arduinos are a good educational tool for
multi-axis controller using a PIC Microchip controller. The students who have never programmed on a microcontroller
project is non-competitive and students build a working before as they come well equipped with libraries, which make
prototype. In [3], students work with several robotics kits it easier to interface them with a wide variety of components.
such as LEGO Mindstorms and the RoboMotor Experiment In the following sections of this paper, we describe the
Kit, and build a boxing robot using an 8-bit microcontroller. structure and content of this course in more detail. In section
In [6], a framework for a fire-fighting robot contest is 2, an overview of the course is presented. Sections 3 and 4
described. A BASIC Stamp-powered controller used in describe the classroom teaching and laboratory components
mechatronics competition-based projects at Georgia Tech is in more detail. In section 5, we provide details on the project,
described in [7]. Other robot competitions include the IEEE and in section 6, we present the results. Our conclusions are
Micromouse [9] and RoboCup [10]. summarized in section 7.
A web-based learning approach is described in [2, 8]. In
[2], various topics related to electromechanical systems, such
as electrostatics and magnetism, are discussed using text,
2. Robotics Course Curriculum 8 (Controls) (Electronics) Lab 7:
Mechatronics is a five-unit course offered annually at Santa Robot Control Color sensor
Clara University in the winter quarter for undergraduate 9 (Electronics) (Control) Lab 8:
students, typically juniors and seniors from mechanical, Power System Robot control
electrical, and computer engineering. It is comprised of three Design
hours of lectures and three hours of lab each week. The 10 Advanced Project work
course is broken up into four components—programming, Topics
electronics, controls, and mechanics—that are taught over ten The grade distribution is 10% for homework, 10% for
weeks. quizzes, 30% for exams, 20% for lab and 30% for project.
The prerequisite for this class is an introductory course in The final exam consists of the robot competition. Thus,
electric circuits and so a majority of the class has not taken hands-on learning is emphasized in the course, with 50% of
any course on electronics. Depending on their disciplines, the grade reserved for labs and project.
students may not be familiar with C, and most have never
programmed on the Arduino microcontroller. The experience 3. Classroom Teaching
of students in mechanical design, CAD drawing and tool Four modules are presented over ten weeks to develop the
familiarity also varies significantly. This disparity in knowledge and skills related to the four core areas:
students’ backgrounds makes curriculum design more programming, electronics, controls and mechanics.
challenging. Programming Module
Table 1 shows the sequence of lectures and laboratories for During the first few weeks, students learn C language
the course that helps this interdisciplinary course provide all fundamentals and Arduino C, a modified version of C used
students knowledge and skills in all aspects of mechatronic on the Arduino platform, through lectures, labs, and
systems. The programming-based lectures alternate with homework assignments. In the first week of class, we discuss
lectures on electronics so that students can start building C programming basics, differences between C and Arduino
small circuits and programming the microcontroller from the C, and write Arduino C programs. In the third week, we
first lab. These are followed by lectures on mechanics and introduce students to the event-driven finite-state machine
controls, which help them understand how to build an based programming paradigm. Students compare interrupt
electromechanical system. The laboratory assignments and polling-based techniques through discussions and in-class
culminate with a project to design and build a robot. These demonstrations, and learn how to write interrupt service
topics are discussed in more detail in the following sections. routines to implement interrupts on the Arduino. Figure 1
shows the simple setup we use in our class to provide in-class
demonstrations of important concepts. This consists of a
Table 1: Lecture and Laboratory schedule debounced button connected to the input of the Arduino and
WEEK LECTURE LAB an LED connected to the Arduino output. As the program
executes, it displays messages on the console to simulate
1 (Programming) Lab 0: Lab
robot operations. For example, students learn to do I/O by
Introduction and Introduction, Safety
reading a button press and sending a command to turn on the
Programming Training
LED. This simple circuit also demonstrates the difference
Basics
between polling and interrupts.
2 (Electronics) (Programming) Lab
Basic Circuits; 1: Introduction to
Signal Programming
Conditioning
3 (Programming) (Electronics) Lab 2:
Finite-state Signal Conditioning
Machines;
Interrupts
4 (Electronics) (Programming) Lab
Sensors and Data 3: Elevator control
Converters system
5 (Programming) (Mechanics) Lab 4:
Robot Behaviors Platform Build
6 (Electronics/ (Programming and
Mechanics) Electronics) Lab 5:
Actuators and Sensors (Line follower,
Motors IR proximity sensor);
Robot Behaviors Figure 1: A simple hardware setup for simulating robot
behavior in the classroom.
7 (Mechanics) (Programming and
Mechanical Electronics) Lab 6:
Systems Motors Students then learn to design and implement finite-state
machines for reactive systems. In the fifth week, robot
behaviors such as home, escape, and line follower are the control system design, understanding the application of
discussed in detail. For robots that implement multiple Laplace transform and its role in obtaining transfer functions.
behaviors, we discuss arbitration schemes to resolve As this is an interdisciplinary course, feedback control is a
conflicts. Using the Arduino, students learn to program and new topic for many students.
simulate robots with different behaviors and an arbiter. We During the lab, students use the robot that they have already
use the button in our hardware setup to simulate one or more built in previous modules. The objective of this lab is for the
sensors and trigger a particular behavior. Our demonstrations robot to stay a specified distance away from an object, which
in the classroom help students visualize their robot as moving helps them visualize in real time the concepts of damping
and performing operations through their program, which coefficient and steady state error.
makes it easier for them to program their robot when they Students follow the following three steps in order to control
start building it in the lab. the robot using proportional control:
Electronics Module 1. Collect data to approximate the robot by a first
The focus of this module is to get the students familiar with order transfer function.
the concepts of sensors, signal conditioning, motor control 2. Use techniques learned during the lecture and the
and power management. We discuss the functionality and lab to find a proportional gain to achieve the
specifications of a wide array of sensors, including how to specified requirements.
gather sensory information in a reliable manner. After 3. Analyze data to ensure that their design meets
presenting fundamentals of electronic components, students the specified requirements.
build circuits for sampling, amplification, and filtering the Mechanics Module
sensory data. The topologies of data converters and their The mechanics module for this course was divided into two
selection are also presented. The students learn about the topical areas. The first of these topical areas related to
different types of motors and understand relationships practical aspects of the mechanical/electrical interface in
between speed, torque, power and efficiency. We also mechatronics systems. The topics covered in this topical area
examine power requirements, DC-to-DC voltage conversion,
include:
and current drives in detail. These topics are discussed
throughout the quarter with hands-on labs that integrate the  Selection and application of mechanical
electronics into the other three modules. actuators
 Power issues associated with electromechanical
Controls Module devices
Our focus in this module is to familiarize students with the
concept and basics of feedback control. We limit ourselves  Practical design aspects of actuator interface
for the purpose of this course to first order transfer functions. circuits
During the lecture, students learn the importance of modeling

(a) (b)

(c) (d)

Figure 2: (a) RC Servo demonstration board (b) Speed control of a DC motor demonstration board (c)
Pneumatic actuator demonstration board (d) Solenoid demonstration board
 Dynamic response for systems with moving Table 2: List of parts given to each team
mechanical parts Part Quantities
 Portable power for electromechanical systems Infrared proximity sensor, 1
with emphasis on different battery technologies photoresistor, line follower sensor, H-
and their limitations bridge, color sensor, microcontroller,
 Mechanical aspects of RC Servo Actuators battery pack
(Figure 2(a) shows a pegboard model that was RC servo motors, stepper motors 2-3
used in the class to demonstrate the control of a DC gear motor, wheels 2
typical RC servo by an Arduino controller.) Small plastic balls of different 5
 Important mechanical aspects in the colors
specification of DC Motors (Figure 2(b) shows LEDs, switches, resistors, variable
a pegboard model used to demonstrate the use potentiometers, capacitors, schmitt
of pulse width modulation and an Arduino triggers, amplifiers
controller to regulate the speed of a DC motor.)
 Fluid (pneumatic & hydraulic) systems (Figure In Lab 0, students learn soldering and complete a safety-
2(c) shows a pneumatic actuator driven by an training module. In first two labs, students write programs to
Arduino controller using a simple power relay.) make the LEDs blink with different patterns, and experiment
 Mechanical design considerations in the with photoresistors and operational amplifiers, and other
selection and use of solenoids (The model in electronic components. In the third lab, students implement
Figure 2(d) demonstrates the speed of operation a simple elevator control system using a scheduling
of two types of solenoids when driven by an algorithm that decides the order in which elevator requests
Arduino controller and a power interface are to be serviced. Each “floor” consists of a switch and
circuit.) LED pair; the program is tested using debounced switches
 A discussion of small piezoelectric devices and and LEDs connected to the microcontroller. Students start
their role as mechanical actuators building their robotic platform in Lab 4. They generate a
The second of these topical areas is related to a general CAD model of a robotic platform with given constraints and
understanding of the mechanical devices used in materials, and a mechanical drawing of robotic parts using
mechatronics systems and the practical aspects associated SolidWorks. In Lab 5, students learn how to use obstacle
with their selection and use. The topics covered in this area detector and line follower sensors to trigger a particular
include: behavior, escape or line follower, respectively, on the robot.
 A comparison of six commercially available The behavior is displayed using LEDs (preferably of
mechanical/structural prototyping systems different colors) connected to the digital output pins of the
 A comparison of the efficiency and ranges of microcontroller. Each LED represents a particular state in
power capacity for various power transmission the behavior implemented by the robot. After the motors
devices including gears, chains & belts, assignment (Lab 6) is completed, the code to light up these
bearings, linkages & special mechanisms LEDs can be replaced directly with the code to move the
robot’s wheels, thereby completing the implementation of
 Sources of standard power transmission the behaviors. The objectives of Lab 6 are to operate servo
hardware for mechatronics applications and stepper motors with a microcontroller and to drive a
Throughout this module, the use of demonstration systems Brush DC motor using an H-bridge. In Lab 7, students
and samples of actual hardware proved to be especially connect a color sensor to the microcontroller through the
useful to the understanding of how mechanical devices are I2C interface and experiment with it to record the color of
deployed in mechatronics systems. The success of this balls provided to them. This can be used in the final project
understanding was validated by the design competence to differentiate the color of the balls distributed by the robot.
demonstrated by the students in the course capstone project. In Lab 8, students learn proportional control by
4. Laboratories implementing a distance follower robot. The robot must stay
Students work in groups of two to complete the lab a specified distance away from an object. If that object
assignments and project. Table 2 shows the list of parts moves, which can be estimated by a step change in the
needed to complete the lab assignments. We used an distance sensed, the robot must respond appropriately as
Arduino Mega as the microcontroller for this project, described in the assignment.
although the cheaper and smaller Arduino Uno could also be After the lab assignments have been completed, students
used. brainstorm ideas to design a robot that can complete the
tasks outlined in the project. Several lab assignments can be
incorporated into the project directly, thereby reducing the
time needed to complete the project.
5. Course Capstone Project a set of individual tasks pertaining to the project and
One goal of the capstone project is to integrate the various participate in a competition. Points were assigned for the
topics discussed in the laboratory assignments. Students ability to:
work in groups of two to design and build robots that solve a
practical problem. Working in teams encourages teamwork Follow the line from the start to the finish line
and creativity. For the competition held in winter 2013, Follow the line to each of the four towers
students needed to build an autonomous robot that could Drop a ball into the correct shelf of a tower
follow a path with a few detours from a start point to a finish Discard the pink ball at the end
line. Four identical towers were placed at the end of each
detour along the length of the path; robots moved to each
Students devised different creative solutions to the
tower by following a line as shown in Figure 3. The final
problem. The robots were constructed using materials such
exam consisted of the competition.
as plastic, metal, wood, cardboard, and paper. Figure 4
shows some of the robots designed by the students.
6. Student Learning
There were 15 teams in the class. Of these, all but two of
the teams in the class completed the individual tasks
required by the project successfully to participate in the
competition, and about half of the teams performed well in
the competition. Students rated themselves highly on the
course evaluation form to the following questions:
The course has contributed to my capacity for critical
evaluation: 4.4/5.0
The course has stimulated me to do independent thinking:
Figure 3: The layout of the course used in the 4.4/5.0
competition. Student written evaluations also indicate that the project
and labs provided a good learning experience:
Each tower consisted of three shelves, and each shelf
could hold a ball of a specific color. The robot had to hold “This course provided me with the necessary electrical
and distribute five colored plastic balls (1 red, 1 yellow, 1 and mechanical backgrounds for robotic design. In addition,
blue, 1 randomly selected red, yellow or blue, and 1 pink). this course taught me how to adapt to design requirement
Balls were loaded in a random order in a hopper on the changes. I believe this skill will be very useful in industry.”
robot. The objective of the competition was for the robot to
distribute one ball at each tower and place it on the “Practical approach in teaching topics regarding electronic
corresponding shelf. A pink ball had to be unloaded at the circuits.”
finish line. Although the electronic parts needed to construct “The project was really good hands on experience that
the robots were supplied to the class, students were allowed helped us internalize what we'd learned.”
to purchase any additional materials, within a budget, to ‘The lab portion of the class was helpful as it was a way
complete the design. to develop certain skills and understanding necessary to
Students participated in a competition during the finals complete the final project.’
week. They were graded on their robots’ ability to complete

Figure 4: Some of the robots designed by students for the course capstone project.
Students indicated that they found the course to be time [5] Verner, Igor, and Ahlgren, J.,“Robot Contest as a
consuming and that its organization could be improved. To Laboratory for Experiential Engineering Education”,
complete laboratory assignments on time, students had to ACM’s Journal on Educational Resources in
work outside laboratory hours. Students also found the Computing (JERIC), Special Issue on Robotics in
course challenging especially when it came to integrating all Undergraduate Education, Part 1, 4(2), 2-28, 2005.
the lab experiences into the final open-ended project. In [6] Verner, Igor, and Ahlgren, J.,“Robot Projects and
addition, there was a steep learning curve for many students. Competitions as Education Design Experiments”,
The true interdisciplinary nature presented the instructors Intelligent Automation and Soft Computing, Special
with the challenge that for most of the course only a third of Issue, Global Look at Robotics Education, 13(1), 57-
the students in the class were more familiar with any topic 68, 2007.
under discussion. This made the curriculum design more [7] Singhose, W.; Vaughan, J.’ Mayor, R., “Use of design
challenging as instructors had to not only teach the competition in mechatronics education,”
fundamentals in a timely manner but also relate it Mechatronics, 2009. ICM 2009.IEEE International
specifically to electromechanical systems, which were the Conference on, vol., no., pp.1,6, 14-16 April 2009.
focus of this course. We would like to address these aspects [8] Perdukova, D.; Fedor, P., “A virtual laboratory for the
in future offerings by adding C programming as a study of Mechatronics.” Emerging eLearning
prerequisite for this course and encouraging mechanical and Technologies and Applications (ICETA), 2011 9th
computer engineering students interested in this course to do International Conference on, vol., no., pp. 163, 166,
electronics prior to taking this class. 27-28, Oct. 2011.
[9] Kibler, S. G. et al. “IEEE Micromouse for mechatronics
7. Conclusion research and education,” Mechatronics, (ICM), 2011
In this paper, we have discussed our experience of
IEEE International Conference on, vol., no., pp. 887,
developing a mechatronics course using in-class
892, 13-15, April 2011.
demonstrations and exercises, hands-on labs, and a project.
[10] RoboCup. [Online] Available: http://www.robocup.org
We have described a sequence of lecture topics and
[11] Kronemann, M. L. et al, “LumiBots – Making
laboratory assignments that can be used to develop relevant
Emergence Graspable in a Swarm of Robots,”
core skills. Our results show that the labs and lectures
Proceedings of the 8th ACM Conference on Designing
described in this paper provide an effective, low-cost
Interactive Systems, pp. 408-411, 2010.
platform for a mechatronics curriculum. Instructors who
[12] Mech 143 ABET Syllabus. [Online] Available:
would like to adapt these assignments to their own
http://www.scu.edu/engineering/me/undergraduate/upl
curriculum can contact the first author of this paper.
oad/MECH-143-ABET-Syllabus.pdf
8. Acknowledgments
The robots shown in this paper were developed by our
students Michael Mifsud and Leif Kjos; Fernanda Braga and
Richard Dobbins; and Jamie Kalb and Mark Spain. We
would also like to thank the teaching assistants Yuval Prag,
Reece Kiriu, Jeffrey Kapper, and Jake Hedlund for helping
us with the class.
9. References
[1] Shiller, Z., "A Bottom-Up Approach to Teaching
Robotics and Mechatronics to Mechanical
Engineers," Education, IEEE Transactions on, vol.56,
no.1, pp.103,109, Feb. 2013
[2] Yilmaz, O.; Tunçalp, K., "A Mixed Learning Approach
in Mechatronics Education," Education, IEEE
Transactions on , vol.54, no.2, pp.294,301, May 2011.
[3] Seul Jung, "Experiences in Developing an Experimental
Robotics Course Program for Undergraduate
Education," Education, IEEE Transactions on, vol.56,
no.1, pp.129,136, Feb. 2013
doi: 10.1109/TE.2012.2213601
[4] Al-Busaidi, A. M., “Development of an educational
environment for online control of a biped robot using
MATLAB and Arduino,” Mechatronics
(MECATRONICS), 2012 9th France-Japan & 7th
Europe-Asia Congress on and Research and
Education in Mechatronics (REM), 2012 13th Int’l
Workshop on, vol., no., pp. 337, 344, 21-23, Nov.
2012.

You might also like