While [Vinod] says he’s not an expert in this sort of thing, we really like his audio spectrum analyzer build from a simple microcontroller and LCD display.
It is a well-studied fact that every audio waveform – a recording of your voice, for instance – is just the sum of many, many sine waves. These sine waves can be plucked out using Fourier analysis, using a Discrete Fourier transform. This is the principle that spectrum analyzers operate under; [Vinod] wrote a bit of code using DFT to take apart audio captured from a microphone and output their frequency on an LCD display.
To output the spectrum on his LCD, [Vinod] stacked horizontal bars up into 8 custom characters in his display. Like [Vinod]’s previous audio on an ATMega32 experiment, an LM324 amplifier is connected to the ATMega through an analog pin. [Vinod] has a very clever build on his hands with his spectrum analyzer, and a great answer to the perennial ‘how do I build a guitar tuner’ questions we’re constantly asked.
After the break, you can see [Vinod]’s spectrum analyzer in action. Be forewarned; you may want to turn down the volume.
[youtube=http://www.youtube.com/watch?v=IUYPmN5fJhY&w=470]
Ah, reading the linked page *first* pays dividends! I was going to ask why Vinod didn’t use the more efficient FFT, instead of the DFT. But, he has already stated his rationale!
You could multiply the data with a Hamming window to reduce the spectrum spreading of a single tone.
AT’mega’ , isn’t that the powerful one ? Do we need a ‘mega’ controller for running simple DFT at 16 MHz. I think (can’t surely say that), a cheaper one would have been better. (Its been loooooooong I am out of touch with MCUs, so pardon me if I am making a mistake)
ATmega’s are the cheap ones. Atmel’s range is pretty wide, from small low IO ATtiny’s to the newer hi IO 16 bit ATXmega series. ATmega’s are the standard 8-bit line. It would be a good idea just to browse their site to see what they got, as well as Microchips to see what new PIC lines they have.
Very cool! I worked with a colleague a couple years ago on a similar project which identified materials by tapping on them with a solenoid and running the audio through FFT. We used an 8051.
sweeet, someone did the work for me! gonna build it!