At work, we have a foosball table which gets quite a bit of work and wanted to incorporate it into an IoT hardware project with Azure IoT Suite and Windows 10 Core.
Lasers, Fricken LasersThe first feature to incorporate is the automatic tracking of goals scored to send this telemetry up to Azure as well as produce some effects at the table (LEDs, etc.). For this, we prototyped using an Arduino at each goal connected to a 5V red laser pointing to a photo transistor. The primary challenge we found is that the ball breaks the beam for a very short amount of time so we needed speed. The photo transistor with code running directly on the Arduino was the only way we could achieve this speed.
As each goal is scored, a message is sent over USB serial to a Raspberry Pi Windows 10 IoT Core gateway which forwards this event message to our Azure IoT suite hub for further processing.
Mount up with custom designed and 3D printed brackets to hold the laser and photo transistor in place.
Instant ReplayWhat sporting event is complete without instant replay? Since we are already tracking when goals are scored, why not also capture a clip of the amazing shot? For this, we coupled a Raspberry Pi with a camera which will create a bird-eye view instant replay. To communicate with the goal lasers, we have a second Pi acting as a gateway which will post the goal laser beam break events to Azure as well as trigger the camera to capture an instant replay. This replay gets uploaded to Azure Storage into a BLOB container.
Stats, analytics, machine learning, oh my!Now that we are capturing the goal events and instant replays, it is time to start working with the data. For this, we capture all events into an Azure IoT hub where we store the scored goals into an Azure SQL database used to train our Azure Machine Learning algorithm. This now allows us to predict who the winner will be when any given two teams pair up for a game.
Table-side Touch AppWith all the above working together the package isn't complete without a table-side (or wall mounted in our case) app to log into the game and present the in-progress game data including live predictive analytics. This will be created as a Windows 10 UWP app running on a Surface 3.
By hooking up to the live Azure IoT hubs, we can trigger the display of the instant replay which was captured and uploaded to the cloud.
Future?But we have so much more planned for this project. Some of the ideas we have discussed (and even prototyped) include:
Velocity Estimation - We plan on mounting lasers throughout the playfield to track the ball as it is shot across the table. This telemetry is sent directly to Azure IoT Hubs where it will be process with Streaming Analytics to produce a speed gauge in the table-side UI.
Instant Reply Button - Why wait for a goal to capture an instant replay of an amazing shot or save? Let's toss some momentary arcade buttons at each goal and trigger one on our own.
Social / SMS Integration - Just shamed your team by scoring on yourself? Let the entire office know with a text message broadcast or tweet including a link to the instant replay.
Log in with NFC - Instead of walking over to the wall to login via the table-side UI (that 3 foot walk is devastating) drop your NFC/RFID card from work on the table and we'll do the work for you.
Comments
Please log in or sign up to comment.