Go Down

Topic: Frequency Analysis (Read 1 time) previous topic - next topic

halley


I get the basic idea of a Fast Fourier Transform to take a waveform and turn it into a histogram of frequencies.  I also get that an FFT algorithm is probably beyond what I want to run in software on a modest AVR platform.

However, I don't understand how to do analog filtering into known bands at all.  I'd like to do a basic display like a stereo's equalizer, receiving voltages on analog inputs to represent the prevalence of signal in multiple frequency bands.

Anyone have some resources that help the analog helpless?

retrolefty

This might get you started. By the way this is probably the best audio DIY site on the web:

http://sound.westhost.com/project63.htm

Lefty

halley

Thanks, retro.  I'm swift enough to think there are some pinout errors on that schematic with the amp on it, and maybe I need one of those circuits per bandpass I want to detect.  But I'm dumb enough to not really get what level +VE is compared to digital +5V.  I might also need to somehow filter it to get an average over the last millisecond (instead of catching an AC waveform).

florinc

#3
Apr 03, 2009, 04:45 am Last Edit: Apr 03, 2009, 04:57 am by florinc Reason: 1
I found these 2 articles very interesting:
http://elm-chan.org/works/akilcd/report_e.html
http://www.maxim-ic.com/appnotes.cfm/an_pk/3722

The first project is around an atmega8.
Both have downloadable source code.

This may be useful as well:
http://www.mathworks.com/products/demos/shipping/fixedpoint/fi_radix2fft_demo.html?product=PO




rocketgeek

I would do this as a pure analog. Check out the Wikipedia article on the Sallen-Key filter (http://en.wikipedia.org/wiki/Sallen_Key_filter). It's a single op-amp dual pole (12 dB/octave) filter that can be configured as low pass, band pass, or high pass. The wikipedia article is somewhat terse but has examples of all three types and appropriate math for calculating the behavior.

In order to get an analog level out of that ac signal, run it through a full-wave rectifier and a low-pass filter. Voila, DC voltage representing the total RMS energy in that band.

PS -- what I described will require either a dual supply for the op-amps or a railsplitter to give you an appropriate virtual ground for your audio input.

Go Up