NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Fourier transform

November 14, 2010
by Hexorg
Hexorg's Avatar

Hey everyone, calculus 2 classes are starting to pay off :D So I started researching about how to transform an audio signal into a frequency bar graph. You saw those all the time in various audio programs and clubs.

So I came across the Fourier transform, which suggests taking an integral of the signal function times e^(-jwt)... I'm going to read ACD at a constant time intervals, so it's not going to be hard to integrate my sound function under a little window (just add all the values), but what should I do with that e^(-jwt)?

Is there a better way to find a frequency bar graph? I'm planning to have 16 different frequency ranges (so 16 bars), and ACD reads value from 0 to 1024, while 512 is the x-intercept of the sound wave)

November 14, 2010
by bretm
bretm's Avatar

Search for "AVR DFT" (discrete Fourier transform) and you'll find a lot of discussions. This one has a link to a good bit of software that someone already wrote, and an example for Arduino (which uses the Atmega168 I believe) but that will still need a few changes.

November 14, 2010
by Hexorg
Hexorg's Avatar

Bretm, thanksm just what I need :)

P.S. Ooo I like that LCD screen XD

Post a Reply

Please log in to post a reply.

Did you know that you can use printf and scanf functions to talk to your computer from your USB NerdKit? Learn more...