I'm working on a project now where my goal is to be able to pick out selected frequencies (between 20Khz and 250Khz) from an input signal and transmit the strength of each of those frequencies to a data visualizer in real time. The frequencies I will create myself and inject into the signal which otherwise has unwanted ambient electrical interference and other noise components. What I'm aiming for is something similar to the graphic equalizer LED bargraphs you would find on an old stereo, but detecting frequencies above the audio range.

Right now I'm working with an ATMEGA328 (arduino) that is running a fixed-point FFT algorithm on the incoming signal and sending the data via an XBee radio to my computer. However, the microprocessor isn't fast enough to be able to analyze for the high frequencies I'm looking to detect..

Does anyone have any advice on how I might do this? Using analog hardware or a dedicated IC perhaps?

Many thank yous!

  • 1
    \$\begingroup\$ What spectral resolution do you need and how many frequency components are you looking for? What detect time window do you have and how often will you want to make a determination about the spectral content (measurements per second)? What is the range of signal levels to be analysed? \$\endgroup\$
    – Andy aka
    Commented Sep 24, 2015 at 7:55
  • \$\begingroup\$ An AVR may not be fast enough to the real time sampling without dedicated hardware, but analyzing the data shouldn't be a problem as long as you don't run out of memory. One thing to think about is how fast/often you need the results of the detector. Another thing to think about:"For 500kHz you need at least 1Ms/s (probably closer to 2). If you want to be able to detect 20kHz in the same run you are looking at at least 50 consecutive samples required for FFT analysis. This will be an indicator for minimal required RAM. If you need more resolution, you need more RAM. \$\endgroup\$
    – jippie
    Commented Sep 24, 2015 at 8:03
  • \$\begingroup\$ @Andyaka I want a minimum of 6 frequencies to be detected (I am also generating the frequencies and injecting them into the input signal, which is otherwise noisy) ... resolution should be pretty sharp on those frequencies. Ideally no fewer than a 10ms sample rate.. I'm using this for a musical application so the analysis should be snappy enough to create smooth musical transitions as a single frequency component becomes stronger or weaker. The signal levels can vary from the mV range to upwards of 5V pp (I have some zener diode protection circuitry on the input to clip anything above this) \$\endgroup\$
    – JCR
    Commented Sep 24, 2015 at 8:05
  • 1
    \$\begingroup\$ Have a look at the Microchip dsPICs. \$\endgroup\$ Commented Sep 24, 2015 at 8:10
  • \$\begingroup\$ @jippie updated the post to make the real-time aspect clear, also dropped the upper frequency requirement to 250kHz. \$\endgroup\$
    – JCR
    Commented Sep 24, 2015 at 8:11

1 Answer 1


If you know what frequencies you're looking for, run a Goertzel for each of those frequencies. https://en.wikipedia.org/wiki/Goertzel_algorithm This is much more efficient than an FFT. This algorithm is used, for example, to detect tones in touch-tone phone systems.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.