Inspiration

The inspiration for building Plate Pets came from a desire to push the limits of NFC technology in a fun and educational way. We wanted to create something that could teach kids about animals and their food while combining hardware, Python, and NFC tags as identifiers. The challenge of extending the range of the PN532 NFC module and making the system recognize and differentiate between multiple tags sparked my curiosity. Additionally, the idea of using this project for a hackathon gave us the perfect opportunity to experiment, problem-solve, and create something unique and interactive.

What it does

How we built it

We started by creating physical models of various animals and equipped them with NFC tags. Using a Raspberry Pi connected to an NFC tag reader, we developed a function in Python to scan the tags and check if the animal and food matched. To bring the animals to life, we hand-drew all the animations and used Pygame to display them in a fun, interactive way. We then designed a seamless interface and game environment, tying everything together so that users could scan the tags and see the corresponding animations play out when the animals interacted with their food.

Challenges we ran into

One of our biggest challenges was attempting to display an animation as soon as we read the NFC tag. This was difficult because our NFC scanner was set up to continuously scan for tags, while our animation was set up in a while true loop. This created a conflict where the NFC would attempt to scan for a tag and pause the entire block of code for 5 seconds. This occurred every time the while loop ran, and it ran 60 times per seconds. We tried to fix this using multiple methods, including threads Boolean logic control statements but we were unable to make it work. We eventually worked around the issue by scanning both at the start prior to displaying on the screen.

Another challenge we ran into was the programming of the actual programming. Because pygame required us to split the images into different frames, and then group them all as a single object. There were many issues when trying to access the rectangles of the group because they were not sprite objects. We overcame this challenge by creating a class that inherited from the sprite class in pygame, as well as utilization of if statements.

Accomplishments

As a group of engineering students, we had little to no experience with Python before this project. We are very proud with how quickly we learnt how to function with this new language and create a functional program. We are also very proud of our use of Github, which was brand new to us prior to this experience. The concept of repositories, pushing, and especially branches (whew!) was very confusing and caused headache at the beginning, but we eventually crafted an effective workflow.

What we learned

This weekend, we learned how to integrate hardware and software effectively by using a Raspberry Pi with an NFC tag reader. We gained hands-on experience building functions that read tags and trigger animations based on those inputs. We also learned a lot about Pygame, especially how to create interactive interfaces and display hand-drawn animations in a smooth, responsive way. Additionally, working with hardware taught us the importance of troubleshooting and fine-tuning connections to ensure everything works seamlessly.

What's next for Plate Pets

Next for Plates, we’re looking to dive deeper into optimizing communication protocols and digital signal processing to make the system even more efficient. By experimenting with different protocols like SPI and I2C, we can improve the speed and reliability of data transfer between the NFC module and the Raspberry Pi. We also want to explore digital signal processing techniques to enhance the accuracy and range of tag detection, especially as we work on extending the PN532's range. Antennas will play a key role here, so we're planning to design and test custom antennas to maximize the signal strength and coverage area. Together, these upgrades could take Plates to a whole new level in terms of performance and scalability.

Share this project:

Updates