Can I get some advice on music reactive LED Tube Light project?

Hi. I am planning to make a LED tube light music reactive, but only to bass.
Right now, I have 5m of WS2812B 30leds/m, Arduino Nano, and some wires and breadboard. Also I'm planning to get max9814 as it can collect from 20Hz to 20kHz.
However, I got really confused when it came to programming part, as I had no knowledge on things like FFT and electrics such as voltages.
If anyone got some advice or tips, please throw it down on me.

The 9814 is just an amplifier chip. I assume you have a "microphone board" with a mic and a complete amplifier circuit?

You don't have to know everything about FFT to use the FFT library but you should understand something about it.

Another option is to use a simple passive low-pass filter to filter-out everything except the bass. A simple filter like that doesn't have a sharp cut-off (so some non-bass will leak through) but the bass content in recordings is usually stronger than the higher frequencies anyway so it might be good-enough.

The low-pass filter would go between the audio preamp and the Arduino's analog input.

The advantage of an analog filter (besides making your programming easier) is that FFT (or other digital filtering) takes quite a bit of processing power, and controlling addressable LEDs also takes lots of memory & processing power so an analog filter allows your processor to focus on the display.

You can try -test the low-pass filter with your stereo system or powered computer speakers to hear what it's doing, For this application, choose a resistor value of around 10K and then experiment with different capacitors.

It's also possible to built a "better" active filter with an op-amp.

I recommend experimenting with the input (audio) and output (LED strips) separately before combining the code into one "working program".

The addressable LED strip just needs a 5V power connection, one data connection to the Arduino, and a common ground. With longer strips you do need power & ground connections about every meter.

The 5V power supply needs to be rated for the required current (amps/milliamps) or more. You can estimate about 60mA (0.06 Amps) per LED. That's "worst case" at full-brightness white. You may never expect that to happen, but you should design for it (or close to it) because "unexpected things" can sometimes happen.

Adafruit has a TON of information on WS2812 LEDs.

The preamp board basically needs the same thing. One connection to an analog input, power, and a common ground.

Just to get you "off the ground", take a look at my World's Simplest Lighting Effect. There is a bias circuit if you want to use a line-level or headphone-level audio signal, but with a microphone/audio board you don't need that.

The code (as written) will NOT work with addressable LEDs. It works with the built-in Pin-13 LED, or you could add an external LED, or with some external circuitry it can drive a light bulb or a non-addressable LED strip, etc.

Dave's garage may be of interest as he does a couple of projects reacting to sound

FFT is not necessary. It is enough to use the MSGEQ7 chip and use only 1 of its 7 frequency levels - the one for 63Hz. It is easy to work with, the scheme is simple and the chip is not expensive.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.