Robotic Table Football: Revolutionising Mechatronics Education Using myRIO and LabVIEW

  Print Print

"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."

- Antony Sutton, Wolfson School of Mechanical and Manufacturing Engineering, Loughborough University

The Challenge:
Although Mechatronic design is a key part of our MEng Mechanical Engineering degree programme, students often struggle to realise their designs using traditional textual programming languages, due to unintuitive syntax and complex hardware integration. We required new tools that would abstract low-level complexity, enabling the students to focus on design innovation, rather than low-level coding.

The Solution:
Using LabVIEW and myRIO, we revolutionised our hands-on approach to teaching mechatronics systems integration. 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 we had ever seen.

Author(s):
Antony Sutton - Wolfson School of Mechanical and Manufacturing Engineering, Loughborough University

A combination of world-class engineering research, innovative industrial partnerships, and unparalleled 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 being crowned University of the Year at the Whatuni Student Choice Awards.  

Loughborough created a mechanical and manufacturing engineering programme 15 years ago. We typically recruit 150–185 mechanical students and 90–130 manufacturing and sports technology students for our MEng, BEng, and BSc degree programmes each year. We are seeing continuous growth in the numbers of MEng students.

Software Tools at the School

Traditionally, our staff used The MathWorks, Inc. MATLAB® software 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 NI hardware platforms running LabVIEW software.

Although NI hardware and software have become cornerstones of our research work, they have not featured strongly in our teaching. Students who study modules taught by research staff often use NI hardware and prewritten LabVIEW executables in their lab experiments. However, until recently, we did not directly teach LabVIEW programming to our undergraduate students.

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 we needed to introduce a module to teach LabVIEW programming to our students, whilst presenting them with real-world challenges to overcome.

Development of the School’s First Module Based on LabVIEW

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

We wanted to create a new, engaging lab experiment, so our 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, we introduced the Robotic Table Football (RTFB) lab challenge. 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, whilst a number of aluminium cylinders represented the opposition players.

We mounted a webcam above the table, to deliver a birds-eye view of the pitch. The student teams had 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, whilst intelligently avoiding the randomly positioned players.

The students then designed and programmed a kicker—a mechanical actuator, mounted to an X-Y motion stage. The students designed control strategies that could move the kicker to the appropriate position on the pitch before taking a shot at the goal.


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, we built a set of basic RTFB rigs by manufacturing components in house. We needed this initial, low-cost solution as a stopgap until we had funding 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, we redesigned the rigs using commercial microstepping drives, high-precision lead screws, ceramic-coated slides, high-quality linear bearings, incremental encoders, and machine vision cameras.

 


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 our 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 we needed to boost student productivity.

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

The myRIO device integrates a dual-core ARM processor and an all-programmable FPGA for unprecedented 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 our 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, we learned 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, we 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 our students, NI delivered a weeklong professional LabVIEW course at the university. The training was practical and comprehensive, and the accompanying documentation simplified the dissemination of best programming practices to our students.

Additionally, to introduce our students to myRIO during the first few weeks of the module, we purchased the myRIO Starter Accessory Kit, which includes a range of common sensors and actuators for basic myRIO projects. We used these accessories 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, our students quickly became captivated. Our 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 we call ‘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 Acceptance—present and demonstrate final solution to external customer
• Week 13: Submission of report

Figure 4. View From the Goal Mouth

Student Feedback

We saw an unprecedented quality of work this year. Student feedback has been entirely positive, with lots of praise for the new module structure. Outside of the official module feedback forms, we received glowing feedback on reports and unsolicited student emails, thanking us for the opportunity and experience.

For instance, one student commented, “Having completed nearly five years of the mechanical engineering programme, I would’ve 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 we continue to encourage code planning, LabVIEW allowed our students to leverage prebuilt functionality to program with immediate results.

Using stand-alone 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 we look forward to deploying more teaching based on LabVIEW in the future.


 

Video 1: Scoring an Open Goal and a Complex Rebound Shot

Author Information:
Antony Sutton
Wolfson School of Mechanical and Manufacturing Engineering, Loughborough University
Loughborough LE11 3TU
United Kingdom
a.sutton@lboro.ac.uk

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI