The heart of this project is the wonderfully versatile 555 timer, configured as an Astable Oscillator (An oscillator that continues to provide output pulses as long as it is turned on.)
If you look at the circuit for the original Stylophone
, you will see that the 555 has a diode and transistor hung off the discharge line (pin 7). These additional components ensure that the output waveform has a duty cycle of 50%.
In a standard configuration, a 555 allows for the timing capacitor (C) to be charged via R1 and R2, but discharged using a separate discharge pin (pin 7) only via R2 - this means that the cap charges using one path, and discharges using a different circuit path, resulting in an output that may not spend equal amounts of time being High and being Low [ie the output does not have a 50% duty cycle.] This is especially true when one of the resistors is being changed to change the tone.
I will admit that I am unsure why the original designer was worried about the duty cycle - remember that this instrument produces square waves - they are a *rich* source of harmonics..
I found a cool way of connecting the 555, that ensures that the duty cycle is 50% using a much simpler configuration here.
Essentially, the oscillator is connected so that the normal 555 discharge connection is not used. Instead, this circuit uses the output pin to both charge, and discharge the timing capacitor, ensuring that the duty cycle is kept at 50%.
The frequency of oscillation can be adjusted by varying the voltage on the Control Voltage pin (Pin 5) - this allows the Stylophone to be tuned to other instruments.