What to do with RGB leds? - Page 1
Forum section: electronics / projects

author: psycholoner
author_rank: Newbie
timestamp: June 07, 2011, 10:55:54 pm
content: 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.

author: ivan747
author_rank: Super Contributor
timestamp: June 07, 2011, 11:42:56 pm
content: 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.

author: psycholoner
author_rank: Newbie
timestamp: June 08, 2011, 12:04:03 am
content: 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.

author: ivan747
author_rank: Super Contributor
timestamp: June 08, 2011, 01:34:05 am
content: Quote from: psycholoner on June 08, 2011, 12:04:03 amTry 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.

author: deephaven
author_rank: Frequent Contributor
timestamp: June 08, 2011, 12:43:11 pm
content: Make a propeller clock. If you don't know what that is, Google will be quite revealing!

author: KeithBrown
author_rank: Contributor
timestamp: June 08, 2011, 01:52:59 pm
content: 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!

author: ivan747
author_rank: Super Contributor
timestamp: June 08, 2011, 01:58:16 pm
content: Quote from: KeithBrown on June 08, 2011, 01:52:59 pmSomeoneseems to have stock problems with the part...

author: shadewind
author_rank: Frequent Contributor
timestamp: June 09, 2011, 09:25:00 pm
content: Quote from: KeithBrown on June 08, 2011, 01:52:59 pmNow 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.

author: Zero999
author_rank: Super Contributor
timestamp: June 09, 2011, 09:55:23 pm
content: Brown is dark yellow/orange.

author: KeithBrown
author_rank: Contributor
timestamp: June 16, 2011, 06:08:16 pm
content: @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 produceanyshade 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!

author: Zero999
author_rank: Super Contributor
timestamp: June 16, 2011, 08:11:26 pm
content: 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?

author: KeithBrown
author_rank: Contributor
timestamp: June 16, 2011, 09:14:13 pm
content: 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.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 17, 2011, 12:31:00 pm
content: i contend there is no such thing as brown light.brown isn't a light, its a dark

author: Psi
author_rank: Super Contributor
timestamp: June 17, 2011, 12:52:45 pm
content: 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 stationor when a cop car pulls you over.Also, bright blue just looks tacky and is very hard to focus on

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2011, 05:21:55 pm
content: Quote from: KeithBrown on June 16, 2011, 09:14:13 pmNeither am I. I just want to help by pointing out to you the error in your thinking.QuoteYes, 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.QuoteI'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.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 17, 2011, 09:03:42 pm
content: 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 inthe 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.

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2011, 09:47:51 pm
content: To illustrate the point further, attached is an image showing progressively darker shades of orange.Notice how the colour shifts through brown towards black.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 17, 2011, 11:25:55 pm
content: 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 oppositeof what solid colours do when they mix.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 17, 2011, 11:35:04 pm
content: Quote from: Vertigo on June 17, 2011, 11:25:55 pmSo 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.

author: Psi
author_rank: Super Contributor
timestamp: June 18, 2011, 02:06:03 am
content: 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 hereNote: the jpg compression changes the colors slightly, they were exactly the same RGB values before i saved it.

author: RayJones
author_rank: Frequent Contributor
timestamp: June 18, 2011, 02:13:52 am
content: 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.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 18, 2011, 03:10:51 am
content: like Ray says, desaturated.the only way to get brown is to go to the very edge of the beamwhere 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 lightproperly 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.

author: Zero999
author_rank: Super Contributor
timestamp: June 18, 2011, 10:31:23 am
content: Quote from: Vertigo on June 17, 2011, 11:25:55 pmWhat 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.Quote from: sacherjj on June 17, 2011, 11:35:04 pmYou 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.Quote from: Psi on June 18, 2011, 02:06:03 amYou should use PNG format when you want to preserve the content of an image pixel perfect.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 18, 2011, 11:51:14 am
content: 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.Quotethis is simply wrong.all u can get this way is different shades of yellow.

author: ndictu
author_rank: Regular Contributor
timestamp: June 18, 2011, 02:25:18 pm
content: 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)

author: Zero999
author_rank: Super Contributor
timestamp: June 18, 2011, 02:50:44 pm
content: Quote from: Vertigo on June 18, 2011, 11:51:14 amIs there something wrong with your eyesight?Do you not agree that the circle in my previous attachment is brown?QuoteSo what is grey then? It's nothing but dim white, just like brown is dim yellow.By your logic just turning up the power makes it more grey.QuoteYou (not u) mean pigments which are opposite to lights. In the pigment world brown can be created by adding black or a small amount of magenta and cyan to yellow.QuoteNo they filter light created by the back light. Refraction is something different.QuoteI know, it's a mixture of red, green and blue light and you get brown by setting the red and green pixels on the monitor to 50% brightness and yellow by setting them to 100% brightness. If you look at the RGB value of the pixels on the circle in my previous attachment, you'll see this.QuoteYes, all shades of yellow from black, to dark yellow (brown) to very bright yellow, just like on the attachment I posted previously, if you care to look.

author: sacherjj
author_rank: Frequent Contributor
timestamp: June 18, 2011, 03:15:20 pm
content: All the browns we are seeing in this thread as LIGHTS no SOLIDS, due to the fact that all our monitors are sending LIGHT to our eyes, we are not looking at them from reflected light (as you would with a SOLID.)

author: Vertigo
author_rank: Regular Contributor
timestamp: June 18, 2011, 08:12:20 pm
content: look, your just wrong, and i am tired of arguing.a monitor does not = a beam of light, thats light refracted troug the screen of your computer.yeah the screen is brown, the light it emits is orange.if u don't believe me, try it and find out.oh hell, ill make it a contest:first person to find me a grey beam of light gets my slightly used grey Leatherman Charge AL.

author: Zero999
author_rank: Super Contributor
timestamp: June 19, 2011, 03:45:07 pm
content: Quote from: Vertigo on June 18, 2011, 08:12:20 pmI agree with you.I think there's been a miscommunication, going from your location, I assume English not being your first language.

author: Vertigo
author_rank: Regular Contributor
timestamp: June 20, 2011, 12:07:19 pm
content: no misunderstandings here dude, if there is one it is entirely on your side.we speak english just fine here in holland.there is no such thing as brown or grey light, your wrong, get over it.

author: ndictu
author_rank: Regular Contributor
timestamp: June 20, 2011, 01:07:26 pm
content: Quote from: Vertigo on June 20, 2011, 12:07:19 pmBut I agree with you, colors aren't just as simple as RGB model, the perception also depends on surrounding, eg. the same shade of orange in this picture looks as orange and brown:

author: Zero999
author_rank: Super Contributor
timestamp: June 20, 2011, 04:35:09 pm
content: Quote from: Vertigo on June 20, 2011, 12:07:19 pmAhhg, I never said there was such a thing as brown or grey light. Your English obviously isn't as good as you think. You've totally misunderstood every single post I've made in this thread. Going from your previous post, your English is pretty poor: you don't even know how to use proper punctuation.Go on, post a quote of me saying there is such a thing as grey or brown light.Quote from: ndictu on June 20, 2011, 01:07:26 pmThanks for posting that image. I tried to explain that earlier on, but he didn't understand.Quote from: Hero999 on June 18, 2011, 10:31:23 am

author: Vertigo
author_rank: Regular Contributor
timestamp: June 20, 2011, 06:10:04 pm
content: has anyone ever accused you of being a narcissist?

author: Zero999
author_rank: Super Contributor
timestamp: June 20, 2011, 06:24:11 pm
content: Quote from: Vertigo on June 20, 2011, 06:10:04 pmNo, only you.Why? What's wrong, still can't quote me on saying there is such a thing as grey or brown light?

author: Vertigo
author_rank: Regular Contributor
timestamp: June 22, 2011, 09:43:37 am
content: no actually that was a question.do you understand the difference?you were talking out of your ass, and you ain't fooling anyone with thesefallacious debate tactics.you were wrong, get over yourself!you spent half a page arguing against 2 statements that were crystal clear,and one of them wasn't even mine.so interpretation on my part is not even relevant to that point.what kind of a pathetic little fairy are you anyways to go trough these mental gymnasticsto avoid having to admit you were talking out of your ass while hiding behind a nickname on1 forum among millions, surrounded by people you don't even know, on a point that is beyondtrivial?why is the idea of being wrong about such banal minutia such a horror to you?that ain't normal dude, and it ain't healthy.not quite as unhealthy as actually trying to pull this irl, but thenyou don't talk much irl at all do you?you were wrong, its plain for everyone to see, and no amount of insults to my person is going to change that.get help.

author: Tony R
author_rank: Regular Contributor
timestamp: June 22, 2011, 11:29:07 am
content: You could make an M&M sorter, i have seen videos of it before, flash each the Red Green and Blue lights at it use a photo sensitive cell to pick up the intensity off the LED and then a mechanical structure to sort them out

author: Zero999
author_rank: Super Contributor
timestamp: June 22, 2011, 04:37:16 pm
content: Quote from: Vertigo on June 22, 2011, 09:43:37 amNo, you're wrong again, I've not insulted you once, you're the one who started the name calling.QuoteI'm not going to bother going go through the rest of your childish post. I was also annoyed that you couldn't take it that you were wrong but I've read through the thread and I now realise we were probably both to blame. All I can say is, hopefully other people here will see this was just a misunderstanding, on both our parts and I hope you'll also see that when you've calmed down.Quote from: Tony R on June 22, 2011, 11:29:07 amI've seen that before but with snooker balls. The most common way is to flash each LED on briefly and monitor the reflected light level. It's also possible to use three sensors with different coloured filters and a white light.