This process analysis showcases how to build a MP3 player with Arduino Nano, the files are 16-bit MP3 and do work unlike tradition Arduino music players which are limited to an 8-bit WAV.
Another portion of this tutorial demonstrates creating laser-cut cases using various websites and applications.
The box has a total of 21 songs along with a stop button as well.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: In Action!
Have your audio on, this shows just the intro to a few songs, and how the dial changes the buttons to new songs.
Step 2: Designing Shell for Music Box With Maker-Case(Optional, Can Use Any Cardboard Box or Case)
Maker-case is a very user friendly and FREE laser cutting plan generate for simple cases. has options to make giant boxes with slots all the way to tiny ones with various slots.
Generating our Box
Feel free to do whatever dimensions you feel comfortable with on your shell. For the image shown above, its a example, my box was 5" x 4" x 3".
Next select outside for the dimensions to align with a standard ruler measuring across the box.
The material thickness will have to depend on whatever material you use, you can measure the thickness of it with a dial caliper or precise ruler. For this project we will be using 1/8", colored acrylic glass.
The edge joints have to be finger slots, for flat breaks easily and T-Slot is not as aesthetically looking.
Tab Width I would recommend to be .4" but feel free to do as fits your box.
Once all this is selected to your fitting, click "Generate Laser Cutter Case Plans" then a screen will show up, In the bottom right hand corner then click "Download Plans"
Step 3: Finish the Case Designs With CorelDRAW 2017 (still Optional, Can Design Your Own Case)
Generating final laser cutting plans on CorelDraw
when you open up CorelDraw, the first thing to do is open up your laser plans from MakerCase
Go to FILE, and then to open and find your drawing in your downloads, more than likely named "CasePlans"
Once you have your case plans open. go ahead and design the cover of your box, using a dial caliper, you can get the measurements of your buttons and potentiometer.
Once you have your measurements, you can add the holes, squares and any lettering you want on your box.
Now, Highlight the box and make it a specific color, I choose red for mine, these lines will be what cuts the box
Second, highlight the text you want to be engraved and make it green, as shown in the picture above.
Step 4: Upload Your Box Plans to Your Laser Engraver
Using a big sheet of acrylic glass, use a glass/box cutter to size your acrylic to your laser engraver.
The laser engraver I used is a Universal Laser Systems in our tech department at school.
The universal laser engraver came with its own program show above.
Save the Corel drawing as a .CDR file and reopen it in your laser engraver program.
On this interface, which should be connected to your lase cutter, all you need to do now is click the large greenplay button on the left side.
Step 5: Engrave and Cut!
Step 6: Prepare Your Bread Board or Prepare to Print Your PCB
Feel free to adjust any parts, but for the BreadBoard and PCB above, you need the following components
- 8 push-buttons
- 1 10k potentiometer
- 1 Aux Port
- 3 Light Emitting Diodes
- Adafruit VS1053 board
- Arduino Nano
- 3 1M ohm resistors
- 2 330k ohm resistors
- 2 47k ohm resistors
- 2 22k ohm resistors
- 2 470 ohm resistors
- 3 100 ohm resistors
- and a spool of 22 gauge wire
Additional handy tools to have are
- Hot Glue gun
- Wire Snippers
- Wire Strippers
- Soldering iron
- X-ACTO knife
The Above pictures I made using a application called fritzing click here to download fritzing
Step 7: Prototype Your Board Before Soldering!
Always before you start to solder and glue!!!! Make sure the soundboard works before, use the image from the last step to guide you.
SKIP SOME STEPS TO GET THE ARDUINO CODE FOR PROTOTYPING
Also make use of the color code to help select your resistors
Step 8: Arduino Code
IMPORTANT NOTE: The pictures above do not show all the arduino code, download the file for the entire code, the entire code is too long to have posted in the photos above.
Once the code is downloaded, you need to get the adafruit library which is shown in the step below
Step 9: Link to VS1053 Library
Step 10: Get Your Mp3 Files
The easiest way to get MP3 files is to use one of many YouTube to MP3 converter, this isn't limited to music. You can convert any audio and trim the files for your liking.
Once you have the files downloaded you need to copy and paste them to a micro sd card.
Once you have your MP3 files, go into the Arduino code and rename the part of the program with the file names, with the new MP3 names of your pick. End the file with ".mp3"
Step 11: Get the Boards Down
Using a hot glue gun, glue the breakout boards to the bottom face of your Soundboard box
Be sure the Micro-SD and Mini-USB port are showing so you can change the SD card and power the box.
Makes sure the pins are facing up too! need them to plug in pins!
Step 12: Prepare Your 5v and Ground Pins
Using a breadboard, cut off a few pieces with at least 5 pin holes each from the power, USE YOUR LINEMAN'S (If you have one) and ground part, use the stick backside to attach to bottom face of board
Connect all three power lines of your pieces, BUT***DON'T CONNECT THE BREADBOARDS GROUNDS TOGETHER*** only connect the two grounds of the boards together to one of the pieces, the other two - lines will be used as the analog signal/ground from the push-buttons.
The photo above is a good example of how to do this
Now, the two grounds that are not connected, you need to connect with the 47k ohm resistors each, use the photo above to see this!!
Connect the Arduino nano's pins to the VS1053's pins
Use the note in the breadboard photo to see which exact pins I'm talking about, literally any pin that is directly connected from the nano to the VS1053
Step 13: Attach the Aux
connect 3 Female pin ends to your VS1053 board for the aux, attach these three pins to the 3 pins on your aux port,
Use the notes on the above circuit board to know where to plug the pins into
Step 14: Prepare Your Buttons (Part 1)
- Your spools of solid wire
- Lineman's tool
- All the other resistors except the 47k and 100 Ohm resistors
- soldering iron
Cut 12 wires of about 5-6 inches long, then plug your soldiering iron in for part 2.
Step 15: Prepare Your Buttons(part 2)
NOW THIS PART IS VERY IMPORTANT
First, solder one resistor each onto any of the buttons pin, you should have 9 resistors and 8 buttons, every button will receive 1 of the remaining resistors EXCEPT for one of the million ohm resistors, 1 button should have two resistors in series soldered to it, this making it two million ohms.
Now, another very important thing to note, take 8 of your 12 wires, and solder it on the pin DIAGONALLY ACROSS from the pin with the resistor on.
take your other 4 wires and solder them to the end of your resistors(Twist the end of two resistors together so and solder 1 wire each to two resistors, CANT BE SAME RESISTOR VALUE) so you end with two long 5-6 inch wires coming out from your buttons on the pins diagonally across from each other.
its important its diagonal, otherwise it would be a closed circuit and the button wouldn't work.
Step 16: Attach Your Buttons
The photos above don't have the last 4 wires yet, but that's ok.
Fit your buttons into there slot in a way that each resistor value is on opposite sides, also, you will want the resistors facing toward the outside of the box as shown above
Now, glue the back of the buttons with your hot glue gun, make sure you glue the back of the buttons so you don't have glue on the front face of your box
Lastly, put your 10k potentiometer in its hole as well, use the nut that comes with majority of potentiometer to keep it tight to the box face
Step 17: Checkpoint
This is how your project should look, the boards are missing the bread-board pieces in the photo above
Step 18: Prepare Your LED's (part 1)
- 1 Red L.E.D.
- 1 Yellow L.E.D.
- 1 Green L.E.D.
- 3 100 ohm resistors
- 6 5"-6" solid wire, around 22 gauge
Solder one 100 ohm resistor to each anode side of your LED's, trim any long pins of the LED's or resistors so it looks like the ones above.
Step 19: Prepare Your LED's(Part 2)
First , glue the backside of your LED's to your board.
Then, take the wires on your cathode side and trim them to about 2-3 inches and solder the tips of the wires to a another 4"-5" wire, these are all grounded to each-other now.
Step 20: Connect the Top to the Base
Now this is where it gets pretty messy, just follow along carefully. And use the breadboard schematic above.
You should have two breadboard pieces connect to your 5V from the third breadboard piece, but the two pieces are not grounded! On those two pieces, you need to plug in the wires from your buttons on the side without the resistors to the +side of the pieces. Plug the 4 from one side into the spot, and plug the other side 4 buttons into the 5V.
Now, you should have two - lines of the breadboards with nothing plugged into them. VERY IMPORTANT, one of each of the resistors needs to go into each side, so follow as bellow
In one of the -, a 470, a 22k a 330k and a 1-million ohm resistor should end there. on the other -, a 470, a 22k, a 330k, and the 2-million series ohm resistor should go into there.
Now the side with the 1-million ohm resistor needs a pin from the board to A1 on your Arduino nano.
And the side with 2-million ohm series resistor needs a pin from the board to A2 on your Arduino nano.
For the potentiometer connect the middle pin to A2 and the ground to the Arduino ground on the first breadboard piece. and the third pin to the 5V on the first breadboard piece.
For the LED's, they should have one pin now that connects to all of their cathodes. With that one pin connect it too the ground of the first breadboard piece too. And connect the LED's cathode to the 1, 2 and 3 pin of the VS1053 shown above.
- Make sure to glue down the wires in the breadboards so they do not come loose, the ones attached to the Arduino should be ok but if your still nervous about it, it doesn't hurt to add a little glue there too.
Step 21: Start to Close the Box
Be careful not to use too much hot glue here, and I would recommend Epoxy if you have access to it. but starting with the top, glue the boarders of your faces together. You may need to push the top a little bit to get it too stay.
Following that, you should get the two side faces glued on. This will leave you with only the front face left. now before you close it completely, I would plug everything in and be sure the box works.
The box at this point should look like a box full of spaghetti from all the wires.
Finally, once it all works put the face of the box on. and your box is complete!
Step 22: Aesthetics
For a final nice touch, you can add some rubber feet to the box to help with sliding and they also like more professional as well.
Step 23: Play Music!
When you turn the knob, the light will change from each LED to the next, Each LED changes the songs on 7 of the buttons, with the 8th button always being a stop playing button. This comes to 21 songs, but you can add up to 8 LED's coming to a total of 56 songs!
Thanks so much to the Instructable's Team and Community.
Participated in the
Epilog X Contest