SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By perryt
#151776
Im working on a new project. Ive done a few different arduino projects in the past, and I am just looking for some advice or helpful comments before making a decision on how I should approach this.
The idea is to have a large (undetermined) number of LED's contained in a plexiglas enclosure and to have these LED's be representative of real- time music. I have done a project like this in the past using an electret mic and not having individual control of each LED, but I want to expand on that idea a little more. Instead of a mic I was considering using this spectrum shield
https://www.sparkfun.com/products/10306?
to analyse the sound. Through this information gathered I would send it through an arduino board with binary code (unfamiliar with, but in the process of researching) to a shift register such as this one
https://www.sparkfun.com/products/734
and be able to be able to have the LED's reflect several different bands of sound (as opposed to a setup with an electret mic). The reason I want to have individual control of each LED is so I can still have the LED's be lighting up in some kind of pattern if I chose for there not to be music (dual- purpose project).
Ive been researching around, and have gotten some valuable information, however, is this the way to tackle a project like this. Does anyone have any suggestions on how to do it differently, tips, or places I can go to learn specifically about a project similar to this?

Thanks a bunch!
By Duane Degn
#151790
I've just recently been working on several LED projects myself.

Here are a couple of ways I've used to control LEDs.

1) (The easiest way.) Use a strand of RGB LEDwith WS2801 chips. I added some of these to my hexacopter. I found some less expensive stands(5m long) on ebay.

2) Use a pre-built array. I purchased a couple of 8x8 RGB LED arrays from ebay. I describe how I control them in this forum post. There are likely better ways of driving the array. I just used some chips I had on hand.

3) I've also used a bunch of 74HC595 shift registers to drive 120 red LEDs.

I haven't tried much audio stuff myself but I do know the Propeller (my favorite microcontroller) is pretty good with audio projects. Here's a link to a post about doing something similar to what you want to do.
By perryt
#152272
Duane Degn,
Thanks for the response. After a few days, Ive got the audio on this project working quite well. As for powering so many LEDS, I still have some questions. Im estimating Im going to be driving 100 LEDS (20ma/ LED), with 13 TPIC6b595 shift registers. I looked at your example
Duane Degn wrote:3) I've also used a bunch of 74HC595 shift registers to drive 120 red LEDs.
. I was thinking (that since these shift registers are sinking) that I would have each LED, with corresponding resistor, be wired to the 5v output on the arduino board. That was before I read on a post

http://arduino.cc/playground/Main/Ardui ... imitations

stating that the maximum output in amps for the arduino UNO is 200ma and maximum sinking in amps is 400ma. Both of these figures are insufficient for the number of LEDS im looking to power. How did you address this is your project?

Thanks a bunch!
Tyler
By Duane Degn
#152285
perryt wrote:the maximum output in amps for the arduino UNO is 200ma and maximum sinking in amps is 400ma. Both of these figures are insufficient for the number of LEDS im looking to power. How did you address this is your project?
Lots of projects will use more power than what a microcontroller board can supply. This isn't a problem. You just need another power source. You need some way of supplying power to the LEDs. This doesn't need to be 5V since you're using the TPIC6B595 which works on voltages up to 50V. You'll need to select your resistors based on the voltage you're using.

Let's say you decide to use a 12V supply. Use the forward voltage of the LEDs to complute the resistance needed. I'll assume you're using LEDs with a forward voltage of 1.7V (common for red LEDs).

12V - 1.7V = 10.3V

So you'll have 10.3V across the resistor. So the resistors should be:

10.3V/0.02A = 515 Ohm

560 Ohm is a common resistor value which would probably be close enough to the desired value to work well.

The power through the resistor is:

10.3V * 0.02A = 0.206 W

So a normal 1/4 Watt resistor should be fine.

You could power the TPIC6B595 chips from the Arduino board since the logic part of the chip doesn't require much current.

You need to make sure both your power sources have a common ground connection.

So you'll power each LED with 12V (or whatever voltage you decide to use). Each LED should have its own resistor (either between power and anode or TPIC6B595 and cathode).