Mosaic Stadium LED Wristbands (2016)
For the last Saskatchewan Roughrider game ever held at Mosaic Stadium at Taylor Field, Mosaic wanted to give the stadium a sendoff befitting a location that had been at the heart of the community for 80 years. While competitors' solutions were priced in the millions, Captive sourced some inexpensive hardware from overseas and dropped it in my lap to have me figure out how to make the final game something to remember. And they gave me two weeks to do it.
|Client||The Mosaic Company|
The commemorative bracelets that were distributed to fans at the final game.
The project was to distribute wirelessly controlled LED bracelets to each fan that attended the final game, and use the lighting to both enhance the football game as well as to act as a key component of the post-game celebrations and presentation.
The hardware sourced claimed the ability to control the bracelets from a computer as well as a several hundred metre range. Both components were important - for scripting the show, and so that the range of the transmitters would be able to effectively cover the entire stadium. As is typical with these sorts of projects, neither claim turned out to be true.
In the end, I was given approximately two weeks. I reverse engineered the software provided to develop software which would meet our needs, developed a networked system for controlling multiple transmitters including integrating a Raspberry Pi inside the transmitter case itself so I could remotely push the rest of the buttons on the controller, ran 1,400' of ethernet cable through the stadium, put on a fall harness and installed the hardware on the roof in packaging I had assembled in order to weatherproof it, coordinated with the Riders, the tech crew, Mosaic, the pyro company and other stakeholders to develop the lighting cues for the bracelets, then was present on game day to make it all happen while the ceremony was broadcast live over TSN across the country.
Part 1: Reverse Engineering, Proof of Concept
The controller—before its trip to the healing bench.
After confirming basic functionality with the initial hardware samples, the first step was to test and evaluate whatever computer control functionality was provided with hardware.
On installing the software, this was found to simply be a picture of the hardware controllers provided, with the ability to essentially press the buttons on the controller over USB. There was no automation or scripting available. And none of it in English.
The software provided was a .NET program, using a library that some quick Google work revealed was from Cypress Semiconductor for communication with the microcontroller within the hardware unit. Running the provided software through a .NET decompiler allowed me to determine the control codes used to trigger specific buttons.
I was able to quickly develop a proof of concept application that allowed scripting simple commands and having the application communicate them correctly to an attached wireless transmitter.
Part 2: Viable Product, Nice-To-Have Features
Expanding the proof of concept out, it was developed into a full-fledged scripting system for the controllers. Drawing on my experience in theater productions, I set the system up to allow an operator to load shows consisting of a number of cues which could be run as necessary.
In order to allow synchronizing multiple channels, I borrowed a camera from our content department, shot video of various operations on the bracelets, and determined precise timings by examining them in Adobe Premiere. The scripting language allowed declaring multiple commands, then executing a commit command with a specific synchronization interval. The software would calculate all the required delays to line up commands between multiple channels of bracelets.
I attended meetings and coordinated with the production staff at the stadium to obtain the script for the show and the videos being presented to give me an opportunity to design the lighting that was to go along with the videos.
set global colour=yellow wait delay=11962 // @12.712 set global off wait delay=3254 // @16.716 set global colour=white wait delay=2996 // @20.462 set global colour=yellow wait delay=3078 // @24.290 set global colour=purple wait delay=3188 // @28.228 set global colour=yellow speed=moderate set b speed=fast set f speed=fast set d speed=fast wait delay=7761
(An excerpt of a script to synchronize the bracelets to one of the videos produced for the final ceremony.)
Part 3: No plan ever survives its first encounter with the enemy.
Science experiment in progress.
After some initial tests in the stadium itself, it was quickly determined that the range of the transmitters was significantly less than specified. That left two options: increase the transmitter power, or increase the number of transmitters. The only realistic option was adding more transmitters.
The initial plan was setting up a computer with each transmitter, and networking those together. To that end, the software was extended to allow connecting multiple transmitters together and controlling them all from a single location. The software constantly measured latency between the devices and added artificial delays to try and keep the transmissions from each transmitter as close to in-sync as possible.
The snag came when it came time to make use of the "music synchronized" mode of the wireless wristbands for the halftime show. That would require both getting the audio across ethernet as well as finding some way to trigger the "MODE" button on the controller to switch it from "Computer Controller" to "Audio" and back.
The audio was solved after testing a bunch of different streaming audio solutions to find one that allowed for low latency streaming.
The mode switching proved to be a bit less obvious, but we were already well outside the bounds of what the supplier had ever imagined for this hardware, so putting one on the bench and taking the soldering iron to it wasn't a huge leap to take.
A Raspberry Pi computer was added in some of the empty space in the back of the unit (it was quite large to accommodate the mass of buttons on the front). A single transistor across the necessary button, a GPIO pin from the Raspberry Pi, and a wire connecting the grounds of both units' respective power supplies, and it all worked. I had a way to control the mode of the controller over ethernet.
Part 4: Final Tests
We did a full setup at the stadium during one of the Saskatchewan Roughrider games played there and sent staff around the stadium to test reception with the bracelets and ensure we didn't cause or receive any unacceptable interference.
It went okay.
Part 5: Now or Never
Game day came. Showed up. Set up. Sat around in the freezing cold for hours. Ran our show. Everything worked as intended, and about as well as we could have hoped. The client loved it. Calls came in from across the country. I went home to start catching up on laundry that had sat neglected for two weeks as I pulled another rabbit out of my butt.