On my last blog post, I discussed the library that I will be using on this blog post. We will be using the library that I forked and modified. Same as before, we will be using a PC speaker output going straight to an Arduino Mega. This is the arduino code that I used http://codepad.org/ezlp9tKT .
On Audacity, I generated two sine waves - 425Hz and 700Hz.
On Audacity, we can mute the channels to be able to verify if the Goertzel algorithm works.
Experiment 1 - Both Channels muted
Magnitude(425Hz): 15
Magnitude(700Hz): 11
Experiment 2 - 700Hz Active / 425Hz Muted
Magnitude(425Hz) 234
Magnitude(700Hz) 5984
Experiment 3 - 700Hz Muted / 425Hz Active
Magnitude(425Hz) 6299
Magnitude(700Hz) 152
Experiment 4 - 700Hz and 425Hz Active
Magnitude(425Hz) 4328
Magnitude(700Hz) 4243
If I adjust the master volume of my laptop, the Goertzel algorithm reports the change of magnitude. To conclude, we can see that the Goertzel Algorithm can detect and distinguish the target frequencies.
Special Thanks to jacobrosenthal.
No comments:
Post a Comment