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
- MDF Wood
- 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

Step 3: Assemble the Frame

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

Read more: Electric-Analog Piano