Here i am going to show to how to make a toy model of piano in simple steps.
A tone is a sound which is produced by a regular vibration. So it has only one frequency even though intensity/amplitude can vary. Loudspeaker is one of the electronic transducer which converts electrical signals to pressure variation to produce the sensation of sound. The diaphragm of the speaker will vibrate according to the frequency and amplitude of electrical signals feed to it.
Audible frequency range of humans is from 20Hz to 20KHz, so we are going to generate electrical signals in this range using 555 IC and feed it to the speaker. The 555 timer is operated in Astable multivibrator mode. In Astable mode multivibrator mode, timer produces accurate free running square waveforms without the aid of any external triggers.
Read more about Astable mode of operation here.
Step 1: COMPONENTS REQUIRED
1) 555 TIMER IC - 1
2) SPEAKER - 1
3) POTENTIOMETER 10K OHMS - 1
4) RESISTORS 1K OHMS - 5
5) PUSH BUTTONS OR TINY SWITCHES - 4
6) CERAMIC CAPACITOR 0.1uF - 1
7) ELECTROLYTIC CAPACITOR - 1
8) 9V BATTERY -1
9) BATTERY CAP - 1
10) GCB (GENERAL CIRCUIT BOARD) -1
11) 8 PIN DIP IC SOCKET - 1
Step 2: CIRCUIT DIAGRAM
Step 3: WORKING
You can easily understand the operation of the above circuit if you know the working of astable multivibrator using 555. Here capacitor C''(10 uF) acts as a coupling capacitor which blocks the DC component and bypass ac signals into the speaker. DC component just means the average of positive and negative half cycles is not zero.
The amplitude of the 555 timer output i.e, square waveform, cannot be changed but its frequency can be changed by varying values of R1, R2 and C. Frequency of the signal going into the speaker or in other words frequency of the astable multivibrator output is given by the formula ,
f = 1.44/((R1 + 2*R2) * C).
Here value of R1 and C is fixed, but the value of R2 can be changed and so the frequency.
The value of R2 is determined by the switch which is pressed as given below.
when S1 is pressed R2 = R' + r1
when S2 is pressed R2 = R' + r1 + r2
when S3 is pressed R2 = R' + r1 + r2 + r3
when S4 is pressed R2 = R' + r1 + r2 + r3 + r4
No of switches and values of r1 , r2, r3 , r4 need not be exact as here. Its upto the one who is making this.
So pressing each switch will generate a corresponding frequency, by which speaker will generate different tones (single frequency sound) for each switch.
Note : I recommend you to go through the data-sheet of 555 timer you are using and know the maximum safe operating voltage.
The intermediate steps of making this piano is not shown as they should not be important.
Any doubts or suggestions are encouraged here :-)