We took inspiration from RFID/NFC-enabled figures such as Skylanders, Disney Infinity and Amiibos, and realized nobody, to our knowledge, has applied that technology to Dungeons and Dragons despite D&D character minifigures being wildly popular with players of the game. We thought it would be neat if you could store your character's information on the minifigure itself instead of having to keep track of a paper character sheet or paid online subscription service.

What it does

Reads and writes D&D character data to and from an RFID tag attached to a character minifigure. It also provides a dice roller for players of the game to use as an alternative to rolling physical dice.

How we built it

We connected an MFRC522 RFID reader/writer to a Raspberry Pi 3. All of the code was written in Python. Several libraries (Spidev, MFRC522, SimpleMFRC522) go into making the RFID reader/writer work, while we used the guizero library to build the user interface.

The example minifigures were laser-cut in the makerspace downstairs.

Challenges we ran into

The Raspberry Pi libraries we found for the MFRC522 RFID reader/writer module would only read/write one 64-byte sector of the tag, of which 16 bytes are reserved, so we had to condense the character data into 48 characters (i.e. 48 ASCII characters) total.

Only one of us actually was familiar with playing D&D so there was a significant learning curve about the basics of the D&D game system for the others, and we ended up significantly simplifying several aspects of the game and making the system a proof of concept instead of a 100% fully functional game system. We believe we still managed to capture the barebones essensce of what is needed to play a game though.

We also originally also wanted resin 3D printed figures to attach the RFID tags too, but we ended up lasercutting 2D figures when we found out the makerspace had a 3-5 day turnaround time for resin prints.

Accomplishments that we're proud of

It works, and we actually managed to condense the critical character data within our 48 Byte limit. None of use had ever built built a GUI in Python or worked with RFID in Python before.

What we learned

How to read and write data to and from RFID tags using an MFRC522 reader/writer connected to a Raspberry Pi using Python How to create interactive GUIs in Python with the guizero library.

What's next for D&RFID

Turn the reader/writer into a stand-alone USB device with an Arduino Leonardo that can then be connected to any computer. The Arduino libraries appear to allow for more convenient lower-level manipulation of the RFID tag data, and would enable us to store more data by allowing us to access every sector of the RFID tag's storage instead of just one. This would also let the character app be used on any computer instead of just a Pi running Raspberry Pi OS. We would also like to make the GUI more polished and user friendly, and print true 3D minifigures in which to embed the RFID tags.

Built With

Share this project: