From Zero to NI myRIO: Students Design Real Embedded Systems in Two Weeks

"We chose LabVIEW and NI myRIO because the flexible platform helped us get projects going in a short time frame. Also, we wanted to expose the students to a new programming paradigm that could broaden the undergraduate engineering experience."

- Dr. Harry Powell, Electrical and Computer Engineering, University of Virginia

The Challenge:

Teaching students a new programming environment and completing embedded programming projects in two weeks as a trial for expanding this approach to semester-long courses.

The Solution:

Using NI LabVIEW system design software and NI myRIO hardware, students can learn advanced embedded concepts and immediately put them into practice, which helps them master the course content and learn a new tool set for tackling engineering challenges in the future.

 

Designing Real Systems, Fast

Over the winter holiday, University of Virginia students can enroll in two-week courses (called JTERM) that equate to a three-hour semester course. Students voluntarily enroll and can choose a topic that interests them. One option is a course on embedded programming with LabVIEW that provides a contrast to the traditional C embedded course that the students have previously taken. Using LabVIEW, students can appreciate the unique benefits of a graphical programming language and challenge themselves to see what they can accomplish in a short amount of time.

 

We designed the course as a pilot to test the viability of NI myRIO and LabVIEW for an experimental full-semester, model-based course. One goal was to see how well a small group of students that had never seen LabVIEW could learn the environment and develop a workable project. We chose LabVIEW and NI myRIO because the flexible platform helped us get projects going in a short time frame. Also, we wanted to expose the students to a new programming paradigm that could broaden the undergraduate engineering experience.

 

This endeavor was exciting, but not without challenges. Designing a course with eight hours of class each day for two weeks of student vacation time and keeping students engaged was difficult. We incorporated some exercises from LabVIEW Core 1 and LabVIEW Core 2 and conducted the class in an interactive fashion with a mix of lecture and programming. This broke the day up and kept students engaged. In addition to the LabVIEW Core materials, we worked some of our own short answer quizzes into the class, which provided frequent breaks. This approach also helped us spot areas in which the students lacked understanding, so we could tailor course content during the class.

 

 

After completing a basic LabVIEW introduction, students worked in teams to build a smart four-way stop sign in LabVIEW on their laptops. This project referenced an infamous four-way stop at the edge of our campus where nobody obeys the traffic rules. The program used parallel loops and a first in, first out (FIFO) method to feed simulated traffic data to a separate loop that ran a state machine to control the simulated lights.

 

Once the students had the program running on a laptop, they moved it to an NI myRIO device. The students were impressed with how well they could move between the two environments—desktop Windows and an embedded real-time OS. One of the more ambitious groups used the accelerometers on the NI myRIO to insert “cars” into the queues for each direction and appreciated how well the hardware could be merged into an existing program without requiring major changes.

 

After this, students took some of the projects that we had previously done in our Introduction to Embedded course and repeated them on the NI myRIO device. I designed an adapter board that would allow students to use preexisting header boards for our TI Launchpad experiments with the NI myRIO. They then chose several projects at random to implement from the high-level perspective of LabVIEW, after having seen the same ones at an extremely low “bit-banging” perspective on the Launchpad. One involved reading a rotary encoder and displaying its count on a seven-segment display. Students also did a control theory exercise based on pulse-width modulation control of a small DC motor and position feedback.

 

 

Developing Skills for Future Classes

At the end of two weeks, 11 of 13 students, who had no previous LabVIEW knowledge upon entering the course, passed the Certified LabVIEW Associate Developer exam. All of them were actively interested in the class and eager to continue learning with this approach. Following the JTERM course, we offered a semester-long course called Model-Based Embedded Computing that used the NI myRIO in conjunction with iRobots. Many of the students who had taken the JTERM course over winter break elected to take this new class and used their LabVIEW and real-time skills.

 

We are overhauling our curriculum and expanding our Introduction to Embedded course to four hours instead of three. One of our goals is to introduce LabVIEW and real-time platforms, for which the NI myRIO is an ideal candidate. We also want to introduce an advanced embedded computing course using the NI myRIO, and the lessons and techniques that were learned in the JTERM course will be useful. We plan to offer the JTERM course again. We also plan on introducing a master’s degree in embedded computing in 2015, and we see the NI myRIO as a key component in that curriculum.

 

Conclusion

In just two weeks, our students learned a new programming language, paired it with powerful embedded hardware, and completed meaningful, sophisticated projects. We successfully evaluated and validated this approach for use in future courses, and most importantly, equipped our students with knowledge that is already benefitting them in subsequent classes. We are excited about the possibilities with LabVIEW and NI myRIO and look forward to continuing to use these tools in our undergraduate and graduate curriculum.

 

Author Information:

Dr. Harry Powell
Electrical and Computer Engineering, University of Virginia

Figure 1. After completing a basic LabVIEW introduction, students worked in teams to build a smart four-way stop sign in LabVIEW on their laptops.
Figure 2. Once the students had the program running on a laptop, they moved it to an NI myRIO device.
Figure 3. In just two weeks, our students learned a new programming language, paired it with powerful embedded hardware, and completed meaningful, sophisticated projects.