This project is about making a piano from scratch. It does not have keys instead it has touch sensors. So, no need to press it just touch it. After touching it a tone is generated, and at last, we can combine different tones to form a melody.
Why did you decide to make it?I have no experience with any music or musical instrument. So, I created one for myself. I would have interfaced different buttons with the Arduino UNO and speaker but that would be boring. To make it interesting, I added touch sensors instead of switches/buttons.
How does it work?There is a capacitiveSensor library that turns two or more Arduino pins into a capacitive sensor, which can sense the electrical capacitance of the human body.
#include <CapacitiveSensor.h>
The sensor setup requires is a high-value resistor and a piece of aluminum foil on the end. The signal is sent from pin a of the board and received at another pin.
So, the time constant, or the time taken for the signal to travel from one pin to another is calculated. By the formula R into C, or RC time constant. Whenever a person touches the aluminum foil, the capacitance changes. So does the time constant, this is how the touch of a human is detected.
Circuit SchematicThis is the circuit schematic. The Arduino Uno board is connected to a piezoelectric buzzer via wires and a breadboard. There are touch sensing points. If a person touches it then, the microcontroller will detect it. There are 10-kilo ohm resistors connected between the microcontroller and the touch point. And the N-P-N transistor will act as a switch for the buzzer or speaker. Also, there is the 5 volts power supply. All these things are connected with the help of this breadboard.
Components & ConnectionsArduino Uno
The Arduino Uno prototyping board is the main component and brain of the project.
Breadboard
Here we have the breadboard, to hold all the components together without the need to solder them.
Resistors
Then we have 7, 10-kilo ohm resistors. we will connect them as per the schematic.
Transistor
This is an N-P-N transistor, it will be used for switching the speaker.
Speaker
And, Here is the speaker, it will be used to play the tones.
Alligator Clips
And alligator clips to make connections with foil strips.
Aluminium Foil Strip
This is the main component of this project. It has a few aluminum strips glued to a cardboard strip. It will act as a touch sensor.
Musical NotesBelow are the frequencies that were assigned to different keys of the piano board.
Sa 240 Hz
Re 270 Hz
Ga 300 Hz
Ma 320 Hz
Pa 360 Hz
Dha 400 Hz
Ni 450 Hz
int freq[] = {240,270,300,320,360,400,450,480};
Issues- Whitenoise When we were not playing any tune, the speaker generated a lot of white noise.
- The volume of sound was not constant, due to loose connections.
- Playing this happy birthday tune required a lot of practice, as we don't have any background experience in music.
This circuit can be used as a touch sensor.
It can be attached to the knob or handle of the door to detect the touch of the burglar. Then trigger the alarm.
Also, it can be used to make a paper-thin piano, which will have the thickness of cardboard. It won't have any keys to be pressed. but touch sensors. Also, it can be foldable so as to carry it anywhere. A flexible computer keyboard can be made out of it.
ConclusionThis was a very interesting project; we learned a lot while making it. We don't even know whether it is a piano or a harmonium. But we enjoyed it a lot playing tunes on it.
Comments
Please log in or sign up to comment.