Asee peer logo

Teaching MATLAB and C Programming in First-year Electrical Engineering Courses Using a Data Acquisition Device

Download Paper |

Conference

2015 ASEE Annual Conference & Exposition

Location

Seattle, Washington

Publication Date

June 14, 2015

Start Date

June 14, 2015

End Date

June 17, 2015

ISBN

978-0-692-50180-1

ISSN

2153-5965

Conference Session

Division Experimentation & Lab-oriented Studies: Electrical and Computer Engineering Labs

Tagged Division

Division Experimentation & Lab-Oriented Studies

Tagged Topic

Diversity

Page Count

11

Page Numbers

26.1480.1 - 26.1480.11

DOI

10.18260/p.24817

Permanent URL

https://peer.asee.org/24817

Download Count

618

Request a correction

Paper Authors

biography

Phillip Wong Portland State University

visit author page

Phillip Wong received an M.S. degree in electrical engineering from Carnegie Mellon University in 1990. Since then, he has been with Portland State University, Oregon, USA, where he is currently the ECE Lab Coordinator and an instructor.

visit author page

biography

Branimir Pejcinovic Portland State University

visit author page

Branimir Pejcinovic received his Ph.D. degree from University of Massachusetts, Amherst. He is a Professor and former Associate Chair for Undergraduate Education at Portland State University, Electrical and Computer Engineering department. In this role he has led department-wide changes in curriculum with emphasis on project- and lab-based instruction and learning. His research interests are in the areas of engineering education, semiconductor device characterization, design and simulation, signal integrity and THz sensors. He is a member of IEEE and ASEE.

visit author page

Download Paper |

Abstract

Teaching MATLAB and C Programming in First Year Electrical Engineering Courses Using a Data Acquisition DeviceA complaint often expressed about newly graduated electrical engineering (EE) students is thatthey have insufficient programming skills. In a traditional undergraduate EE curriculum, one ortwo programming courses compose the entirety of the student’s training in programming. Thecourses are often taught by the computer science department without any engineering emphasis.While the fundamentals may be well covered, the ability to apply the knowledge to practicalengineering problems is frequently lacking. Students may lose interest in programming due to aperceived disconnect between practice exercises and real-world applications. As a remedy, someEE departments have incorporated inexpensive microcontrollers into their own programmingcourses. These units have digital and analog ports for interfacing sensors and other circuitry,which are controlled by user-written programs. Adding a hardware component offers anopportunity to increase student engagement by reinforcing programming concepts with relevantand fun hardware projects.Our university’s first year electrical engineering sequence includes two courses that involveprogramming and hardware interfacing. Both are taught by the EE department itself. The firstintroduces engineering problem solving using MATLAB. The follow-on course focuses on the Clanguage. Although Arduino and Raspberry Pi microcontrollers are popular choices forinterfacing projects, we selected a LabJack data acquisition device instead so that students couldlearn to program in the language’s native environment. Code is developed and executed on aseparate host computer, which then communicates with the LabJack over a USB connection.MATLAB scripts to control the LabJack can be written in the standard MATLAB environment.Similarly, industry standards such as Microsoft Visual C/C++ or the GNU C/C++ compiler canbe utilized as development tools. With a common API for both languages, the LabJack eases thetransition between the two courses, since students are already familiar with the command set.We have devised a series of in-class and laboratory exercises to advance student learning ofprogramming. Students make progress along this path:One or a few lines of statements to solve simple engineering problems → short self-containedscripts to solve more sophisticated problems → simple LabJack scripts to read sensors → fullprogram control of a complex system with LabJack serving as the interface.This cycle is used first with MATLAB and then in C, so the experience gained in the initialcourse carries over to the second. Examples of in-class and lab exercises will be provided.Projects are another major component of our courses. Over several years, our students havedeveloped LabJack-based projects that range from games such as Wheel of Fortune and Simon(with switches and LEDs) in the first course to more sophisticated fare such as light trackersusing photocells and motors, music synthesizers, multiplexed LED timers, and home alarmsystems in the second. A high rate (> 95%) of successfully completed projects suggestsimproved comprehension of programming topics such as loops, data structures, and debugging.Feedback from students has indicated a higher level of interest and motivation, with theintegrated software/hardware projects being an important factor in their achievement.

Wong, P., & Pejcinovic, B. (2015, June), Teaching MATLAB and C Programming in First-year Electrical Engineering Courses Using a Data Acquisition Device Paper presented at 2015 ASEE Annual Conference & Exposition, Seattle, Washington. 10.18260/p.24817

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2015 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015