Connect with us

LED cycle RGB

Discussion in 'LEDs and Optoelectronics' started by MPdesign, Aug 20, 2012.

  1. MPdesign

    MPdesign

    6
    0
    Aug 20, 2012
    I have a RGB LED
    http://www.superbrightleds.com/moreinfo/component-leds/rl5-rgb-clear-tricolor-led/298/

    Do I need common cathode or common diode?

    I need to cycle this between each color, one color per second. I am using 2 AA batteries as a power source. It does not have to be exactly 1 second.

    Can someone please show me a basic electronics layout for this using basic components that I can order and put together very cheaply.

    Please forgive me. It has been 20 years since my logic classes and it will take me 3 hours to get this somewhat correct - probably put together in not the best way. ;). I really need it correct to modern standards.

    Thank you!
    Jody
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,174
    2,690
    Jan 21, 2010
    It all depends on how you're driving it.

    If you source current to the LED, then you need common cathode. If you sink current from it, common anode.
     
  3. MPdesign

    MPdesign

    6
    0
    Aug 20, 2012
    Source
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,174
    2,690
    Jan 21, 2010
    So you need common cathode. :)

    The easy way to figure it out is to draw the circuit and then figure out how you can connect either all the anodes or all the cathodes together.

    You may find you have to move resistors from one side of the LED to the other or do other basic manipulation, but it's generally pretty straightforward.
     
  5. Electrobrains

    Electrobrains

    259
    5
    Jan 2, 2012
    Hi Jody

    First of all, you can hardly drive those LEDs and circuitry directly from 2xAA batteries = 3V or less. You would need to step-up that supply voltage to about 5V or more (or use 3-4 batteries).
    This can easily be done with charge pump circuits like LTC1682 or MAX682 or with a low-cost boost regulator like MCP1640.

    For the rest, you could use these standard circuits: NE555 for pulse generation and a CD4017 for sequencing. A few transistors (eg. BS170) on the output could help the 4017 supplying enough current for bright LEDs.

    I suggest you take the chance and try to put together those circuits in a circuit diagram of your own. That will quickly bring you in touch with the electronics again (and give you the joy of having made it yourself). Then we can have a look at it.

    If I would make this commercial, I would use a low-cost (<0.5$) micro controller (eg.PIC10F202 or PIC12F508)
     
  6. MPdesign

    MPdesign

    6
    0
    Aug 20, 2012
    Thank you for your help.

    This needs to be pretty rugged, tough and small.

    From what I am seeing, a 555 and 4107 look right for the application - OR - the PIC10 and 12.

    The application should be thought of as a very *ruggedized* flashlight that sequences three sets of different color LEDs in a seemingly random order.

    It will be subject to some knocks, so I will be looking to protect it all or encase it. I would think that less components = less components to break.

    This would head to manufacturing, maybe, in a year. Which may be the best choice? I am just doing some garage entrepreneur testing right now, but I want to start off in the right direction.

    THANK YOU!
    Jody
     
    Last edited: Aug 21, 2012
  7. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    Confused with this comment as it's not true, here is no need to boost the voltage doing so is a waste, both in conversion and dropping it back down to drive the LEDs, as nothing needs 5V to opperate... The LEDs only need 2V forward, so as long as the drive circuit operates at 3V or less you will have no problem driving it with a 3 volt supply...

    Use a low voltage version of the 555 timer like the TLC555 or LMC555 and a M74HC4017 (or equivalent) that all operate at 3V and you are done...

    A micro solution will also work just fine at 3V...
     
  8. Electrobrains

    Electrobrains

    259
    5
    Jan 2, 2012
    If you plan to make a commercial product with a real PCB and larger amounts than just a few for hobby, then you should definitely use a micro controller.

    With for instance PIC12F508 (approx. 0.5$) you can include almost everything!
    It has enough power to drive all the LEDs without external transistors.
    You can make the frequency generator in software and also a (pseudo-) randomizer, sequencer or whatever you wish.
    The function of raising the supply voltage can most probably also be included in the PIC.
    Either as a driver for an external charge pump or maybe even as a step-up converter according to the principle of Steve's mini converter! (let the Schmitt trigger oscillator and control function reside inside the micro controller)

    Of course you would need more time for such project, because of the software development, but it would give you a very small and cheap end product, aimed at mass production.

    p.s. Hm... Coca-Cola, take a look at the data sheet! The red, green and the blue LEDs need 2.6V, 4.0V and 4.0V respectively to work properly!
     
  9. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    A micro solution like the PIC is best for production, they can sink/source 25mA on their own so it's a single chip solution... If you want to make it rock solid you can parallel a few I/O pins of the micro to half the load on them and still be a single chip solution without resorting to transistors, but it's likely overkill as the I/O pins of the PIC are designed to directly drive LEDs... A micro also has the advantage of being able to easily produce a better pseudo random pattern...
     
  10. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    I see that, but there are other RGB that will again operate at 2-3V...

    https://www.sparkfun.com/products/105

    http://www.ebay.com/itm/10x-5mm-Dif...ltDomain_0&hash=item43b2e78a6e#ht_3384wt_1163

    As I suggested use parts that will operate at the supplied voltage, and avoid the hassle of upping the voltage...

    And if you just want random colors, there are solid state RGB LEDS that rotate through the colors all on their own, no need for a drive circuit...
     
    Last edited: Aug 21, 2012
  11. Electrobrains

    Electrobrains

    259
    5
    Jan 2, 2012
    Hm.. According to the data sheet, the first one needs 3.4V (green and blue) and the ebay no-namer without data sheet needs 3.2V (green and blue) according to hongkongsuperseller!
     
  12. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    That isn't what the datasheet says when I read it?

    [​IMG]

    Again, that isn't what I'm seeing?

    [​IMG]

    And if that doesn't work here is one that goes down to 2.8 Volts

    http://factory.dhgate.com/diodes/highlight-round-led-5mm-rgb-p44740325.html

    [​IMG]

    In the end getting an RGB to operate at 3V is not a problem, you just need to pick the appropriate LED...
     

    Attached Files:

    Last edited: Aug 21, 2012
  13. Electrobrains

    Electrobrains

    259
    5
    Jan 2, 2012
    Hm again... :(

    Dear Coca-Cola, I appreciate your inputs in this forum, but sometimes I think you try very hard to prove things that are bluntly said wrong!

    If anybody has any understanding on how to dimension an electronic circuit, he must know that he never dimensions a professional circuit based on minimum limit values (not even on typical values), but has to add a very good margin.

    Of course you must dimension the circuit based on "worst case", which in this thread is the maximum voltage of the "worst" LEDs.

    Added to that, the battery voltage will soon drop below those 3V and definitely disable the function of two out of three LEDs. Result: throw the (still good) batteries or go and demand your money back for a poorly engineered product.

    Other factors that would give reasons to add more margin, would for instance be the temperature range (the values given in the data sheet are mostly given for Ta=25°C), aging influence and voltage drops in switch components and contacts.
    Are you serious...???
     
    Last edited: Aug 21, 2012
  14. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    Correction, I showed what I said was factual, as anyone can clearly see... The fact that you disagree with the datasheet does not change what is printed on the datasheet as you proclaimed to be the case...

    You appear fixated on 'proving' that it's necessary to boost the voltage in this application, when I show that isn't the case you immediately disregard the data, so you can hold fast on your proclaimed necessity to boost the voltage... You are fixated on your single solution as being the only one while ignoring other options that might very well work in this application just fine, depending on the desired outcome...

    That is always up for debate and should be taken into consideration on a product/design to product/design basis... I personally go through 10s of thousands (sometimes 100s of thousands) of LEDs a year in my commercial products that I manufacture and produce all in house... I handle all complaints and concerns as well since it's my product and I'm a one man show... With all my products I repair for FREE (if I'm at fault, and many times when I'm not) indefinitely, there is no limited warranty so the customer is always free to contact me with issues if they arrise... The short of it is that I know full well on reported failure rates, and trust me LED failures are far, far below 1% even with diminishing battery voltage, in fact I have found that in most cases a microchip (or other ic) will experience abnormalities from voltage drop before the LEDs themselves stop functioning... I have yet to find any validity that would support an LED not functioning properly at the MIN datasheet specifications for forward voltage... In fact based on many, many hands on test I have concluded that a VAST majority of them will easily operate at substantially less voltage than the MIN specification... The MIN specification is almost always based on a specified performance level indicated in the datasheet, not the absolute cut off value of the LED... Thus you will see a diminished brightness but I have never seen an LED that just shut down at the MIN operational voltage specified, in fact quite the opposite... I have seen plenty of blue and white LEDs with a min specified voltage of 3.5-3.8 that perform down in the area of 2.5V without issue (less diminished brightness) before they cut off, in fact I have intentionally run blue and white LEDs at decreased voltage levels due to space limitations or by design because I wanted to tame the brightness down... I have run many a blue and white LED off of 2032 or 2016 coin cell @ 3V due to space limitations, even though it's bellow the min voltage of those LEDs the design functions and met the designed space requirements that it needed to...

    The best procedure IMO for any commercial product using an LED is real world TESTING not assuming the datasheet MIN specification is an absolute cut off failure value... Test and verify that it will work within your desired perimeters, never just assume...

    If the circuit functions properly under testing and in this case is still within the datasheets specified perimeters it should for all intents and purposes...

    Before you proclaim 'definitely' have you tested? At what point did you discover said LED started to fail? Were you using an alkaline that started out at 1.55-1.6 V and will take many hours driving a single LED to fall below the 1.4V threshold that it would take to be bellow the specified MIN voltage?

    Yes there is going to be a point when it will fail due to a dead battery, as with any product... I just tested some RGB automated flashing LEDs I had on hand, specified at 3.0V minimum... At 20mA I did not lose blue, until 2.5, green dropped off at 1.7 and red dropped at 1.5... Is this acceptable for this particular design?

    When is a battery not good? Are you going to suggest they implement a joule thief circuit in there to milk everything you can? Like all products, yes there is a point where batteries (that are still good) will no longer function in a specified circuit, that is a given, and that point can vary all over the place depending upon the design... If after testing you determine that run times with standard alkaline based on voltage drop isn't within your desire perimeters you can recommend lithium cells or change the design at that point...

    Are you serious in suggesting that selecting a better matching LED to the supply voltage is wrong? Because, YES, I'm serious, if you have a 3 Volt supply don't choose components that require in excess of 3 Volts, when there are suitable options that will operate at the supply voltage.. Why shouldn't you match the components requirements to power source? What is wrong with suggesting a lower voltage rated LED as as suitable replacement to a higher voltage rated one when you have a limited voltage to work with, to me it's one very logical option to consider?

    You seem fixated on your claim that it's 'necessary' to pump the voltage up to 5V, that is simply a false statement, it's actually just one of many options that can work or could be explored to accomplish the task it's not the only option available...

    In the end you have to consider perimeters of your device, and it's expected performance as well as balancing cost with target price...

    With that said another design option to consider is using rechargeable 3.6V, 14500 sized batteries that are nearly identical in size to an AA battery and mostly interchangeable with over the counter AA battery holders... They supply 3.6V, giving you even more voltage head room in a design like this without using a boost converter and minimum design change... You can even drop down to a single cell (or double up for longer run time) at 3.6V or double the voltage with two cells if it works better in the design...
     
    Last edited: Aug 21, 2012
  15. MPdesign

    MPdesign

    6
    0
    Aug 20, 2012
    Thank you both for your help. I will confirm my correct voltages myself - or with the LED manufacturer if needed.

    Also, I have found many RGB LEDS that do cycle (I need the slow cycle) but they all seem to cycle R,G,B,RG,RB, B, R, etc...

    I need only solid colors (RGB) without having 2 colors on at once. If you know of an LED that does this, please let me know because I can't find it. It also has to be a "Faux" random pattern such as: R,G,B,G,R,R,B,G,G, etc and then it starts over.

    By the way!!!!!
    If I use any of your above solutions and I cut power to the chip, then turn the power back on, will it start over at the start of the sequence, or start where it left off (I will be triggering the whole thing with a light sensor).
     
  16. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    Hmm.

    EB and CC seen to have a completely different reading on the meaning of the forward voltage in the datasheet of an LED.

    I am with EB on this. I have always thought the min and max forward voltage represent the variation among devices for the forward voltage at the stated forward current. I am not sure why I have thought this, or who is right at this point. CC seems to be interpreting it as an operating range.

    Anyone else care to comment?

    Bob
     
  17. MPdesign

    MPdesign

    6
    0
    Aug 20, 2012
    If it represents a range of variation among devices , wouldn't that be like saying that a hand grenade would blow up in between 2 and 5 seconds after pulling the pin?

    Who cares if might blow up in 5 seconds, you would only care about 2 seconds, any data after that is useless.

    Do you see what I mean? No-one would say 2-5 seconds, they would only say 2 seconds...

    This would leave me to believe that it is an operating range - that would likely vary the output lumens.

    but then again, I am an idiot that the asked the whole pedantic question to begin with...

    Thanks again!
     
  18. KJ6EAD

    KJ6EAD

    1,114
    157
    Aug 13, 2011
    The datasheet voltage tolerances apply to the LEDs collectively. They aren't applicable to individual LEDs. While it's possible to test and select LEDs for higher current at lower voltages, it's an unenviable chore.

    Using CocaCola's approach and assuming a 2 X AA supply, you'd be forced to either sort LEDs, buy pretested bins, accept reduced brightness and/or poor battery usage efficiency.

    I always try to design for a cutoff voltage of 0.7V per cell and for blue LEDs I assume a worst case of 4.0V if I want to retain the option of maximum current. I'm no fan of 9V batteries, but I might choose one in this case if size is critical.
     
  19. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,174
    2,690
    Jan 21, 2010
    You're both right, and you also both wrong (he says putting himself in a position to get shot down in crossfire).

    It is true that you can't rely on Vf being 3.0V at 20mA, but it is also true that with enough searching you would probably find one where it is.

    I have no idea where min and max fall on the spectrum of values, and neither can I be absolutely sure that the typical value falls in the centre of the population. Assuming that min and max are at 5% and 95%, you're going to have to search for one at or below the minimum value. Since it's probably variation between batches more than variation between devices, you may have to hunt for different batches.

    BUT, 2 alkaline AA cells give you more than 3V when new. You can get up to 3.4V.

    And maybe the design doesn't call for 20mA (Vf will be somewhat lower at lower currents)

    However, how do you current limit them?

    And what happens when the batteries are not new (but nowhere near flat)?

    If I were designing something like this, I might use the typical ones for determining the values of series resistors, and then check using both the min and max values to ensure I wasn't overly sensitive.
     
  20. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,174
    2,690
    Jan 21, 2010
    yes

    Not to the person who wonders why it didn't go off and wanders over there to take a look.

    Really?

    No, it's the observed and expected variation between devices. If you design expecting the maximum (like using a 2-5 second grenade like it was 2 seconds) you'll be safe. But the wise designer will also see if the other limits have any impact.

    Not an idiot. It's a very useful question, even if you're getting some disagreement in the response.

    The debate indicates that it's not a simple question to answer, and whilst it's possible that the discussion may be no use for you, out of it may come some specific recommendations.

    For instance, I would recommend that you try to use 2 AA batteries, or a pair of LiPo batteries (same size as AA, but between 3.2 and 4 volts per cell). In a similar size, you can also use a 9V battery. If you are limited to a pair of AA cells, you may find that blue and white LEDs are either dim, or change brightness rapidly as the batteries go flat.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-