Introduction: Electric-Analog Piano

Music is a big part of our culture -- everyone enjoys listening to music. But while listening to music is one thing, learning to make music is another thing. Similarly, while making music is a difficult task, building a musical instrument is a whole new challenge. Typically, musical instruments are expensive to make, as only the finest materials are used to create the work of art, but as time goes on, our technology evolves, and we have discovered new ways of making music than traditional musical instruments.

Building a piano has never been easier. Actually, building a piano has never been so rustically homemade either, but nevertheless, that vivid nostalgic style is probably what you were looking for in the first place. We were inspired by a circuit design that we found in an Elenco electronics booklet while learning about electronics in our ninth grade engineering class. Although the circuit didn’t look like a piano, it was able to make different electronic sounds just like the musical notes produced by a piano. We wanted to take this a step further and integrate the circuit into the frame of a piano. By doing this, we were able to create a fake piano that could make different sounds just like a real one. So enjoy learning to make our “Electro-analog Piano”, a new way to make the music that everyone loves.

Step 1: Getting the Goods

Bill of Materials/Tools

  • Materials:
    • MDF Wood
      • 3 Pieces
      • 12" x 1/8" x 12"
    • Speakers
      • 2" diameter
      • 2 pieces
    • Yellow LEDs
      • 1/8" diameter
      • 14 pieces
    • Green LEDs
      • 1/8" diameter
      • 1 pieces
    • Everbilt Clothespins
      • 12 pieces
    • White Printer Paper
      • 8.5" x 11"
      • 2 sheets
    • Skewers
      • 8" x 1/8"
      • 2 sticks
    • Blickeric Black Paint
      • 1 can
    • 3-pin pin slide switch
      • 1/8" x 3/4"
      • 1 piece
    • Pine Wood
      • 1' x 1'
      • 1 square
    • Insulated Copper Wire
      • 19 ft
    • 9v Battery Clip
      • 1 pieces
    • Push Buttons
      • 12 pieces
    • Arduino UNO and Cords
      • 2 of each
  • Required tools:

    • Drill press

    • Bandsaw

    • Clamp

    • Coping Saw

    • File

    • Paint Brush

    • Hot Glue Gun

    • Hand Drill

    • Wood Glue

    • Sandpaper (120 and 220 grit)

    • Scroll Saw

    • X-Acto Knife

    • Elmer's Glue

    • Cork-backed steel ruler

    • Mat

    • 3/4" Drill Bit

    • 1/8" Drill Bit

    • Lead/Tin soldering wire

    • Wire strippers

    • Soldering Iron

Step 2: Making the Components of the Frame

Using a band saw, we cut out the front, back, bottom, top, left, and right panels out of ⅛” MDF wood and filed the sides. Next, we cut out 12 keys out of ¾” pine wood and sanded the edges. Lastly, we cut out four cubes out of ¾” pine wood to help support the sides during the assembly process. Then, we cut out a 1 inch by 1 foot MDF wood plank and saved it for later. Use the blueprint below to reference the size and shapes of the panels. The overall dimensions of the piano are 10”x2.5”x5”. It is important to note that while our drawing has 14 keys, the piano only accommodates 12 keys.

Step 3: Assemble the Frame

To assemble the frame, we glued the pine wood cubes from earlier to the bottom plate about ⅛” away from the edges. Then, we hot glued the left, right, and back panels to the bottom palen and the cube supports. To finish it off, we filled in any gaps with hot glue. We covered the entire left, right, and back surfaces with white printer paper and cut it to the right size using an x-acto knife. We painted the paper black once it was glued onto the piano and painted all the keys white. Reference the blueprint from the previous step to find the orientation of the pieces. Using a drill, make the hole for the switch according to the diagram and use a coping saw to make it the right size (⅛”x3/4”).

Step 4: Coding

We used two Arduino units to program the piano. The code for both arduinos is below:

First Arduino

int pos = 0;

void setup() {

pinMode(A0, INPUT);

pinMode(8, OUTPUT);

pinMode(A1, INPUT);

pinMode(A2, INPUT);

pinMode(A3, INPUT);

pinMode(A4, INPUT);

pinMode(A5, INPUT);

}

void loop() {

// if button press on A0 is detected

if (digitalRead(A0) == HIGH) {

tone(8, 440, 100); // play tone 57 (A4 = 440 Hz)

}

// if button press on A1 is detected

if (digitalRead(A1) == HIGH) {

tone(8, 494, 100); // play tone 59 (B4 = 494 Hz)

}

// if button press on A2 is detected

if (digitalRead(A2) == HIGH) {

tone(8, 523, 100); // play tone 60 (C5 = 523 Hz)

}

// if button press on A3 is detected

if (digitalRead(A3) == HIGH) {

tone(8, 587, 100); // play tone 62 (D5 = 587 Hz)

}

// if button press on A4 is detected

if (digitalRead(A4) == HIGH) {

tone(8, 659, 100); // play tone 64 (E5 = 659 Hz)

}

// if button press on A5 is detected

if (digitalRead(A5) == HIGH) {

tone(8, 698, 100); // play tone 65 (F5 = 698 Hz)

}

delay(10); // Delay a little bit to improve simulation performance

}

/*

Second Arduino:

int pos = 0;

void setup() {

pinMode(A0, INPUT);

pinMode(8, OUTPUT);

pinMode(A1, INPUT);

pinMode(A2, INPUT);

pinMode(A3, INPUT);

pinMode(A4, INPUT);

pinMode(A5, INPUT);

}

void loop() {

// if button press on A0 is detected

if (digitalRead(A0) == HIGH) {

tone(8, 784, 100); // play tone 67 (G5 = 784 Hz)

}

// if button press on A1 is detected

if (digitalRead(A1) == HIGH) {

tone(8, 880, 100); // play tone 69 (A5 = 880 Hz)

}

// if button press on A2 is detected

if (digitalRead(A2) == HIGH) {

tone(8, 988, 100); // play tone 71 (B5 = 988 Hz)

}

// if button press on A3 is detected

if (digitalRead(A3) == HIGH) {

tone(8, 1047, 100); // play tone 72 (C6 = 1047 Hz)

}

// if button press on A4 is detected

if (digitalRead(A4) == HIGH) {

tone(8, 1175, 100); // play tone 74 (D6 = 1175 Hz)

}

// if button press on A5 is detected

if (digitalRead(A5) == HIGH) {

tone(8, 1319, 100); // play tone 76 (E6 = 1319 Hz)

}

delay(10);

// Delay a little bit to improve simulation performance

}

To download the code onto each Arduino, plug one into a computer, enter the corresponding code into the website https://codebender.cc/, and download the code by clicking “run on arduino”. If this doesn’t work, try again and make sure to verify your code to remove any bugs. Also, remember to select the right port for the usb.

Step 5: Testing the Circuit on a Breadboard

We made a plan of the circuit of the piano on TinkerCAD. Reference this diagram to create two identical circuits on a physical breadboard with the materials you gathered in step 1.

Step 6: Attaching Keys/buttons

We took our 1 inch by 1 foot MDF wood plank and started gluing the keys with wood glue. First, we made markings with pencil that went across, one ⅛” away from one end, one ⅜” away from the other end. Then we applied glue to the open side of the clothespin, and stuck it so that the side of the white key part of the keys would be aligned to the keys. We repeated this process for the rest f the keys, placing one next to the other. Once we were finished, we sawed off 2 of ½” x ¾” x ¾” pine wood chunks, and a ½” x ¾” x ⅞” pine wood chunk, for later.

We made another 1” by 10” MDF wood plank that served as a holder for the buttons. We drilled holes that corresponded in distance from clothespin to clothespin. Then we pushed the button wire ends through the holes for each one, and bent it so the perpendicular wires of one button were apart from each other, and all the button wire ends were arranged like train tracks. Afterwards, we took 2 long, uninsulated pieces of wire that stretched from the 6th button to a bit over the edge, and soldered them so they were attached and perpendicular to the ends of the button wire ends closest to the center. When soldering, make sure to use enough wire to connect each component, but try not to use too much because it will take up space on the inside of the piano.

Step 7: Installing the Circuit

After fixing up the frame, We installed the LEDs in the holes and fixed them in place with hot glue, while connecting the wires and resistors to the LEDs by using a soldering iron. We covered any loose connections with electrical tape to prevent a short circuit from happening. We painted the top side black just like the other sides.

We drilled two holes for the batteries in the left and right sides of the bottom face by drilling two ¾” holes side by side. After this, the piano was ready for us to install the circuit. We soldered the components according to the breadboard diagram. Make sure to cover any open connections with electrical tape after you are finished soldering.

Step 8: Wiring the Keys

At this point, the moving parts of the key mechanism were in place, so all that needs to be done is connecting the keys to the circuit to produce sound. We began by threading a 3 inch wire through each clothespin and soldered it to one of the electrodes on the button. We lined up the electrodes so that we could connect one electrode from each button to the positive side and the part with the wire running through the clothespin would be the negative side. Our circuit looked like this:

Once the wires were soldered together, we glued the bottom plate with the buttons on it under the keys. This made it so that if one of the keys were pressed, one of the buttons would get pushed. This is what the completed key apparatus looked like.

Mount the key apparatus on three 1.5” high wooden stilts to elevate the keys above the lip of the front frame.

Step 9: Sealing the Body of the Piano

With this, the components of the piano were finished. One thing we had to do before the final assembly was gluing a ¾” x ¾” x 3” piece of pine wood over each speaker hole to provide a ledge to mount the speakers on. We glued the speakers onto the wood with a hot glue gun.

Next we had to place the circuit into the piano frame. While you can to this any way you’d like, we recommend putting the Arduinos under the key apparatus and placing the wires behind the keys. Then for supporting the keys, we put the 2 ½” x ¾” x ¾” pine wood stilts at the sides (that were perpendicular to the front) right next to the corner blocks and hot glued it on, and hot glued the ½” x ¾” x ⅞” pine wood stilts at the middle between the 2 other pine wood stilts. Afterwards, we took the key apparatus and placed it right on the 3 pine wood stilts. Once the wires were hidden away, we glued the top to the left, right and back faces by putting hot glue on the edges. Lastly, we glued the front panel onto the piano. The completed product should look like this:

We hope you enjoyed building our electro-analog piano. The only thing left to do is let the music flow -- through the wires of your new piano.

Step 10: Reflection

One thing that we liked about our project was that it was original and theoretically could be used and enjoyed by everyone. This is no normal display item, it is more of a toy that can be used for entertainment and can bring people together the way music does in our society.

One thing we would change is using shorter wires so that is is easier to fit the circuit inside the piano. We had to jam the circuits into the device, so it would have been easier if there weren't any unnecessary lengths of wire that take up space. This problem can be avoided if the circuit is put on a PCB circuit board. This makes the circuit neater and more compact just like on the breadboard. If we used a PCB board, the circuit would have fewer wires that take up space.

If we were to do this project differently, we would work out the details of the circuit first because that was the most time consuming part. It would have been easier to design the frame of the piano around the capabilities of the circuit rather than having a fuzzy idea of the circuit when beginning to build the piano frame. This would make it easier to integrate the circuit into the piano instead of having to figure the wiring out on the go.