Sound – Audio Projects

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.

For More Details: Electric-Analog Piano

Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button
Close
Close