Hey, I'm more or less new at Arduino and I want to create a music reactive LED String.
My first/previous project was a LED cube (worked well), otherwise I don't really have a lot of knowledge.
My idea is to use a arduino uno to control 2 meters of a ws2812b LED String. I plan to connect the arduino with a mic and then use the fft library OR a MSGEQ7 Chip to split the sound signal into 7 frequencies. Then I'd like to let the colour react to the frequency and the brightness to the loudness of the music.
First question: Would you recommend using the fft library or the MSGEQ7?
In the other thread I just asked about the possibility of analizing frequencies, in this one I'd to get some general suggestions for improvement. I also thought, that this forum fits better to my questions...
It's hard to "improve" something that doesn't exist yet.
You'll probably need to power the LED strip at both ends, and possibly in the middle. You get a voltage drop across the "thin" built-in conductors and you'll get inconsistent colors & brightness if you power a "long" strip from one end.
It will probably he helpful to include some kind of automatic sensitivity control so you get good results with loud & quiet music. If you want an example of how to do that see my [u]World's Simplest Lighting Effect[/u]. I do something like that in my "real" effects and I also switch between the 5V and 1.1V ADC references depending on the signal level.
I recommend you experiment with the MSGEQ7 and LED strip separately.
Once you get those working and you understand the "data" you get from the MSGEQ7 and the kind of things you can do with the LED strip, it just up to your imagination to do something "interesting". And, once your hardware is connected and working you can modify/improve the software at any time!
While you're experimenting with the MSGEQ7 you can send the results to the serial monitor and/or try it with one or two (or 7) LEDs. It might also be helpful to generate some test tones at known frequencies. (You can do that with [u]Audacity[/u].)
To keep things "interesting" you might want to add some "movement" up or down the strip (if you're not planning that already) and/or randomly change the colors associated with each frequency, etc. (Just for example, I've made chase effects that change direction with each "beat" or where the speed varies with the loudness.)
P.S.
Are you sure you want to pick-up room sounds with a microphone? These kinds of things usually work better with a direct electrical connection to a line-level or headphone-level signal (or sometimes to a speaker output*) so it only reacts to the music and not to any other sound/noise in the room.
You have to "be careful", especially with high-power amplifiers because they can smoke your Arduino. And, if you have a bridged amplifier output (with no ground) you can smoke your amp when you ground the signal.
Hey DVDdough thanks for your very helpful answer! I wanted to use the led strip only with music in my room and planned to place the mic close to my bluetooth box. Do you think that would work?
I wanted to use the led strip only with music in my room and planned to place the mic close to my bluetooth box. Do you think that would work?
Yes that should work. It's time for you to start experimenting!
I've experimented briefly with a SparkFun microphone board. The one I have doesn't have a gain/sensitivity control and I had to turn-up the TV a little louder than I normally listen, even with the microphone a foot or two from the speaker. So, that particular microphone board wouldn't work with background music but it would be OK with music cranked-up to normal "music listening levels".
I'm very happy to hear this! I ordered all the components today, my mic will be the groove sound sensor. I will start experimenting with the LED string and if I have any other questions, you are my answer right?
Hey, all components arrived today, and I worked with 5 LEDs for testing. I read, that every single LED can use 0,06 amps. I have 120 leds, so it would use about 7 Amps. But this number seems kind of unrealistic to me. Should I really buy a 7 Amps power supply? And if yes, do you have a suggestion?
120 RGB LEDs is 360 LED "elements" and it kinda' adds-up doesn't it?
That's actually "worst case" with all of the LEDs lit-up white so that probably won't happen very often (if ever) but good engineering design calls for a power supply rated for at-least those worst case conditions.
Ok, so it will be a 5V 10A power supply. I just need 7,2 but 10 amps won't damage the string right?
Right. [u]Ohm's Law[/u] says Current = Voltage / Resistance. The resistance will change depending on how many LEDs are on and how bright* they are but since the voltage is fixed at 5V the important concept to understand is that the current depends on the resistance, which a characteristic of the LED string.
A 12V car battery is capable of putting out hundreds of amps but if you connect a regular little LED with the normal current-limiting resistor you'll get about 20mA.
Or, here in the U.S. the standard outlet voltage is 120VAC. With nothing plugged-in no current flows. If you plug-in a 100W light (and turn it on) you get a little less than 1A.** If you plug-in a hair drier you'll get 10-15A and if plug-in a hair drier and a toaster you'll draw excess current and blow the circuit breaker!
*Actually, with PWM dimming the peak current doesn't drop but the average current does.
** Power is calculated as Watts = Voltage x Current.
Ok, thank you! When I played around with the LED string I noticed, that there are the Adafruit Neopixel and the Fast LED library. Which one should I use?
If I was using an ESP32, I'd use the Adafruit Neopixel library which not only works well with the ESP32, the library uses C to take advantage of the ESP32 built in features.. Otherwise, I'd use the Fast LED library.
My msgeq7 arrived today, but when I looked in the internet for wiring plans I found a couple of different plans. Im not sure which I should use.
Furthermore, I don't really understand them. For example in this one (https://www.baldengineer.com/wp-content/uploads/2012/01/14411047844_4b3a8d1ffc.jpg) there are some arrow Icons from the capacitos going into nothing.
What does that mean? And which wiring plan should I use?