NI LabVIEW and myRIO enhance teaching of mechatronics
Posted to News on 28th Nov 2015, 10:31

NI LabVIEW and myRIO enhance teaching of mechatronics

The Wolfson School of Mechanical and Manufacturing Engineering at Loughborough University has used LabVIEW and myRIO to develop lab experiments, based on a robotic football game, to boost student engagement and comprehension when learning about programming and hardware integration.

NI LabVIEW and myRIO enhance teaching of mechatronics

Although Mechatronic design is a key part of the MEng Mechanical Engineering degree programme at Loughborough University's Wolfson School of Mechanical and Manufacturing Engineering, students often struggle to realise their designs using traditional textual programming languages due to unintuitive syntax and complex hardware integration. Tools were required that would abstract low-level complexity, enabling the students to focus on design innovation, rather than low-level coding.

Using LabVIEW and myRIO, the hands-on approach to teaching mechatronics systems integration was revolutionised. The resulting lab experiments, based on a robotic football game, boosted student engagement and comprehension, resulting in some of the best student feedback and most sophisticated software designs seen.

A combination of world-class engineering research, innovative industrial partnerships and sporting achievements has made Loughborough University something truly special and distinctive among the UK's universities. This leads to excellent student experiences, resulting in Loughborough recently being crowned University of the Year at the Whatuni Student Choice Awards.

Loughborough created a mechanical and manufacturing engineering programme 15 years ago. Typically 150-185 mechanical students and 90-130 manufacturing and sports technology students are recruited each year for the MEng, BEng and BSc degree programmes, and there is continuous growth in the numbers of MEng students.

Software tools at the School

Traditionally, staff used Matlab from The MathWorks as the primary engineering software tool. However, the adoption of LabVIEW into research activities has grown quickly over the past decade. Most research groups, including dynamics, thermofluids, sports technology, intelligent automation and laser materials processing, now use National Instruments (NI) hardware platforms running LabVIEW software.

Although NI hardware and software have become cornerstones of the research work, they have not featured strongly in teaching. Students who study modules taught by research staff often use NI hardware and prewritten LabVIEW executables in their lab experiments. However, until recently, LabVIEW programming was not being taught to the undergraduates.

To best prepare undergraduates for industry and advanced research, it is vital that universities expose students to the tools and techniques they may encounter throughout their future careers. With the growing trend towards software-defined instrumentation and control systems, and the fact that LabVIEW is the industry-standard within this field, it has been apparent for some time that it was necessary to introduce a module for teaching LabVIEW programming to the students, while presenting them with real-world challenges to overcome.

Development of the School's first module based on LabVIEW

Until recently, Loughborough implemented the control and monitoring algorithms taught in the mechatronic module in text-based programming languages such as assembler, C and VB.NET.

However, there was a desire to create a new, engaging lab experiment so students could gain practical experience with common mechatronic components and techniques. As Loughborough is renowned for its engineering and sporting achievements, it seemed fitting to combine the two. As such, the Robotic Table Football (RTFB) lab challenge was introduced. RTFB incorporated a table with raised sides to form a football (soccer) pitch, with a goal at one end. A plastic disc on the table represents the football, while a number of aluminium cylinders represented the opposition players.

A webcam is mounted above the table to deliver a birds-eye view of the pitch. The student teams have to process the video streams to identify and locate the positions of the players and the ball. Subsequently, the students use this information to calculate a clear, vector shot-path to the goal, while intelligently avoiding the randomly positioned players.

The students then design and program a kicker - a mechanical actuator mounted on an X-Y motion stage. The students also design control strategies that move the kicker to the appropriate position on the pitch before taking a shot at the goal.

Image

Figure 2. The Robotic Table Football (RTFB) task layout. The path to goal can be direct or via a rebound off the wall.

With little money or time, a set of basic RTFB rigs was manufactured in house. This initial, low-cost solution was required as a stopgap until funding was available to develop higher-quality rigs. At that time, a preprogrammed microchip PIC, which communicated with a host PC through an RS232 serial interface, controlled the kicker. The students developed Visual Basic code that acted in a supervisory, SCADA, capacity.

However, with this initial RTFB rig, students were not gaining exposure to industry-grade equipment that they would encounter in their future careers. Therefore, in 2013, when funding became available, the rigs were redesigned using commercial microstepping drives, high-precision lead screws, ceramic-coated slides, high-quality linear bearings, incremental encoders and machine vision cameras.

Image

Figure 3. The refined table football rig with the ball (plastic disc), opposition players (aluminium cylinders), and student-designed kicker.

A secondary goal of the redesigned RTBF rigs was to reduce the amount of time students spent on coding, empowering them to focus on design and experimentation. In light of the success of the research groups, LabVIEW was an obvious software choice. LabVIEW delivers advanced analysis and signal processing libraries, powerful image processing functions, highly customisable user interfaces, and easily scalable software architectures. Essentially, LabVIEW delivered everything that was needed to boost student productivity.

However, computational hardware was initially more problematic because of the very strict requirements. A powerful, flexible, and industrially relevant embedded controller was needed that was also inexpensive and student-friendly. Fortunately, one month into the redesign, NI released the myRIO embedded controller, which perfectly suited the needs.

The myRIO device integrates a dual-core ARM processor and an all-programmable FPGA for exceptional power and flexibility. The out-of-the-box FPGA personality for myRIO is designed for industrial control applications, so it delivers all the functionality required for the RTBF rigs. However, the ability to completely customise the FPGA will benefit future lab experiments.

Additionally, myRIO incorporates a wide range of analogue and digital I/O, which simplified integration with the RTBF rig's stepper and DC motors, incremental encoders, switches, machine potentiometers, solenoids and microstepping drives.

LabVIEW training and support

Through discussions with peers at other UK universities who had already integrated LabVIEW into their curricula, it was apparent that students become proficient in LabVIEW programming far more quickly than traditional textual languages. This is largely because the graphical programming paradigm aligns more with a typical engineering mindset. As such, rather than developing a prerequisite LabVIEW module, it was decided to teach the fundamentals of graphical programming in the first five weeks of the mechatronics module. This would allow students to gain enough LabVIEW proficiency that they could focus on solving the RTBF challenge for the rest of the semester.

To help Loughborough staff train their students, NI delivered a week-long professional LabVIEW course at the university. The training was practical and comprehensive, and the accompanying documentation simplified the dissemination of best programming practices to the students.

Additionally, to introduce students to myRIO during the first few weeks of the module, the myRIO Starter Accessory Kit was purchased, which includes a range of common sensors and actuators for basic myRIO projects. These accessories were used in conjunction with the myRIO Project Essentials Guide, a free multimedia learning resource available on ni.com. By following the mini-projects described in the myRIO Project Essentials Guide, the students quickly became captivated. The initial concern that students would not adapt to LabVIEW quickly disappeared.

Delivery and implementation

The mechatronic module is almost entirely experiential, with lectures only delivered on the first day. The team assessment of the RTBF challenge is inspired by a competitive tendering scenario, something called 'Satisfying the Customer.' Continuous assessment includes log books, reports, risk management, project planning, competitive presentations, and a technical demonstration of the final RTBF solution to an external 'customer.'

The structure for the one-semester module is:

  • Week 1: Introduction and lectures
  • Weeks 2-5: Students complete LabVIEW Core 1 online, machine vision tutorials, exercises from the myRIO Project Essentials Guide and design the RTBF kicker
  • Week 5: Assessment of project plan and progress, complete kicker design
  • Weeks 6-8: Development of RTFB control code and manufacture the kicker
  • Week 9: Demonstration image processing code and kicker control, customer representatives from NI present for the assessment
  • Weeks 10-11: Develop the final RTFB solution
  • Week 12: Customer Acceptanc""present and demonstrate final solution to external customer
  • Week 13: Submission of report

Image

Figure 4. View from the goal mouth.

Student feedback

The quality of work from students was unprecedented. Student feedback has been entirely positive, with lots of praise for the new module structure. Outside of the official module feedback forms, glowing feedback was received on reports and unsolicited student emails, thanking the teaching staff for the opportunity and experience.

For instance, one student commented, "Having completed nearly five years of the mechanical engineering programme, I would have liked to have accessed more real-world hands-on engineering opportunities. For me, the new mechatronics module was a highlight of the course - allowing us to develop both practical design skills and technical coding expertise, which we could not have achieved with lectures alone. Also, the ease-of-use of LabVIEW enabled us to quickly try out complex ideas to further improve our work."

Final thoughts

In previous incarnations of the module, students had to develop their own code for tasks such as object recognition and motion control. Although code planning is still encouraged, LabVIEW allowed the students to leverage prebuilt functionality to program with immediate results.

Using standalone tools, such as the Vision Assistant, students can experiment with ideas and rapidly prototype processing algorithms before lower-level implementation in LabVIEW. The NI tool chain accelerated the speed of development, empowering students to deploy solutions that easily match the complexity of previous generations in half the time and with significantly fewer frustrations.

Figure 5. An Example of a Student-Designed User Interface. Notice that LabVIEW highlights the detected players, ball and pitch, and the potential shot-paths on the video stream.

LabVIEW and myRIO have benefited the mechatronic module in many ways, including accelerated code development, superior user interface design, increasingly sophisticated control implementations, and a renewed focus on algorithm design rather than low-level coding. The adoption of NI technologies resulted in a marked increase in student engagement, which naturally led to improved grades and the best system implementations to date. In summary, the overhauled mechatronics lab has been a resounding success, and the staff are look forward to deploying more teaching based on LabVIEW in the future.

More information


National Instruments Corporation (UK) Ltd

Measurement House, Newbury Business Park
London Road
RG14 2PZ
UNITED KINGDOM

+44 (0)1635 523545

Bosch Rexroth SICK (UK) LTD ABSSAC Ltd Pilz Automation Ltd Procter Machine Safety Mechan Controls Ltd AutomateUK Machinesafe Compliance Ltd Heidenhain (GB) Ltd PI (Physik Instrumente) Ltd Dold Industries Ltd Aerotech Ltd Rittal Ltd WEG (UK) Ltd Euchner (UK) Spelsberg Els UK Ltd STOBER Drives Ltd Smartscan Ltd Phoenix Contact Ltd AutomateUK Kawasaki Robotics (UK) Ltd Leuze electronic Ltd Murrelektronik Ltd FATH Components Ltd HARTING Ltd Servo Components & Systems Ltd M Buttkereit Ltd Micro Epsilon UK Limited