Connect with us

microcontroller for FFT

Discussion in 'Electronic Design' started by Matt Warnock, Jan 31, 2004.

Scroll to continue with content
  1. Matt Warnock

    Matt Warnock Guest

    I'm looking for a microcontroller that can sample audio and do a FFT for
    freq 400hz->4khz. I need the fund freq and the amplitude. What is a good
    processor to look at?
  2. Mark Little

    Mark Little Guest

    There are other factors that will determine what suits your requirements.
    For example, what dynamic range are you looking for? Some microcontrollers
    have built-in A/D converters but they may or may not provide the dynmaic
    range that you require. Also, the frequency resolution that you require will
    influence what you need. The finer you want to make the resolution of the
    spectral estimates, the more memory you will require.

    If you describe your project people may be able to give appropriate

  3. onestone

    onestone Guest

    If you need to do this in real time I would suggest using a DSP, or an
    ARM. You can do it on a micro, but at 8000 samples a second you have
    just 125 usecs to run the calculation, many low end DSP's can't handle
    that. As Mark said it also depends on the resolution you require. More
    resolution = more RAM required, and of course more calculations. If you
    don't need real time the MSP430 has a built in 12 bit A/D, for decent
    dynamic range, and a 16 bit architecture, including multiplier for MACS
    operations. It can readily handle a 128 bin FFT, and there is sample
    code available for this.


  4. It depends of course on the number of points needed... A low range
    microcontroller can do but you will need at least enough on-chip RAM to
    store the FFT buffer. For exemple on my own PIC'Spectrum design (published
    in '99 in Circuit Cellar) I used a PIC17C756 to :

    - Acquire in real time an audio signal at 16Ksps
    - Calculate the FFT of the signal, using a 256 points 16-bits fixed point
    FFT. This FFT itself took around 40ms
    - Generate in real time the FFT spectrum on a VGA display using
    software-generated video

    By the way I've now ported this original FFT routine on the 18F family, this
    code is available on a royalty-base. Contact me at if

    Friendly yours,
    Robert Lacoste - ALCIOM : The mixed signals experts
  5. Tim Shoppa

    Tim Shoppa Guest

    You say you need an FFT... and then you say that you need fundamental
    frequency and amplitude. Those requirements aren't necessarily
    contradictory, BUT keep in mind that a FFT of 100000 points is in
    itself 100000 numbers (actually 200000 with phase information), and
    picking the two quantities out of the FFT isn't necessarily easier
    than picking them out of the time series.

    If all you really need is the fundamental frequency and amplitude, and
    the "fundamental" is clean and dominant, a frequency counter and a
    lock-in amplifier will get you there far more elegantly. Doing those
    functions in a low-end microcontroller is very feasible.

  6. Ian Buckner

    Ian Buckner Guest

    Further, if you know what the fundamental frequency is,
    you could use a variant of the Goertzel algorithm, or a DFT
    of just the few frequency bins you are interested in.

  7. Reminds me of the misguided effort to make submarine decoys with digital
    synthesis methods. They realized that you absolutely had to use analog back
    then, as any decent FFT would reveal the quantizing frequency of a
    synthesized wave and know it was no more than a decoy.
    And even today, that is probably still true- for some things, analog is
    still the best way to go.


    Chip Shults
  8. Silicon Labs (Cygnal) has a FFT for one of their ~100 mHz 8051
    derivative processors on their web site in Keil C. it does a 5 kHz max
    input fft and dumps it to the serial port, gets its data from a 8 or
    12 bit dac on chip. I'd also look at Analog Devices DSPs. The
    development board it runs on is ~150$.


    Steve Roberts
  9. Tim Wescott

    Tim Wescott Guest

    TI, Motorola and Analog Devices all have good 16-bit DSPs, and I like them
    all equally well. I usually end up selecting by how well it's going to fit
    into the board.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day