loading

Arduino Vu meter/Mood light?

Hello There :)
I have this concept: A wall to ceiling light that consists of several segments that are lit with rgb leds. I want it to have two modes - VU meter mode and rgb mode (goes through rainbow of colours)
I know how to do each separately:
-VU meter - There is an instructable I can follow
-RGB mode -Using shift registers etc..
But I don't know how to incorporate them together. Can I use a shift register and an arduino (through PWM) to give functionality of both settings I would like?
Thanks,
Joe







sort by: active | newest | oldest
maewert6 years ago

I think you are suggesting using three PWM pins to drive the R, B, and G LED brightness values and using cascading shift registers to select each of the tri color LEDs sequentially in your array.

As Steveastrouk is aluding to you'll have to drive the LEDs carefully since an Arduino can't source/sink enough current itself to drive the LEDs.

To use this as a VU meter the Arduino would need to determine the volume of the music and light the LEDs accordingly.  I believe there is at least one 'ible on doing this.

The problem I see is one I also believe I have as well for a project I'm considering.  Will multiplexing the PWM signals be a problem?  Although I have not done it myself, I would think multiplexing PWM signals could get difficult as you would want to switch LEDs (i.e. step the shift registers) in step with the PWM cycles.  If you don't I would think you would get color change effects visible to the eye as a beat frequency.  I would think these effects would diminish if the PWM frequency were increased, and here is a description of doing this which I have not tried: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1152547089/2

Maybe in order to do this correctly we need to use the same timer that triggers the PWM frequency to also trigger our shift registers so that only whole PWM cycles are multiplexed. 

I'd be interested in opinions from anyone out there who has experience multiplexing PWM signals...

Best Wishes
 

Its not impossible,but when off the shelf silicon does PWM, in 16 channels, with up to 100mA of controlled power to each LED, you have to ask yourself "why bother"

Steve
The MAX 7221 chips sure look nice.  If I read the specs correctly it allows the user to specify 16 levels of intensity for each LED.  When driving RBG LEDs this gives you 4096 colors.  I am sure this would be good enough for many applications.

Thanks.
NOT individually with a 7221 unfortunately. This does though:http://www.maxim-ic.com/datasheet/index.mvp/id/4539
There are much better ways of getting the functionality you want - like the MAX 7221, or some of the Allegro devices like the A6280 if you can get it.

With three Max 7221, you can address 64 LEDs at once, or 21 RGB ones.

With the 6280, you'd need one chip per RGB LED

TI do a lovely chip, with 16 independently programmable brightness LED channels - they're £3.50 each, but there is a price break at 10 off, and you may well need that many anyway

Three of them, and you have 16 RGB channels, at reasonable currents to play with - for a tenner.

You can't expect to be able to build that kind of functionality on a breadboard for the money.
Steve
orksecurity6 years ago
Emulating a shift register should be pretty trivial for an Arduino program, if you've got the microcontroller anyway...
What kind of current are your LEDs ?

Steve