Introduction: Old School Cassette Player With New School Cassettes
I saw this cool project a little while ago right here on Instructables. The author Ananords created an RFID music player that could be used by children or people who might not have the capacity to be able to operate a normal mp3 player/device. The original project is called Juuke can be found here. He created this project for his girlfriend's grandma and it is the perfect project to make for someone with Alzheimers or Dementia. This bit really hit home for me, as I lost one of my grandparents to this awful illness and I know that she would have loved something like this.
The basis of the project is that the player has two buttons, one to play/pause the music and one to shuffle all of the songs. You can also select an RFID card and place it on the reader to play that particular song. It therefore takes some of the nostalgic parts of listening to music (like choosing a physical CD or cassette to play) and combines them with new technology making it accessible for those with certain needs.
Even though my Oma (Grandma) is no longer with us, I still wanted to make the project and when my parents were cleaning out some old things from their house, I came across my mum's old cassette player, and thought 'this is it'! I've used the cassette player as the basis for my very own Juuke. I put together everything as per Ananords' instructions and it all worked well, but I had a couple of other ideas that I wanted to incorporate including:
- The ability to play an entire album from one RFID card,
- The ability to skip to the next song,
- The ability to play a 'side B' of the card, just like the side B of a cassette tape, and
- Utilising the same amount of buttons, but incorporating long/short press functionality.
If you like this remix, then please vote for it in the Remix Contest.
Let's jump in!
For my project, I deviated a little from the materials list that Ananords used. Check out my shopping list below:
- Arduino Nano (instead of Arduino UNO used in the original project)
- DFPlayer Mini
- Micro SD card
- RC522 (Some people say you should buy a couple to be sure, as some of them arrive broken. I only ordered one and it was fine, but maybe I was lucky?)
- RFID Cards (I ordered 100)
- Momentary Push Buttons x 2
- 1K Resistor Pin headers Old Cassette Player (that still works)
- Coloured LED
- Power Bank with USB connection
- Prototyping Board
- 10K Potentiometer (I didn't use one, as I had the volume dial on the cassette player)
- Aux Stereo Jack (I used the speakers on the cassette player)
- Jumper Wires
- 5V Power Supply
- Power Jack
- Soldering Kit
- Wire Stripper
- Colour Printer and Computer
- Canva Account
Step 1: Put Together the Prototype
I won't go into too much detail on this step. The project is based on a few main parts:
- The Arduino Nano which drives everything using the code you will upload to it later
- The DF Mini Player - a small chip that takes a micro SD card and plays the mp3s
- The RC522 which is the card reader and will take the input from the cards that are presented to it in order to play the songs
- Some buttons to control it and a volume dialA speaker
I used a breadboard to get the prototype together and followed Ananords' instructions which were spot on. You can check them out here. I then tested it all to make sure it was working as it should.
Step 2: Solder It!
Once I was happy with the prototype and how it worked, I soldered the project to a more permanent prototyping board solution. I followed Ananords wiring diagram for this, with one small change - the addition of an LED. The + of the LED is connected to Pin 8 on the Nano and - is connected to Ground. This LED will indicate if the reader for 'Side B' is activated - for example the LED is off, then reading Side A/LED is on, then reading Side B.
I opened up the back of the cassette player and located the volume potentiometer and the speaker wires. I unsoldered these wires from the speaker and potentiometer, marked them, so I knew what belonged to what and put some tape over the ends of the wires.
I decided to leave everything else in the cassette player intact - just in case I want to change it back to a cassette player in future. I managed to fit the DF Player and Nano on a small board which could be placed inside the case, however there wasn't much room for buttons or the RC522 reader.
I found a place on the side of the cassette player where I could place the buttons. Although they aren't really in a 'permanent' position, it's sturdy enough and means that if I do want to return the player to it's original glory, I don't need to fill any holes that I've drilled, as the buttons will just slide out.
I fed the wires for the RC522 reader through a hole in the battery compartment and sat the RC522 reader in the battery compartment, up against the side wall of the player. I chose this, as it had a minimal amount of material between the external shell and the card reader and was a large flat surface - giving the reader the best opportunity to read any card that is presented.
For the LED, I slipped the anode and cathode through a small hole in the back and then soldered the wires to them, connecting it to the circuit.
This is the first time I've 'hacked' an appliance and only the second or third time I've soldered, but everything connected pretty well - so I was very happy with myself.
Step 3: Setting Up the Cards
There are two things you need to do to setup the cards:
- Program them, so they are each assigned a number (Ananords supplies this code in his original project) - there are two options, you can do it automatically, which will increment each card by 1 each time a new one is scanned. Or you can do it manually, assigning a number via the Serial Monitor in Arduino IDE.
- Create covers for the cards, so you know what song or album has been assigned to each card.I made a list in Excel of all of the songs I wanted to play and gave them a number between 1-100. Then I did this a second time for the 'Side B'.
Once I had my list, I found cover art for each song online and created the covers using Canva. This made it very easy, as it was drag and drop for all of the cover art and all of them looked uniform.
I used icons to denote if it was a song or album (Sam Smith is an album - with the record/CD icon, whereas Natalie Imbruglia's Torn is a song - with the music notes). I also placed a large 'B' in the background for those songs/albums that will be on Side B.
I printed them out on a colour printer and then cut them and used a glue stick to stick them on each side. (It doesn't matter which side you stick the 'side B'). You can see a few pictures of the completed cards.
Once you've setup the cards you need to upload the code to your Nano and setup your micro SD Card.
Step 4: Uploading the Code and Setting Up the SD Card
These two go hand in hand, as the code won't work if the Micro SD Card isn't setup properly, so it's a fairly long step as I talk about both aspects.
The original project gave me a little bit of trouble, sometimes the wrong song would play depending on which card I presented to the reader. I did a bit of research online and found that I could recode and ask the player to play a song from a certain folder, so I placed all of the individual songs in folder 1 and then told the player to play the chosen song from folder 1 using the following code:
In order to make a 'Side B', I added some code that said if the button had been pressed to activate Side B, that 100 would be added to the number of the card scanned. For example, if you scan card number 22 and Side B is activated, it would actually play song 122. Otherwise if Side B wasn't activated, it would play song 22. The example code for Side B is:
The songs on the Micro SD card need to have a prefix of 4 digits that will match the number you've assigned to the RFID card. For example, if you assigned the number 3 to a card, then the song to match will have a prefix of 0003, a card with the number 21 will have a prefix of 0021, etc. When you're assigning files for Side B, song 157 would be 0157.
Albums work the same way. You can ask DF Player Mini to loop the songs in a certain folder. I placed all the songs from a certain album into a folder and numbered that folder to match the card number. So if you scan card 90, you can instruct the Nano to play all songs in folder 90 on loop. The code for this bit is:
This is how I achieved the ability to play a whole album. There is a limitation here, you can only use this command to play songs from 99 folders. So originally I had programmed cards 89 - 99 to play albums. But when I decided to add the 'Side B', I couldn't just add 100 to these card numbers, as the code doesn't allow for folders 189 -199. Because I had 11 albums already setup, I just subtracted 11 from the number and setup folders 78 - 88 for the Side B albums. It then updated the Side B code to reflect this:
See the screenshots for how my folders looked.
I've commented in the code where to change your numbers to make it work according to the songs you've put on the micro SD card.
I also chose to make some changes to the buttons to control the cassette player. I still wanted only two buttons for simplicity, but wanted to add functionality of a long press and short press to assign extra functions to these buttons.
The program compares the time pressed to a pre-defined length of time (in this case half a second). If the button is pressed for shorter than half a second, it's considered a short press. Alternatively, if it's pressed for longer than half a second, it's considered a long press.
The red button pauses/plays the current song with a short press or skips to the next song with a long press. The yellow button activates/deactivates Side B with a short press (also illuminating/extinguishing the LED on the back) and shuffles all of the songs on the micro SD card with a long press.
To play the next song, I used the command:
To activate Side B, I use a status variable. So Side B is FALSE until the button is short pressed. Then the status of the Side B variable is changed to TRUE. Then I used an IF statement that read the status of the Side B variable and played songs between the 1 - 100 range if it was FALSE and songs between the 101 - 200 range if it was TRUE.
Download the code, make any changes you need to and upload it using Arduino IDE to your Nano. Test it all to see if it works as it should.
Step 5: Put It Together and Test It Out
I tucked all the wires away and put the back of the cassette player back on. Then I plugged in the USB to my power bank (I like to keep it portable) and tested it out with some songs. You can see the LED lit up for Side B.
Watch the video to see how it works.
Step 6: Enjoy Your Old School Cassette Player With New School Cassettes
Plug it in and put the RFID cards on display so your friends and family can play their favourite tunes.