Arduino FFT Visualizer With Addressable LEDs

by ChrisParkerTech in Circuits > Arduino

10431 Views, 19 Favorites, 0 Comments

Arduino FFT Visualizer With Addressable LEDs

Easy Audio Visualizer Using Arduino FFT
anjjm-b0a6o.jpg
ae2sd-lzdh4.jpg

This tutorial will explain how to build an Audio Visualizer with an Arduino Uno and some addressable LEDs. This is a project I've been wanting to do for some time now because I'm a sucker for sound reactive lights. These lights use the FFT (Fast Fourier Transform) library to compute the frequency peaks heard by the built in mic and displays each frequency in a different color.

I had originally planned to include a button and some alternative modes for the display but I didn't get a chance to write the code for it. If you have some Arduino experience it shouldn't be too hard for you to modify my code to include other animations or even just different colors. Al you'll need to add is a button with a 330 ohm resistor.

Code: https://github.com/mrme88/Arduino-Audio-Visualizer...

STL: https://www.thingiverse.com/thing:4541177

Supplies

Elegoo was very kind and sent me an Arduino basic starter kit for this project! You'll want to pick one up if you're new to Arduino or even if you just want some extra common parts: Use the affiliate links to support my content!

https://amzn.to/3fqEkIJ

Here's everything else used:

1/8" Plywood - Local hardware store

Led Strip (5m 30 leds/m) - https://amzn.to/2AUpdbE

Acrylic Sheets - https://amzn.to/3fqMIrX

Mic - https://amzn.to/3fpT2jf

Wire - https://amzn.to/3fpT2jf

Wire stripper - https://amzn.to/3fpT2jf

Hot Glue Gun - https://amzn.to/3fpT2jf

Soldering Iron - https://amzn.to/3fpT2jf

3D Printer - https://amzn.to/3fpT2jf

Filament - https://amzn.to/3fpT2jf

Cut the Base and Sand the Acrylic

Cut.png
Sand.png

Cut the wood into a 1' x 1' square (or match the size of your acrylic). This can be done with a circular saw or handsaw if you can keep the edges square, but it's easiest with a miter or table saw.

Sand both sides of the acrylic sheet with low grit sand paper to frost it. This can be done with a sander or by hand. Avoid high grit sand paper because you'll leave large gashes in the material that will ruin the finished look.

Wire the LEDs and Mic

Solder.png
Vis Schem.png
Test.png

Cut your LED strip into 8 lengths of 8 LEDs. Stick them to the wooden base, evenly spaced and alternating directions. Be mindful of the arrows, these LED strips only work one way. Solder the three outputs of each strip to the three inputs of the next strip. Connect the inputs of the first strip to the arduino board, if you're using my code I used pin 2 for Data.

Before turning your soldering iron off be sure to test your connections with a FastLED example sketch. I like to use ColorPallets.

This is also a good time to connect the mic to the Arduino. Connect the power to the 3.3V output and data to A0. You can test this with the sketch from my GitHub page.

Upload the Code

It's important to test the sketch with your final setup before you glue anything down permanently. If anything doesn't work it'll be easier to fix it now than later. The sketch I wrote can be found here:

https://github.com/mrme88/Arduino-Audio-Visualizer/blob/master/FFT_Visualizer.ino

Open it in the Arduino IDE and make sure all the values at the top next to #DEFINE statements match your setup. Once the sketch is uploaded and appears to work correctly you can move on to the final step.

Final Assembly

Done.png
Spacers.png
Glue.png
More Glue.png

3D print four 1" spacers to separate the acrylic from the LEDs. If you don't have a 3D printer you can use anything else to improvise these spacers. Cardboard or wood blocks would work just fine. Hot glue a spacer in each of the four corners and glue your Arduino and mic somewhere at the bottom so the Arduino can receive power and the mic can hear noise.

Optionally you can drill some holes in the back for easy wall mounting with a couple thumb tacks. Alternatively you can leave this as a desk ornament or command strip it to the wall.

Finally hot glue the acrylic to the spacers in each corner and let it dry. You now have a beautiful LED visualizer you can use to impress friends or entertain yourself!