Arduino LED spectrum analyzer help!

Hi, I am fairly new to working with an arduino and the whole EE field in general. However, I have found a project that interests me, which has proven to be fairly difficult, and have been trying to find information about how to go about building it. Without much luck I am turning to this forum for help. My goal is to build something that is very similar to these projects:

I plan on taking an audio input directly from the source and feed it into the arduino and then have it output onto leds different colors based on the frequencies of the audio. My problem is that I do not know enough about the hardware to make it possible. What I figured i need is an external power supply to power about 50 ws2811 leds and a pair of old headphones to transmit audio to the arduino but I do not know the inbetween aka what the breadboard and arduino should look like, and what additional hardware I would need

The code for the 1st project is here: GitHub - snskreationz/Ws2811-Spectrum-Analyzer: "Waterfall" spectrum analyzer using WS2811 string RGB LEDs. Pictures/videos and info can be found at www.12vtronix.com

Thanks for your help!

Hi, I am fairly new to working with an arduino and the whole EE field in general.

Are you a good programmer? I'd say the software is the tough part. :wink:

Just for reference, neither of those projects looks like a spectrum analyzer, although there is apparently some frequency analysis going on... That's OK... Whatever effect you want!

What I figured i need is an external power supply to power about 50 ws2811 leds

For a large number of LEDs, you'll need an external power supply and some kind of driver circuit.

With a [u]serial shift-register approach[/u] you can address an almost unlimited number of LEDs with just 3 output lines. Another approach is a matrix connection. (A matrix LED arrangement does not require a matrix connection.) There are special purpose driver chips, and you can look around. I've got a lighting effect with 48 individually-addressable LEDs, controlled serially with six [u]MAX6968[/u] chips.

and a pair of old headphones to transmit audio to the arduino but I do not know the in between aka what the breadboard and arduino should look like

What? Headphones don't transmit audio... A headphone-output from a laptop or smartphone, etc., can work if the volume is cranked-up. A line-level signal (the RCA connections from a CD or DVD player, etc.) is also good.

However, the Arduino cannot accept the negative voltage swing of an audio signal. The easiest solution is to [u]bias the input[/u] at 2.5V. Then you simply subtract-out the bias in software.

If you don't need more than 7 frequency bands, check-out the [u]MSGEQ7 chip[/u]. It has 7 bandpass filters built-in and a single time-multiplexed variable DC output. The chip also takes care of the negative voltage issue. It's not super-easy to program (because the timing is critical) but I'd say it's 10 times easier than FFT or software-digital filtering.


[u]This is a spectrum analyzer[/u]. A spectrum analyzer (of this type) is basically a bunch bargraph-type meters, each meter representing a different band of frequencies. Traditionally, the low frequencies are on the left and high frequencies on the right.

A real spectrum analyzer is an instrument with calibrated & labeled frequency & dB scales, but a spectrum analyzer effect doesn't have to be precise. i.e. I've made a VU Meter effect that automatically adjusts/calibrates to the average level so it's totally useless as any kind of meter, but as a meter effect it automatically adjusts for quiet songs & loud songs or volume changes and you always get a lot of "meter action".