Searching \ for '[EE] Controlling an RGB LED' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/displays.htm?key=led
Search entire site for: 'Controlling an RGB LED'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Controlling an RGB LED'
2006\01\03@152433 by Shay

flavicon
face

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.

Thanks,
Shay

2006\01\03@160216 by Marcel duchamp

picon face
Shay wrote:
> 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
circuit working.

*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:
www.dattalo.com/technical/software/software.php
Down near the bottom are some pwm references. Or try the piclist dungeon
as well.

Good luck!

2006\01\03@175806 by Jinx

face picon face

> 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

http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4539/ln/

Datasheet (400kB)

http://pdfserv.maxim-ic.com/en/ds/MAX6966-MAX6967.pdf

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
- Today
- New search...