Author Topic: What to do with RGB leds?  (Read 20950 times)

0 Members and 4 Guests are viewing this topic.

Offline psycholonerTopic starter

  • Newbie
  • Posts: 6
What to do with RGB leds?
« on: June 07, 2011, 10:55:54 pm »
I was doing a project to run an led array for RGB leds. One of those kinds of things that are more for fun than being productive. Anyway, I managed to balance the colours on an LED to give a good white, but after trying to run several of them at a time, I realized that all the LEDs have radically different colour intensities on different colours. I haven't tried driving them with a constant current yet, but i don't have the parts on me right now to do it, so I'll skip that option for now.

Now I've got a whole bunch of LEDs to play with, and I don't know what to do with them. Give me suggestions. A way to make all the LEDs have the same colour intensities would be fine, but making something that just uses RGB leds without regard to the accuracy of the colour intensities is fine too (since you can't really tell when colours change too fast, or LEDs aren't diffused and put next to each other.)

Any ideas? I've got 100 of them.
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: What to do with RGB leds?
« Reply #1 on: June 07, 2011, 11:42:56 pm »
Can I haz many quantities of colorific light-emmiting diodz?

Now seriously. You can use some transistors with a trimmer to set the limiting value if you are in a hurry.

Check out the TLC59116 IC from Texas Instruments. It is really cool! It is an I2C LED driver with PWM, global brightness control, constant current source and I think it has individual calibration, open LED detection and is available on Digi-Key!

Just one warning on that one: it gets hot if you have a supply that is too high. Just use 5V or less and you will be fine. Also remember to get it out of the power saving mode (check the MODE1 table and write the corresponding bit to turn it off), otherwise the LED's won't go on.

The only killer for this chip is that it is only available in a TSSOP package, but I managed to solder it with a firestarter iron and some solderwick. Just don't expect a toner transferred PCB to work with it.

If you are a crafty guy, the kind that do beautiful enclosures that are better than commercial ones, you could build some find of moodlight. I though about having some RGB's on my fish tank and a IR receiver, automatic feeder and a water filter controller.
 

Offline psycholonerTopic starter

  • Newbie
  • Posts: 6
Re: What to do with RGB leds?
« Reply #2 on: June 08, 2011, 12:04:03 am »
Yea but I'm not sure if I'm going to make a complete project. I don't even know if I'm going to make a board yet. This is more of a skill building, and learning experience than anything else. I know people are going to tell me not to reinvent the wheel, but I wanted to try to use my own code and own drivers to run something. Buying a chip that does everything for me is kind of overkill, and for something like this, I'm trying to stay away from actually ordering something in if I don't have to.
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: What to do with RGB leds?
« Reply #3 on: June 08, 2011, 01:34:05 am »
Yea but I'm not sure if I'm going to make a complete project. I don't even know if I'm going to make a board yet. This is more of a skill building, and learning experience than anything else. I know people are going to tell me not to reinvent the wheel, but I wanted to try to use my own code and own drivers to run something. Buying a chip that does everything for me is kind of overkill, and for something like this, I'm trying to stay away from actually ordering something in if I don't have to.

Try to do some constant current sources with some op amps and some small transistors if you want it to be challenging. Try feeding them a PWM signal generated by software on some microcontroller and have individual channels.

If you want it to be a real challenge, try to re-implement most of the features of the TLC59116. It would be super cool to see that.  :)
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: What to do with RGB leds?
« Reply #4 on: June 08, 2011, 12:43:11 pm »
Make a propeller clock. If you don't know what that is, Google will be quite revealing!
 

Offline KeithBrown

  • Contributor
  • Posts: 37
  • Country: ca
Re: What to do with RGB leds?
« Reply #5 on: June 08, 2011, 01:52:59 pm »
This is interesting, I checked Digi-Key to look up the data sheet for the TLC59116 since I had not come across that one. The results table showed me 149 of the TSSOP in stock  (the only non-zero number) bit when I clicked through to the detail for that package the quantity was 0: in the 2 or 3 seconds between clicks somebody had bought all the stock! Never seen that!
Anyway, here's a challenge for you. The expectation is that you can make any colour with an RGB LED, right? Well, try to get a brown!
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: What to do with RGB leds?
« Reply #6 on: June 08, 2011, 01:58:16 pm »
This is interesting, I checked Digi-Key to look up the data sheet for the TLC59116 since I had not come across that one. The results table showed me 149 of the TSSOP in stock  (the only non-zero number) bit when I clicked through to the detail for that package the quantity was 0: in the 2 or 3 seconds between clicks somebody had bought all the stock! Never seen that!
Anyway, here's a challenge for you. The expectation is that you can make any colour with an RGB LED, right? Well, try to get a brown!

Someone seems to have stock problems with the part...
 

Offline shadewind

  • Frequent Contributor
  • **
  • Posts: 329
Re: What to do with RGB leds?
« Reply #7 on: June 09, 2011, 09:25:00 pm »
This is interesting, I checked Digi-Key to look up the data sheet for the TLC59116 since I had not come across that one. The results table showed me 149 of the TSSOP in stock  (the only non-zero number) bit when I clicked through to the detail for that package the quantity was 0: in the 2 or 3 seconds between clicks somebody had bought all the stock! Never seen that!
Anyway, here's a challenge for you. The expectation is that you can make any colour with an RGB LED, right? Well, try to get a brown!
Now I'm not color expert, but isn't brown simply a red which is very dark compared to the environment? My computer monitor can do brown very well.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19820
  • Country: gb
  • 0999
Re: What to do with RGB leds?
« Reply #8 on: June 09, 2011, 09:55:23 pm »
Brown is dark yellow/orange.
 

Offline KeithBrown

  • Contributor
  • Posts: 37
  • Country: ca
Re: What to do with RGB leds?
« Reply #9 on: June 16, 2011, 06:08:16 pm »
@Hero99:
Your own avatar icon sez that this is not so. Using ColorZilla with FireFox (a neat tool, by the way) shows the dark browns at the top right of the image to include some blue. Your suggested "yelow/orange" solution are both colours obtained by mixing red and green in varying proportions. I contend that one cannot produce any shade of brown with just a red LED and a green LED, but that a blue one has to be added. But even then, the nonlinear response of our eyes to each primary colour makes a brown quite tricky to produce. So my suggestion stands: with the RGB LEDs, try to produce brown colours!
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19820
  • Country: gb
  • 0999
Re: What to do with RGB leds?
« Reply #10 on: June 16, 2011, 08:11:26 pm »
You don't need any blue light to make brown, see the attachment.

I used to use Firefox but dropped it for Opera and what's wrong with the spell checker on your Firefox installation?
« Last Edit: June 16, 2011, 08:14:43 pm by Hero999 »
 

Offline KeithBrown

  • Contributor
  • Posts: 37
  • Country: ca
Re: What to do with RGB leds?
« Reply #11 on: June 16, 2011, 09:14:13 pm »
I'm not trying to start a fight! Colour is so subjective as to be unscientific (just look at the number of models that have been developed to map our three electro-chemical, not-so-narrow band receptors in our eyes to various mixtures of electromagnetic frequencies that we call light [wikipedia — http://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses]), and varies from person to person anyway so that it is largely subjective.
To get back to the person trying to find a use for 100 RGB LEDs, how about we suggest that he try to produce as many colours as possible: that would lead him into an understanding of the logarithmic response of our vision, I think.
{As to my Firefox spell checker: it is turned off—I suppose you were commenting on the "sez" which was intentional and has a story behind it, and besides a checker would probably tell me that I spelled "colour" wrong.}
This doesn't belong here...but why do you prefer Opera over Firefox? I have both, and Chrome, and IE, but prefer Firefox because of all the add-ons available.
 

Offline Vertigo

  • Regular Contributor
  • *
  • Posts: 78
Re: What to do with RGB leds?
« Reply #12 on: June 17, 2011, 12:31:00 pm »
i contend there is no such thing as brown light.

brown isn't a light, its a dark :P


 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: nz
Re: What to do with RGB leds?
« Reply #13 on: June 17, 2011, 12:52:45 pm »
From the tests i did with rgb leds, PWM was by far the best way to get even color between different rgb leds.

A interesting project with RGB leds is to replace all the lamps in your car's dash with rgb leds and then code a few mcus do to PWM and let you select any color you want.
Or even have the color around the km/h display charge as the speed does. etc.. Or maybe the needle color changes, (if your car has an illuminated needle).

Just make sure you set it to white before you take your car to the testing station :)
or when a cop car pulls you over.
Also, bright blue just looks tacky and is very hard to focus on

« Last Edit: June 17, 2011, 12:58:46 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19820
  • Country: gb
  • 0999
Re: What to do with RGB leds?
« Reply #14 on: June 17, 2011, 05:21:55 pm »
I'm not trying to start a fight!
Neither am I. I just want to help by pointing out to you the error in your thinking.

Quote
Colour is so subjective as to be unscientific (just look at the number of models that have been developed to map our three electro-chemical, not-so-narrow band receptors in our eyes to various mixtures of electromagnetic frequencies that we call light [wikipedia — http://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses]), and varies from person to person anyway so that it is largely subjective.
To get back to the person trying to find a use for 100 RGB LEDs, how about we suggest that he try to produce as many colours as possible: that would lead him into an understanding of the logarithmic response of our vision, I think.
Yes, it's subjective. There are lots of colour models but the only one relevant to this discussion is the RGB model.

My point is that, the only colours that are real spectral colours are those going from red through the spectrum to violet, then there's the colours which are mixtures: magenta, orange, pink etc. Colours such as brown and grey are just darker shades of other colours. If you want grey, the proportion of currents through the LEDs should be the same as per white but lower. The same is true for brown and yellow/orange.

If you have a little blue in brown the effect is to make it appear lighter, nearer to white, but dimmer so on a computer monitor it'll be a greyish brown. As you keep adding more even more blue, the colour will become more reddish, then purple when the blue exceeds the green content.

Quote
This doesn't belong here...but why do you prefer Opera over Firefox? I have both, and Chrome, and IE, but prefer Firefox because of all the add-ons available.
I've switched between Opera and Firefox and back a few times in the past. At the moment I'm using Opera because it's faster and more stable than Firefox. Firefox does have some nice extensions but I like Opera because it gives the functionality I need without adding extensions which are invariably buggy, slow it down and can become unsupported from one version to the next. People complain about the lack of adblocking in Opera but this can be set up, if you know how and works fine for me as I only need it for one forum I visit which is packed with advertising.

I don't use Chrome because the last time I tried it the adblocking was crap, it loads the banners, shows them to me before hiding them which just slows things down. Don't get me wrong, I'm happy for webmasters to advertise but one that site I visit oversteps the mark.
 

Offline Vertigo

  • Regular Contributor
  • *
  • Posts: 78
Re: What to do with RGB leds?
« Reply #15 on: June 17, 2011, 09:03:42 pm »
dude not to be rude but; no, you are wrong.

what you are suggesting amounts to making a colour lighter.
light colours do not behave the same way as solid colours do, and there is no brown in
the light spectrum, for the same reason that there is no black in the light spectrum.



see what happens when u mix light on the left, and solids on the right.
THIS is why we have RGB and RYB models, these are not options.

and no there ain't nothing subjective about light or colour, they can be measured.
only our opinions are subjective.

here's the entire visible light spectrum:

see?
no brown.

there is no such thing as brown light.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19820
  • Country: gb
  • 0999
Re: What to do with RGB leds?
« Reply #16 on: June 17, 2011, 09:47:51 pm »
To illustrate the point further, attached is an image showing progressively darker shades of orange.

Notice how the colour shifts through brown towards black.
 

Offline Vertigo

  • Regular Contributor
  • *
  • Posts: 78
Re: What to do with RGB leds?
« Reply #17 on: June 17, 2011, 11:25:55 pm »
that doesn't represent light, that's a solid.



there's a picture of the primary light colours, notice how when they mix they do the opposite
of what solid colours do when they mix.

 

Offline sacherjj

  • Frequent Contributor
  • **
  • Posts: 993
  • Country: us
Re: What to do with RGB leds?
« Reply #18 on: June 17, 2011, 11:35:04 pm »
that doesn't represent light, that's a solid.



there's a picture of the primary light colours, notice how when they mix they do the opposite
of what solid colours do when they mix.

So you can't have light that is brown colored?  How come I see brown on the screen projected by an LCD projector?  It only uses RGB light.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 10179
  • Country: nz
Re: What to do with RGB leds?
« Reply #19 on: June 18, 2011, 02:06:03 am »
To make brown using RGB light you just need to find a good mix of red and green that gives a nice yellow and then turn down the brightness, Simple.

It's hard to see in the picture above because the color range is compressed on the edges. But the brown is located here


Note: the jpg compression changes the colors slightly, they were exactly the same RGB values before i saved it.
« Last Edit: June 18, 2011, 02:24:27 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline RayJones

  • Frequent Contributor
  • **
  • Posts: 490
    • Personal Website
Re: What to do with RGB leds?
« Reply #20 on: June 18, 2011, 02:13:52 am »
Brown is simply desaturated yellow and this hasn't changed since the early days of colour TV.

Your crappy CGA monitor will help by only showing full saturation yellow, and desaturated yellow, perceived as yellow and brown.


 

Offline Vertigo

  • Regular Contributor
  • *
  • Posts: 78
Re: What to do with RGB leds?
« Reply #21 on: June 18, 2011, 03:10:51 am »
like Ray says, desaturated.
the only way to get brown is to go to the very edge of the beam
where light is only barely reflected.

so if u intensify all light sources equally, all that will happen is that your 'brown'
moves over to the right, and the previously 'brown' spot will now be bright yellow.

in other words: 'brown' is the result of the surface's inability to reflect light
properly at such low intensity, and/or in this case the limits of digital image formats.

to put it in yet another way:
when you intensify a true red light, you get more intense red.
when you intensify a 'true brown' light, based on the above example, you get yellow.

to put it in yet even another way: to get brown in solids like paint, you must use red and yellow to get orange,
and then black to make it brown.
obviously this is impossible with light.

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19820
  • Country: gb
  • 0999
Re: What to do with RGB leds?
« Reply #22 on: June 18, 2011, 10:31:23 am »
that doesn't represent light, that's a solid.
What do you mean by a solid?

The attachment I posted shows an orange light getting progressively dimmer until it's black, going through various shades of brown on the way.

So you can't have light that is brown colored?  How come I see brown on the screen projected by an LCD projector?  It only uses RGB light.

You only see it as brown because it appears to be darker than the other colours on you monitor i.e. white, yellow pink etc. If you have two lights shining on a white wall in a darkened room, one yellow and the other white, then turned down the brightness of the yellow, it would appear to be brown, then if you turned down the white also it would appear grey, until your eyes adjusted to the lower light intensity making the grey appear more white and the brown appear yellow. Of course as it get much darker, the cone cells in your eyes would stop responding so you'd see less colour (both colours would appear more greyish) and the yellow would appear more greenish if it were composed of red and green light, or just dimmer if it were pure yellow and the white would shift more to the blue end of the spectrum.

Brown can also be made from dim yellow, as pointed out above, see attached. I don't think yellow/brown such a nice colour as orange/brown but that's my opinion.
Note: the jpg compression changes the colors slightly, they were exactly the same RGB values before i saved it.
You should use PNG format when you want to preserve the content of an image pixel perfect.
« Last Edit: June 18, 2011, 10:33:30 am by Hero999 »
 

Offline Vertigo

  • Regular Contributor
  • *
  • Posts: 78
Re: What to do with RGB leds?
« Reply #23 on: June 18, 2011, 11:51:14 am »
dim yellow is not brown, its yellow.
if it were brown, turning up the power would make it more brown, not less.
just like turning up a blue light will make it more blue.

with a solid i mean literally solids, IE: paint.
if u mix paint colours, it mixes completely differently from the way light colours mix.

light = light, solids = light reflected off, and thereby being influenced by the properties of, the surface material.

LCDs don't emit light, they refract it.
what you are seeing is not pure light, the colour is created by light being refracted trough the lcd.

Quote
If you have two lights shining on a white wall in a darkened room, one yellow and the other white, then turned down the brightness of the yellow, it would appear to be brown, then if you turned down the white also it would appear grey,

this is simply wrong.
all u can get this way is different shades of yellow.
 

Offline ndictu

  • Regular Contributor
  • *
  • Posts: 211
  • Country: sk
Re: What to do with RGB leds?
« Reply #24 on: June 18, 2011, 02:25:18 pm »
Little off topic but you can also make see brown from Benham's disk:


Take that image, print it out, put it on a motor/drill and spin. You will see some colors appear, including brown.  There is animation on wikipedia but due to low refresh frequency it doesn't really work on a monitor.

I saw this in a Walter Lewin lecture: http://mitworld.mit.edu/video/33/. The entire thing is amazing (as are his physics courses), there is also a lot about colors. But according to the description this demonstration is at 14:02. (Can't confirm, the site seems to be having problems with the video at the moment)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf