Low Pass Filter
Each piece of electronic equipment can affect the signal passing through it. We've heard music produced by square waves sounds distorted...
Each piece of electronic equipment can affect the signal passing through it. We've heard music produced by square waves sounds distorted. While we may be used to music that sounds this way from classic video games, if you tried to reproduce someone's voice or a piano note accurately using the square waves, you wouldn't be able to do it.
One way to fix this is filtering. By pushing the square waves through a circuit, we can transform the square waves into sine waves without using a DAC at all.
One way to fix this is filtering. By pushing the square waves through a circuit, we can transform the square waves into sine waves without using a DAC at all.
The circuit we use is depicted below, with the end of the circuit connecting to the end of a headphone jack, so each student can listen to the sine wave note directly. The frequency and amplitude of the note change as the frequency of the square wave output changes.
The pseudocode is included below:
void loop() {
for(int i = 1;i<15;i++){
tone(1,1000*i);
delay(2000);
}
}