controller choice - RGB Needs

Discussion in 'Embedded Systems and Microcontrollers' started by amueller, Apr 11, 2012.

  1. amueller

    Thread Starter New Member

    Apr 11, 2012
    3
    0
    Hey guys,

    I am very new to all this, but do have a EE background and have (in many years past) worked on embedded controllers. With that said, treat me as a complete moron :)

    I want to create an application whereby I trigger a set of RGB LEDs in specific lighting patterns. I am thinking of a circular lighting arrangement around an 8" diameter hole. Approximately 20 LED's around this hole.

    1 pattern may be: color changes around the circle, i.e., from light blue to blue moving in a circular fashion clockwise.

    Essentially, though, I want to be able to control the lights individually if possible.. if that takes a lot of cost, then I would likely have 2-4 'sets' of LEDs that I would control the color of as a group and work it that way.


    My question is this: What is the best way to do something like this? I notice that many of the boards can only control 2-4 LEDs via the PWM outputs (I think), so that would not allow me to individually control all of the LEDs.

    I would prefer the 'easiest' way, if possible, since I am new to this. But I don't want to pay $200 for ease either :) I'm willing to put in the work.

    Thanks in advance!!
     
  2. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    If you have 20 RGB LEDs then you essentially have 60 LEDs. Think about operating them in a matrix fashion, and they'll be in triads so 8x8 won't work, but 7x9 will, so you'd actually end up with 21 RGB LEDs.

    That would require 16 controllable pins of a processor, though you can improve that by sending the data out to 2 74HC595 shift registers. The real programming trick would be setting up independent PWM operation of each of the 63 outputs. That might be a challenge, but it's a feasible project with a mid-sized PIC processor like the PIC16F690.
     
  3. amueller

    Thread Starter New Member

    Apr 11, 2012
    3
    0
    ok, maybe the individual may not be the best route then :)

    I could do this in quadrants, though. Example:

    Have 16 RGB LEDs, have 4 per quadrant that would have the same color output. If I did something like this, would that help? And, if so, what would be the best way to accomplish it?

    Worst case I can do non RGB LEDs and have specific colors - but I really want to play with RGB :)

    Thanks again!
     
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    That is soooooo boring! All you'd need to do would be connect all 4 of the R's, G's and B's together via a resistor each for each quadrant, and so you'd have a single R, G and B for each quadrant, times 4 quadrants, for a total of 12 lines. Then you just drive all of those in PWM mode as needed. No scanning required. Depending on the resolution you want in color selection, you might do something like create a 6KHz repeating timer, and when it activates, increment a count from 0-99. Each of the 12 outputs would have a setting which would be checked against the count, and if less than or equal to the count for a given cycle, would set the output "off" and if more, would set it "on". So you'd have your outputs operating at 60Hz with a 1% resolution.
     
  5. chrisw1990

    Active Member

    Oct 22, 2011
    543
    41
    take a look here at instructables.com.. they have nice things going on there, some are very sketchy, but others.. like this RGB led aurora id love to build one like it sometime.. build into a clear diffracting dome for a nightlight style thing, pretty good as it if im honest!!
     
  6. amueller

    Thread Starter New Member

    Apr 11, 2012
    3
    0
    Boring? :) Yeah, not much work for a quadrant based system, i guess.

    I have looked at Instructables.com and that example earlier in the day, maybe I will re-visit it. I would prefer a completely individualized pattern - more fun.

    thanks to everyone for your help!
     
  7. chrisw1990

    Active Member

    Oct 22, 2011
    543
    41
    yeh and im not saying dont go individualised, but everyone, mostly, uploads schematics and im sure coding etc too, so it gives people a place to start, the 18x18 aurora he makes also has infrared control on it, so worth looking at
     
    amueller likes this.
Loading...