DIY: RFID music box with Raspberry Pi
|I made this project a while ago with the full intention of writing up a how-to. This is likely as close as I’m going to get.
What is it? A box that plays back music selected via RFID cards.
I used to collect music, back when it took a more physical form: CD, Records, even Cassette Tapes. Digital music has replaced the physical in most cases and that brings many benefits, but one aspect of physical music that I like is flipping through albums. This project is an effort to bring some of the physical experience back into digital music.
Watch the video to see how this works:
The Pi in the video above is running off wifi, which adds more of a delay to music starting and to album art showing up via Pi Music Box. This system is also nice because Pi Music Box provides a web interface to control the playback in addition to using the RFID cards.
If you tap a playlist on the reader it starts to play. If you lift and retap the card the player will skip to the next track.
Here a list of the parts you need to build the cigar box RFID music player:
A Raspberry Pi 3 ( you could probably use any model RPi )
Some RFID cards (make sure you get the right frequency)
And here’s the software I used – most of this is right out of the box with very little configuration or modification required:
PiMusicBox (this is the music player)
Music Cards (this lets you select playlists using RFID)
Spotify (you will need an actual subscription to use the API and make this work.)
You may also want:
a USB WiFi dongle (if your pi lacks wifi or gets bad reception)
a USB sound card (the built in pi audio output is bad, these sound way better)
You will also need speakers and amp (or headphones) to listen to your music. I used these cheap USB powered speakers for testing.
I had difficulty installing Pi Musicbox on a RPI3, hopefully that’s fixed now, but if not here’s how I ended up fixing this issue.
I ran into a few issues trying to get this project working – the main one was initially trying to use a raspberry pi specific RFID card reader, and then using cards of the wrong frequency. I never did get the RPI reader to work, but this USB reader worked right out of the box when paired with 125 khz cards.
Total Cost including 50 RFID Cards, sound card and wifi card: About $70 bucks.
The steps at their most basic are:
Set up Raspberry Pi with Pi MusicBox. Configure Pi MusicBox to use Spotify. Install Music Cards. Use the Music Cards python script to link RFID cards to spotify playlists. This links the card ID to a specific playlist. You can then print up album or playlist art to stick onto the RFID card (or hand write it if you prefer), find a nice box to put everything in, plug it in and listen to some sweet sweet music.
If you run into issues post a comment below, If I remember how to fix it I’ll let you know. Good luck!