Pin Assignments on RGB LED?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Pin Assignments on RGB LED?

Postby bunger » Wed Feb 22, 2012 5:01 pm

I bought a bunch of RGB LEDs from the Adafruit store, am playing around with them, and am having a difficult time. Specifically, the data sheet shows the following pin assignments:

--Flat Side--
Pin 4: Red
Pin 3: Anode/Cathode
Pin 2: Blue
Pin 1: Green

Using these assignments, I can't get the LED to light up. I can only get it light if Pin 4 is connected o Ground and Pin 3 appears to be Red. Not sure of the other 2 assignments as I can't yet get them to light.

Am I missing something stupid here?

Thanks
Bill
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby adafruit » Wed Feb 22, 2012 5:02 pm

what part number are you referring to?
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Pin Assignments on RGB LED?

Postby bunger » Wed Feb 22, 2012 5:05 pm

I have bought the Diffused RGB 5mm LED 25 pack and bought them individually:

https://www.adafruit.com/products/159

https://www.adafruit.com/products/302
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby pburgess » Wed Feb 22, 2012 5:39 pm

Tell us about your voltage source. Wouldn't be a single AA battery, would it?
User avatar
pburgess
 
Posts: 1327
Joined: Sun Oct 26, 2008 1:29 am

Re: Pin Assignments on RGB LED?

Postby bunger » Wed Feb 22, 2012 6:17 pm

I have it connected to an Arduino Uno powered by the USB connection to my laptop. I have also tried it with the 9v power block that came with the Arduino Starter pack... same result.

Bill
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby pounce » Wed Feb 22, 2012 10:28 pm

You are using some resistors on the RGB legs before grounding? These are common anode which means you power the long leg and the others sink. Note the specs on the product page. (Red: 2.1-2.5V Forward Voltage, at 20mA current, Green: 3.8-4.5V, Blue: 3.8-4.5V ). You have the pins in the right order. Have you tried the tutorial?
pounce
 
Posts: 82
Joined: Wed Nov 23, 2011 5:36 pm

Re: Pin Assignments on RGB LED?

Postby bunger » Thu Feb 23, 2012 6:45 am

No resistors.... And am following the tutorial....
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby adafruit_support_bill » Thu Feb 23, 2012 7:09 am

No resistors.... And am following the tutorial....

Which tutorial? The LED tutorial examples here all use resistors to limit the current. Too much current can damage both the LED and the Arduino output pins.
http://www.ladyada.net/learn/arduino/LEDs.html
User avatar
adafruit_support_bill
 
Posts: 15918
Joined: Sat Feb 07, 2009 9:11 am

Re: Pin Assignments on RGB LED?

Postby bunger » Thu Feb 23, 2012 7:35 am

I just did some testing with a plain 'ol LED, connecting it to the various Arduino pins and it lights up without issues... so nothing is fried. I also have about 35 RGB LEDs and none of them work, so it is likely not a fried LED.

Sooo.... maybe something in the code is wonky.

Can someone post really stupid simple RGB LED code and I will test that?

By the way... THANKS ( that's a big "thanks" ) for all of the help!!
Bill
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby pounce » Thu Feb 23, 2012 8:58 am

Resistors.
pounce
 
Posts: 82
Joined: Wed Nov 23, 2011 5:36 pm

Re: Pin Assignments on RGB LED?

Postby bunger » Thu Feb 23, 2012 10:23 am

So there theory would be that too much power is getting through, thus preventing the LEDs from lighting? Seems like they would light up even without resistors...
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby adafruit » Thu Feb 23, 2012 11:05 am

the LEDs are common anode, pin 3 is the anode
that connects to 5V
connect the other pins to resistors to ground
User avatar
adafruit
 
Posts: 10483
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Pin Assignments on RGB LED?

Postby bunger » Thu Feb 23, 2012 11:37 am

Apparently I am now totally confused.

I thought pin 3 went to ground followed by pins 1,2,4 going to various output pins ( ie., 9,10,11 ).

But you are suggesting that pin 3 goes to the 5v power source and pings 1,2,4 all get piped to ground? If that is the case, how do you control different red, green, and blue light levels?

Bill
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Re: Pin Assignments on RGB LED?

Postby adafruit_support_bill » Thu Feb 23, 2012 1:58 pm

how do you control different red, green, and blue light levels?

Connect the RG & B cathodes to Arduino pins (using current limiting resistors) and when you do a "digitalWrite(LOW)" it will pull the pin to ground and light the led.
User avatar
adafruit_support_bill
 
Posts: 15918
Joined: Sat Feb 07, 2009 9:11 am

Re: Pin Assignments on RGB LED?

Postby bunger » Thu Feb 23, 2012 4:45 pm

adafruit_support wrote:Connect the RG & B cathodes to Arduino pins (using current limiting resistors) and when you do a "digitalWrite(LOW)" it will pull the pin to ground and light the led.


Humbly bows before you, accepts his dunce hat of Newbieness, and greatly appreciates the help!!!!!
bunger
 
Posts: 86
Joined: Sun Apr 10, 2011 1:33 pm

Next

Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: No registered users and 3 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [102]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]