Exact match. Not showing close matches.
'[EE] Controlling an RGB LED'
I'm trying to figure out what the best way is to control an RGB LED.
Some questions I have:
1) Do I need to light all 3 colors at once, or can I just light 1 at a
time and use POV to get the desired color?
2) Should I use a microcontroller or an LED Driver?
2a) If you suggest an LED Driver, is there a sample project somewhere
that I could try?
3) Anyone have any POV timings to get specfic colors? not sure how to
state this.. probably dependant on the RGB LED so I'll probably have to
figure this out on my own? maybe a better question is, any suggestions
on how to figure out timings needed to generate specific colors?
I'm trying to make a simple project, to begin with, which is a cardboard
cube lined with tinfoil and with some RGB LED's. I covered the open
side of the cube with white paper. I'd like to be able to pick any
color and even be able to transition from one color to another by
choosing colors in between. All of this I'll eventually control with a
serial connection just to keep it simple.
> I'm trying to figure out what the best way is to control an RGB LED.
> Some questions I have:
> 1) Do I need to light all 3 colors at once, or can I just light 1 at a
> time and use POV to get the desired color?
Either way works but a pwm method is probably a better approach. In 8
bit pwm (pulse width modulation), you can get 256 levels for each led
which gives you 16+ million colors.
> 2) Should I use a microcontroller or an LED Driver?
Use a pic, no question about it.
> 3) Anyone have any POV timings to get specfic colors? not sure how to
> state this.. probably dependant on the RGB LED so I'll probably have to
> figure this out on my own? maybe a better question is, any suggestions
> on how to figure out timings needed to generate specific colors?
Yes, you will be on your own here since leds vary from one to another
and from one manufacturer to another. Plus my idea of lemony-mauve is
maybe different from yours. Plus, this is the fun part after you get a
*ANY* pic will work but I would suggest one with at least 8 or more
pins. Then you can dedicate 3 to the outputs and 3 more to read
potentiometers. This way, you can play with the pots and get all the
colors you want. Another way would be to hook up a serial port and
write a simple program to send color data (pwm values, actually) and
then you could easily tell the pic to "give me 127,234,19" for r,g,b
values, for example.
For how to do pwm, see Scott Dattalo's page:
Down near the bottom are some pwm references. Or try the piclist dungeon
> 2a) If you suggest an LED Driver, is there a sample project
> somewhere that I could try?
What Marcel said about PIC PWM, and
Maxim and Philips both do LED drivers, eg MAX6966
On page 26 is an app for 3 x tri-colour LEDs, ie 3 RGBs
You can get samples (usually, depends on product) from Maxim.
If this was to become a large project, using an I/O expander like
above might be more resource- and cost-effective than PICs
dedicated as individual LED drivers. Maxim have the cost at
US$1.59 / 1k (double that for 10-up ?), so it's not unreasonably
expensive and takes a lot of the hassle out of PWM managment
More... (looser matching)
- Last day of these posts
- In 2006
, 2007 only
- New search...