Shop OBEX P1 Docs P2 Docs Learn Events
Bi-Color LED Specs? — Parallax Forums

Bi-Color LED Specs?

JBWolfJBWolf Posts: 405
edited 2013-02-11 12:31 in General Discussion
Hello,
I just purchased part# 350-00005.
The LED didnt come with any info and the store doesnt have any documentation... I dont know how exactly this works or what the max current rating is.
Theres only 2 pins so im assuming just reverse the voltage? Normally this would burn out an LED running it in reverse.

Is there are information on this LED?
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/350-00005/List/0/SortField/4/ProductID/569/Default.aspx

Thanks

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-02-07 15:38
    Bi-Color LEDs such as this one have two LEDs internally in parallel with one in reverse from the other. Voltage/current flow in one direction lights up one LED while reversing the flow lights the other LED. We don't include technical specs for this LED as the supplier may change and therefore the spces. These are intended for generic use so if you put a 470 ohm resistor in series you'll definitely be in the safe zone on current @ 5V. If you have a multimeter with a diode checker, some report the forward voltage, so you could check in both directions and divide that value by 10mA to get the resistor value. Note that green and red LEDs have different forward voltages so the green will almost always be slightly dimmer than the red.
  • Mark_TMark_T Posts: 1,981
    edited 2013-02-07 15:43
    I would be surprized if it wasn't rated at 20mA - and with 2 leads it is presumably back-to-back. Most LEDs have a reverse voltage rating ot 5V or similar.
    so wouldn't mind being reversed at 3V3 for instance. With two LEDs back-to-back the reverse breakdown cannot be reached as the other LED will
    conduct first.
    Perhaps the documentation for some of the kits it is included with have more information, but if you stick to 5V or below and say a 330 ohm series resistor
    it ought to be OK - that's about 10mA so I'm erring on the safe side.
  • JBWolfJBWolf Posts: 405
    edited 2013-02-07 16:14
    ok, just wanted to make sure, this is my first time using a bi-color with only 2-pins.... thought there would have to be an internal diode to stop flow to one led in a reverse current config.... so I thought maybe I received the wrong product.
    Thanks!
  • JBWolfJBWolf Posts: 405
    edited 2013-02-07 16:15
    Oh, what is a typical method of running this off the prop?
    Connect 2 pins to the LED, bring one low and one high, reverse high/low output for other color?

    Should I change the pins from input to output to switch from high/low?
    or can I just set both pins to output and use !outa[pin1..pin2] to switch between colors?
  • JBWolfJBWolf Posts: 405
    edited 2013-02-07 19:33
    Works great, red is a bit dim so I might step up current to 20ma.
    Here is the code:
    {{
    Bi-Color LED Test (Red/Green)
    Parallax PN# 350-00005
                                                                      
                                                                                           
     P17 >>------- 330Ω ------                                      
                             |
                             |
                           (LED)               
                             |
                             |
     P16 >>-------------------
     
    Starts with LED off...
    Button press #1 turns on one color
    Button press #2 turns on other color
    Button press #3 turns off LED
    
    }}
    
    CON
    ' Set Processor Speed @ 80mhz
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    ' Global Pin Assignments
      Button = 25
      LEDpin1 = 17
      LEDpin2 = 16
    
          
       
    PUB  Main | Temp
    Temp := 0
    DIRA[LEDpin1..LEDpin2]~~
    DIRA[Button]~
                         
    waitcnt(clkfreq / 1000 + cnt)  
    
         
     repeat                                ' Start Endless Loop
        IF INA[Button] == 1                
         Temp++
           IF Temp > 2                     ' 3-Options Max (0,1,2) 
              Temp := 0
         case Temp
           0 :  OUTA[LEDpin1..LEDpin2]~    ' LED OFF
           
           1 :  OUTA[LEDpin2]~             ' LED Red ON
                OUTA[LEDpin1]~~
                
           2 :  OUTA[LEDpin1]~             ' LED Green ON
                OUTA[LEDpin2]~~
                       
     
       waitcnt(clkfreq / 3 + cnt)
    
    
  • RDL2004RDL2004 Posts: 2,554
    edited 2013-02-07 20:42
    If that is correct and you're actually using a 330 ohm resistor, that's pretty large for the 3.3 volt Propeller. You're probably only drawing around 5 mA or less from the Prop pins. I'd expect the LED to be kind of dim. You should be able to go down to 220 or even 150 with no problems.
  • JBWolfJBWolf Posts: 405
    edited 2013-02-07 22:38
    I=V/R
    3.3 / 330 = 10ma

    I switched to a 178ohm.
    3.3 / 178 = 18.5ma

    Looks much better :)
  • RDL2004RDL2004 Posts: 2,554
    edited 2013-02-08 04:52
    In this case, you have to subtract the forward voltage drop of the LED (VLED).

    I = Vin - VLED / R

    Red LEDs will normally have a voltage drop of around 1.7 - 2.0 volts or so, green will be a bit higher, maybe 2.0 - 2.2. Any number in those ranges will be close enough.

    I = 3.3 - 1.8 /330 = 4.5 mA

    So with 178 ohms, you're probably still under 10 mA
  • ajwardajward Posts: 1,130
    edited 2013-02-10 21:03
    I never checked the actual current flow, but I've used 100 ohm resistors for led's on the prop. No problems!

    @
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-02-11 11:00
    That sounds right since the Propeller runs at 3.3V instead of 5V.
  • RDL2004RDL2004 Posts: 2,554
    edited 2013-02-11 11:53
    Propeller specification is 40 mA per I/O, 3.3 volts / 0.04 amps = 82.5 ohms. This would limit current to the maximum even with a dead short. Given component tolerances and such, 100 ohms is probably a good minimum value.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-02-11 12:31
    Okay, I should have posted this earlier, but I had to look through purchase history to make sure they haven't changed in the last year. The LED we're selling currently and for some time now is the following (datasheet):

    http://www.kingbrightusa.com/images/catalog/SPEC/WP57EGW.pdf

    According to this datasheet the forward voltage for the red is 2.0V and the forward voltage for the green is 2.2V (typical). Given that and a standard operating current of 20mA, the following resistor values have been calculated:

    For Red (5V and 3.3V):
    5.0 - 2.0 / .020 = 150 Ohms
    3.3 - 2.0 / .020 = 65 Ohms (100 ohms is close standard value)

    For Green (5V and 3.3V):
    5.0 - 2.2 / .020 = 140 Ohms (150 ohms is close standard value)
    3.3 - 2.2 / .020 = 55 Ohms (100 ohms is close standard value)

    Keep in mind also that these are for 20mA forward current and that these (according to the datasheet) are both high-efficiency type and do not need 20mA to look good. 10mA probably works fine. I used a 220 ohm in a Propeller project that used this LED giving ~5mA forward current and that works/looks great.
Sign In or Register to comment.