Diversified Projects in Microcontroller Class Enhances Undergraduates’ Learning and Research

Abstract

Understanding the use of microcontrollers is fundamental in both Electrical and Computer
Engineering undergraduate programs. Our school replaced our microprocessor class with
microcontroller class in year 2010 due to the fast growing popularity of microcontrollers. In the
first two years of offering this class, a more traditional “lectures plus weekly Lab” model was
used. Students received background knowledge in the lecture and applied that information in the
lab. In order to improve students’ ability to design, problem solve and research, a new teaching
approach was adopted for this course in 2012. After preparing the class with sufficient
fundamental knowledge, they are asked to implement a microcontroller project of their own
choice. The students must conduct research on the state of the art in that topic, design their own
implementation which includes both hardware and software, and plan the budget. They also
must submit a project proposal along with the electrical components list and the total cost for
their project. Once approved, the team implements their project and gives a demonstration and a
presentation of their work to the whole class. The classes have enjoyed learning through the
project research and implementation.
The diversified projects have allowed the students to more deeply and broadly explore
microcontroller applications. The projects show them the significance of microcontrollers and
inspires their interests in Computer and Electrical Engineering. It also give them practical
practice in team work and time management. Additionally, it has helped to better prepares them
for the coming senior design projects.
This paper will explain why and how the new model is adopted in our microcontroller course. It
will demonstrate some of the fun projects our student implemented. It will also present the
improved class outcomes and evaluations.


Introduction


Our Microcontroller course is a fundamental class for both our Computer and Electrical
Engineering majors. Similar courses have been widely adopted in most similar undergraduate
engineering curriculums. Information in this course lays the foundation for embedded system
and introduces fundamental concepts and skills for analog and digital interfacing. Therefore,
mastering microcontroller techniques is considered to be one of the important factors for
student’s future study and career development.
Our school used to offer a Z80 based microprocessor course. Due to the microcontrollers’ lower
prices, more powerful functions, and wide application areas, we replaced our previous

microprocessor course with a course in microcontrollers in the year 2010. The PIC18
microcontroller from Microchip was chosen as the learning platform. The traditional “lecture
plus lab” model was used in the first two years of teaching. However, in order to improve the
class and motivate students learning, “diversified project design” was added to this course in
2012. Since the addition of the diversified microcontroller projects, positive feedback and
results have been observed. This paper will demonstrate the “diversified microcontroller
project” method, the reason we designed it and how it is carried out. Some fun project examples
are included. Finally, an improved class evaluation result is presented.

Literature Review

Microcontroller classes are not new to higher learning. Also, others have attempted and
developed different kinds of teaching methods in order to improve microcontroller class
outcomes. There are a collection of papers describe different kinds of project oriented teaching
approaches.

For instance, in the paper “New Approach for Teaching a Microcontrollers System Design
Course for Engineering Technology” [1], a project-based method is described. The class is
instructed to use the “Dragon 12 prototyping card” to implement a group of specified projects.
The same group of projects is required of the whole class. Instructions on how to implement
those projects are also given to the class. The projects were carried out on pre-made prototype
boards not from scratch by the students.
In the paper “Creating a Realistic Embedded System Design Experience for Computer
Engineers” [2], a student-designed project method is presented. The project design platform is
again a completed prototype board. Like all the projects that use prefabricated prototype boards,
this approach limits the students’ practice of real interfacing skills and design ability.

The paper “Design Projects for Programmable Embedded System-on-chip Course” [3] also
describes a project-based teaching method in which diversified projects are given to the class.
The design projects are generally presented to the student as a textual description of the problem
to be solved, including technical specifications. It is not an open-end project approach. .
The paper “A design Project Approach to microcontroller class” [4] gives a good selection of
projects for the students to design and implement. However, the projects again are selected by
the instructor and each project is topic specific instead of aggregate project.
There are many other similar project-oriented teaching methods for microcontroller classes. Most
of the approaches that have been reported take a similar form as of the methods mentioned in the
above examples. Some uses a single big project given to the whole class through an entire
semester. Some use a group of small projects targeting different topics of microcontrollers, but
again the group of projects apply to whole class and instructions on how to implement those
projects are provided by instructor. The diversified project method that is the closest to ours is
where the instructor provides a diversified project pool from which the students select their

projects. In summary, most approaches use instructional projects where diversified projects are
given by the instructor along with the implementation instructions.
The diversified project method that our school adopted is a true student selected and studentdesigned project method. It is a truly open-end diversified project method. The students conduct
all the stages of research, design, budgeting, and implementation. Faculty serve as only advisors.
Additionally, we do not use any development board or prototyping card. The students implement
their projects on a breadboard using chips, resistors, capacitors, etc. This provides the students a
great opportunity to develop their hardware design and debugging skills. The remainder of this
paper will explain our process in further detail. Because the projects that our students
implemented are also good examples of microcontroller based class projects, selected projects
are also presented in this paper.

Stage 1: Lectures and Labs

When we created our microcontroller class in year 2010, the PIC18 series microcontrollers from
Microchip was selected as the learning platform. Both MPLAB v8 and MPLAB x have been
used as the development IDE. We use the C18 C compiler for code development. The students
who take this class are Electrical Engineering and Computer Engineering major students. Each
week, the students meet for two one-hour lectures. Basic concepts and background of one of the
microcontroller topics are delivered during the lectures. The class then meets for a two hour lab
in the same week. The labs focus on the content that was delivered during that week during the
lectures. For instance, in the week the class learns Pulse Width Modulation (PWM), the lab of
that week has them interfacing DC motors, servos, tri-color LED and sound generation.
The weekly lab is an important part of the diversified project approach. It serves as hands on
practice for each of the topics. Some selected weekly labs are listed below:

  1. Parallel I/O: interface with dip switches, LED array and seven-segment LED
  2. LCD interface: implementing a real time clock on LCD, and customized emoji display
  3. ADC: ADC conversion by fixed point calculation method
  4. Timer: frequency measurement by both direct and reciprocal method
  5. Interrupt with Timer: decode the IR signal of TV remote
  6. PWM1: use PWM to control servo motor, generate light spectrum by tri-color LED, and
    drive DC motor with different RPM
  7. PWM2: digital music generation and Karaoke music system
  8. SPI: interfacing with SPI compatible DAC chip to generated variety of analog signals
  9. I2C: IO expanding through I2C
    Our philosophy is that in order to guarantee the success of project implementation, a solid
    foundation of each topic has to be set first. Outside the classroom lectures, we want to make sure
    our students get adequate hands-on experiences. We believe in “learning by doing”. We also

believe that experimental learning is the best fit for a microcontroller class. The labs are well
designed not only to cover most important aspects of microcontroller, but also to provide the
class with the most applicable design and experimental information. Each of the labs not only
gives the class an opportunity to try out one of the functions of the microcontroller, but also
exposes students to a variety of commonly used electronic components, such as sensors and
motors. The class learns the characteristics and the interfacing of these electronic components
with microcontrollers during the lab, which greatly helps the success of the proceeding project
implementations.
For instance, in the first PWM exercise, the experiments with PWM by generating different
kinds of waveforms. At the same time they also learned how to use NPN transistor to drive a DC
motor, how to control the position of a servo motor, and how to set the right current to drive the
Tri-Color LED. In the “Interrupt with Timer” lab, the class not only learns how to program the
microcontroller to work in the interrupt mode, they also learn how a TV remote works, the
characteristics of IR signal a TV remote generates, and how the timer on microcontroller can be
used to decode the signal pulses.
Each lab is conducted in teams, in which two students work side by side. In order to enhance
learning, both pre-lab reports and post-lab reports are required from each student so that both the
design and execution of the experiments can be measured.

Stage 2: The diversified projects

Our goal is to stimulate our students’ interest in microcontrollers and to motivate them to gain
knowledge beyond the lectures and labs. We believe we can achieve these goals by giving them
the freedom to explore microcontrollers through open-ended design projects. Additionally, these
projects allow our students to integrate a variety of the course topics into a single project. An
underlying assumption was that if the students were given the freedom to choose their project,
they would be more motivated to complete it well. As a side benefit, these projects also can
serve as a small senior design rehearsal. The following details the steps of how the project
approach is conducted.

The diversified project is announced in the first day of the class to give the students
enough time to look into potential projects. Announcing the project phase early helps to
keep them motivated in the lectures and labs, since the techniques they are learning will
be used in their project later.
 When it is time to start the project, the class is asked to form two-person teams.
 Each team is asked to brainstorm and then propose their project idea. The project idea is
generated by the students, and often is very relevant to them. For example, one group
chose a refrigerator status display project because their own dorm refrigerator was
malfunctioning. Another team decided to build a Nerf gun robot to do battle for them
when they have a Nerf gun wars in the dorm. Still another team saw me having a hard

time reaching the top of our whiteboard due to my petite stature. They chose to build a
TV remote controlled robotic white board eraser and marker for me to make my teaching
easier. After each team chooses their project idea, they are asked to conduct research on
the techniques related to their project implementations. They use library and online
materials to find the related background information. They then design a detailed
implementation strategy which includes parts and part vendor selection, and cost
estimates. Finally a formal project proposal is required around two thirds into the
semester. The project formal proposal includes:
 Description of their project idea/statement of the problem;
 Implementation plan based on the research they conducted;
 A complete list of the hardware components (ex, sensors, motors, motor drivers)
that need to be ordered;
 A complete list of web links or company addresses where we can order the parts
and the prices of those parts;
 Total cost (which is required to be below the lab fee of $100)
 The proposals are then evaluated. Modifications and suggestions to each project are
made as necessary. For instance, if a team chose a project that is too hard to finish within
three to four weeks, we would suggest the team to either simplify it or break the project
into multiple parts and implement a portion of the overall design. If the electrical
components the team picked are not appropriate or are not the ideal, the different
components may be suggested.
 The class is then given three to four weeks to implement their projects once the proposal
is approved. Each team is granted key-card scan access to our microcontroller lab to
allow them the freedom to work on their project anytime the building is open. Our
faculty remain available to offer help as needed and to ensure all teams are making good
progress to meet the presentation deadline.
 The week before the final exam is designated as presentation week. Since the projects
are diversified, we want the whole class have a chance to learn from the projects that
other teams conducted. The slogan for the week is “Teach us something new”. It is a
great opportunity for the students to learn from each other and broaden their view of
microcontroller applications. Each team is required to include the following features in
their presentation.
 A brief description of their project
 Implementation and budget
 Picture of their circuit board and diagram
 Flow chart and algorithm of the software design.
 Either a video demonstration or a live demonstration of the working project
 A time of question an answers
 In order to encourage attendance and learning from the presentations, some questions for
the Final Exam are drawn from the project presentations.

Currently, one computer engineering professor serves as the primary course coordinator and
instructor. When the projects start, two more faculty typically step in to assist as project mentors
needed. Students who have already completed the course are frequently hired as lab assistants.
Selected project gallery
Following are some of the more interesting projects that were implemented in the last few years.
Videos of these projects are available upon request.

  1. White board eraser robot: Using magnets to attach itself to the whiteboard, this robot
    accepted commands from an infrared remote control to navigate and control both its
    eraser and pen. The robot could both draw and erase as it navigated under user control.
Figure 1. White board eraser and its circuit close up.
  1. Refrigerator status display system: This project displayed the current temperature and
    humidity on an LCD character screen. By flashing different colors on a tri-color LED it
    also indicated how the current temperature compared to the pre-set temperature.
Figure 2. Refrigerator status display circuit and live demonstration.
  1. Magic 8 ball: This project implemented a microcontroller and accelerometer version of a
    Magic 8 ball. The Magic 8 ball provided random answers for questions when it was
    shaken. The microcontroller read motion from an accelerometer attached through ADC.
    Random numbers were generated when shaken which were used to select an answer from
    the pre-set answer array.
Figure 3. Magic 8 ball circuit and live demonstration
  1. Nerf Robot and Lego Robot: The following two robots are both examples of IR TV
    remote-controlled robots. The bodies of the robots are made of either Lego or Magician
    chassis from Sparkfun.com. The robots navigated around and shot at different angles
    based on the keys pressed on the TV remote.
Figure 4. Nerf robots
  1. Sound Sight project: In this project, a sonar sensor module measured the distance to
    obstacles by calculating the time delay between the transmissions of a sound pulse until it
    is bounced back. The timing information arrived at the microcontroller as a pulse width.
    The microcontroller calculated the pulse width and generate audio signals based on the
    distances. The audio signals were delivered to the ear buds worn by the operator.
Figure 5.1. The sonar distance measurement and the wearable soundSight equipment.
Figure 5.2. Sound Sight project live demonstration.
  1. Music book and piano learning project: These two projects were related to music and
    audio generation using the microcontroller’s PWM module.
Figure 6. The Christmas music book and the piano teaching class

The first project (on left) used four speakers and several PWM modules to generate
Christmas music with harmony. It also displayed lyrics on the LCD screen that
correspond to the melody so that the user could sing along with the music.

The second (on right) also used PWM. It is a piano education project that showed a
piano keyboard on the LCD. A keypad is provided to pick a song. When a song was
selected, the keypad served as music keys. The LCD piano flashes the key to be played
next. Following the lead of the display, a user could play the selected melody.

  1. Morse code decoder: This project used a timer in the microcontroller to distinguish long
    and short key presses and store the long/short designations in memory. A Morse code
    look up table was then used to decode the letter or number. The decoded message was
    then displayed on the LCD screen.
Figure 7. Morse code decoder live demonstration and the circuits.
  1. The microcontroller oven: This project designed a simple oven that set and maintained
    its temperature under microcontroller control. The group successfully melted butter with
    it
Figure 8. Microcontroller controlled oven
  1. Laser Tag Project: This team implemented a simplified laser tag game. Five
    phototransistors were grouped together to detect a laser shot. The game status, including
    number of hits, was maintained on the LCD. A handheld set was used to shoot and
    reload.
Figure 9. Laser Tag game set

Results

  1. The class evaluations have shown significant improvement since the adoption of the
    diversified project technique. Table 1 shows a comparison of averages of a subset of the
    class evaluation questions before the adoption of the diversified project in year 2011 and
    after the diversified projects were adopted. The questions from the evaluations that are
    displayed are those most closely related to the diversified project.

Table 1. Class evaluation scores comparison

  1. Many positive comments related to the diversified project approach were received
    through both class evaluations and from personal e-mails. The following are some
    student comments.
    “The extra project was very enjoyable and informative as well, so definitely don’t get rid
    of that.”
    “The final project was fun to do.”
    “I would not change anything else about this course. I thoroughly enjoyed this class and
    all the learning opportunities it offered; it has cultivated a strong interest in
    microcontrollers in me and it has given me new reasons for enjoying my major.”
    “Nothing needs to be changed for this class”
    “We should keep everything in this class”
    “Thanks for a great semester in your classes! I learned a lot and greatly enjoyed them”
    “Thanks for teaching this class for us, I really enjoyed it.”
    Many students told me that they received gift cards from Sparkfun.com and got the
    PIC18 microcontroller and PICKit 3 as their Christmas gifts that year.
  2. Since the inclusion of the diversified project into our microcontroller course, we have
    also noted an improvement in the overall course grades as seen in Table 2.

Table 2. Average Course Grades Before and After Including the Diversified Project

  1. This class has also positively influenced the senior design and competition team projects.
    Students are excited to adopt microcontroller technique into their competition projects
    and senior design projects and have more confidence in doing so. More and more
    competition teams are using microcontrollers to solve problems and help them achieve
    success in competitions. Finally, this year, most of our senior design teams included
    microcontrollers as part of their solution. Some of the senior design teams chose
    microcontrollers other than the PIC indicating that they have been able to generalize their
    understanding of microcontrollers and choose models more appropriate for their design.

Strategy and Conclusion

We have seen that diversified projects can stimulate the students’ interests in microcontrollers,
motivate them to learn, and help them develop their problem solving and project management. It
can also help them learn to work together as a team. For any small to medium size universities,
diversified projects can be added to their microcontroller class by following the steps below:
Step 1: Structure Classroom Lectures to cover the modules and functions of the
microcontroller and include background and commonly used interfacing techniques.
Step 2: Design weekly lab exercises that not only cover the topics related to the
microcontrollers but also expose the students to a variety of sensors and interfacing techniques.
We believe it is beneficial to let the class build each lab from scratch instead of using a prototype
board.
Step 3: Call for project proposal at the 2/3 into the semester. The proposal should
include:
 Statement of the problem
 Design/Implementation plan
 List of the parts that is necessary for the project
 Parts and budgeting information
Step 4: Faculty evaluates proposal, make corrections and suggestions and orders the
needed parts.
Step 5: Students implement their project
Step 6: Students present and demonstrate their working projects to whole class.
Step 7: Include questions on the course final exam derived from the student presentations.
Our school has seen positive outcomes by using diversified projects. This approach has worked
successfully for us in classes with a size of 20-30 students.

Source: Diversified Projects in Microcontroller Class Enhances Undergraduates’ Learning and Research

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.