Introduction: Programmable Electric Music Box

Hi, I am Cameron and I am 14 years old. I had the idea for this project a while back, but never made it. When I saw this contest I was motivated to attempt to make it. I am glad I did because I got a lot better at using Tinkercad, I used TPU for the first time, and I got some practice with electronics. The music box works fairly well, but some things could still be improved. So if you have any ideas or tips, please let me know. Also, for the explanation of this project, I will be mostly using pictures as I believe that is the best way to show the process. Thank you!

Programable Electric Music Box

Supplies

  • 3D Printer
  • PLA Filament
  • TPU Filament
  • Hot Glue Gun
  • Hot Glue
  • Philips Head Screw Driver
  • #4 x 1/2 in Screws
  • Thin 6" x 7" Base (Any material that can be screwed into)
  • 8 Passive Buzzers
  • High Torque DC Motor
  • Arduino Nano
  • Cable for Arduino Nano
  • Sandpaper
  • Hobby Knife
  • Conductive Copper Tape
  • Wire Stripper
  • Variety of Dupont Wires
  • Electrical Tape
  • Ruler
  • Paint
  • Drill
  • 1/16 or Small Drill Bit

Step 1: 3D Print

Use the files below to print all of the pieces. Do not scale up or down. Print all pieces in PLA except for the two labeled with flexible which should be in TPU. The Arduino Nano Stand is only needed if you are using a Nano board. After printing, remove supports and use sandpaper when necessary.

Step 2: Prepare the Base

Cut any thin material that can be screwed into easily to the dimensions 6" x 7". You can now paint the base if you would like. If you are painting the base, I would recommend sanding it first for better adhesion.

Step 3: Add Axles to Barrel

Glue in the axles pieces to the barrel on both sides.

Step 4: Pre Drill for Barrel Stands

Use the barrel stands on the barrel to mark out spots to pre drill.

Step 5: Add Barrel to Barrel Stands

Screw in one barrel stand. Slide in barrel and then screw in the other stand. Test to make sure it rolls.

Step 6: Add Knobs Onto Axles

Slide the two knobs on the axle. This may require some sanding and hammering.

Step 7: Pre Drill for Motor Stand

Add the motor to the motor stand and connect motor shaft to the knob. Use this to mark the spots for pre drilling.

Step 8: Screw in Motor Stand

Screw the motor stand onto the base and glue in the motor at the right height.

Step 9: Connect Flaps Stand and Flaps

Screw the flaps piece to the flaps stand.

Step 10: Add Copper to Flaps

Stick on a small piece of copper tape to each of the flaps.

Step 11: Pre Drill for Flap Stand

Pre drill holes for flap stand. You want the flaps to just barely miss the barrel.

Step 12: Add Copper to Thin Flaps

Add a thin strip of copper tape to thin flaps.

Step 13: Add Thin Flaps

Screw in flap stand and use glue or screws to attach the thin flaps so they rub on the bottom of the barrel.

Step 14: Set Up Buzzer

On the positive terminal of the buzzer add female Dupont pins. On the ground terminal add a stripped wire.

Step 15: Glue in Buzzers

Put the wires through the holes and glue in the buzzers.

Step 16: Screw in Buzzer Stand

Screw the buzzer stand in. The stripped wires should go back through and the female Dupont pins should come through the front.

Step 17: Add Arduino Board

If you are using a Nano board screw in the stand and put the board on it. If you are using an Uno board just put it next to the base. The wiring and codes are the same for both boards.

Step 18: Wire Up

Tape the stripped wires onto each of the copper flaps. You can use the picture and the diagram to match the rest of the wiring. Then, upload the code below to the your Arduino.


const int pins[] = {5, 6, 7, 8, 9, 10, 11, 12};

const int notes[] = {440, 494, 523, 587, 659, 698, 784, 880}; // You can change tones if desired.


void setup() {

 for (int i = 0; i < 8; i++) {

  pinMode(pins[i], OUTPUT);

 }

}


void loop() {

 for (int i = 0; i < 8; i++) {

  playNote(pins[i], notes[i]);

 }

}


void playNote(int pin, int frequency) {

 tone(pin, frequency);

 delay(0); 

 noTone(pin);

}

Step 19: Wrap Peg in Copper

Wrap the peg in copper tape. You can make as many of these as you would like. They can be screwed onto any spot on the barrel to play different notes at different times.

Step 20: Add Copper on Barrel

Add copper tape all around the barrel and poke the wholes through.

Step 21: Play!

Screw in some pegs, turn on the motor, and play some music. The video shows a simple tune played by the music box.

Make Some Noise Contest

Participated in the
Make Some Noise Contest