Juuke - a RFID Music Player for Elderly and Kids

72K560181

Intro: Juuke - a RFID Music Player for Elderly and Kids

This is the Juuke box. The Juuke box is your own musical friend, made to be as easy as possible to use. It is especially designed to be used by elderly and kids, but can of course be used by all other ages. The reason we created this, is because of my girlfriend's grandmother.
She told me that her and her grandma sitting in the kitchen, listening to music, dancing and laughing. Sadly, through the last years, her grandma has been in and out from hospital. On her worst days, however, music is one of the few things that still makes her smile. And music players like CD players are just too hard to use for her. That’s why we created the Juuke.

The Juuke Box works by using RFID cards to play specific songs from an SD card. You could also play the songs randomly using the green button, or play and pause with the red button.

This way, it is really simple for everyone to play music.

STEP 1: Watch the Video!


We made a video showing how me made it:)

STEP 2: Gather the Parts:

We got all the parts from AliExpress, and links to the parts are listed below:

Parts:

Arduino UNO AliExpress& Amazon

DFPlayer Mini AliExpress & Amazon

Micro SD card AliExpress & Amazon

Arduino UNO DIY Shield AliExpress & Amazon

RC522 - Buy 2 to be sure, some of them arrive broken AliExpress & Amazon

RFID Cards AliExpress & Amazon

AUX Stereo Jack AliExpress & Amazon

22 mm Momentary Push Button - 1 Red and 1 green - 3-6V AliExpress

10K Potentiometer AliExpress & Amazon

Wires AliExpress & Amazon

1K Resistor AliExpress & Amazon

Pin headers AliExpress & Amazon

Breadboard - Optional AliExpress & Amazon

Jumper wires - Optional AliExpress & Amazon

5V power supply -AliExpress & Amazon
Power Jack - AliExpress & Amazon



Tools:

3D printer AliExpress & Amazon

Soldering Kit AliExpress & Amazon

Wire Stripper AliExpress & Amazon

STEP 3: Test the Parts

I recommend connecting everything up, and test if it all works before starting.

To do that, I used a breadboard and some jumper wires to quick and easy check that it all worked as intended. I had some problems with the first RC522 module I bought, it just didn’t work even though it came straight from the factory. So I had to get a new one… That’s why I recommend getting 2 of them, that way you are sure that if you break one of them, you have a spear.


Connect everything according to the circuit diagram here (Link), or see the attached pictures.

Remember to use a 1K resistor between RX on the DFPlayer Mini and the Arduino.

To check if the card reader works, you can use the “Dump card” example sketch from the library. (See step 4)

STEP 4: The Code - Programming the Cards


To get a better understanding of how the code works with the DFPlayer mini, I will try to explain it as easy as possible. The DFPlayer mini works by playing songs from a micro SD card. To know which song to play, the songs has to be stored as a number to the SD card. Song number 1 is stored as “0001 - SONG NAME”, song number 2 is stored as “0002 - SONG NAME”, and so forth. We can write a number to the RFID cards, so if we write the number 2 to one of the cards and place it on the reader, the Arduino will read the number and say to the DFPlayer mini, “play song number 2”.

The number we write to the card has to be the same number as the name of the song we store on the SD card.

If you would like to learn more about the DFPlayer mini, visit this page with lots of great information

You can now open Arduino and upload the code for the card programming. I have divided the code into two parts. One for programming the cards, and one for the actual player. In this step, we will start by programming the cards. The code is published to GitHub, and added below. You will also need to download the following libraries:

- MFRC522

- DFRobotDFPlayerMini.h

I have tried to explain the code with comments as much as possible, but if you have any questions, don’t be afraid to ask them in the comment section!

Also, I am not a great programmer but I would like to become one, so if you see any mistakes in the code a comment would be great!

To upload the code to the Arduino, see this article. To add libraries, see this article.

MODES:

The card programmer has two modes, automatic and manual.

Manual mode: Writes the number you want to write to the card. Type in a number, and it will store it.

Automatic mode: Starts at the number you specify in the code, and increases it by 1 every time you place a card on.

HOW TO USE THE CARD PROGRAMMER:

Connect the Arduino Open Serial monitor (top right corner) Write “manual” for manual mode and “auto” for automatic mode. (See above) Place a card on the reader, and make sure it says succeeded.

STEP 5: The Code: Player Mode

Once you have programmed the cards, you can upload the music player code. This is the code that reads the card and plays the associated song.
The process is exactly the same as for the card programmer code. Upload the sketch, and start using it!

PS: IMPORTANT! To disable the serial communication where you can see what the program is doing in the serial monitor, you have to comment out “Serial.begin(115200); “. Just add“//” in front of the line. I had some problems where the program would not run if it was enabled. (It was waiting for a serial connection before it would start)

STEP 6: Download Songs to the SD Card

As said previously, you have to give the music files on your SD card a specific name for it to work. Every song has to start with a number. The number also has to be 4 digits (1 is 0001 for example).
After these digits, you are free to add the name of the song. For example: “0035 - Frank Sinatra - Fly me to the moon”

It uses standard MP3 files, so it’s simple to copy them over to SD card and rename them.

STEP 7: Test, Then Solder

When you have tested that everything is working as intended, you can start soldering the parts to the Arduino UNO shield.


Just follow the circuit diagram wire for wire. It is smart to print it out, and use a colored marker to mark which wires you have soldered on. I also recommend to use pin headers for the DFPlayer Mini so you don’t damage it under soldering.

I also desoldered the RC-522 Led, because it was showing through the print.

STEP 8: Make the Enclosure

In this step I am going to show you how I made the enclosure.
I designed it using Fusion 360, and 3D printed it. I also made one using a CNC machine, and some plywood.

If you don't have a 3d printer or a CNC machine, don't worry! It's also possible to make an enclosure out of cardboard or using a project box

You can find all the files here:

3D printed:

STL: CULTS 3D | Thingiverse

FUSION 360: Ananords.com

The settings I used to 3D print it is:

Infill: 15%

Layer height: 0.2mm

Supports: YES

Just insert the UNO and the RC522 into the pins on the 3D print. They should fit snugly. I recommend using a drop of glue to secure them in place. Do the same with the audio jack. For the buttons, potentiometer and power socket, use the included hex nuts.

When you are done, just snap the bottom plate and the “face” together.

STEP 9: Make the Cards

Start with the design.
I made the designs in Adobe Spark, where I used the card dimensions (85 mm x 54 mm) as the custom size

I found the pictures on google and imported them into Adobe Spark, set the song title and artist, and done!

Since I don’t have an id card printer, I had to find another way to make the print on the cards. I went the simple route, and just printed it on paper then glued it to the cards.

You can also just use a pen and write directly on the cards.

STEP 10: Done!

You are now done!

If you make this project, please post a make:)

Any questions?

Ask in the Discord Channel, or send me a message:)

For updates about the Juuke, sign up to the newsletter!

Follow me on Instagram for updates on upcoming projects!


Instagram: https://www.instagram.com/ananordss/

Contact me: Ananords@outlook.com


••• Support me •••

Patreon: https://www.patreon.com/ananords

Donations: https://ananords.com/products/donation/

Buy me a coffee: https://www.buymeacoffee.com/Ananords/

121 Comments

Could you power this off of the arduino's usb port. If so, would you still need to the resistor running to the DF player?
Why hasn't this been used to re-release HitClips yet?
Thanks for sharing this! For others who might be struggling with my problem: If you get the error "Number: Reading failed: The CRC_A does not match" in the serial monitor: Then MOVE StopCrypto1 TO BEFORE "IsNewCardPresent"!!

Code:
mfrc522.PCD_StopCrypto1();
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
if(mfrc522.PICC_IsNewCardPresent()){
[HELPPPPP]
Hey Guys, Im a little late to the game but i've been wanting to do this project so i finally gave it a shot. Im running into a problem with the RFID cards where when im trying to program the cards some work while others dont. Even on "manual" and "auto" mode.


I get an error like the one above^^^^. Not sure if anyone can help me out!!
I'm building this for my 2yo daughter, and she's already so excited by the work in progress. I've got everything breadboarded, and I have two questions before I start soldering and building the enclosure:
1. When I push the shuffle button, it always just plays the first song, even though I have 12 songs assigned to cards and working properly. Is there a trick to getting random play to work?
2. I bought the Fusion360 files for the enclosure so I can make some modifications (swapping headphone jack for built-in speaker), but when I open the file, all I see is the main case, not the knob or card holder which are included on Thingiverse. Am I missing something? Are those files included in the Fusion360 file?
Update: I emailed the author, who sent me the missing Fusion360 files for the volume knob and card holder - thanks, Andreas! He also told me that the DFPlayer does indeed seem to play songs in order rather than randomly. It looks like it’s possible to build your own randomizer by polling the DFPlayer to see when it’s done, and then starting a new track yourself, but I don’t really want a shuffle feature so I’m going to leave that as an exercise for the reader.
Great project! I love the idea and am trying to make this for my young niece. I'm fairly new to this but still think I have spent countless hours and exhausted all means of finding the solution on my own. I am having the same problem as a previous commenter that did not have a lot of information and their final solution did not work for me.

Cards were programmed with success. However, when I upload the card player I can see the card is read in the serial monitor but the song that is supposed to play does not. Nothing happens. There are no errors. (see attached images). If I press the play/pause button the serial monitor will first say "paused..", press again "playing.." and the 0001 song will start to play. Likewise if I press the shuffle button first song 0001 will start to play. If I show the reader a card at any point it has no effect other than to show the card info in the serial monitor.

As mentioned another commenter mentioned a discrepency in code on Instructables vs GitHub. I have tried both with no change in outcome.

I tried writing the cards in both auto and manual mode, still same outcome. I tried seperating the reader code to auto only, programed cards, same outcome.

Examples such as "GetStarted" for the DFPlayer work.
Examples such as "DumpInfo" for the RC522 also work (althogh sometimes a card has an error but reads fine the next time).

**The "firmware_check" example for the RC522 does return the following:

MFRC522 Digital self test
*****************************
Firmware Version: 0xB2 = (unknown)
-----------------------------
Only known versions supported
-----------------------------
Performing test...
-----------------------------
Result: DEFECT or UNKNOWN

I purchased two readers as reccomennded. Both have the same result. I have tried using both for this project. Both readers have had the pins souldered. Do I possibly still have bad readers or is there something super simple I'm missing?

I checked the player code and nothing seems to be wrong, although I don't fully understand what should be happening in the "get number" and "print number" section of the player code. Maybe there? But I doubt it as others have had success.

Any insight on my possible problem would be greatly appreciated. I am using an Arduino UNO R3 but I cant imagine that is having an effect.

Also if anyone has a screenshot of what the serial port looks like when a card is read sucsessfully and the correct song is initiated may also be helpful. Hopefully I'm just missing one silly little detail.
Thanks :)
Hi, I don't know if you were able to fix this, but I've had similar issues with the programmed card not starting the associated song. At the bottom of the https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299 documentation, there is a small message about how the song must be organized:

"The folder name needs to be mp3, placed under the SD card root
directory, and the mp3 file name needs to be 4 digits, for example,
"0001.mp3", placed under the mp3 folder."

Moving all the songs on my sdcard to a folder named "mp3", at the root of the card, fixed things for me.
Hi! I would try to format the SD card, then upload the songs again. Try to rename them to only numbers (0001, 0002...) before you upload them to the SD card. Also, have you managed to play a song with the DFPlayer mini using their code?
Thanks for the response. Yes, I had already tried that as well. Full formatted the card tried naming the songs only with 0001, 0002... as well as 0001.mp3, etc, and even tried three, two and one digit numbers (all seperate tries). I'm starting to think maybe I got 2 bad card readers. At my whits end. Thanks for the response, I will definately update if a new, new card reader solves the problem.
And yes, the DFPlayer works using there code, get started plays each song for three seconds. I tried other code from github that has buttons and calls for song 1 to start playing and that all works too. The player works with the Juuke-Player code, but only after the shuffle button is pressed or the pause/play button is pressed twice (pause then play). Its just that I cant get the player to play the song that should be associated with the card. It sees the card and I do not get any errors in the serial monitor it just wont play it. Keeps playing as it was. I'm definitely going to order some more card readers from a different vendor.
if (digitalRead(shuffleButton) == LOW) {
myDFPlayer.randomAll();
Serial.println("Shuffle Play");
isPlaying = true;
delay(500);
myDFPlayer.next();
}

Read from elsewhere that delay should be 500. Didn't work alone.
Found code somewhere else that had myDFPlayer.next();-line.
Now I haz shuffle! (filenames are 0001, 0002...... don't know if it works with 0001 - song title)
When using Serial Monitor for Juuke-CardProgrammer - Remember to confirm you have the correct [baud], else the monitor won't show anything/shows mumbojumbo.

The baud you are looking for is on the line >>> Serial.begin(115200); // Initialize serial communications with the PC
= baud 115200

First time using Arduino and mine was set to 9600 by default I think (took a while to find the problem xD)
I have similar problem like mtbourgault, but not exacly the same. When I'm using cards everything is OK, but shuffle button is not working properly. Shuffle button always starts with song NO.1. I named them on the start 0001 - XYZ XYZ XYZ.mp3, then I formated SD card and named them just 0001.mp3, 0002.mp3 etc., but it doesn't help. Any ideas?

Thank you for this project :) He taught me a lot of electronics, starting with the difference between 1A and 2A on the charger;)
Help!!!!

I want to add two push buttons to rewind or skip the Audio for 10 seconds. Is there any library or line of example code available for this function.. in this project???
The speaker must by connected to SPK_1 and SPK_2, not to GND!
Is it possible to play multiple songs with one card? if so, how would I add a button to maybe skip through each one?
Very great project! Thanks for this tuto. I try to make a portable device like yours so I've found a mini rc522, an arduino Nano and a 3W speaker: everything works with an usb 5V powerbank 2600mAh but I need some smaller battery, maybe like lipo 7,4V 2000mAh, 30C. Do you think that it's possible to connect the Vin Nano pin with this battery without issue or overheated?
According to the arduino nano datasheet, the input voltage is 7-12V for the VIN pin, so that shouldn't be a problem:)

More Comments