Content area
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.
Details
Scripts;
Students;
Sensors;
Hardware;
Engineering education;
Matlab;
Analog circuits;
Timing devices;
Curricula;
Complex systems;
Synthesizers;
C (programming language);
Circuits;
Electrical engineering;
Problem solving;
Photoelectric cells;
Industry standards;
Light emitting diodes;
Data structures;
Debugging;
Computer engineering;
Data buses;
Switches;
Visual programming languages;
Visual C;
Computer science;
Comprehension;
Music;
College students;
Engineering;
Computer mediated communication;
Data;
Motivation;
Teaching;
Student participation;
Languages;
Learning;
Feedback;
Educational activities;
Acquisition;
First year;
Ability;
Ports