Put n Play Cube

RFID-based tangible MP3 Player for kids driven by Arduino

Similar projects worth following
Have you ever seen a child crying and asking you why their favourite CD’s don’t play anymore? CDs are a vulnerable medium suffering from scratches when children are handling them. We run crazy sorting CDs into their cases and replacing non-working ones. By the way, don’t expect a toddler to successfully use a CD player from the very beginning.
The idea of the Put’n’Play Cube was born…by ripping the children songs or radio plays and storing them on a MP3 player. The goal was to make the use of the toy as intuitive as possible, with a minimum number of buttons, portable and cheap, as small as possible and with an innovative interaction to trigger the songs they want to play. Further, we insisted from the very beginning to allow a personalised design of the player and the freedom to use any beloved characters or items of the kids in order to trigger the right song.

This project is gradually improving. It is fully functional at this point, our kids use it already every day. Nevertheless, we have planned several improvement for the second release, such as a night light mode.


  • 3D printed case covered with felt with a personalised embroidery
  • SD card for storing MP3 files
  • Charging and uploading files via micro USB
  • Visual feedback using 24x LED ring with configurable RGB pattern
  • Triggering songs/folders using RFID module
  • Creating your own characters and link them to a MP3 folder
  • Pre-configuring maximum volume level
  • Sleep mode for battery saving
  • Customisable startup jingle
  • Portable with a more than 20 hours of play time
  • Cheap and easy to build hardware


The Put'n'Play Cube hardware is based on the cheap DFPlayer module which contains an SD-Card reader, an MP3 decoder and an audio amplifier, controlable via a serial interface.

A Mifare compatible RFID reader is used to program and read the objects/characters that are placed on the cube. These objects are linked to the folders on the SD-Card containing the related mp3 files. Visual feedback such as state, played track etc. is done using a ring with 24 WS2812 RGB LEDs. An Arduino nano is used to control the mp3 player, handle the tags on the RFID reader, read the buttons and control the LEDs. We use a standard 18650 LiIon cell for many hours of autonomous music. There is even room for a second cell to double the runtime. The WEMOS Battery Shield provides us with stable 5V from the battery as well as doing all the charging and battery protection logic. The onboard Micro USB port allows us to charge the cube with any mobile phone charger. When connected to the USB port of a computer, the cube will register its self as a mass storage device to fill the SD Card with fresh music.

The mechanical and electronical assembly is done by soldering all components to a simple prototyping PCB. No custom PCB is needed. If you place everything correctly, it will perfectly fit the 3D printed case. Simply follow the build instructions below.

All components can be bought from your/our favourite china shop or ebay at a low price.


The firmware that is managing all functionalities of the cube is written in Arduino using several external libraries for the MP3 player, RFID reader and LED effects.

When the Cube is switched on, it checks for the SDCard, initializes the hardware while playing the configured startup jingle and startup led effects. Once that is done, the cube will wait for an RFID tag being placed on the reader.

If an already known tag is detected on the reader, the cube will speak the number on the tag and start playing the sd card folder named with the same number as programmed on the detected tag. The album will be resumed at the same track it was stoped last time. The LED ring will display the current track as well as a "play" effect.

If a new tag is detected, the cube will program this tag to the next available folder number. After programming it will tell the programmed number by saying the number twice. After that you will need to create the matching folder on the SD card and place the mp3 files in there. The next time when this tag is put on the cube, the corresponding folder will be played.

Short clicks on the left and right buttons will play the previous and next song in the current folder/album. Long presses of the buttons will decrease/increase the volume.

Cut templates for felt and embroidery files for different stitching machines.

Zip Archive - 159.81 kB - 08/25/2017 at 19:32


Arduino Code for the Put'n'Play Music Cube. Zip contains the whole Arduino Playground including the needed libraries.

x-zip-compressed - 169.19 kB - 08/24/2017 at 08:02



Cutting pattern for the felt cover of the cube. File includes proposition of stitched decoration.

svg+xml - 8.30 kB - 08/16/2017 at 18:26


SD Card content and readme for the Put'n'Play Music Cube.

x-zip-compressed - 2.26 MB - 08/09/2017 at 08:29


View all 12 components

  • 1
    3D Printing

    The case is composed of two halves. Depending on your printer settings it will take you about 6-7 hours to print all three parts. The case has been designed in a way that almost no support structures are required. We recommend to print only support for the three holes for the buttons and for the LED ring holder.

    We have printed the case using PLA with the following printing parameters:

    • Infill: 15%
    • Outside shell
    • Layer height: 0,2mm
    • Nozzel: 0,4mm 

    Typically there is no need to glue the LED ring, it is designed so that you have to push is firmly on the case. Keep in mind that a small gap remains between the LED ring and the case. This is normal to make sure that the felt and volume fleece fits underneath.

    You can find the STL files at thingiverse.

  • 2
    Solder Electronics

    The position where you put the breakout modules onto to prototyping board is important.

    Solder the pin headers to the modules and place them in the correct position onto the prototyping board. Solder only one pin of each module and check if the USB ports and the SD card slot are accessible when the board is installed into the 3D printed case. If everything is fine solder the remaining pins and do the connections according to the image below.

  • 3
    Compile software and upload MP3 files

    Extract the content of the firmware zip file to your Arduino sketch folder.  In the user settings section of the MusicCube.ino you can change some values to adapt the behaviors of the Put'n'Play Cube.

    // -- user settings -------------
    #define INIT_VOL      3
    #define MIN_VOL       2
    #define MAX_VOL       20 // max=30
    #define STORE_TRACK   true
    #define SAY_FOLDER    true
    #define REPEAT_FOLDER false
    #define STARTUP_SOUND 200
    #define CYCLE_DELAY   20
    #define SECS_UNTIL_SLEEP 1200L // sleep after 20min
    #define LONG_PRESS_CYCLES 5
    #define COLOR_MAIN    0,0,255
    #define COLOR_TRACK   255,0,255
    #define BRIGHTNESS    100

    Line 1 - 3 is to set the speaker volume.
    STORE_TRACK can be set to true to resume from the last played track of a folder.
    If SAY_FOLDER is enabled the folder number will be said by the cube when a socket is placed on the cube.
    REPEAT_FOLDER is to enable loop playback.
    STARTUP_SOUND is the number of the mp3 file that is played when powering the cube.
    CYCLE_DELAY is used to control the speed of the LED ring effects.
    SECS_UNTIL_SLEEP is used when to put the cube into sleep mode after the last track of a folder is played. Only works if REPEAT_FOLDER is false.
    LONG_PRESS_CYCLES influences the duration necessary to use the next/previous track buttons for volume control.
    EFFECT_* to show in different states of the cube. See the WS2812FX library for more info on the available effects.
    COLOR_MAIN color used for common LED ring feedbacks e.g. the color for the idle or playback effect.
    COLOR_TRACK RGB values to define the color that is used to show the track number of the current playback.
    BRIGHTNESS a value from 0-255 to control the LED ring brightness.

    After uploading the firmware to the Arduino Nano you have to prepare the SD card for the first use. You can find a zip file for the folder structure of the SD card. It also includes mp3 files for the numbers from 0-100, that are used by the firmware to give spoken feedback about folder numbers. See the readme.txt in the for details about the folder and track naming.

View all 5 instructions

Enjoy this project?



ghostlyfu wrote 11/02/2019 at 21:36 point

Great project but does anyone else find the tracks do not play after folder name is spoken unless tag is removed & replaced? Even with 'say_folder', turned off, I have to place the tag on the reader twice for track to play. I suspect there's something missing around line 383 but am far too newbie to know what...

  Are you sure? yes | no

sl wrote 10/15/2019 at 21:12 point

As I am a new follower: hi to everybody. I'm trying to realize that Project with some small deviation:

... I'm using a different battery charger - nur no problem.

... I hot the MFRC522 RFID Module that uses SPI instead of I2C... Here I started investigation in what I have to changing that it works with the existing code - when Debugging through serial Interface I don't get communication to the MFRC52, it's still searching for PN532...

A+ Sascha

  Are you sure? yes | no

andre1000 wrote 03/24/2019 at 22:53 point

Hello, thank you for the good project. I Have a problem with the WS2812 libray. When I compile the poject, than the memery is at 110% and the project will not downloaded. Without the ESP2812 the code is running. Has someone a idea? What is correct version of the library?

Then one additional remarq: The diameter of the linked LED ring to is to big.

  Are you sure? yes | no

stefhh wrote 02/19/2019 at 22:39 point

It took me some time to figure out that i was missing a  " "include <arduino.h> "  at the beginning of the main sketch. added that and now its running fine!

  Are you sure? yes | no

stefhh wrote 02/18/2019 at 22:27 point

Hi! i also having issues with the nfc reader timeout. it doesn´t seems to recognise the reader. can this be due to the code referring to the adafruit version despite the reader being another brand? thanks Stefan

  Are you sure? yes | no

Lima85 wrote 01/04/2019 at 23:34 point

always get connection timeout to nfc reader... soldering is ok

Any idea?

  Are you sure? yes | no

bancbanus wrote 09/20/2018 at 09:21 point

Hi! Very nice project! As I've seen the battery shield does not have any undervoltage protection. Do you use cells with protection?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates