I picked up a tri-color led from ratshack this weekend to play with my arduino. I wired it up how it should have worked, with a shared ground (I now know this is called common cathode), and it didn't work. Looked around and found a post on common anode/cathode LEDs on this site, which tells me that what I've got is a common anode.
Bummer. I've inspected the packaging the LED came in, and it doesn't give any indication on which it is! Naivite aside, I had no chance.
So my big question is, next time I go to buy one of these, how do I tell if it's common anode or common cathode without testing it (assuming it's not marked)?
And the lesser question is, is there an easy(ish) way to use a common anode LED with an arduino for simple projects?
Thanks
Common anode & cathode LEDs, how to tell difference?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- kyle_s
- Posts: 12
- Joined: Mon Jan 12, 2009 11:44 pm
- westfw
- Posts: 2005
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Common anode & cathode LEDs, how to tell difference?
No idea. There MIGHT be a schematic on the package that would tell you if you can read the schematics. The "bar" side of the diode symbol is the cathode.how do I tell if it's common anode or common cathode without testing it (assuming it's not marked)?
This, however, it easy. Simply connect the common anode to +5V, and connect each cathode (through an appropriate resistor) to your arduino digital outputs. Now output LOW on the pins of the diodes you want to turn on and, HIGH on the ones you want off. PWM will work too, only backwards (255 will be minimum brightness instead of maximum.) In most cases, common cathode and common anode LEDs are equally easy to use, as long as you can think backward...is there an easy(ish) way to use a common anode LED with an arduino for simple projects?
- kyle_s
- Posts: 12
- Joined: Mon Jan 12, 2009 11:44 pm
Re: Common anode & cathode LEDs, how to tell difference?
Thanks! That tip on how to use the LED worked. I'm playing with it now.
As far as a schematic, there was none on the package. It's the same way you can identify Chinese or Korean on a package: you can tell what it is, you just can't understand it I'd be the same way with an electrical diagram.
All radio shack gives you is a part number, and the max voltages of each color. Not even which pin is which color!
Still, fun little LED
Thanks!
As far as a schematic, there was none on the package. It's the same way you can identify Chinese or Korean on a package: you can tell what it is, you just can't understand it I'd be the same way with an electrical diagram.
All radio shack gives you is a part number, and the max voltages of each color. Not even which pin is which color!
Still, fun little LED
Thanks!
-
- Posts: 58
- Joined: Fri Nov 28, 2008 3:14 pm
Re: Common anode & cathode LEDs, how to tell difference?
But you shouldn't think of it as 'backward' or you're just going to confuse yourself more and for longer, right? The useful takeaway fact from this is not that you can drive a 'backwards' LED 'backwards' but the reminder that in working a circuit supplying a low potential to a component with a high potential on the far side is just as useful as supplying a high potential to a component with a low potential on the far side.westfw wrote:In most cases, common cathode and common anode LEDs are equally easy to use, as long as you can think backward...
Now I'll be the first to trash on Radio Shack for being cell-phone-headquarters and having forsaken the electronics geek needing components but... I'm gonna have to challenge you on this point. If you go to radioshack.com and plug in the part number of an LED (in this case I used 276-028 - don't know if that's yours or not but...) and then hit the Product Support tab they've got a datasheet that'll tell you pretty much the whole story about that part.Kyle_S wrote:All radio shack gives you is a part number, and the max voltages of each color. Not even which pin is which color!
-
- Posts: 196
- Joined: Tue Nov 04, 2008 5:21 pm
Re: Common anode & cathode LEDs, how to tell difference?
Color me equally annoyed at the [apparent] total lack of documentation for radioshack parts. And flabbergasted at radioshack.com having a data sheet for their RGB LEDs. I never thought to look there, the package not giving any information leading in that direction, nor a "real" part number for me to google, and even if I got to the product page I don't think I would have clicked on "Support" for a data sheet.
-
- Posts: 58
- Joined: Fri Nov 28, 2008 3:14 pm
Re: Common anode & cathode LEDs, how to tell difference?
Do remember that a long long time ago a Radio Shack partnumber was entirely 'real' for any hobbyist in electronics. And if you already know the vendor then going to Google with the part number instead is a wee bit off-kilter if you ask me... And once you're at the Radio Shack page for a given part clicking through the tabs to find the datasheet is not that big of an imposition, really...sparr wrote:Color me equally annoyed at the [apparent] total lack of documentation for radioshack parts. And flabbergasted at radioshack.com having a data sheet for their RGB LEDs. I never thought to look there, the package not giving any information leading in that direction, nor a "real" part number for me to google, and even if I got to the product page I don't think I would have clicked on "Support" for a data sheet.
Got plenty of reason to hate on the RatShack. Lack of documentation hasn't been one for me.
-
- Posts: 1
- Joined: Sun Feb 15, 2009 10:15 am
RS 'dataRe: Common anode & cathode LEDs, how to tell differe
I'm getting old - I remember the data sheets of the 1970s, where you
could find out expected lifetimes. Today's data sheets are silent
on this issue.
If I'm evaluating components, how to I tell what their lifetime is?
could find out expected lifetimes. Today's data sheets are silent
on this issue.
If I'm evaluating components, how to I tell what their lifetime is?
- karlgg
- Posts: 212
- Joined: Sat Dec 27, 2008 2:41 pm
Re: Common anode & cathode LEDs, how to tell difference?
I've see ratings for estimated lifespan on some... But most datasheets I've been looking at are from actual manufacturers (ie: chinese websites), not Radio Shack (which just buys them and resells them).
That said, the LEDs of twenty-thirty years ago seemed much more prone to fade than current technology. It might perhaps be that they don't differ in lifespan until you get to the weird stuff like high-lumens or odd wavelengths. Or maybe it's a price point, pay extras for ones rated to work X hours, and with cheap ones ya takes yer chances...
That said, the LEDs of twenty-thirty years ago seemed much more prone to fade than current technology. It might perhaps be that they don't differ in lifespan until you get to the weird stuff like high-lumens or odd wavelengths. Or maybe it's a price point, pay extras for ones rated to work X hours, and with cheap ones ya takes yer chances...
Please be positive and constructive with your questions and comments.