Introduction: Arduino Trinket Music Box

Picture of 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 Switch

1 Buzzer

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.

Picture of 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.

Comments

JemChalweDoPorzygu (author)2015-08-25

I did something similar to it
I just made 2nd bottom to hide all batteries and SD card and ArduinoProMini.
Used very small limit switch and normal on/off switch if my bae got bored of sound :D
I used also nice thing for jewellery

http://majsterkowo.pl/szkatulka-na-bizuterie-z-poz...

Just look at photos :)

JPasi (author)JemChalweDoPorzygu2015-08-25

Wow! You did a lot more than I did. I chose to use a piezo for simplicity, but I think I might try for an SD card like you for the next one.

JemChalweDoPorzygu (author)JPasi2015-08-27

By using SD card and a specia program on arduino you can play real sons. It's better than 8-bit melody

seamster (author)2015-08-25

This looks really cool!

JPasi (author)seamster2015-08-25

Thank you! I had a lot of fun making it.

About This Instructable

1,689views

10favorites

License:

More by JPasi:Arduino Trinket Music Box
Add instructable to: