You can use GNURadio to examine the performance of a Goertzel filter tone detector. Its selectivity depends on the number of samples used.
Watch this short learning video which demonstrates using GNURadio to examine filter performance. If you want to run this yourself, just copy and expand the graphic to understand the flow diagram. Or you can use the GNURadio Companion file here.
In the video, you will see how to use GNURadio to create a tone signal and run it through the Goertzel algorithm. By converting the output signal to a power reading, you have a circuit than can recognize a tone of the specific frequency. Then, you measure the strength of the output signal to know when a tone is actually present, and for how long.
The flow diagram shows how to set up a signal source of varying frequency and amplitude, and how to tune the filter. Also, it demonstrates using a GNURadio tabbed notebook to display different signal displays. The easiest way to show a strength meter is to use a GUI Number Sink
Goertzel Filter Tone Detector for Arduino
Previously, I posted some articles showing how to build an Arduino Morse Code Decoder. This series showed how to use Arduino analog input to read audio, a Goertzel filter to detect the presence of a Morse Code signal, and then translated the Morse into text.
At the time, I wondered how to manage the bandwidth of the Morse filter. By varying the number of samples used by the Goertzel detector, I could increase or decrease filter bandwidth. The trade-off was the amount of time required for the filter to work. With GNURadio, you can experiment with various sample lengths to figure out the right bandwidth and timing requirements for your decoder.
Keep in mind that to decode Morse signals you need to capture the rising and falling edges of the tones. This means that you must sample two or three times faster than the shortest “dot length” you expect to receive.