Inspiration
The idea was initially formed as a joke between the group members as an interesting and unique way to play music. The group sought out a fun (and probably pointless) method to play or pause music without needing to click on playlists in the Spotify software. In other words, a useless invention. Gaining inspiration from online projects, the group set out to accomplish this task with programmable cards and a hidden sensor.
What it does
The raspberry pi and NFC sensor are connected in a 3-D printed casing. Cards are programmed to accomplish a certain action when tapped on the surface of the casing (Including playing a specific playlist, pausing, and playing the music).
How we built it
Hardware was gathered
Jukebox case was designed in Solidworks and 3D printed
Raspbian os was loaded onto the pi
RFID reader was connected to the pi, along with other necessary cables
Python venv was set up with necessary packages (spotipy, other dependencies)
Spotify URIs were written onto blank RFID cards using NFC Tools app
Read in RFID cards with scanner using PN532 python library, experimented with bytearray received in order to decode it
Create spotify app through developer account
Wrote code to take scanned input and carry out the particular action in spotify (eg. playback, pause/play, skip track)
Assembled product inside printed case
Challenges we ran into
We were unfamiliar with the PN532 and how to use the switches and pins. There was very little documentation online for our specific model of the PN532-HAT. We had trouble figuring out how to decode the hex code into a string that Spotipy would recognize. Through trial and error and reading the Wiki on PN532, we found the correct switches.
One group member was unable to physically work on the project with the rest of the group. The group communicated with him using Discord video call throughout the project.
Accomplishments that we're proud of
Figuring out the correct switches on the PN532 to begin reading the NFC cards.
Incorporating certain engineering elements, such as using CAD to create a 3D printed casing (though we would like to make a more functional case for future projects).
Creating a functioning first project with a raspberry pi.
What we learned
How to operate a new raspberry pi module we haven't used before.
Best methods to cut down on 3D printing time (including reducing infill density).
What's next for Spotify Jukebox
Refactoring the code to make it more robust (better error handling, accepting more inputs, etc).
If we had the time, we would like to also make the code to write data into blank NFC cards.
Find a way to print our card designs directly onto the cards.
Make an improved casing for the product that has screw holes and cooling system.
Built With
- nfc-reader
- pn532
- python
- raspberry-pi
- spotify
- spotipy

Log in or sign up for Devpost to join the conversation.