Spectrum analyzers are fun and valuable tools that are used to monitor certain frequency bands and then show the amplitude for each "bucket" of frequencies. They often take the form of simple LED matrix or virtual displays, but Instructables user emdee401 wanted to make one of his own that utilized an array of RGB LEDs behind acrylic blocks for a floating effect. Additionally, he desired to add some intelligent features in the form of Wi-Fi connectivity and the ability to choose between various audio inputs.
Because of its powerful processor, ample amount of RAM, and Wi-Fi plus Bluetooth connectivity, emdee decided to go with an ESP32 as his project's microcontroller. And rather than using FFT to split up the audio signal into different frequency bands, a unique approach of integrating band pass filters was taken. Finally, a 74 LED/meter WS2812b strip was integrated to show the resulting audio data in a fun way.
For the vast majority of audio spectrum analyzer projects, Fast-Fourier Transformations (FFTs) are run in order to break up an incoming signal into its component frequencies and associated amplitudes. But instead, emdee designed a series of 10 band pass filters that each use an operational amplifier (op-amp) along with a couple resistors and capacitors to only allow certain frequencies through while blocking out the rest. From here, the amplitude of each signal can be read with the ESP32's ADC, digitized, and sent to the LED strip for viewing.
The housing for this project is what really sets it apart from most other ones. Emdee began by cutting out the backplate, frontplate, and base from 5mm black acrylic sheets and then running the LED strip along the inside of the backplate. From there, he quickly tested the LEDs before gluing together each 10mm clear acrylic tile with the frontplate. Finally, he attached the base to the top portion while leaving it open slightly for the electronics to be added later on.
Two separate PCBs were designed and fabricated for this project. The first is the motherboard, and it contains the ESP32, power management circuitry, audio inputs, and the 10 band pass filters. The second, much smaller board has just three potentiometers for changing the brightness, delay between peaks, and input sensitivity, while the two push buttons change the current mode or select between the line-in and microphone inputs.
Some of the available modes include changing to one of twelve possible LED patterns, the last of which is a screensaver, a VU meter on the top row, or reset the currently stored Wi-Fi settings.
The web interface displays a simple menu to input new Wi-Fi credentials if none are stored on the ESP32 currently. From there, a user can simply access the spectrum analyzer page by visiting its IP address. This page displays all 10 channels virtually and can be used to help debug the LEDs.
Emdee's demonstration video below showcases how the current pattern can be changed between solid colors, a rainbow, and even the classic green/amber/red. It also shows the VU meter at the top with the webpage in the background. For more information about this project and its build guide, you can visit Emdee's Instructables write-up here.