Making An Audio Spectrum Analyzer With A Microcontroller

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]

6 thoughts on “Making An Audio Spectrum Analyzer With A Microcontroller

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

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

Leave a Reply to Anthony KaramCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.