Paper Piano With Arduino

by Barqunics in Circuits > Arduino

12764 Views, 13 Favorites, 0 Comments

Paper Piano With Arduino

Paper Piano With Arduino

This is a simple project using an Arduino, a drawn keyboard using lead pencil, a paper, and a speaker.

Materials

- Male-to-male jumper wires : https://amzn.to/2O66ZW0

- Breadboard : https://amzn.to/2N3C8g8

- Arduino Uno board : https://amzn.to/2N1vZkM

- Resistor 1M ohm : https://amzn.to/2oY0SYJ

- Speaker : https://amzn.to/2qRuE2B

- Pencil

- A4 paper

- Paper clip

Drawing Your Keyboard

IMG_2218.JPG

The sensors are created by drawing on a paper with a pencil. In my project I only use 8 keys. Each key piano is a sensor that the sensor and your body form a capacitor. The more its capacitance, the more charge it can store. The capacitance of this sensor depends on how close your hand with the sensor. If you want to get some nice, thick lines on the paper.

Putting It All Together

Paper Piano 2.jpg
IMG-2211.JPG

- Lets put resistors on breadboard.

- Connect your jumper wires to drawing via paperclip.

- Each one end of resistor requires two jumper wires.Connect your each jumper wire from paper piano to each one end of resistor and then connect wires to digital pin 3-10.

- The other end of each resistor is connected to pin 2.

- Connect a speaker to the Arduino with one wire to the digital pin 11 and the other one to the ground of the Arduino.

Code

Before you start playing your paper piano, you will need Capasitive sensor library if it is not already installed. This can be downloaded from here.

When you want to add a new library into your Arduino IDE. Go to the directory where you have downloaded the ZIP file of the library. Extract the ZIP file with all its folder structure in a temporary folder, then select the main folder, that should have the library name. Copy it in the “libraries” folder inside your sketchbook.

Let’s Play

You can make tone sounds if you tap keys of paper piano. If the keys are not responsive,you may need to change capacitiveSensor() value for your drawing or you may need re-trace over your drawing again. I recommend you thick lines on paper when you draw piano keys on paper.