|Software apps and online services:|
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 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.
- 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!
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!