the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
icon

in understanding rgb led's


Post ReplyPost New Topic
< Prev Topic Next Topic >
dormage 
Member - Posts: 6
Member spacespace
Joined: November 18, 2010
Posted: November 18, 2010 at 3:02 PM / IP Logged  
Hello,
I've been working on a small project of controlling a few RGB LED's with a controler.
Programming went smooth and it was pritty fun.
I ordered some Leds from ebay 5mm difused 5V RGB LED's 4pins.
I hoocked everything up and tryed making them color my wall.
I'm passing RGB values to my controller witch then outputs the acording voltage to each of the pins(excuse my terminology i'm a newb).
From what i read this is done with PWM witch my controller (arduino) alrady has.
Problem:
When i light each individual color to full and others to 0 it works great. Red = red and blue is blue and so on.
As soon as i tryed mixing colors they don't actualy mix!
I just see a circle of blue color and a circle of red color on my wall.
I've been looking at some project's people have made and videos of them, and everybody seems to have made the led's produce yellow or even orange. I don't know if i'm doing something wrong or not but i'm 100% sure it's not the program.
The electronic part i'm defenetly doing wrong cause at the moment i'm not using any resistors. But i fail to see how the resistors could change the fact that the colors don't mix at all, its the same as having 3 LED's each of it's own color.
Maybe i've baugth the wrong LED's?
Can anyone explain and fill the void in my brain on this one?
Thanks!
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: November 18, 2010 at 4:58 PM / IP Logged  
You don't need resistors provided the max time-current rating of each LED component is not exceeded.
EG - a 20mA LED may tolerate 150mA for a max 10% duty cycle or max 10mSecs.
Exceed those ratings and it may blow.
But normally a resistor is used for each LED segment (or series string) to set a max current.
You should be able to test one color only and confirm its PWM as it varies brightness from 0% to 100%.
Do the same for all colors.   
If they do, then those routines running independent should change the colors.
Good programming should provide for such testing.
Running the same PWM on all will just change brightness, though some color shift may occur if their current-brightness responses are different.
Remember too that the LEDs must converge - ie, shine or overlap on the same wall area, else be perceived by our eye as a single source (as done with printers or LCD & TV screens).
dormage 
Member - Posts: 6
Member spacespace
Joined: November 18, 2010
Posted: November 18, 2010 at 5:10 PM / IP Logged  
Thank you that explains lots of it.
I've alrady written a program that takes each pwm from 0 too 255 and back to see if each of the RGB's are working properly and it appears everything is in order.
Maybe i should cover the LED's with some diffused plastic to get rid of the feeling that i only have 3 leds each of its own color.
I turned the lights off and moved away from my computer and i guess from far away the wall seemed "kinda" purple altugh i must admit i was expecting more.
I think i wount need resistors, but in case i decide to use them, would it make sence to put 3 resistors on 1 LED, 1 for each pwm pin?
Thanks for everything!
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: November 18, 2010 at 5:36 PM / IP Logged  
You are all correct.
Yes - diffuse to "mix" the colors. Thin paper, scratched perspex, or my dirty glasses. (All white. That's not an "alright?" pun, I mean all white-ish diffuses. Colors only re-transmit their own color (obviously, yet often overlooked).
Resistors? I suspect the uPC being on 5V, less the chip or PWM switch's voltage drop is enough to drop the voltage down to (say) the 3.3V 20mA LED's maximum (say) 4.2V or max current etc.
If it hasn't blown so far, maybe it never will?
Normally yes - a resistor in each leg because if it were a common/single LED for all 3, the the resistors current varies from (eg) 20mA for one LED to 60mA for all 3, hence a 1:3 voltage variation.
But maybe that doesn't matter. It may even enhance the effect by dimming when all 3 are up full?
Reconsidering, I'd either leave as is, else maybe add the single resistor if I was worried about blowing the RGB...
Now, when it comes to using my Audrino... (LOL - I bought 2 Dueys several months ago...)
Best wishes.
dormage 
Member - Posts: 6
Member spacespace
Joined: November 18, 2010
Posted: November 19, 2010 at 2:19 AM / IP Logged  
Yeh, Its an arduino powered by the USB port witch is 5V, I've been testing my program for a day now and the LED's are allright so i guess they woun't blow up :P
Thanks for answering my questions, realy helps a lot :)
Your working with arduino too?
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: November 19, 2010 at 4:56 AM / IP Logged  
Let us/me know when it works. (Or doesn't - ie, eventually continue else close this thread..)
dormage wrote:
Your working with arduino too?
Er, um, well... I bought 2 Duemilanoves (ATmega328)... er, aha! back in May (2010).
Not sure why - maybe sequential ignition without the need for an extra sensor in the dizzy - but I recall deciding between PIC(AXE) solutions and uPCs.
I chose uPC (the ArDueys) because they were half the price of established PIC systems and did not seem to have the same limitations.
I've done nothing except download a different flash rate program for its onboard LED to confirm they were ok (eBay), and familiarise a little with the ATmega instruction set (I prefer and intend assembler programming).
Maybe one day or century I'll start my ignition or EFI or dash projects...
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: November 19, 2010 at 5:39 PM / IP Logged  
Have you played around with difference distances? Do you have a link to the data sheet for the LED?
Kevin Pierson
dormage 
Member - Posts: 6
Member spacespace
Joined: November 18, 2010
Posted: November 19, 2010 at 8:30 PM / IP Logged  
The link to the datasheet died i hope it gets restored asap.
This is the link:
http://www.electronikdreamz.com/data/LED_5mm/U/5mm_RGB_U.pdf
I'm new to the world of LED's so i didn't try anything.
Only thing that bothers me is that the colors don't mix.
It's just like having 3 different LEDs.
Is it posible to make a "shell" out of some reflective material to focus all the beems in 1 spot, maybe then then the colors would mix?
At this point i'm going to try the ping pong ball idea as soon as i get my hands on them :)
Thanks for all advices :)
P.S if the datasheet link still dosen't work maybe i could give you some info.. if by chance i know any :)
What i remeber is that each of the pins (r,g,b) can handle 20mA.
And it also said they are watter clear and ultra bright :)
I might sound stupid but im a newb at this.
KPierson 
Platinum - Posts: 3,527
Platinum spaceThis member consistently provides reliable informationspace
Joined: April 14, 2005
Location: Ohio, United States
Posted: November 19, 2010 at 9:41 PM / IP Logged  
How far are the LEDs from the wall? What I would look for in the data sheet is an optimal focal length or something like that. If you have three LEDs in one case I would assume there would be an optimal distance for all the color to mix.
Kevin Pierson
oldspark 
Gold - Posts: 4,913
Gold spacespace
Joined: November 03, 2008
Location: Australia
Posted: November 19, 2010 at 11:10 PM / IP Logged  
Is it like electronikdreamz.com/data/LED_5mm/D/5mm_RGB_D.pdf?
They are 30mA LEDs with peaks of 100mA or 150mA (10% duty-cycle, max 0.1mSec) and Fwd Voltage drops (Vf) at 20mA of 1.8V & 3V nominal, or 2.5V & 3.6V max.
But its lens color is "Diffused", hence the colors should be mixed.
Page of 2

  Printable version Printable version Post ReplyPost New Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

  •  
Search the12volt.com
Follow the12volt.com Follow the12volt.com on Facebook
Tuesday, May 13, 2025 • Copyright © 1999-2025 the12volt.com, All Rights Reserved Privacy Policy & Use of Cookies
Disclaimer: *All information on this site ( the12volt.com ) is provided "as is" without any warranty of any kind, either expressed or implied, including but not limited to fitness for a particular use. Any user assumes the entire risk as to the accuracy and use of this information. Please verify all wire colors and diagrams before applying any information.

Secured by Sectigo
the12volt.com spacer
the12volt.com spacer
the12volt.com spacer
Support the12volt.com
Top
the12volt.com spacer
the12volt.com spacer