Arduino Floor Piano

3,131

13

11

Introduction: Arduino Floor Piano

Over one summer I created this floor piano. It is slightly modeled after the piano featured in the movie "Big". I spent almost 100 hours creating this, but I estimate it would only take me 30 hours if I were to do it again. There is over 120 feet of wire, 300 lines of code, and countless pieces of wood inside of it. I entered it in our county fair and got grand-champion. I went on to the state fair with it and also got Grand Champion.

Feel free to make any changes or improvement to your own piano.

Have Fun and Good Luck!

Step 1: Supplies

  • Arduino Uno
  • Breadboard
  • 1k Resistors (12)
  • 18-20 Gauge wire (about 75 ft)
  • Plywood (3 ft by 4 ft)
  • Acrylic Sheet (4 sheets 18"x24")
  • Wood Lath (I used about 160 feet)
  • Circular Saw (Blades - 24 Tooth and 140 tooth)
  • Alligator Clips (36)
  • 3/8 inch thick Window Seal Tape (About 42")
  • Hinges (4-6 the smaller the better)
  • Soldering Iron
  • Solder
  • Spray Adhesive
  • Spray Paint
  • Aluminum Foil
  • Wood Glue
  • Super Glue
  • Clamps

Other Household Items and Tools will be needed

Step 2: Drawing the Outline

I first drew the outline of the piano onto the sheet of plywood, so that it was easier to visualize the piano.

The white keys measured 6 7/8" by 33"

The Black keys are centered on the edges of the white keys and measure 4" by 15"

The storage area is 3" wide and runs the length of the piano (4ft)

Step 3: Building the Dividers

First I measured and cut the wood lath so that it would be the same size as the lines I drew in the previous step.

Next, I sanded the edges to avoid future slivers, and for a smoother look.

After sanding, I used Elmer's wood glue to glue all the pieces down. I clamped the dividers to the plywood for about 30 minutes.

I then made risers for each key. These would fit right into the key compartments and would allow the keys to be flush with the top. I made stacks of lath that were 3 high and then laid long pieces of lath over the top.

Step 4: Painting the Piano

1. I used the black spray paint to paint the black keys and the storage compartment.

2. I let the black paint dry for a few hours, then I put tape over the black.

3. I then spray painted the white keys white. The tape kept all the black keys black.

4. After letting the paint dry, I removed the tape.

Note: You do not need to paint all of the keys. I only painted them, so that I could potentially use semi-opaque acrylic later.

Step 5: Cut and Paint the Acrylic

1. measure the dimensions of each key and draw a copy of the key onto the sheet of acrylic.

2. Cut the acrylic

I first tried to use an acrylic knife, but this failed. It ended up shattering the acrylic sheet instead.

I used a circular saw blade with 200 teeth. This worked great and cut fast.

3. Check to make sure it is the correct size

If the panel is too large trim a little bit off and check again.

4. spray paint the acrylic

Try to paint as quickly and as evenly as possible. The paint likes to pool up and then it does not look as nice.

Step 6: Make the Sensor Pads

1. Cover a large sheet of paper with aluminum foil. I used spray adhesive and it worked great. (The heavier the paper, the better)

2. Cut the shapes of the keys into the pads. I just used a scissors and rough estimates of length.

3. Draw the outline of the pads onto the paper.

This is one of the most difficult steps. make sure you follow the patterns and cut along the lines so that a middle piece sticks through and the two halves mesh without touching.

4. Cut the pads in half

I used a utility knife, but if you have an xacto-knife that would work better.

5. The second piece of the sensors goes on the acrylic panels. Cover the side of the panel that is not painted with foil. (Spray adhesive works great!)

Repeat these steps for every key on the keyboard

Step 7: Assemble the Keys

1. Place risers

Glue these down using wood glue

2. Place foam strips

Place the foam strips along the vertical (long) ends of the keys. These act as springs. When the acrylic is pushed down, the foam condenses and the panel lowers. When the acrylic is released, the foam rises.

3. place paper/foil

Place the foil between the two rows of foam. Make sure that the two halves are not touching at any point.

4. Place acrylic on top of the foam.

I found it useful to label the acrylic panels so that I knew where the panels fit.

Now you have something that looks much like a keyboard, but it does make any noise. In the next steps we will add sound to the piano.

Step 8: Wiring

Fortunately, the electrical/wiring in this project is quite simple. It consists of 3 wires running to every key and one resistor for every key.

On one side of the bottom pad, you want to connect positive voltage, and on the other two, ground and a signal wire. The signal wire runs directly into a digital in/out on the Arduino. The ground wire runs through a resistor (any value works) and then to a common ground. All of the wires are concealed in the storage compartment.

1. Drill 3 holes from the storage to each key.

These holes should be large enough to fit the wire through.

2. feed wire through the holes.

For my alligator clips, I just cut the ends off of wires. I fed the wire from the clips through the predrilled holes.

Clip two alligator clips to one plate, and one to the other,

3. Solder wires

The next step is to solder the wire from the alligator clips to the long wires that go back to your Arduino and breadboard.

4. Connect Wires

The one wire that is connected two its own panel gets connected directly to 5v. To do this, I ran a jumper wire to the positive rail on a breadboard then every key had a positive wire running back to this positive rail.

On the other panel (the one with two wires) connect one wire directly to a digital In/Out on your Arduino board. The second wire connects to ground with a pull-down resistor. I connected ground to the negative breadboard rail then used the small rails to connect the resistor and wire to ground.

Step 9: The Code

There are two main programs of the code. The Arduino code and the python code. The Arduino just relays the information back to the computer using the serial ports. The computer then plays the audio files based on the inputted numbers.

1. All files can be found in this GitHub Repository. https://github.com/haberkornsam/ArduinoFloorPiano.git

Make sure to keep all the files in one folder

2. Upload the file "final_Arduino_Program" to your Arduino

3. Set your working directory of your Python IDE to the folder containing all of your files.

4. Open the file "1 octive final.py"

5. Change the serial port on line 65 to the port containing the Arduino. (I found this by using the Arduino IDE)

6. Run the program "1 octive final.py"

There are instructions to change the instrument within the python file

Have Fun!

Step 10: Improvements

I few ideas I have had for improvements for the piano.

  • Create a game like Guitar Hero
  • Create an octave switcher to allow for a wider range of notes to be play
  • Create an instrument switcher to switch between instruments
  • Create a GUI for easier navigation
  • Replace the Arduino with a Raspberry Pi, so that it doesn't have to be connected to a computer
  • solder a PCB instead of a breadboard

Improvements I have made

  • I created a cover for over the storage area
  • I cut a hole in the side to allow the cover to be closed and also connected to the computer

First Time Author Contest 2018

Participated in the
First Time Author Contest 2018

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share

    Recommendations

    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    11 Discussions

    0
    Naomi Clark
    Naomi Clark

    Question 21 hours ago

    I was reading through the instructions, but I didn't see anything about power. What is this piano running on? Is it a battery? Is it plugged into the wall?

    0
    haberkornsam
    haberkornsam

    Answer 7 hours ago

    The piano is powered via USB from the computer that it attached to it

    0
    Naomi Clark
    Naomi Clark

    Question 23 hours ago on Step 3

    Hi!
    I'm buying the supplies I need but I can't get my hands on any wood lath (or whatever you used fir the risers and border). How wide are the wood strips?

    0
    haberkornsam
    haberkornsam

    Answer 7 hours ago

    The wood strips are about 1/8-1/4 inches thick and 1.5-2 inches tall

    0
    Naomi Clark
    Naomi Clark

    Question 4 weeks ago on Step 6

    Hi!
    I am interested in building my own piano, and loved your example. I was going over the instructions and got confused at step six. What are you referring to when you say pad? What is the pattern? Also, how does the aluminum on the acrylic make contact with the aluminum on the wood, wouldn't you be crushing the foam?

    0
    haberkornsam
    haberkornsam

    Answer 4 weeks ago

    The pad is the aluminum cutout. There is one cutout glued to the underside of the acrylic key and there are two cutouts on the frame of the piano. When the two frame cutouts are connected by the acrylic cutout a signal is sent back to the arduino.

    I tried to model this pattern at a much larger scale. This style is used in most keyboards. Honestly the pattern doesn't matter too much as long as there is not incidental contact. This video explains the pads very well (and I used it for inspiration) https://www.youtube.com/watch?v=nXjj9IXUaA4

    As for the foam - The purpose of it is to be crushed. It acts as a spring and when you step on the acrylic the foam compresses causing the foil to contact and in turn sending a signal back to the computer.

    This system is surprisingly robust. My piano is about 3 years old and works perfectly. It has had lots of kids jumping on it, and nothing has ever broke.

    0
    Naomi Clark
    Naomi Clark

    Reply 4 weeks ago

    Thank you so much! This was a huge help

    Hi! First of all I know its a old project, so sorry for posting a comment.
    I am trying to make the piano, and I followed all the instructions, but when I execute the python program y get the following error:

    File "1 octive final.py", line 199, in <module>

    loop()

    File "1 octive final.py", line 197, in loop

    loop()

    File "1 octive final.py", line 82, in loop

    c4Player.next()

    File "/Library/Python/2.7/site-packages/future/types/newobject.py", line 54, in next

    raise TypeError('newobject is not an iterator')

    TypeError: newobject is not an iterator

    I ran out of ideas on how to solve this. I am running it on Python 2.7.10, i've reinstaled everything and checked the wiring, fist times i forgot to connect the unused Arduino pins to Ground, but after solving this the error still appears.
    Also I hace instaled the two imports serial and pyglet

    Thank you in advance and great project!!

    0
    haberkornsam
    haberkornsam

    Reply 1 year ago

    Hello,
    I'm happy you are making the piano!

    Without seeing exactly how your system is set up there is only so much troubleshooting I can do... One issue I ran into early on was pyglet was not installed with the correct version. (https://stackoverflow.com/questions/44350629/nameerror-global-name-eventloop-is-not-defined-pyglet?noredirect=1#comment75749343_44350629)

    try
    pip uninstall pyglet
    pip install pyglet==1.2.4

    if that doesn't work, what OS are you using (windows? mac?) what IDE? or are you running from Command Line? I know for sure it works on a mac from the command line, Enthought Canopy, or Pycharm.

    Hope this helps!
    Feel free to message me any more questions!
    0
    laclavegraficaestudio
    laclavegraficaestudio

    Reply 1 year ago

    Hi!

    I installed all the imports 'serial' and 'pyglet' and answering your questions, I am running it from MAC from the Command Line.

    I found the solution, and for future builds this is what happened. Apparently the method ".next()" is deprecated as you can see in the error, it says "c4Player.next()".

    So the solution is the new method .next_source() as you can find here https://stackoverflow.com/questions/15380488/pyglet-player-next-song

    Apart from that, the prints needed parenthesis print ('a') maybe this is because of the Python version I was running Python 3.

    Thank you for answering!

    0
    Swansong
    Swansong

    2 years ago

    These are so fun! I wish we had the floor space for one :)