Audio Spectrum Analyzer

There is a great tutorial on how to setup and use a 2×16 LCD on the Arduino website:

Here’s a good explanation of FFT theory:

My pinout is a little different because I wanted to save as many PWM pins to add servo control for the next stage of this project.  I’ve been tinkering with the idea of moving physical objects around based on audio input, instead of just showing levels on a display.

To visualize the frequency levels of the incoming audio signal I use the 8-bit Fast Fourier transform code which is discussed here:,38153.0.html

Honestly, I’m not convinced that what I’m seeing on the display is an accurate representation of the audio spectrum that I’m listening to, but it looks pretty cool and that’s all I really care about at this point.  There is hardware available that would produce much more accurate results than this software.  There is a “Color Organ” project on the Make website that I’d like to build someday:

Additional Reading:

Code and libraries on GitHub

6 thoughts on “Audio Spectrum Analyzer

    1. varind Post author

      I am not using the msgeq7 ic. That chip would probably produce more accurate results, but for this project I use the fix_fft software library to analyze the frequencies.

      Yes, the audio input is connected to the analog inputs 4 and 5 of the Arduino.

      1. Sangs

        Can you please send me the detailed pin configuration as to which wire of lcd , 3.5 mm jack and the arduino pins I am supposed to connect…….?
        Guess I am going wrong understanding the program

        1. varind Post author

          I’m still a beginner too, and this project is a couple of years old, but I’ll do my best.

          First, the 3.5mm jack goes through a small circuit that I built, and is described in this post:

          That circuit connects to the arduino’s +5V, GRD, A4 and A5 pins. I think this keeps the input voltages in the range of -2.5V to +2.5V. Then in the code it is transformed into the equivalent of 0V to 5V (0-1024 values).

          You can alternatively use a microphone with a preamp (instead of a line out jack) like this one:

          If you do get one this one it hooks up to +3.3V, GND, and any analog in. It works with 5V too, but using 3.3V works much better!

          The LCD can be hooked up using any 6 pins on the Arduino, then define which pins you use in the code. Look at the LCD tutorial:

          I use pins 2,3,4,7,8,12 in my code so that the PWM pins are available for other uses. I spent some time experimenting with servos that responded to the frequencies.

Leave a Reply