Pages: [1]   Go Down
Author Topic: Frequency Analysis  (Read 1407 times)
0 Members and 1 Guest are viewing this topic.
Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


« Last Edit: April 02, 2009, 09:57:00 pm by florinc » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 618
Posts: 33939
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like you might want to look at this DSP link:_
http://interface.khm.de/index.php/labor/experimente/arduino-realtime-audio-processing/
Logged

Seattle WA
Offline Offline
Full Member
***
Karma: 1
Posts: 208
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: