Introduction: Customizable Piano Music Box

About: In which I turn the thoughts from my head into objects in my hands

A musical gift for someone NOTEable...

A friend surprised me with a birthday gift, and I wanted to return the favor by creating something personalized to his interests. He's pretty amazing on the piano, so I had originally planned to record one of the clips he's sent me on a recording greeting card and write a note... boring, I know. When I got the card, however, I noticed that the electronics formed a shape similar to a grand piano.

Essentially, I built a mini piano and rigged the recording greeting card to play a song whenever the piano's cover is lifted past a threshold. There's a spring on the underside of the cover so that when a finger presses and releases the cover, it causes the spring to hyperextend past the threshold and trigger the song (go to this link for music box in action; the video is also attached below for convenience). The recording only plays for 30 seconds, but you can also press down on the lid until it turns off.

Step 1: Materials

  • Recording greeting card
    • You can choose to buy just the recording module for ~$3 or a full greeting card version for ~$12. The card is completely unnecessary, but I got that option because it was from Amazon prime so I could get it quickly within 2 days. The recording module would take around 4 weeks to ship from China, even though it costs much less.
    • There are different shapes for the circuit, so you might need to play around with the piano cutting files that I provide. The circuit in the Amazon card happened to be almost perfect for a grand piano shape, but this one for example is suboptimal because the circle is above the center of the rectangle instead of tangent to the left edge.
  • laser cutter access
    • I have this courtesy of my university, but for those who don't have this, you could outsource to online services such as ponoko.com or talk to a makerspace near you
  • acrylic or wood to laser cut
    • To get the black grand piano aesthetic, I used 1/8" thick black acrylic. I made prototypes in 1/8" wood since it's cheaper though. You could also use black stain on wood, but laser cut wood edges won't match your color scheme.
  • glue (super glue works well for acrylic)
  • tape
  • printer (the keyboard keys are printed on paper and cut out)
  • retractable pen that you don't care about (this is the type that you press a button to reveal the ballpoint: you just need to take it apart for the spring)
  • laser cutting files (attached at the bottom of this step)
  • If you want to design your own laser cut box:
    • CAD software: I used SolidWorks, but Autodesk Fusion 360, CATIA, or Pro/E are alternatives
    • graphic design software: I used Adobe Illustrator, but Corel Draw or Inkscape (free!) are alternatives

Attachments

Step 2: Hacking the Recording Circuit

Did you get the recording module, or the actual card? I got the card because I needed this pretty quick (hence relying on amazon prime's free two-day shipping), but you could get the recording circuitry for less than 1/4 of that price, albeit with at least 4 weeks of waiting for shipping from China.

If you got the card, this is what you probably have in front of you:

Follow the instructions to record the sound you'd like to use (if you got the bare bones circuit, do the same and record what you want). NOTE: if you're unhappy with the sound quality, you can improve the recording by opening the card and placing the mic closer next to your mouth or speakers; scroll down to see how to get to the mic. I went with a piano version of Senjougahara Tore since it's what my recipient likes. Then carefully rip open the glued flap of the card covering the circuit.

Here's a close up of the circuit. Your particular one may look a little different, but the main parts should be similar at least.

  • A = microphone; This is the component that captures your recording. If you're having trouble with sound quality of your recording, you could put this piece closer to your mouth or speakers.
  • B = speaker; This is where your recording will be emitting from as it plays back.
  • C = buttons; These are the buttons you used to control the recording. Pressing both simultaneously allows you to re-record.
  • D = contact switch; This is the part that controls the recording when you open the card. It's essentially a contact switch: when the metal shim contacts the metal surface beneath it (opening the card pulls the plastic shim from between them and closing the card slides the plastic back in between), a circuit is complete, playing the recording.
  • E = red LED; The LED stays on when you are recording and blinks when the recording is playing.

Now decide: do you want the recipient to be able to record their own tunes in the future to customize the music box? If yes, you should leave the mic, button, and LED connected to the chip: you'll just have a little more trouble with the wires later on as you cram everything into the laser cut container. If no, you can remove all of them without impairing the playback ability. Simply take the wires connected to the circuit board and fatigue them off: by "fatigue them off," I mean wiggle the wire around where it's connected to the board until it snaps off. These circuits are pretty cheap so the wire is really thin and thus easy to remove.

You should keep the components for future projects! Those buttons in particular look fun to use...

This should leave you with a clean, low-profile circuit. Use scissors to cut it out of the card (if you got the card; no need to do this if you have just the circuit board). Be sure to cut around the plastic shim portion! In fact, cut about 1/2" more to the left of the plastic shim than I did in this picture (go to step 5 in which I explain how I had to fix that issue...).

Take this and carefully cut alone the long edge of the circuit board: essentially, you want to disconnect the plastic shim portion. Rotate the piece you cut by 90 degrees and align the plastic piece underneath the metal shim.

This is the circuit you'll put in the laser cut container (plus the other circuit components if you chose to keep them)!

Step 3: Laser Cut Design (in SolidWorks)

In order to design the laser cut piano exterior, I used SolidWorks, which is a program for making 3D computer aided designs. It's free for university students (for up to 3 years, I think if you apply on the company website), but for others who don't have access, there are alternative free online programs you can use such as TinkCAD (not as great, tbh) or the (my favorite) best of them Autodesk Fusion 360. My SolidWorks parts and assembly are attached in a zip folder to this step.

I won't provide incredibly detailed instructions on how to use CAD software, but I'll provide at least a basic overview of what I did so you could whip this up yourself if you know how to CAD. The assembly files are also attached to the bottom of this step in a zip folder for your reference.

First I took measurements of the electronics I would need to house, and replicated it in a sketch to represent the space it would take.

Then I used the offset tool to create another sketch that's 0.2" bigger in all dimensions. I had to play with the fillet sizing to make the curves look aesthetically pleasing because the offset tool ends up making the curves slightly smaller (same radius but longer lines = shorter curved portion).

Then I offset this curve 0.1" in both directions (so one larger and one smaller version of the curves) to create a rim. These rim cutouts would be stacked to form the cavity where the electronics would sit, sandwiched by solid cutouts. The solid cutouts on the bottom will help with forming the piano keys (hence why the layers are slightly offset). I also cut away the front of the rim pieces (right in front of the piano keys) and replaced it with a solid front face so that the front would be smooth acrylic instead of layered like the sides.

The hinges were inspired by this picture: I wanted fairly low profile hinges on the left side so the lid of the grand piano could be lifted upward easily. I started with designing the bottom hinges, cutting small slots in one of the rim pieces so that the bottom hinges could slide into something for better stability. The good thing about CAD is that you can visualize how the proportions will look before it's even made, which I took advantage of to play with the sizing of the hinges.

And the top ones:

Finally, I added slots in the bottom piece for legs to slide into.

I played around with the length of the legs so that the piano looked correctly proportioned. They ended up being around 1/4 of the longest dimension of the piano (the long edge of the piano is 3.3", and the legs are roughly 0.8" tall)

Finished isometric view of the piano design:

Finished design with the lid lifted:

Step 4: Laser Cutting and Assembly

Because those designs were done in SolidWorks, I exported the designs to laser cut by saving faces as .dxf files and converting the line colors and thicknesses for laser cutting in Adobe Illustrator.

The Adobe Illustrator file is attached to the bottom of this step (and to the Materials step) for laser cutting. Again, you can outsource the cutting to a maker space or online service (such as ponoko.com) if you do not have laser cutter access yourself. If you need other file formats, feel free to let me know!

Once you have everything cut out, it's assembly! Double check that the electronics will fit within the box by lining up the edges with one of the rim pieces.

Follow this numbering guide for the assembly instructions:

Stack and glue pieces 1, 2, and 3 together like shown below. Make sure you line up the top curves, not the bottom straight edges.

Add piece 4 on top, again lining up the top curvature. Then on the left side, add 5, then 6, then 7 like shown below. 6 is used as a spacer in between the hinge parts.

This is the tricky part: Grab part 8 and keep the circle cutout from the hole inside of that hole. Put glue on either side of that circle cutout (so the circular faces of the cylinder) and insert that in between pieces 5 and 7 like shown. Try to line up the circles in this assembly as close as you can before pinching 5 and 7 together to help the glue stick. Pinch them together WHILE rotating part 8 like a hinge: you don't want to accidentally glue all of these pieces together and prevent rotation! If the hinge is slightly stiff, that's perfect; it'd ideal to have the lid be able to rotate but also stay in its position if you just let go.

Add piece 9 right below 7, and repeat the hinge process with pieces 10, 11, 12, and 13. Add piece 14 right below 12.

Glue piece 15 standing up at the front of the piano like shown below. Then glue 16 on top of 3.

Take piece 17 and glue the square pins from pieces 8 and 13 into the square cutouts of 17. The lid-hinge assembly is complete!

Glue pieces together in pairs so that you have three total legs. Glue them to the bottom of 1 in the square holes to make your final piano stand up.

Attachments

Step 5: Adding Electronics and Calibrating

Now that you have your mini piano, go ahead and slip in your electronics to see how things fit.

Judging from how things look, cut the plastic shim to around 1" length at a ~80 degree angle like shown below -- the length may differ, so use your judgement! This angle ensures that the shim will stay under the metal contact switch prong even when it slides out (sorry, hard to explain with words..). Tape together the pieces of the electronic (the plastic shim part and the actual electronics part) at some distance apart: you'll test this out to figure out what optimum distance they should stay taped. Use blue painter's tape so as not to damage the paper as you peel and unpeel the tape. I also taped on a longer piece of cardboard to extend the top part of the plastic shim piece (the part wrapped in blue tape in the picture below)

Now remember, you want the electronics to play the recording whenever the piano's cover is lifted past a threshold. This means that you want a ~35 degree angle to trigger the song, so you'll iteratively tape and untape the plastic shim portion closer or farther from the electronics pieces until you get something you like.

Take apart a retracting pen (the type that has a button you press to reveal the ballpoint) and keep the spring from it. You may need to cut down the spring, but the idea is that the spring keeps the lid open *right* at the threshold. Glue the spring to your electronics like shown below: remember than you can slightly pull and deform the spring to change its resting length.

The ideal calibrated music box should work like the one in the video below:

Step 6: Completion & Future Steps

To finish up, print out a 3" long version of this picture of a piano keyboard. Cut and glue it to the front of the piano where the keys should go.

And that's it! A tiny piano that'll replay a song when the lid is flicked.

Tweaks to try for the future:

  • Keep the two buttons for recording so that the song can be changed to whatever the recipient wants whenever he/she wants.
  • Instead of a prerecorded song, I actually wanted to make a mini piano that the person could play. It would interface with a piano HAT on a raspberry pi. However, my recipient already has a keyboard in his room, so that'd be excessive work.. it would still be an interesting idea!
  • I was also thinking of turning the piano into a speaker somehow; you would be able to connect to this piano-speaker via bluetooth while you put on your favorite classical music playlist.

Feel free to leave questions, comments, concerns, and critiques below: enjoy!

Homemade Gifts Contest 2017

Second Prize in the
Homemade Gifts Contest 2017