Audio To Multiple LED Strip Light Show System Advice Please!

Hello everyone!

I’m here because I’d like some feedback and advice for my project from people that much more experienced than I am. I’m a college student in mechanical engineering with a desire to get my hands wet with some electrical engineering! My goal is to learn as much as I can and to build a kick ass system! At any point on the page, you see something wrong, please correct me or push me toward a better direction!! I do not have much experience with this stuff(reason why I’m doing it), so please assume I don’t know advanced circuitry lingo or programming code. I’m sharp and a quick learner, but I’m throwing myself into a field I’ve never seen before. If I ask a stupid question and prefer not to answer it, throw me a link and I’ll do extensive research.

Before I begin, I must say thank you for your time. Your efforts will teach me more now than any exposure I’ve received in the past. It’ll only prepare me more for a job in the future and for my electrical classes that’ll come in the near future. You efforts will not go unappreciated! But now, I’ll cut to the chase.

The project:

Using any audio file(MP3, WAV, ect.) from a computer or phone connected by a 3.5 mm headphone jack, I want to break up a song into 5 frequency ranges using Arduino to translate it into 5 1m RGB LED strips to create a light show. ADVANCED(for later in the project): Make it controllable over a remote and the system to have a dimmer!

I have not found a similiar project to mine on the internet after 15 hours of searching. The concepts and applications have been used but I have not seen one connecting multiple LED strips that might require multiple external power supplies.

Here is my material list as well as the logic behind it. As I stated before, correct me or provide a suggestion if you see something odd or wrong about it! Here we go!

Arduino Mega 2560 R3 ATmega2560-16AU Board + USB Cable

RGB Multicolored 1-Meter 30-LED 6W Light Strip (DC 12V)

N-Channel MOSFET 60V 30A

Amamax Wall Adapter Power Supply - 12VDC 1A

Breadboard

Breadboard wires

Resistors(don’t know what kind though)

Y headphone splitter

2 headphone jacks

I want to use the Arduino 2560 board because it has 15 PWM pins. Each LED strip requires 3 pins(one for each color) into the Arduino board. Since there’s 15 PWM pins, I can hold a maximum of 5 strips. I don’t know exactly what the MOSFET does, but I thnk MOSFETs reduce the voltage. Because Arduinos can only handle 5V and 500mA, I need to convert the 12V power supply and LEDs into 5V for the board. The breadboard and wires are fundamental, I don’t think I need to explain why I have those. The Y cable splitter will allow me to separate the audio signal into two lines. 1 line will head to the arduino system with the lights. The other line will head to my speaker system.

If you are still confused on my vision, look at this video. He nails the concept. What changes is that his lights aren’t strips and don’t have multiple power supplies. http://www.loneoceans.com/labs/arduinolights/

My Questions are broken up into categories, this is extensive, I apologize, I’m a curious person :dance:

General:

Are my thoughts in the right direction?

Should I consider the dimmer and remote access already, or wait till after I complete this step first?

How complicated is it to add a dimmer?

Where do I begin with the remote system?

What improvements can I make?

Can you think of any bigger or better ideas to add to this?

Materials:

Are my materials so far correct?

What other materials do I need? Wiring? Shields/Protection? Extensions? Converters? Amplifiers?

Do I need TO-220s or would TIP120’s suffice or neither?

RGB LED Strips/External Power Supply:

How do I compensate for the Arduino board only being able to handle 500mA when the rest of the system requires 1-5 amps for the LEDs?

For each LED strip, do I need a power supply for each? What’s the best way to go about that external power supplies?

Will the power supply maxing at 1A be enough? Should I go with an alternative 5A one?

How would I hook up the external power supplies into the system?

How do I find out how many amps each LED strip requires?

How do I control how bright the lights are? Potentiometer?

Arduino Board/Programming:

How do I make sure that I do not have too many amps running through the breadboard, Arduino board, and my wires? What are my limits?

How do I make sure the voltage drops from 12V to 5V correctly rather than 3V or 7V?

Am I only limited to the PWM pins for this system/application?

Is there an opto-isolator installed in the Arduino board?

Should I be able to find code somewhere that’ll translate nicely to my system?

Will I need the program Processing as well as Arduino?

Miscellaneous:

When is the right time to add heat sinks?

Are there any side effects to splitting the audio signal?

Does anyone know a good tutorial for breadboard wiring when I go to put this all together?

Sounds like a fun project. I’d recommend breaking it into manageable chunks and getting each phase working rather than jumping in with both feet and getting overwhelmed. First get the lights to turn on and off, then add dimming, then add sound detection, finally add remote control.

I’ll try to answer some of your questions:

How complicated is it to add a dimmer?

You are on the right track with PWM. If you are using a pin that can be driven by hardware PWM, it’s rather easy. Just set the correct registers and the hardware will do the rest.

Where do I begin with the remote system?

For now, just keep in mind that wireless will likely use the serial port or SPI port, so keep them available

Can you think of any bigger or better ideas to add to this?

Maybe go with pixel-based strips rather than “dumb” ones?

What other materials do I need? Wiring? Shields/Protection? Extensions? Converters? Amplifiers?

You need some way of getting the audio to the processor. I’d look at https://www.sparkfun.com/products/10306 Otherwise, you may need a buffer amp and some clamping, and the code will be a bit more involved. Do a google search for FFT to see what’s needed to convert a time-based signal to a frequency-based one

Do I need TO-220s or would TIP120’s suffice or neither?

Apples and oranges… TO-220 is a package (three pins, metal or plastic tab). TIP120 is a power transistor that most often comes in a TO-220 package. I’d likely use FETs instead as they will run cooler

How do I compensate for the Arduino board only being able to handle 500mA when the rest of the system requires 1-5 amps for the LEDs?

I’d get a 12V supply that can handle all of the LEDs. Check the specs for the strips. Assume that all LEDs on all strips may be on, and get a supply that puts out a bit more current than that. No problem if the supply can put out extra current; the parts will only draw what they need. You can feed the Arduino’s external power jack from this supply. It’s on-board regulator will drop that to the 5V or 3.3V it needs.

How do I control how bright the lights are?

That’s what PWM will do. It turns the lights on for part of the time, and off for the rest. It does this fast enough so you don’t see the flicker. By varying the time on, you adjust the brightness

How do I make sure that I do not have too many amps running through the breadboard, Arduino board, and my wires? What are my limits?

The wiring between the power supply, FETs, and strips are the higher current wiring. I’d keep that off the breadboard and use suitable gauge wire. 24ga is good for 3A, 18ga for 10A

Am I only limited to the PWM pins for this system/application?

It’s a lot easier. You can, however, use software PWM on any pins with some more code.

Is there an opto-isolator installed in the Arduino board?

No. For isolating audio, however, a transformer is likely better

/mike

kdolf:
The project:

Using any audio file(MP3, WAV, ect.) from a computer or phone connected by a 3.5 mm headphone jack, I want to break up a song into 5 frequency ranges using Arduino to translate it into 5 1m RGB LED strips to create a light show. ?

I’ve seen a few of these and you might want to look at this project first.

https://forum.sparkfun.com/viewtopic.ph … ip#p166611

@Mee_n_Mac, You’re the man with answers, it’s clear in the link you showed me. I’m still doing research on what n1ist talking about (I haven’t finished my response to you yet). I’ll post back in a day or two for both of you guys. I’ll be sure to have questions(but not as many as last time lol). I will say I’m changing my design a little. Instead of having 5 1m rgb led strips, I want to have 4 seperate 1m strips but 2 of the 4 strips will be wired together. The remaining 2 will be wired together as well. The design is that with 1m led strip on each wall of my room. I want to create the appearance of the light bouncing between walls (Imagine a kick drum and clap alternating in a simple electronic song). I’m currently looking into the audio spectrum shield/analyzer, but I can ask a question now. With the 7 bands, I want strip 1 to cover bandwidth 1,2,3 and 4. While strip 2 covers bandwidth 4,5,6, and 7. With an overlap at 4. Does this concept of the coding seem possible? Any recommendations to a better plan of attack? Also, in your experience of these projects have you found a schematic or some visual similiar to what I’m trying to do with the hardware? Like I said before, still doing research, I’ll solidify my plan more in a few days. N1ist and Mee_n_Mac thank you already for your efforts! I appreciate them!

Next Post

@n1ist Thank you so very much. I think you were able to answer almost every question. Marvelous job! It’s obvious you’re experienced and your last post was fantastic. Very clear.

Having the weekend to do more research and think about it more. I’m modifying it slightly. Originally I said I was going to have 5 RGB Multicolored 1-Meter 30-LED 6W Light Strip (DC 12V). I’ve changed it to 4 RGB LED Strips (same kind) but with a different purpose. Trying to visualize how the original light show would work, I think it’d flop or give someone a seizure with how much action that would be occurring. Also, to make the programming on me easier, this is my new plan.

I’ll have 4 strips. 2 of the strips will be linked together as well as the other 2. I’ll split the frequency range into 7 categories and divide them up evenly between the 2 NEW strip segments. With the mid-range overlapping. The 2-2 segments will be wired together, but stay separate in the fact that each 1m strip will be on a different wall (saying that my room has 4 walls, they’ll each be on a wall). So I’ll need 5-20ft of wiring for each LED strip from my Arduino board depending whether it’s on the near-side wall or far-side wall. Also, I want to use only 1 power supply. Instead of using 4 12V 1A DC wall adapters, I’ll use 1 12V 5A DC wall adapter. Using P=IV. Each LED strip will use 500mA roughly so a 5A supply should be significant. This should simplify potential issues.

Raising a few new questions:

Should I worry about voltage drop, or will the 5A adapter ensure that I’ll have enough current to keep the lights bright?

Using PWM, do I have to consider reverse voltage surges going back through my wires? Or will the nature of LEDs stop the voltage from jumping backwards potential burning them out?

Now to your suggestions:

I appreciate your comment about the pixel-based strips. I looked at youtube videos, prices, and tutorials and it’s a cool concept! I don’t think I want it for my vision however. I’m more focused on solid changing light rather than the movement of many lights, but much appreciated!

I knew the Arduino board has an internal voltage regulator. The suggested range was 5-12V. Saying that I’m on the high side of the suggested, I wasn’t sure if it would be smart to drop the voltage because the internal regulator did it just to ensure that it wouldn’t be damaged. Will I be fine? Even if it was an hour or two of straight use?

How do I control how bright the lights are?
That’s what PWM will do. It turns the lights on for part of the time, and off for the rest. It does this fast enough so you don’t see the flicker. By varying the time on, you adjust the brightness

By this logic, will it be independent of volume control of the speakers?

You suggest useding FETs, Will my N-Channel MOSFET 60V 30A do the trick? I’ve done research on this product; however, the application still alludes me. Can you explain how it’ll benefit my system?

Now in response to @Mee_n_Mac:

Looking more into the audio spectrum, I see its stereo. Would you suggest a better way to split up the frequencies?

Do you think I need some IC’s or any other hardware to make the system run fast or more effectively?

and just to clarify, I don’t want to make a matrix of LEDs. Every tutorial I’m looking up uses matrixs. Yes they use an audio spectrum shield, but it’s not the same application.

Closest project I’ve found to mine. https://www.youtube.com/watch?v=sm1fcgI5BcM

kdolf:
You suggest useding FETs, Will my N-Channel MOSFET 60V 30A do the trick? I’ve done research on this product; however, the application still alludes me. Can you explain how it’ll benefit my system?

Now in response to @Mee_n_Mac:

Looking more into the audio spectrum, I see its stereo. Would you suggest a better way to split up the frequencies?

Do you think I need some IC’s or any other hardware to make the system run fast or more effectively?

RE: the FET ... do you have a link to the FET you have ? In this case it would be used to switch the LED strip on/off at the PWM frequency. The IO pin of an Arduino can neither tolerate the 12v nor sink the 100+ mA of the LED strip. If these are RGB strips then you'll want 3 FETs per strip.

I’m unclear on how you want the frequencies divided amongst the strips. Is the intent to have the brightness of 1 strip (of a pair) controlled by the amplitude of the low and mid frequencies of one channel (left) while the other strip in the pair brightness is controlled by the mid and high frequency amplitudes ? Then the other pair of strips is controlled (in the same fashion) by the other (right) channel ?

A link to the LED strip would be informative.

The link to the MOSFET is https://www.sparkfun.com/products/10213

The link to the RGB Leds is http://www.dx.com/p/rgb-multicolored-1- … rzLvldWTA.

I understand why it was unclear for the frequencies. In my first 2 post, I did not know that the shield was stereo. To conserve the illusion of the light bouncing from wall to wall, I’d like it to be mono perferably with 1 strip handling lows and mids; while the other strip handles mids and highs. Is that possible? Or simply should 1 strip be left audio and the other be right audio. I’m open to suggestions and/or changes to the overall project.

kdolf:
To conserve the illusion of the light bouncing from wall to wall, I’d like it to be mono perferably with 1 strip handling lows and mids; while the other strip handles mids and highs. Is that possible? Or simply should 1 strip be left audio and the other be right audio. I’m open to suggestions and/or changes to the overall project.

That should be possible. Moreover the changes you mention are only software, you could code it either way or even have the ability to switch between them.

That FET is overkill for the current (<200 ma) and voltage (12v) involved. You’ll need 12 of them to run 4 strips. Two of these would work sufficiently well.

https://www.sparkfun.com/products/312

https://www.sparkfun.com/datasheets/IC/uln2803a.pdf

Thank you for the constant help Mee_n_Mac. I took your advice with the Uln2803A. I have to use 4 by the current restrictions. Hopefully I’m moving in the right direction by creating a schematic of my system. Can I get a verification that what I have is right? Or changes that need to be made? I know it’s not 100%. http://anchorpump.com/wp-content/upload … ram-12.png

Note: One issue with my schematic is that I do not have the 4 LED strips spliced into 2 strips. When is the right time to combine them?

If you would like my schematic to make changes yourself, I used the program Edraw Max. Private message me and I’ll send you my file!

Let me know if you need any other datasheets, but I’ll provide as much info as I can find.

Arduino 2560: http://arduino.cc/en/Main/ArduinoBoardMega2560

Uln2803A: https://www.sparkfun.com/datasheets/IC/uln2803a.pdf

Spectrum Shield: https://www.sparkfun.com/datasheets/Com … MSGEQ7.pdf

http://dlnmh9ip6v2uc.cloudfront.net/dat … ld-v14.pdf

LED Strip: http://www.dx.com/p/rgb-multicolored-1- … 55ObPldWTB

kdolf:
Note: One issue with my schematic is that I do not have the 4 LED strips spliced into 2 strips. When is the right time to combine them?

I can't get your page to load but even so, why "combine" the strips ? You need to send +12v power and 3 switched grounds (via the ULN) to each strip. Since the 3 switched signals are going to come from your controller box, why not the +12v power as well ? The strips are all physically separated, won't it be both easier and less clutter if you send 4 wires to each strip from the controller box ?

As for doubling up on the ULN drivers … that may not be a bad idea though I’m not sure it’s necessary. Each pin can sink 500 mA, you’d be sinking just under 200 mA if the 12v/6W rating is correct (and using just 2 ICs). Each ULN IC has a 2.5 A total rating, and you’d be sinking 6*0.2 = 1.2 A. What I don’t know is the power rating. You’d be asking each IC to dissipate ~1.2 W. That might be OK or might be too close to the max limit. So that might be an argument in favor of doubling up.

Lastly I’ll mention that you’ve picked a Mega, no doubt due it’s plethora of PWM pins. But the Spectrum shield is compatible with the Uno and won’t just plug into the Mega. Given you don’t want stereo, perhaps you can find a Mega compatible prototyping shield and build a custom shield w/just 1 MSEG IC and the ULNs ? Or you might use an Uno and use software PWM to get the 12 outputs needed. While an Uno has only 13 DIO pins, and I don’t recommend using the 2 for Tx/Rx, you can use the analog pins as DIO. That might just give you enough pins to do the job and use the Spectrum shield. And for power dissipation reasons, you don’t want the PWM frequency too high, just high enough to be above the flicker threshold, so doing it in software may be reasonable.

Hmm, I’ve looked on both of my computers and I can see the link, how do I upload an image right to here so it’s embedded?

The strips are all physically separated, won’t it be both easier and less clutter if you send 4 wires to each strip from the controller box ?

Maybe I’m not reading it correctly, but how would it be less clutter by sending 4 wires from each strip from the control box? That would be 16 wires total correct?

why “combine” the strips ?

Is there a reason not to combine them? It would make a neater wiring job, less software writing, and a little more simplified system. The only question that needs answered is can the hardware handle being doubled up? That being the ULN, shield, and Arduino pins. I don’t know what the shield can handle. However, like you said the ULN can handle 2.5 A and the pins can handle 500mA. Both should be under the limits of the hardware.

Playing with the idea of using an Uno instead. Since I want 2 1m strips to be hooked up to do the same software job, could I wire the 2 1m led strips together before they touch any other hardware? It would cut the amount of PWM’s needed in half, while also making it compatible. My system right now requires 12 PWM, but if I double them up, then I could use the 6 PWM the Uno has to offered. It’ll be the same as if I doubled up the ULN divers. Thoughts?

The weakest part for me wiring-wise is how to set up the power supply. I don’t know where the +12v and ground are supposed to go. As well as how to combine the led strip grounding wires correctly.

kdolf:
Maybe I’m not reading it correctly, but how would it be less clutter by sending 4 wires from each strip from the control box? That would be 16 wires total correct?

I guess it all depends on where you have the strips located. First let's invent some terminology for the strips so we can all talk about the same thing. I see you have 2 pairs of strips, I call them and A pair and a B pair. Then each strip (presently) is going to be controlled by a different mix of frequencies, low and mid for 1 and high and mid for the other. So let's call them LM and HM and so we have 4 strips; A-LM, A-HM, B-LM and B-HM.

My thinking was that the A pair might be off to one side of your controller (Uno/Mega/whatever) and B on the other side. Since you need independent wiring (except for the 12v) for any LM and HM pair, that’s 7-8 wires. I’d just make it 8. OTOH if the A-LM and B-LM are on a side (on adjacent walls) then (at present since it’s mono not stereo) then you could send just 4 wires to A-LM and then 4 from it to B-LM. So it all comes down to placement. That said, once you’ve decided on that route you lose the option to go stereo or to alter that concept of wiring … w/o changing the hardware.

As far as using an Uno vs a Mega … it comes down to pins needed. I’ll have to look at that shield and see what it uses.

The way I see it you have a 12v power supply. It has to go to the Uno/Mega/controller. From there you need to send 3 wires for signaling to a strip (or A-LM + B-LM pair) plus 12v. Seems to me the power supply 12v and gnd go to the controller box and from there you send two pair of 4 wires or two pair of 7-8 wires.

FWIW I can now see your diagram. I notice you have the LEDs depicted backwards. That is you have the ULN outputs connected to the diodes anodes. That won’t work. As I understand it from the comments, the LED strips have a common +12v tied to all the LED anodes. So you need to send +12v from the power supply to the strip. Then there’s some parallel and serial connections of the LEDs and current limiting resistors in the strips. The other contacts of the strip are the R, G and B leads which, when grounded, allow current to flow through all the R, G and B LEDs in the strip. The ULN drivers are open-collector types (Google it) and so can sink, but not source, current. When active they provide a semi-ground. I say “semi” as their voltage will depend on the current through the pin. In the case of 200 mA, it’s about 1v, leaving about 11v across the LED strip. Enough to work well.

I also note that you’ve not doubled up on the ULN outputs. Each IC has 8 outputs. If you’re going to use 1 per strip, you should use 2 outputs per R, G and B channel. This will also reduce the voltage drop below the 1v mentioned before, though not by much. Three ICs (24 outputs) used that way could drive 12 channels and that’s four 3 channel (RGB) strips.

Lastly the Spectrum Shield (per it’s schematic) uses the A0 and A1 analog pins and D4 and D5 digital pins for strobe and reset. Leaving D0 and D1 (Rx and Tx) free, there’s then enough other pins left to do 12 channels of PWM … D2, D3, D6-D13 and your choice of A2-A5. Of course if you choose to pair up the LM channels and the HM channels, then you only need 6 pins to drive the 3 (RGB) LM channels and the 3 (RGB) HM channels. Alas the Uno has only 6 hardware PWM pins and D5 is one of them, so even going this route means using software PWM … or doing some cutting and re-wiring of a trace on the shield. I note 8 pins, D6-D13, are also connected to a small prototyping area on the shield. That area might just be large enough to house 3 ULN ICs ???

http://dlnmh9ip6v2uc.cloudfront.net/dat … ld-v14.pdf

We are thinking the same way, which is great! I know my words aren’t the clearest so thank you for bearing with me. Using your terminology, this is what I was thinking. Pair A will consist of A-LM & B-LM(from the pairing system you suggested). Pair B will consist of A-HM & B-HM. Do you follow me? The red wire from A-LM will be connected with the red wire from B-LM. The blue wire from the A-LM will be connected with the blue from the B-LM. And so forth. All the spliced wires will be connected before they reach the ULNs or microcontroller(or any hardware). Pair A will consist of 4 wires when it reaches the microcontroller. We will use the same method for Pair B. This will give us another 4 wires. Totaling to 8 wires. 6 of which will be using PWM(correct?). If we connect both ground wires from the pairs we can have 7 wires total. The 2 strips that make up Pair A will be on opposing walls. And the 2 strips that make up Pair B will be on the other opposing 2 walls. This is the placement I was thinking of.

My thinking was that the A pair might be off to one side of your controller (Uno/Mega/whatever) and B on the other side.

What did you mean Pair A will be off to one side and B on the other?

Thank you for the power supply advice. I’ll continue to think about it and process it. I think I understand what you’re saying.

Since I will be using 6 PWMs, I was leaning toward the Uno because it has 6 PWMs. I think, but do not know for sure that the Shield requires 8 pins. Those pins consist of RST, +3.3V, +5V, GND, GND, VIN, A0, A1,and a digital pin.

Also, how do I embed an image into this post?

kdolf:
We are thinking the same way, which is great! I know my words aren’t the clearest so thank you for bearing with me. Using your terminology, this is what I was thinking. Pair A will consist of A-LM & B-LM(from the pairing system you suggested). Pair B will consist of A-HM & B-HM. Do you follow me? The red wire from A-LM will be connected with the red wire from B-LM. The blue wire from the A-LM will be connected with the blue from the B-LM. And so forth. All the spliced wires will be connected before they reach the ULNs or microcontroller(or any hardware). Pair A will consist of 4 wires when it reaches the microcontroller. We will use the same method for Pair B. This will give us another 4 wires. Totaling to 8 wires. 6 of which will be using PWM(correct?).

Correct !

kdolf:
If we connect both ground wires from the pairs we can have 7 wires total. The 2 strips that make up Pair A will be on opposing walls. And the 2 strips that make up Pair B will be on the other opposing 2 walls. This is the placement I was thinking of.

You don't send ground to the strips, you send +12v. Otherwise ... OK but do you really want the pairs, as you've described, on **opposite** walls ?

kdolf:

My thinking was that the A pair might be off to one side of your controller (Uno/Mega/whatever) and B on the other side.

What did you mean Pair A will be off to one side and B on the other?
I was thinking left and right but ignore what I'm thinking, just think about how it works (both ways) and decide what you want.

kdolf:
Since I will be using 6 PWMs, I was leaning toward the Uno because it has 6 PWMs. I think, but do not know for sure that the Shield requires 8 pins. Those pins consist of RST, +3.3V, +5V, GND, GND, VIN, A0, A1,and a digital pin.

You can ignore the power and ground pins, they are shared by any/all shields you care to stack onto the Arduino. Look at the schematic and you can see the shield uses the A0, A1, D4 and D5 pins. Alas D5 is one of the 6 available hardware PWM pins. You can still use software to do the PWM you need to do on any of the remaining pins ... or do some cutting and jumpering.

kdolf:
Also, how do I embed an image into this post?

Go to the full editor and you'll see an Upload attachment tab below the entry field. Click on it and do the obvious.

Also notice that while not used, the additional pins are brought over to the prototyping area and called JP2 and JP3.

(click on to open)

And here’s what I think your intent is, in a block diagram.

(click on to open)

And since I’m making wiring path diagrams …

Here’s what I think you’ve proposed. The red block is your controller. The RGB blocks are the strips. You have LM pairs and HM pairs on opposite walls. Each pair shares the wiring to it w/its pair-mate (they are in parallel).

And here’s was my thinking, keeping the strips all independent.

So how much extra (or overlapping) wiring is there vs the first ?

Of course a lot depends on the exact placements. But think about it.

And lastly, if you had the pairing as you described above but on adjacent walls, then you’d have less wiring by paralleling the LM pairs and HM pairs.