Maker Pro
Maker Pro

microcontroller for FFT

M

Matt Warnock

Jan 1, 1970
0
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?
 
M

Mark Little

Jan 1, 1970
0
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
suggestions.

regards,
Mark
 
O

onestone

Jan 1, 1970
0
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.

Cheers

Al
 
R

Robert Lacoste

Jan 1, 1970
0
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 [email protected] if
interested.

Friendly yours,
Robert Lacoste - ALCIOM : The mixed signals experts
http://www.alciom.com
 
T

Tim Shoppa

Jan 1, 1970
0
Matt Warnock said:
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?

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.

Tim.
 
I

Ian Buckner

Jan 1, 1970
0
Tim Shoppa said:
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.

Tim.

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.

Regards
Ian
 
S

Sir Charles W. Shults III

Jan 1, 1970
0
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.

Cheers!

Chip Shults
 
S

Steve Roberts

Jan 1, 1970
0
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$.

See: http://www.silabs.com/products/pdf/an142rev1_1.pdf

Steve Roberts
 
T

Tim Wescott

Jan 1, 1970
0
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.
 
Top