Session T1D Microcontroller Based Introduction to Computer...

4
Session T1D 7 th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-1 Microcontroller Based Introduction to Computer Engineering Hugh Smith California Polytechnic State University, [email protected] Abstract – We developed an Introduction to Computing course focused on embedded systems and robotics. This course is taken by first year Computer Science and Computer Engineering students. This course uses a number of hardware components including a Bluetooth board and IR sensors to interface with an Arduino Microcontroller board to implement an autonomous wheeled robot. This course consists of 3-hours of lecture and 3-hours of lab per week. There were 7 laboratory assignments that allowed the student to learn about programming and interfacing with the required hardware. The course also had two projects. The first project was to control the robot using a Bluetooth connections. The second project was to implement a line following program using an IR sensor. This course was taught using a flipped model with the traditional lecture material being presented using videos. Assessment of this material was performed both on-line and in-class. The in-class “lecture” time focused on activities using the on-line material. While this was the first time we taught this course and our first experience using this flipped format, we are able to provide some results from using this approach. Index Terms – Arduino, Embedded Systems, Robotics, CS1. INTRODUCTION California Polytechnic State University’s (Cal Poly) Computer Science and Computer Engineering programs require a 4-unit Introduction to Computing course that proceeds CS1 (intro to programming). This course is intended to introduce the students to the depth and breadth of the computing majors. The students have a choice between five different versions of this course including Digital Entertainment (Games), Music, Electronic Art, and Security. The version we implemented focused on embedded systems and robotics. This 4-unit course is offered in the first quarter of the students’ freshmen year. No programming experience is expected or required. The course consists of 3-hours of lecture per week and 3-hours of lab. The embedded system version we implemented involved the use of an Arduino microprocessor board and other hardware to implement an autonomous line following robot. [3], [7] We implemented this course as a flipped course with video and on-line material covering the traditional “lecture” part of the course and individual and team based activities in the classroom. The lab component of the course focused on building and programming the students’ robots. STUDENTS This course consisted of Computer Engineering, Computer Science and Software Engineering students. The course was taught in two sections of approximately 30 students each. This course assumes no previous programming experience for the incoming students. While it is not intended as solely a programming course, a main component of the grade is the robotic projects. One of the main issues encountered by introductory to computing courses is the wide disparity in programming skills of the incoming freshmen. Based on a survey of the 63 students in the course 35% of the students identified as having significant programming experience and 31% had little to no programming experience. Also, 40% of the students had worked on some type of robotics project or competition during high school. This disparity in skill sets is a known issue for the computing majors. In our College of Engineering this problem seems to be unique to the computing majors. Most other engineering majors do not have a significant component of the major introductory courses taught in a subset of high schools. We address the issue of skill set disparity later in this paper. EMBEDDED SYSTEMS COURSE The focus of this course was on embedded systems. The course used an Arduino Uno Microcontroller board. The students programmed this board using the Arduino Integrated Development Environment (IDE). The students purchased an $85 kit that included all of the hardware for this course. This kit included a two wheel robot, an Uno Figure 1

Transcript of Session T1D Microcontroller Based Introduction to Computer...

Page 1: Session T1D Microcontroller Based Introduction to Computer ...fyee.asee.org/FYEE2015/papers/5096.pdf · Microcontroller board to implement an autonomous wheeled robot. This course

Session T1D

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-1

Microcontroller Based Introduction to Computer Engineering

Hugh Smith

California Polytechnic State University, [email protected]

Abstract – We developed an Introduction to Computing course focused on embedded systems and robotics. This course is taken by first year Computer Science and Computer Engineering students. This course uses a number of hardware components including a Bluetooth board and IR sensors to interface with an Arduino Microcontroller board to implement an autonomous wheeled robot. This course consists of 3-hours of lecture and 3-hours of lab per week. There were 7 laboratory assignments that allowed the student to learn about programming and interfacing with the required hardware. The course also had two projects. The first project was to control the robot using a Bluetooth connections. The second project was to implement a line following program using an IR sensor.

This course was taught using a flipped model with the traditional lecture material being presented using videos. Assessment of this material was performed both on-line and in-class. The in-class “lecture” time focused on activities using the on-line material. While this was the first time we taught this course and our first experience using this flipped format, we are able to provide some results from using this approach. Index Terms – Arduino, Embedded Systems, Robotics, CS1.

INTRODUCTION

California Polytechnic State University’s (Cal Poly) Computer Science and Computer Engineering programs require a 4-unit Introduction to Computing course that proceeds CS1 (intro to programming). This course is intended to introduce the students to the depth and breadth of the computing majors. The students have a choice between five different versions of this course including Digital Entertainment (Games), Music, Electronic Art, and Security. The version we implemented focused on embedded systems and robotics.

This 4-unit course is offered in the first quarter of the students’ freshmen year. No programming experience is expected or required. The course consists of 3-hours of lecture per week and 3-hours of lab. The embedded system version we implemented involved the use of an Arduino microprocessor board and other hardware to implement an autonomous line following robot. [3], [7]

We implemented this course as a flipped course with video and on-line material covering the traditional “lecture” part of the course and individual and team based activities in

the classroom. The lab component of the course focused on building and programming the students’ robots.

STUDENTS

This course consisted of Computer Engineering, Computer Science and Software Engineering students. The course was taught in two sections of approximately 30 students each. This course assumes no previous programming experience for the incoming students. While it is not intended as solely a programming course, a main component of the grade is the robotic projects.

One of the main issues encountered by introductory to computing courses is the wide disparity in programming skills of the incoming freshmen. Based on a survey of the 63 students in the course 35% of the students identified as having significant programming experience and 31% had little to no programming experience. Also, 40% of the students had worked on some type of robotics project or competition during high school.

This disparity in skill sets is a known issue for the computing majors. In our College of Engineering this problem seems to be unique to the computing majors. Most other engineering majors do not have a significant component of the major introductory courses taught in a subset of high schools. We address the issue of skill set disparity later in this paper.

EMBEDDED SYSTEMS COURSE

The focus of this course was on embedded systems. The course used an Arduino Uno Microcontroller board. The students programmed this board using the Arduino Integrated Development Environment (IDE). The students purchased an $85 kit that included all of the hardware for this course. This kit included a two wheel robot, an Uno

Figure 1 Robot with Bluetooth and IR sensors

Page 2: Session T1D Microcontroller Based Introduction to Computer ...fyee.asee.org/FYEE2015/papers/5096.pdf · Microcontroller board to implement an autonomous wheeled robot. This course

Session T1D

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-2

Microcontroller board and the other hardware components needed to control the robots movements.

As discussed below there were weekly lab assignments that allowed the students to learn the basics for programming their Uno board and then to control the hardware needed for the robot. There were two main projects for this course. The first project was due six weeks into the quarter. This project involved the use of wheel encoders and Bluetooth to control the movement of the robot. The final project for the quarter was the implementation of a line following algorithm using IR sensors.

DEVELOPMENT ENVIRONMENT

The Arduino ecosystem includes multiple microcontroller boards all based on ATMega microcontrollers from Atmel, multiple shields that allow for simple attachment of hardware to the microcontroller board and an IDE for programming the board. [1]. [5]

Ease of use of both the hardware and software makes the Arduino ecosystem work well for teaching students about embedded systems. The Arduino Uno board used in this class provides 16 digital I/O pins, 5 analog input pins, and a USB connection for programming the device.

The real power of this ecosystem comes from the Arduino IDE and libraries that come with the IDE. The IDE runs on Linux, Mac OSX and Windows. This programming environment hides much of the details of the microcontroller and lets the students focus on programming the device without worrying about correctly configuring pins and other chip related configuration.

The language supported by the IDE is C++ but much of the details of C++ are hidden from the programmer. The environment lets the students directly access I/O pins to receive input and control devices. The IDE also allows the programmer to debug the program running on the microcontroller via the same USB connection used for programming the Uno board. The programmer can write

simple print commands that will send the output to the Arduino IDE running on the student’s computer. The IDE provides a terminal window to show the results of these print commands.

To teach the students how to decompose a problem we introduced the students to state diagrams and state machines. Many embedded systems can be represented by state diagram due to the asynchronous nature of their inputs and outputs. Designing using state diagrams allowed us to teach the students a process for decomposing a word problem into something they can program. The process for going from a state diagram to a state machine implementation is fairly straight forward. Not only does this give the students a process for developing their embedded system but also forces them to decompose the problem before starting to implement a solution.

There were seven laboratory assignments in addition to the two projects. These labs introduced programming concepts as well as introducing the students to the hardware needed for their projects.

Laboratory Assignments

1) Introduction to the Uno Board, LEDs and IDE 2) Implementing State Machines 3) Introduction to C++ objects 4) Configuring and using the Bluetooth module 5) Motors and the L293D chip 6) Wheel encoders (project #1 due this week) 7) IR sensors

FLIPPED CLASSROOM

This was my first experience with flipping a course. In a flipped course the students spend time outside of the classroom learning the material and the classroom “lecture” time is spent on activities that reinforce this material. In a flipped course the outside material typically consists of watching videos, reading textbooks and looking at websites. Since this was my first experience flipping a course, we were only able to provide on-line material for the first 6 weeks.

To present the on-line material we used Cal Poly’s learning management tool called PolyLearn. The course material was broken up into one or two week modules. These modules provided the students with videos covering the material, slides from the videos and source code to review. We created the videos using a combination of PowerPoint slides, the Explain Everything app on a Samsung tablet and Camtasia for video editing. [4]

In addition to the on-line material, each module included an on-line quiz. The intent of this quiz was to motivate the students to go through the on-line material. While the quiz provided some assessment of their understanding of the material, the intent of these on-line quizzes was primarily motivational.

Figure 2

Line Following Robot

Page 3: Session T1D Microcontroller Based Introduction to Computer ...fyee.asee.org/FYEE2015/papers/5096.pdf · Microcontroller board to implement an autonomous wheeled robot. This course

Session T1D

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-3

The in-class “lecture” component of the course was focused on activates to reinforce the material reviewed outside of class. These activities included an in-class quiz the day after the on-line quiz was completed. This individual quiz allowed me to assess how well the students had learned the on-line material.

Following this in-class quiz the students broke up into predetermined groups of 4-6 students and took the same in-class quiz as a group. This group quiz allowed the students to work through the material with their peers in order to come up with the correct solution.

The remainder of the “lecture” time was spent on a number of activities. These activities included creating state diagrams, implementing state machines, and answering questions on the material. Any remaining time was spent on the laboratory assignments and the two projects.

RESULTS

Overall we felt the flipped version of the course worked well. Many of the students commented that the videos were nice because the students could watch them at their own pace. The students also enjoyed the team based quizzes and asked for more of these. From an instructor perspective the team based quizzes worked very well. It was rewarding to watch the students discuss in depth the concepts presented in the video in order to convince other team members that their answer was correct.

The creation of the flipped material took a significant amount of time. Even though we spent more time preparing for this course than any other course, it fell short of our expectations. We are scheduled to teach this course again in the fall 2015 and plan to use the same flipped approach. Having many of the videos already created will significantly reduce the preparation time.

Other results: 1) Hardware – Identifying and creating the hardware kits

took a significant amount of time. We are currently looking for a prepared kit that will save time and expense.

One issue with using a hardware based approach is that it introduces another variable to learning how to program. While the Arduino environment is helpful, problems with hardware (e.g wiring, parts in backwards) add another level of complexity to teaching a student to program.

2) Arduino Uno Board issues – The Revision 3 (R3) of the Uno board has sporadic problems with uploading software. Each week multiple students would waste up to an hour trying to work around this problem. This is a known issue with these boards. This coming fall we are using the SparcFun Redboard [2]. This Uno compatible board uses a different approach to upload programs. Based on our testing the Redboard does not have these uploading issues.

3) Differences in student programming skills – In this course 1/3 of the students came into the course with strong programming skills and 1/3 of the students had

no programming skills. This caused a number of problems. The students without programming experience were intimidated by the experience students. This creates a two tiered class with some students getting lost while other students are bored. Creating a curriculum including lecture, lab and projects for these two skill sets is almost impossible.

We are currently looking at different solutions to this problem. These include having the skilled students act as team leaders or creating a special section of the course for the experience students. We are also planning on coaching students with AP credit in computer science to skip this course.

4) State diagrams - From a pedagogical perspective, teaching problem decomposition using state diagrams seems to be an effective approach. The biggest complain for using this approach came from the experienced programmers. While they did not have any formal way to decompose problems they resisted learning a formal technique.

Since this is the first time we taught this course,

assessment of its effectiveness is still an open question. We have a significant amount of long term data from students taking previous sections of this course. This data includes first year student retention and student performance in future computing courses. Sometime this summer we will receive the first look at how this embedded system course compares to our other approaches.

CONCLUSION

This work looked at two questions regarding teaching an introduction to computing course. First, was using an embedded systems approach using the Arduino ecosystem an effective approach to teaching an introductory course. Second, was this embedded systems approach amendable to being taught in a flipped manner.

We do not feel we have an answer to the first question. The problems with hardware hampered our ability to teach other topics. Missed wiring, Arduino problems and other hardware issues can take significant time to address. This time takes away from the students learning and also ties up the instructor for long periods of time.

Regarding the second question, the use of a flipped model for this type of course, we feel strongly that this type of course is very conducive to using the flipped model. Much of the material covered work well in video and this allowed us to utilize the “lecture” time to reinforce and practice this material.

REFERENCES

[1] www.atmel.com

[2] SparkFun Redboard (https://www.sparkfun.com/products/12757)

[3] Cambron, M. “Using the Arduino in Freshmen Design”, Proceedings of the 6th FYEE Conference, August 7-9, 2014

Page 4: Session T1D Microcontroller Based Introduction to Computer ...fyee.asee.org/FYEE2015/papers/5096.pdf · Microcontroller board to implement an autonomous wheeled robot. This course

Session T1D

7th First Year Engineering Experience (FYEE) Conference August 7 – 8, 2014, College Station, TX T1D-4

[4] Saterbak, A., Muscarello, A., and Wettergreen, M. “Workshop: Developing Videos and Support Materials for First-Year Engineering Design Courses”, Proceedings of the 6th FYEE Conference, August 7-9, 2014

[5] www.arduino.com

[6] Jamieson, P., “Arduino for Teaching Embedded Systems. Are Computer Scientists and Engineering Educators Missing the Boat?” Proceedings WorldComp 2010.

[7] Balasubramanian, R., York, Z., Dorran, M. Biswas, A., Girgin, T., Sankaralingam, K., “Hands-on Introduction to Computer Science at the Freshman Level”, Proceedings SIGSCE, March 05-08, 2014.

[8] Summet, J., Kumar, D., O’Hara, K., Walker, Ni, L., Blank, D., Balch, T. “Personalizing CS1 with Robots”, Proceedings SIGSCE, March 3-7, 2009.

AUTHOR INFORMATION

Hugh Smith Associate Professor, Department of Computer Science, Cal Poly, [email protected]