Introduction: Arduino Trinket Music Box
My little brother had told me on a few occasions how Disney's UP has the best soundtrack of all time. When he told me that he was getting engaged, I immediately knew what I wanted to get him as a wedding present; a custom music box that played the main theme from UP. This is a very basic project. When I started this, I understood a tiny bit of Java and had never done anything with electronics. I would highly recommend this as a project for someone who is beginning with Arduino.
Step 1: Acquire Materials
Most of these parts can be interchanged other parts to suit your specific needs. I ordered my parts from www.adafruit.com
1 Arduino Board
1 Power Supply
1 Box with lid.
I have attached my Adafruit Shopping list in pdf form for convenience.
In addition to this, you should also acquire the sheet music for the piece that you would like the music box to play when opened. I was able to find the sheet music on Google pretty easily. The sheet music that I used is also attached in pdf form.
Step 2: Assemble the Music Player.
The diagram above illustrates how the components are put together. Sorry the pictures don't match the actual pieces that I used, but I don't know how to create new components in Fritzing yet. If you don't have much experience with soldering, I taught myself how to do it by watching YouTube tutorials. It is not as intimidating as it sounds.
The embedded video shows all of the components pieced together.
Note: In the video, the code has already been uploaded to the board. The music will not play until you have uploaded your code.
Note 2: If you are viewing this via mobile device, the above video may not play. Access it on youtube at
Step 3: Write Your Code
I learned the basics of how to code using the Arduino IDE. One painful lesson that I learned is to make sure that the IDE that you are using is compatible with your board. I was using the IDE that I downloaded from arduino.com, just to find out hours later that the Adafruit Trinket needed an earlier version of the IDE that could be downloaded from adafruit.com.
After viewing some tutorials, I found someone who had made a Piezo buzzer play the Imperial March and I followed their example to make my code. The code that I used is attached in pdf form.
Upload your code to your board and the music should play.
Step 4: Decorate Your Box and Attach Your Components
I am not artistic. Not at all. I think my wife did a great job painting the box for me.
Once the paint was dry, I attached the components to the walls of the box using super glue.
If you are viewing via mobile, you can view the video here:
Thanks for taking the time to view my first Instructable. I plan on making more boxes, so if you have any suggestions, they would be welcomed.