Paper Piano

by unoseistres in Circuits > Art

7242 Views, 38 Favorites, 0 Comments

Paper Piano

circuit.jpg
materials.jpg
paperpiano.jpg

"Paper Piano" is a pentatonic scale piano made out of paper and powered with an Arduino and some code! It's a part of a series of education activities to teach science and engineering concepts using building, crafts, and art. This was created at Princeton University under The Council on Science and Technology. Contributors include Aatish Bhatia, Bernat Guillen Pegueroles, and Sharon Lee De La Cruz.

Paint Your Circuit

messynotmessy.jpg

Print out your paper piano (fits on a 8.5" x 11" sheet of paper). Grab a paint brush and your conductive paint. Paint over the pink outlines, which is your circuit.

NOTE:

  • Card stock tends to be a great paper to use because of its stiffness

  • How you apply your paint onto the paper is important!

    • The conductive paint is a bit thick so dipping your paintbrush into some water is encouraged

    • If your paint is watery at first, don't be alarmed, just grab a bit more paint

    • Avoid textures, try to get your paint as smooth and solid as possible.

Fold and Cut Your Circuit

IMG_1373 2.JPG

Fold your circuit along the grey dotted line. Using a scissor, make cuts along the black dotted lines in between your keys and remove these in-between sections, making sure not to cut the circuit.

Arduino

detailofcircuit.jpg
Unknown.png

The Arduino's job, in this case, is to map the different keys of your paper piano into the musical notes of the pentatonic scale. The Arduino code can be found here, under the folder labeled "paperPianoPentatonic". Set up the circuit as shown in the diagram.

  • In the diagram above, the red and green alligator clips connect the 5V and GND (ground) terminal of the paper piano the the corresponding terminals of the Arduino.

  • The yellow alligator clip connects the Vinput (input voltage) terminal of the paper piano the the A0 terminal of the Arduino. This is where we measure the voltage of our paper circuit.

  • When connecting your speaker to the breadboard, notice that the speaker has a negative and positive input.

  • Connect your positive input to DIGITAL PIN 11 on the Arduino

  • Connect your negative input to ground

Code

arduinocode.jpg
paper piano

Open your Arduino program and upload the code provided with this tutorial (right arrow button on the top left).Now it's time to "tune" your piano.

  • Open up your serial monitor. It's the magnifying glass symbol located on the upper right corner of your Arduino program.
  • Press down the left most key of the paper piano.
  • Your serial monitor should give you an average of numbers
  • Input that average into your code. You'll be replacing the numbers under the variable "keyReadings". From left to right, replace the key readings with the ones on your serial monitor. i.e. float keyReadings[] = {276, 225, 195, 203, 171};
  • When you're done with replacing your key readings save your code and upload it again.
  • Your average numbers should decrease from left to right when you press the keys and take readings from the serial monitor
  • Play your piano, do you hear the pentatonic scale when you press the keys from right to left or left to right?

How This Circuit Works

circuit_flow_visual.jpg
paino2.jpg

Think of the flow of voltage like the flow of water. The 5V power supply is like a water tower. Water (electric current) can flow through the 5 different pipes (keys). When you choose a pipe for the water to flow through,it eventually flows to the "ground", and our "V-input" or voltage input measures the water pressure (voltage).


In our circuit, what we're really measuring is the degree to which our paper circuit opposes the passage of an electric current, i.e. its resistance. Depending on the distance of the keys you'll get a higher or lower resistance. Pressing the rightmost key creates a longer path for current to travel, and this higher resistance circuit results in a lower voltage reading at V-input. Similarly, pressing the leftmost key creates shorter path for current to travel, and this lower resistance circuit results in a higher voltage reading. Using the Arduino, we've mapped these different voltage readings to the musical notes of the pentatonic scale.