cancel
Showing results for 
Search instead for 
Did you mean: 
Knowledge Base

Student Projects

Top Contributors
Sort by:
mySmartFoosball: Analyse Your Game! Imagine a 'foosball table' that autonomously calculates LIVE match statistics, such as goal scores, ball possession, successful passes, shots on goal... and even announces which of the little plastic footballers was the ‘player of the match!’ Using NI myRIO, an iPad, and a tin of conductive paint, you can add connected intelligence to ANY Foosball table!     The Developer. My name is Leonard Goldschmidt, a Mechanical Engineering student at Loughborough University (UK). As part of my industrial placement year with National Instruments, I have been given a week to design and implement an innovative new gadget or tech demo. This is an awesome opportunity, as this project has engaged my creativity, knowledge and engineering enthusiasm more than ever before! The System Summary. Boosting tools with technology: In recent years, there has been a lot of hype surrounding the modification of regular appliances using simple technology to make them smart. Take your house for example. Commercial companies have modified everything from lightbulbs, to speakers, to kitchen equipment, to thermostats… to allow them to connect them to the web, collect data, and make informed decisions… ie. to become smart!     The game of table football, also known as Foosball, was invented almost 100 year ago. Since then, many engineers/hobbyists have added smart modifications to foosball tables, but most have been focused on creating robotic opponents.     However, I wanted to bring cutting edge technology to Fooseball, whilst maintaining super fun, super competitive human vs human play. I decide to do something I had NEVER seen before… to give the Foosball table the ability to track live game statistics, like those found in a real football match. With this project, I used an NI myRIO embedded controller to give a generic Foosball table a brain.   Using LabVIEW, the myRIO is programmed to…    1. Detect and track any interactions between the ball, the players and the goals    2. Perform data analysis to discern match statistics such as goals, ball possession, successful passes, shots on goal, and even the ‘player of the match’    3. Wirelessly broadcast the results of the analysis to an iPad tablet, to be read by the human competitors.     To sense the interactions with the ball, I decided to use conductive paint – not only would this keep the foosball table modifications simple and cheap, but the conductive paint also would be immune to environmental variations such as lighting (unlike, for example, a webcam).   Conductive paint is already used in multiple applications, such as a this paint-piano.     Ultimately, by defining the system’s intelligence in software and keeping the hardware modifications as simple as possible, I hope that I can enable anyone to modify any existing foosball table. Also, by defining the statistical analysis in software (specifically, LabVIEW), it also allows anyone to quickly implement their own custom match analysis routines.   Want to know which goalie saves the most goals? Which player assisted the most goals or intercepted the most passes? Or which team scores the most own goals? You could very quickly implement these features with tweaks to the software! The Hardware. The entire hardware design was based on a simple, initial theory: “When a player touches the ball, it completes a circuit and a digital signal is sent to a myRIO.”   Once a digital signal is recognised by the software running on the myRIO, I can use it to calculate appropriate statistics. To create this switch-like behaviour, I painted the following parts with conductive paint:     To physically connect to each of the 12 players, I ran individual wires through the various poles used to move the players. Each of the wires was then connected to one of the 40 digital IO lines on the myRIO. In doing this, I could recognise exactly which player is kicking the ball/intercepting a pass, whilst ensuring that the wires did not encroach on the field of play.     To attach the wire to each player, I simply glued exposed wire to the players’ feet (which had been previously covered in conductive paint). This provided a permanent and robust connection, and allowed current to flow when contact is made with the ball. The current is supplied to the entire pitch by the myRIOs built-in 5V supply line. To prevent the ‘power wire’ from interfering with the flow of the game, I attached it surreptitiously to a corner of the pitch.      The only match statistic that could not be reliably sensed by the conductive paint, was the goals. On my specific Foosball table the distance between the back of the goal and the pitch was too great. Instead, I created ‘goal-line technology’ by mounting a laser diode and a light dependent transistor at the mouth of each of the goals. This acts as a light gate, which ‘breaks’ when the opaque football passes through the goal.     Again, I wired the diode and transistor to the digital IO lines on the myRIO, such that a TRUE is read when the goal is clear, and a FALSE is briefly read when a goal is scored. The Software. LabVIEW 2016 (or above) LabVIEW Real-Time Module 2016 (or above) LabVIEW FPGA Module 2016 (or above) myRIO toolkit (2016 or above) NI Data Dashboard (IPad App) To produce the iPad interface, I used a free app called NI Data Dashboard. It is completely configuration based, so no programming was required. This allowed me to create a clean, attractive, responsive touch-based interface within minutes!   Enabling the wireless communication between the iPad and the myRIO was also easy! I simply had to define a number of Network Shared Variables with the appropriate data type, then wire them into my code at the appropriate locations.  By using the FPGA on the myRIO, I utilized the high acquisition speed to ensure no players touch is missed. I then read the FPGA from the RT and used Network Shared Variables to share the data with the IPad. Steps to Run the Project. 1. Ensure that the required software is installed (see above)  2. Connect your myRIO to the PC.  3. Create a Wifi Network from the myRIO. Follow the steps here. 4. Install "NI Data Dashboard" on your IPad. 5. Build your own Smart Foosball Table.  6. Ensure each player is connected to a digital I/O line of the myRIO.  7. Download the attached zip file called "myFoosball.zip" 8. Reconfigure the project to use your myRIO's IP address. 9. Create a Data Dashboard that connects to the network shared variables, using the myRIO Wifi IP Address. (this enables it to work as a stand alone application) 10. Compile the FPGA onto the myRIO.  11. Restart the myRIO, open the dashboard & get playing! The Future of mySmartFoosball. With the fundamental concept of counting the players touches in place, I can massively expand the number of statistics the myRIO processes. Successful passes? Intercepted passes? Own goals? Goal assists? Number of saves? I am only limited by my imagination!   I also want to create an easy hardware and software toolkit, to make ANY Foosball table smart!  Useful resources. Preparing Future Innovators With the NI LabVIEW RIO Architecture   Getting Started with Data Dashboard for LabVIEW Integrating NI Data Dashboard for LabVIEW into your LabVIEW Applications
View full article
  myLightShow: Smart RGB String Lights   Imagine getting a string of LEDs, laying them on the floor in a random order and then them displaying a perfect rainbow.   myLightShow is an LED controller that can find the position of individual LEDs in a random arrangement in order to use them to display patterns. Its modular design allows for any number of LEDs to be used, and it can be controlled from any Wifi-enabled device such as a smartphone, a tablet or a laptop.     The Hardware National Instruments myRIO 1900 5 Volt Power Supply WS2801 Individually Addressable RGB LEDs USB Webcam All the functionality of the myLightShow is made possible by the myRIO. The default FPGA personality of the myRIO is used to send commands to the LEDs using SPI communication. The myRIO's on-board WiFi is used to host the web-service which devices can connect to and control lighting modes and other functions.   We used a Mean Well RQ-125B power supply to power both the myRIO (12V) and up to 150 WS2812 LEDs (5 volts and up to 9 amps). This supply has a minimum current draw requirement on each of its 4 channels, so power resistors have been added to ensure that we don't drop below these currents.   The WS2801 LED driver was used for this project because it makes the LEDs individually addressable and easy to daisy-chain. RGB values for each LED pixel are sent to the drivers using SPI, where a shift register will pull values out of the communication and pass the rest of the commands through to the next driver/LED. We have mounted a table-tennis ball on each LED to improve light diffusion; Making it look much better and also larger, which makes it easier to acquire images of the light. With a more powerful power supply (and more table-tennis balls!), one could light up an entire room with a single myRIO!   We used a Logitech C270 webcam to allow the myRIO to capture images of the LEDs. It is possible to use any USB webcam, but some changes may need to be made to the Vision Acquisition part of the code, where the camera attributes are changed. It was important to change the exposure among other attributes and then process the images further in code in order to allow the myLightShow to calibrate in different lighting environments.   The Software LabVIEW 2017 Vision Development Module LabVIEW Real-Time Module myRIO Toolkit The LabVIEW Real-Time code is written with a queued message handler architecture to keep it readable, maintainable and upgrade-able. Tag messages are generated by a web service which is being run on the myRIO and handled by a real-time process in the main program.   The Vision Development Module is used to enable the myRIO to find the positions of each LED. When the "Calibrate" button is pressed, an LED is lit up red, and an image is then taken by the webcam. The myRIO then processes the image to find the x and y position of the lit up LED, and this process is repeated until every LED has been calibrated. LEDs that are not found by the myRIO are not lit up in the display as we do not know where they are, so would not be synchronised with the patterns.   The x and y co-ordinates of each LED are stored in a file on the myRIO, and automatically loaded whenever myLightShow powers on. This means that you do not need to calibrate them every time you turn them on; just whenever you've moved them!   Steps to Set Up Connect your LED strips and webcam. Plug the power cable into myLightShow. Connect a device to the myLightShow Wifi Network. Go to <IPaddress>:<port>/webservice (For example, ours is 172.16.0.1:8001/webservice). Enter the number of LEDs and press ‘Calibrate’ on your device. Once your LEDs are calibrated, you can switch between patterns using the 'Next Pattern' and 'Previous Pattern' buttons. What next? Due to the modular approach we took, and the architecture used when programming the device, it’s really easy for anyone to expand this project. Personally, we’re really keen to add the following functionality:   Display information with the LEDs; imagine if the LEDs changed colour with the weather outside or showed a specific pattern when you received an email? You could display a notification icon with enough LEDs! Add functionality to display photos with the LEDs, or even videos! We currently don’t have enough LEDs to provide a clear enough image, but it seems very possible! Perhaps this could enable you to use the an LED strip as a screen!? Adding new and interesting patterns; for example, something similar to the old Windows screensaver. Add games to the strip where players can use their phones as a controller.   How can this LED string be useful?  myLightShow is a cosmetic device, however a lot of the key technologies and algorithms which we use here could be used in more industrial applications:  You could use the LED detection algorithm to identify where dead pixels on a TV or monitor are as part of a production line. Large temporary displays where carrying big flat panels would be inconvenient and slow; perhaps at a festival? This is especially useful on uneven surfaces! Communicating with aliens in a time of need. The Developers My name is Kevin, and I worked on the vision acquisition and analysis functionality that made calibration of LED positions a possibility. I am doing a masters in Automotive Engineering at Loughborough University. I particularly enjoyed this project because it showcases the power of machine vision, which can be used extensively in autonomous vehicle navigation systems - an application that I am excited to explore!   Hey, I’m Jack. I focused on the real-time application's architecture, pattern algorithms and the SPI interface for the LEDs. I’m about half way through a Masters in Electrical and Electronic Engineering, also at Loughborough. I’m very interested in gadgets and the way devices are all starting to connect with each other to form the Internet-of-Things, so am excited that you can control the myLightShow with a phone!   If you have any questions or feedback, then feel free to reply below, or reach out to us on LinkedIn.   Acknowledgements  Finally, there are some people which were very important for the success of this project and we’d like to share that here.   Radim Stefan - Radim was the first to locate and control programmable LEDs with a myRIO and served as the inspiration for this project. You can see Radims video here. Sam Sharp - Sam made a fantastic project where you can play Tetris from your phone using a myRIO, and I’m sure you can see how this inspired us. We do, however, have our own implementation of the websockets from the myRIO. Importantly, he also used the same LEDs as we use and therefore we didn’t have to spend time finding the SPI settings for our LEDs as Sam had done the hard work for us! You can see Sam's project here. Amy Duke - Amy let us wrap her in lights for the video!
View full article