Maker.io main logo

Arduino FFT Spectrum analyzer on VFD display GP1287

2024-02-16 | By Mirko Pavleski

License: General Public License Audio Arduino

An audio spectrum analyzer is a device that visualizes the frequency content of an audio signal. It represents the distribution of frequencies in a graphical form, typically displaying amplitude or power on the y-axis and frequency on the x-axis. This tool is commonly used in audio engineering, music production, and sound analysis for various purposes. This time I will describe how to make an audio FFT spectrum analyzer on a 256x50 pixel VFD display.

yu

These types of displays emit very bright light with high contrast and clear visibility from wide angles and have a wonderful retro look.

 

The device is very simple to build and has only a few components:

  • Arduino nano microcontroller
  • GP1287 VFD display with a resolution of 256x50 pixels
  • Stereo potentiometer
  • Two capacitors
  • Two resistors
  • Pushbutton switch 

ygfu

Thanks to the two libraries used (U8G2 and fix_fft), the code is very simple and can be easily modified. The audio input to the Arduino is on A0, with bias at the midpoint by 10K to Ground and 10K to +5V. At the input, we can also put a potentiometer to control the amplitude of the input signal. First, let's look at the case when we bring a signal with a certain frequency and shape to the input. For this purpose, I will use the signal generator that is part of my oscilloscope.

rdt

The spectrogram clearly shows the fundamental signal, as well as its harmonics. I will test it with square and sine waves. As we change the frequency of the oscillator, so does the fundamental of the analyzer display. Here we can see that the frequency range of this instrument is from 0Hz to 4.5 KHz, where most of the music signals are found. However, the purpose of this device is not to perform any precise audio analyses and measurements, but primarily has a visual function. The following image shows how the device works in conditions when we bring a complex audio signal to the input.

vgfhygfth

Otherwise, the device has two modes of operation that can be changed with the push of a button, in one mode the bars are next to each other, and in the other, there is a certain distance between them.

yguj

Finally, the entire assembly is housed in a suitable box. This is not a professional tool because it has a relatively low resolution and frequency range, but can serve as a great educational tool and visualizer for some audio projects.

huiohu

制造商零件编号 A000005
ARDUINO NANO ATMEGA328 EVAL BRD
Arduino
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum