STEM Activity – NFC Outdoor Game
For the past couple of years I’ve been working on a project to develop an outdoor game featuring Near-field Communication (NFC) tags and lots of addressable LEDs. Outside of work I volunteer with the Scouts and am passionate about using my skills to inspire the next generation of engineers.
The game is designed to be played over a large outdoor area (e.g. a field or forest) and uses NFC technology to turn traditional team games into something more exciting all while allowing young people to keep active and take an interest in engineering, electronics and software.
I’ve been experimenting with the 13.56MHz MIFARE range of products to create interactive treasure hunts and relay games. MIFARE chips come in the form of smart cards, key fobs, wristbands and even clothing and so there’s a range of possible applications and scope for development.
The system is based on an Arduino Mega microcontroller and programmed in C++.
For the treasure hunt game, players are split into two teams and sent to find coloured key fobs. Different coloured fobs are worth different amounts of points and once found, players return to the base to scan their ‘treasure’. Points are attributed to the correct team and total up on the LCD displays within the team modules.
In the relay game, players are asked to retrieve a smart card labelled with a particular number that has been hidden at the opposite end of the playing area. On scanning the correct card, the number of the next card to find is announced. The winning team is the first team to locate all of their cards and scan them in the correct sequence. Flash memory is used to store voice commands and sound effects as Ogg Vorbis files that can be triggered by the microcontroller and played out through speakers.
I’ve incorporated several addressable LED strips into the system. There are three 4m strips mounted on poles at the far end of the playing area and two rows of addressable LEDs on the team modules as well as a ring of addressable LEDs above the NFC scanner. The addressable LEDs are all RGBW so I have complete individual control over 750 separate LEDs that are used to bring the game to life. For example, in the treasure hunt game they can be used to show a scoreboard or flash/change colour based on a game event.
Implementing the LEDs has not been without challenge. The strips need to work at distances of around 150m from the base and as the ‘pixels’ are timing sensitive, noise or ringing in a long wire causes big data integrity issues. The solution was to use RS-485 balanced differential signalling, a technique that is used for noise immunity in the Ethernet standards.
I used Quad Differential Line Driver chips to set up a pair of balanced transmission lines for each strip. Standard Cat5e cable was used to carry the three pairs of LED strip signal lines to/from a special controller box I designed containing differential bus receiver chips. The fourth twisted pair in the Cat5e cable was used for 12V power and ground.
I’d really like to use RF transceivers (example shown is by Adafruit) in place of the Cat5e cable as it would massively reduce set-up time. LoRa radio transceivers are long range (up to 2km!) and low power and so are definitely on my list of things to investigate.
I’m also really keen to integrate the system with Microsoft’s MakeCode block editor. This would allow young people to come up with and program their own games whilst allowing them to experiment with different blocks and learn to code.