Introduction: A New Age Music Box

We built a music box that played Prince's "Purple Rain", Miley Cyrus's "Wrecking Ball", and Beyoncé's "Single Ladies". The box opens up to reveal a 3D printed carousel on it that has Prince's symbol of love on it, a wrecking ball on it, and a hand on it to correspond to the songs that we had it play. On the inside of the box, there is a Raspberry Pi that controls the songs playing and the movement of the carousel, and on the outside are four switches, one for each song and one to make the carousel spin.

Step 1: Supplies

You will need:
1. 3/4 in. Plywood

2. Hinges, Screws, Wood Glue

3. Raspberry Pi

4. Arduino set

5. Speakers, Switches, Servo

6. A 3D Printer

7. Laser Cutter (Optional)

Step 2: Building the Box

Start by cutting the plywood into the sizes you want. We made our box 8x6x6in, but you could make yours larger or smaller. The box has two main parts: the base and the lid.

The base of the box was made out of five pieces: two for the sides were 4x6in, two for the front and back were 4x8in, and the bottom was 6x8in. Most of the cuts were made at a 45 degree angle so as to make the seams smoother except for the ones that would be touching the lid (one six inch edge on each side and one six inch edge on the front and back pieces). We then cut holes in the front piece to accommodate our speakers and switches that we used. These will vary depending on what you have available to you, but they aren't difficult to make. The five pieces were then glued together to form a box that was 8x6x4in with no top.

The lid was made in the exact same way as the base except the dimensions were 8x6x2in. On the top of the lid, we laser etched our team's logo. You can do the same if you have access, but it isn't necessary. The lid was attached to the base by one hinge centered on the back. We stained all of the wood a dark brown.

On the inside of the base, about one inch from the lip, we put a platform for our 3D printed carousel to sit on. The base was about 4.5x6.5in and sat on a simple lip that we built from scraps and glued on the inside wall of the base. The platform had a hole cut in it so the servo motor could come through and attach to the 3D printed carousel.

Step 3: Designing the 3D Printed Carosel

This part is really up to you on what you wish to put in it. We made Prince's symbol of love, a wrecking ball, and a hand because of the songs we decided to play, and yours can be whatever you want. We first printed the base which was simply a 5in wheel that all of our pieces were then glued onto. The base was then attached to our servo motor.

Our designs are attached so for you to use or simply get inspiration from.

Step 4: Programming the Raspberry Pi

Programming the Pi isn't as easy as pie... If you have a Pi that already has Raspbian on it, the easier this process will be.

1. Before starting, download the music you would like your box to use. Whether it's Beyonce, Fetty Wap, or Billy Joel, anything will work as long as it's in a .mp3 file.

2. Download NOOBS onto the Pi. On the opening screen, hold down shift to also add Raspbian onto the operating system.

3. Open a Python programming window.

4. Type the code below into the window:

5. Run the code by clicking F5.

Step 5: Wiring the Raspberry Pi

1. Add one wire from the switch to the positive port row 40.

2. Add the second switch wire to row 38 on the regular board.

3. Add a 350 ohms resistor from the same right next to the wire in row 38 then have the other side in row 40 on the regular board.

4. Add a 100 ohms resistor from row 40 to a negative port.

5. Add one wire from row 40 to a port on the GPIO.

6. Repeat for any other switches you may have.

Step 6: Programming the Arduino

Obviously the Raspberry Pi is super hard to work with, so let's take it easy with a simple Arduino kit.

1. Download the Arduino program.

2. Add this code into the Arduino programming window:

#include
Servo myservo;

void setup() { Serial.begin(9600); // put your setup code here, to run once: myservo.attach(9); pinMode(2,INPUT); } int state=HIGH; void loop() { int button1state=digitalRead(2); Serial.println(button1state); if(button1state==LOW){ Serial.println("Starting"); myservo.write(88); } else if(button1state==HIGH){ Serial.println("stopping"); myservo.write(90); } // put your main code here, to run repeatedly:}

Step 7: Wiring the Arduino

1. Solder two wires to a switch. One wire on the long, middle prong and another on either side.

2.Add a servo in ports E5-E7 (black in E5, red in E6, white in E7)

3. Connect a jumper wire from Pin 9 to A7

4. Connect another jumper wire from B5 to a negative port.

5. Add a jumper wire from A6 to a positive port.

6. Add another jumper wire from port 5V to a positive input.

7. Insert a 350 ohms resistor from row 16 to the negative ports.

8. Add one switch wire to row 14 and the other wire to row 16.

Comments

author
seamster (author)2016-06-17

Very clever idea! Nice work on this :)

About This Instructable

191views

3favorites

License:

More by cnickels:A New Age Music Box
Add instructable to: