Arduino 2812 5050 RGB music visualizer project.. And a complete newbie.

Hey people.
First time here, first time trying out Arduino and also my first time building a high tech Van interior.

Here's the idea, and what I need help with is what components I need, and how to put it all together to get the best possible result..

In the rear wall inside the Van, I'm going to put in three 50cm long RGB LED strips on each side as vu meters, or visualizers. Theese strips are cut down 1 meter, 144 LED, 5050 RGB individual programmable LED's. Mounted side by side. Three on left side, and three on the right side.
Left side connected to the left channel from a amplifier, and the right side to the right channel. I keep finding lots audio LED projects all over youtube, but they all recieve input from a microphone.
I would like both the sections of three strips not to light up identically, but rather be more frequency dependant. Like a 3 channel vu meter on each side.

In addition, the on/ off funktion needs to be controlled by a IR remote control, and also the brightness to be dimmmable. Theese LEDs can be way too bright to be used in taffic at night. Don't want to get in trouble with the five o.

So. So far I know I'll be using a Arduino Uno. Would I need one for each side, since the three LED strips on one side needs to be conneced to separate pins on the arduino. Or can one board control all six strips?
What do I need to connect the audio signals from each channel to the in side of the arduino? I need attachement cards?
I think I do for the IR remote.

So, basically, what components do I need? Apart from the IR remote, power source to get the cars 14.8v down to 5v, and the Arduino itself.

Let me know if my explanation is a little unclear.. Been in the garage welding all day, so my head are a little fuzzy :o)

Oh, one more thing..
Theese RGB leds draw, I think, 60mA a piece.. And there are going to be 216 on each side.. That would mean that I need a relay board, right? I don't think the Arduino Uno can handle that kind of power..

I keep finding lots audio LED projects all over youtube, but they all recieve input from a microphone.

At the bottom of [u]this post[/u] there is a schematic for a bias circuit that allows a line-level audio signal (like the output from your head-unit into your amps). You need to bias the AC audio signal because the Arduino can't read the negative half of the signal. In fact, it can be damaged by negative voltages and/or the signal can be "damaged" (distorted).

If you want to use a speaker signal (higher voltage), you'll probably need a [u]voltage divider[/u] and possibly a [u]over-voltage protection circuit[/u].

Or since you want frequency information you can try an [u]MSGEQ7 chip[/u]. It can take a line-level audio signal (which you don't have to bias) and it gives 7 time-multiplexed DC voltages for 7 frequency bands. (If you don't want to use all 7, you can ignore or combine inputs.)

If you don't want to use that chip, you'll need to use an FFT or FHT library to get frequency information.

So. So far I know I'll be using a Arduino Uno. Would I need one for each side, since the three LED strips on one side needs to be conneced to separate pins on the arduino. Or can one board control all six strips?

Theese RGB leds draw, I think, 60mA a piece.. And there are going to be 216 on each side.. That would mean that I need a relay board, right? I don't think the Arduino Uno can handle that kind of power..

Yes. Each Arduino I/O pin is only good for 1 or 2 LEDs. And it depends on the number of "channels". A "normal" RGB LED strip is 3 channels. "Stereo" would be 6 channels.

For example, I "rewired" the strip lights in my van. My van came with four 14-lamp "rope lights" mounted in the ceiling. There's a "split" in the center. I wired it as eight "strings" with 7 lamps each. So, I made a 7-channel effect with all 8 segments operating the same. These are little incandescent lamps so just white light.

I used 7 solid state relays just to make it easy. MOSFET driver circuits would have worked, and drivers would be dimmable. Regular electro-mechanical relays would "click". Relays are on-off so any dimming would have to be separate.

I have 7 different random effects including a VU meter and various chasing/sequencing/flashing/flickering effects. All of these effects have random variations to keep things interesting. For example, the VU meter operates in dot or bar-graph mode, and it randomly reverses and inverts (so louder sounds off more lights). None of my effects are frequency dependent. (Unfortunately, my non-backed-up hard drive crashed so I can't share the code.)

In addition, the on/ off funktion needs to be controlled by a IR remote control, and also the brightness to be dimmmable. Theese LEDs can be way too bright to be used in taffic at night.

I'm not sure why it has to be wireless... Mine doesn't dim but I have a 3-way switch - Center is off, one position is all-on, and the 3rd position is the active lighting effect mode.

P.S.
You might look into [u]NeoPixels[/u]. NeoPixels are addressable RGB LEDs and you can individually address/control an almost-unlimited number of LEDs with just a couple of connections and no drivers (or relays) needed.

Thanks a lot for a good answer.
Go nice on me with technical terms, though. Ok? Even if I know the basic of how to knit a couple of cables together, I'm in no way experienced with electronics :slight_smile:

I read somewhere that the Arduino uno has a limit of controling around 300 endividual leds.. Becaue of the limited memory in the Arduino. Is that so? In that case, it seemd like I need two, since one side only will be 216 leds.
By the way. The strips I'll be using are these
As far as I know, they should be individually programmable leds. At least according to a youtube video that linked to them.

Good idea about the MSGEQ7 chip. That was something i didn't know about. When I googled it, I came up with this Sparkfun Spectrum Shield.
Seems like massive overkill for my project because they have 7 channels on each side. But I think I might make something out of it. Also, I would like to make the electronics as tidy as possible. What do you think?
Soldering IC's to PCB's is something I'm not very good at, so I think I'll try to go for ready made components as much as I can :slight_smile:
Also, when it comes to the IR, I think there are breakout boards for that. ( That's another term I'll never remember, breakout board :wink: )

At the bottom of this post there is a schematic for a bias circuit that allows a line-level audio signal (like the output from your head-unit into your amps). You need to bias the AC audio signal because the Arduino can't read the negative half of the signal. In fact, it can be damaged by negative voltages and/or the signal can be "damaged" (distorted).

Does this mean that I can use the signal out from my amplifiers too? Seems like some of them has a kind of throught put of low level signals. And, of course, I DID know that the amplified audio signals would kill anything low voltage.. Just didn't think, lol..
I see that some recomend to put a resistor, 200 - 500 ohm on the data in cable for the LED strip.
Would I also need this if I was using signals from Line In?
I'm thinking that if the amp don't have a low level out, I could make a splitter of some kind on the Line in signal cables.
The only thing that worries me are if this could cause interference and "noise" in my speakers.

Yes. Each Arduino I/O pin is only good for 1 or 2 LEDs. And it depends on the number of "channels". A "normal" RGB LED strip is 3 channels. "Stereo" would be 6 channels.

For example, I "rewired" the strip lights in my van. My van came with four 14-lamp "rope lights" mounted in the ceiling. There's a "split" in the center. I wired it as eight "strings" with 7 lamps each. So, I made a 7-channel effect with all 8 segments operating the same. These are little incandescent lamps so just white light.

So, grnd is one channel, power is a second and the data is the third?
I think I have to use my power supply to run the 5v directly to the strips, as well as powering the Arduino. Just need to find one that can transform the 12.2 to 14.8v of the car.

Yes, I think I know what kind of light strips you mean. Sounds a lot like a Chevy Starcraft or maybe a Ford from around the same time.
I have a 92 Chevy Starcraft, but I have removed almost all of the original wood trim, replaced by some new stuff I made, and all of the lighting inside is gone. I mean the woodwork looks like it was made by the equivalent of a woodworking Stevie Wonder, and the lights was mainly broken, so.. :slight_smile: Most of the electric in the car has been rebuilt and replaced. A never ending project, I fear :slight_smile:

Ok, I see how you made it :slight_smile: Not sure if that would look good here though. I'm thinking that maybe it would look better if the individual strip in each bundle of three would differ. What frequency they would run on might be of minor importance.

I'm not sure why it has to be wireless... Mine doesn't dim but I have a 3-way switch - Center is off, one position is all-on, and the 3rd position is the active lighting effect mode.

Well, there is several reasons for that. And the dimming is also crucial. But mainly, I need to be able to operate my lighting and my main monitor from anywhere inside the van.
I'll have swithces in my overhead console, of course, and also switches for the main monitor in the rear wall.
But I also have rebuilt the lighting in the centre of the roof, and there will be other features, like the door locks, maybe power windows and main parking lights that will also go on a remote. As well as pause/unpause the main stereo, and volume control.. And general dimming of all the lights inside the whole van. Like I said, never ending project :wink:

I was just thinking.. What would happen if one put a dimmer on the main power to theese strips? I have dimmers on the strips I built into the inner roof lighting and they go on somewhere around 20% of full power. For now they are not remotely controlled, though. Just a 12v dimmer I got from a shop here.

Again, thanks for the links and the help :slight_smile:

What do you want with relays?

The WS2812B LEDs (that's what you refer to, right?) are individually addressable. They take a 5V power supply and a single data channel.

Rated at about 50 mA at full power, 216 of them need 10.8A of 5V power. So you're going to need a big buck converter to supply that (look for a 15A model). Wire the power to both ends of the strip, to limit the current in the strip itself.

I was just thinking.. What would happen if one put a dimmer on the main power to theese strips?

You would potentially damage them. Do not do it.

I have dimmers on the strips I built into the inner roof lighting and they go on somewhere around 20% of full power.

So that means you have not got individual, LED addressable strips.

Hello, wvmarle and thank you for answering.

What do you want with relays?

Well, I think that if I go with the remote IR option of turning theese leds on/off, the signals from the remote would go through the Arduino, and since it can't handle the amps, ot would make sense to use a relayboard. Right?

The WS2812B LEDs (that's what you refer to, right?) are individually addressable. They take a 5V power supply and a single data channel.

Those are the ones, yes. But that single data are channel still counting and working with each LED sepearately, if I understand it correctly. So I wonder if that person that claimed that the Arduino had a limit of about 300 individual LEDs it could work with, meant per channel or in total. Does anyone know?

Rated at about 50 mA at full power, 216 of them need 10.8A of 5V power. So you're going to need a big buck converter to supply that (look for a 15A model). Wire the power to both ends of the strip, to limit the current in the strip itself.

Good idea. Thank you.
You mean power to both ends even if the strips individually won't be longer than 50cm?
Yeah, 10.8A on each side.. A total of 6 x 50cm. More than 20A in total. and I thought that LEDs was supposed to be power saving, lol.. Good thing I have a total battery capacity of more than 320Ah.
But I'm also thinking about limiting the max lighting power of the LEDs to about 50%. Otherwise they will be WAY to bright.
That can be done by programming, right? Setting a upper limit to the brightness?

Thank you for commenting :slight_smile:

You would potentially damage them. Do not do it.

So, it's a difference between theese and normal LEDs apart from the built in controller?
I am using a voltage dimmer for my other led strips, and that don't seem to be a problem at all.
But that would include a MOSFET driver circuit too?

So that means you have not got individual, LED addressable strips.

No, the other strips already in the centre of the roof are just normal, 12v blue and red 60led/meter strips. Connected to a 12v dimmer.
I only have a few rgb's built into the front table. But those are also just a normal 12v rgb strip. And they come with a remote and a power/dimmer module.

The strips in the rear wall are the only ones that will be of the 2812 addressable for now.

This is what I have so far.
Think I might be missing some resistors for the data in cables. But since I don't really know the value of those....

3x 2812b 5050 individual addressable LED. 1m - 144 leds.

3x 2812b 5050 individual addressable LED. 1m - 60 leds.

Not sure if I'm going to use the 144 or the 60 LED yet.. It depends on what layout I decide to go for.
But either way, there's a lot of Acrylic involved :slight_smile:

2x Arduino Uno R3.

Sparkfun Spectrum Shield.

Arduino Stackable Header Kit - R3

DFRobot DFR0107 Arduino-Compatible Infrared Remote

2x Voltage Converter 12V/24V (10-30v) Step-down to DC 5V 15A

Not at all sure about the type of remote, yet. But something along that line. Just not so cheap looking :wink:

So, what do you people think.. Anything except some resistors I've forgot? Or need?
And I was thinking... Does the Line out from the car stereo have strong enough signals for the MSGEQ7 chip to pick them up? I mean without a lot of interference?

Every LED takes 3 bytes of RAM. You have only 2048 bytes total available, hence the ~300 limit. That's almost half your available memory.

And yes, power to both sides. Otherwise there's too much current at the one end that's powered. Length doesn't matter as much as the number of LEDs and with it the current you want.

Relays totally do not make sense here as the LEDs take care of themselves.

And yes, a small resistor in the data wire. Quite important for protection.

So, it's a difference between theese and normal LEDs apart from the built in controller?

The built in controller is the difference. Reducing the voltage on a WS2812 LED will at some point cause the controller to stop working and this can cause excessive current to be drawn at other parts of the circuit.

wvmarle:
Every LED takes 3 bytes of RAM. You have only 2048 bytes total available, hence the ~300 limit. That's almost half your available memory.

And yes, power to both sides. Otherwise there's too much current at the one end that's powered. Length doesn't matter as much as the number of LEDs and with it the current you want.

Relays totally do not make sense here as the LEDs take care of themselves.

And yes, a small resistor in the data wire. Quite important for protection.

Aha.. Now I understand about the limit. So, the Arduino Wifi could control about 3 times as many since it has 6mb memory. Or so.. The thing is, though. At three times the price it's not worth it :slight_smile:

Thanks a lot for your help.

#Grumpy_Mike

The built in controller is the difference. Reducing the voltage on a WS2812 LED will at some point cause the controller to stop working and this can cause excessive current to be drawn at other parts of the circuit.

I see. Makes sense, since the controller are the only main difference from a "normal" RGB.

Then I guess I'll be down to control the brightness via programming. If possible.

Thanks a lot for your help.

ManWithVan:
Aha.. Now I understand about the limit. So, the Arduino Wifi could control about 3 times as many since it has 6mb memory. Or so.. The thing is, though. At three times the price it's not worth it :slight_smile:

That's only a limit if you rely on keeping your display info in RAM. And the Uno only has 2048 bytes, not 2MB, of RAM for everything including the stack and variables it takes to run the sketch.

See you can generate data to send even as you are sending what you got. It goes into the strip one bit at a time even if quickly at 24 bits per led which gives Arduino plenty of time to prepare the next 24 bits.

You can store patterns in the Arduino flash memory (Uno has 32KB) where the sketch is kept. You can store patterns on an SD card and read that.

Search youtube for Arduino led display, some even show how their project is built. Many use shift registers or LED driver chips to give their Arduino Hundreds-Of-Pins that can still be changed faster than human eyes can see. Buuuut those things take a LOT of wiring!

Suppose you want to keep your led colors in RAM. --- You don't have to go the full 24 bit color unless you need 16 million color depth. You could store 32 levels of each color in a 16 bit variable (32 thousand color) and turn them into 24 bits to send into a WS2812 strip. You could store 64 colors per led as 4 levels of RGB in a single 8 bit byte, Uno has room to hold perhaps 1600 of those and still run a sketch as long as it doesn't use any RAM-hogging libraries.

Lots to ponder? Lots more to learn!

One thing though (and lots of people do just as you did) is next time don't buy a bunch of parts until you know how to use them. Get what you need to learn, you may learn that you want something else and that's a bad time to be stuck trying to justify investment in a bunch of something that you then feel forced to deal with.

How is your programming background? Did you decide to write a novella before you learned your ABC's?

Then I guess I'll be down to control the brightness via programming. If possible.

Yes possible.
With WS28xx led strip you send lower values for the RGB in those 24 bits.

With the 12V strips that all of a color come on at the same time you turn the color ON and OFF in tiny pulses. The ON vs OFF time is how bright the led appears. Arduino PWM pins make this pretty easy but about the hardware to do this: do not use relays! A relay would burn up in seconds trying to switch ON-OFF every 2 milliseconds which is PWM frequency (eyes only see steady light). The thing to use is a FET type transistor that can switch 100x faster than PWM without getting warm.

ManWithVan:
Aha.. Now I understand about the limit. So, the Arduino Wifi could control about 3 times as many since it has 6mb memory. Or so.. The thing is, though. At three times the price it's not worth it :slight_smile:

Maybe you can consider the NodeMCU or other ESP8266 based board. Fewer pins (but you don't need that many) but more processing power (80 MHz clock, can be set to 160 MHz even) which is useful for sound processing, and much more RAM (about 80 kB).

GoForSmoke:
don't buy a bunch of parts until you know how to use them.

Come on, that takes away all the fun of learning and building up a huge collection of unused parts!

Hello, #GoForSmoke.

Thank you for taking the time to write such an extensive ansver.

How is your programming background? Did you decide to write a novella before you learned your ABC's?

I''m sorry to say that my programming skills leaves a lot to be desired. I have been running some Arma 2 and 3 game servers in my time, so I'm not completely ignorant but it still is a long way to say I "know" programming.

I have been looking at some easy sketches made by some of the people that have made DIY videos on Youtube, and thats is basically where I have gotten my idea of this LED project from.

What I am trying to make is something along the line of theese two videos.

Look at the last section of this video, from about 17.00 and you'll see the effect I'm looking for. Not his build, though, since it's battery powered and microphone controlled.
Another video is here. Apparently this guy is using the MSGEQ7 chip and running all 7 channels. I'll only need 3 on each left and right stereo channel.
And I'll not build anything identical to this, but it's the right direction.
I tend usually pick up ideas for all my different projects from internet and then create my own twist on it from there.
This is the very first time with Arduino or the like.

Lots to ponder? Lots more to learn!

Oh, yes :slight_smile: It sure is. But I'll go for the KISS (Keep It Simple, Stupid) method and take it from there. :slight_smile:
And belive me, I've been searching youtube extensively. There's a LOT of.. Hmm.. Not so good stuff there, but also one can find quite a bit of good information and exiting project ideas.
As you say, some of them leaves links to their build and I try to read and learn as much as I can without actually having the required items in front of me.

When it comes to hardware, the only thing I have actually bought so far are the two different types of LED strips.
The rest is on my list for now. But as you said, a lot to learn, so the way I think is simply to make something less complicated to begin with, but with the best possible result, and then evolve the project from there in time.
After all, this is also just a small part of a otherwise rather big project.

#wvmarle

Maybe you can consider the NodeMCU or other ESP8266 based board. Fewer pins (but you don't need that many) but more processing power (80 MHz clock, can be set to 160 MHz even) which is useful for sound processing, and much more RAM (about 80 kB).

I googled the NodeMCU card and it turns out that they sell it in a place not far from me.
The one I found has WIFI, 10 in and out pins and actually 4Mb storage and 128 kB of ram..
And since I'm looking for a card for this project only, I'm thinking it might be a good choice.
The thing is, for the Arduino, one has the Sparkfun Spectrum Shield that has both the MSGEQ7 chip and also two 3.5mm audio in. Actually ready made for left and right stereo. Saves me a TON of work and headace :wink:
Is there a similar thing for the NodeMCU?
As I wrote before, soldering chips to PCB's are not the thing I'm best at :slight_smile:

But no worries if I should buy a part or five to many.. There will always be new projects popping up in my head so nothing will be just laying around for ever :slight_smile:
And I am not one ot those people that buys things I have no clue how to use.
The stuff I put on my shopping list for now, are the things I think I'm going to need, based on a little research, but it's not all I'm going to need.
And yes, as it is with every new project I pick up, I'll be learning while I'm building.
This is only one, of several things I'm trying to learn right now.

When it comes to relays, I think there has been a misunderstanding somewhere.
I'm talking about using relays on the power side, not the data side. Relay between the power source and the LED strips, with a signal from the Arduino to close or open the relays and supply power. Since I would like to have ON/OFF function on the IR remote.
Don't really like the thought of having 20A constantly on the LED strips.
At least not until I'm ready to have the car burnt to a crisp :slight_smile:

As far as I understand, one can use the same programming laguages on both the NodeMCU and Arduino?
Good to hear I was not mistaking in thinking that the brightness can be adjusted bu the programming. That makes everything a LOT easier.

ManWithVan:
The one I found has WIFI, 10 in and out pins and actually 4Mb storage and 128 kB of ram..

It's got 80 kB of RAM, the seller has it wrong.

The thing is, for the Arduino, one has the Sparkfun Spectrum Shield that has both the MSGEQ7 chip and also two 3.5mm audio in. Actually ready made for left and right stereo. Saves me a TON of work and headace :wink:

No idea!
One thing: that chip has an analog output; the NodeMCU (and any other ESP8266 based boards) have only one analog input.

But no worries if I should buy a part or five to many..

Rule of thumb... if you need one, buy 10.
Especially when it's about cheap stuff. Not the USD70 sensor I got from Sparkfun last year, got just one those :slight_smile:

It's got 80 kB of RAM, the seller has it wrong.

It's a shop. But, it wouldn't be the first time they got thing back axxwords.

By the way.
Here's a video from a guy that has used some of the same components I had listed.

No mike here. The only thing I can see that I can't use, are the fact that it seems like he has the center of the LED strip as a zero point. But thats all programming, right?
And he's using 60 instead of 144 leds\meter.
But that shouldn't matter much.

Or this video might be even closer. Not in size, of course, but in funktion.
See how bright those LEDs are? No way that can be used in a van :slight_smile:

Now, the thing is, would the signals from the stereo- line out be strong enough for the MSGEQ7 to pick up without drowning in interference, or maybe I would need a small amplifier?

Btw. I can promise you I'll put up a video link here or the result of this small project :slight_smile:
If anyone would be interested.

Hope you can get a better result.

In the first video the LEDs are lagging the music; in the second video I don't see/hear a clear relationship between the LEDs and the music... I do assume Youtube doesn't mess up the synchronisation of the video.

Where your mid point is, that's of course a matter of programming (and maybe physical arrangement). You can also see this as two strips, just placed back to back.