Heya all, first, I am new to this stuff, so my understanding of the physics that drives all this is extremely limited.

Currently, I have a RGB LED (anode type) hooked up to my Arduino. The cathode is hooked up to the 5V and the anodes for each color in the LED is hooked up to PWNs 3, 5 and 6. (red, green and blue respectively).

Everything works as it should, however, I read up a lot about the need for resistors to prevent the LEDs from burning out.

This here is the anode RGB LEDs I purchased at Seeed Studio (http://www.seeedstudio.com/depot/5mm-triple-output-led-rgb-common-anode-p-25.html?cPath=32_19)

My question is, how do I find out what kind of resistors I need to use? Is there a formula or calculator that I can use to determine this? What if I have multiple RGB LEDs that I want to hook up to my Arduino? (I'd like to hook up around 5 of these RGB LEDs, all performing the same function). I saw this thing called a breadboard, what is it? Do I need that to allow plugging in of more than 1 RGB LEDs?

Anyway, any links to tutorials or high-level diagrams would be much appreciated. Again, I'm new to all of this, and am trying my best to take things one step at a time, any help would be much appreciated.

A breadboard is basically a solderless PCB where you plug your parts and connect them.

As for the leds. You need resistors.

You provide 5V, usually blue and green LEDs have about 3V, and the red about 2.1-2.4V

So you need to eliminate about 2 Volts for the green and blue, about 3V for the red.

Check out this calculator, use a current of 20mA and supply 5V

http://www.led-calculator.com/

Safe option : 1K

Full brightness option requires you know the current they run at and the forward voltage. 300 ohms usully isn't too far out for small LEDs on 5 volts. The page you posted doesn't give values or a links to a data sheet.

You need one resistor for each cathode.

Do not run them without resistors, it stands as much chance of cooking the arduino as the LEDs without.

This should be right up your street : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228874758

? One LED for three status indicators
? Pin 3 is red and pin 4 is green

The 5mm Triple Output RGB LED is red, green and blue colors LED. The 5mm Triple Output RGB LED units have four pins. There is one pin for each color and have a common anode. The one LED used as three status indicators or pulse width modulate and all three give mixed colors.

Features:
? Forward voltage (RGB): (2.0, 3.2, 3.2) V
? Luminosity (RGB): (800, 4000, 900) mcd

Hi Apogee, where did you get that information? I believe that is for the cathode types. Are anodes the same?

I guess this makes no difference, the led needs voltage and current wheter it is cc or ca, so the ratings stay the same

Also, since these are RGB LEDs with 3 anodes, if there are 5 RGB LEDs in parallel, would that mean I need to plug into the LED calculator that there are 15 RGB LEDs instead of 5? Thanks man!

This is what I have plugged into the calculator:

http://www.led-calculator.com/?betriebsspannung=5&led_anzahl=15&led_spannung=3&led_strom=20

Does that look right? Says I need a bunch of 100 ohm resistors, with a total power draw of 300ma? I believe USB 2.0 can provide up to 500ma, so I don't need an external power source do I? Thanks!

The arduino pins are rated at 40 mA max, most recommend you stay below 20mA so you should only run 1 LED per pin. If you went with 1k resistors as I suggested you would get away with 5 on each pin. But they would want one resistor per LED (3 on a RGB which is effectively 3 in one package). Since the red LED forward voltage is only 2 volts, you couldn't use a 100 ohm resistor on thet part of the RGB, current draw through the Arduino pins aside.

Hi Pluggy, so what do I need to do to wire up 5 LED RGBs? Each pin can do 40ma, so I can put 2 leds in each pin? Thanks!

Basically 5 RGB Leds are 15 single Leds wich is above the arduino Current rating (correct me if i'm wrong) escpecially if you have a weak Mainboard or Laptop. The Arduino is a Microcontroller and I/O Board, not a Power-provider for Leds or motors.

You could use LED-Driver chips or use a rainbowduino.

I did a small test here (also note, the stuff i plugged the Leds into is big Breadboard) driving 36 RGB Leds from normal USB without resistors or any additional components than a Rainbowduino.

Hi Apogee, that is beautiful! Is there a tutorial on how to connect the Arduino to the breadboard to do something similar? I just need to power 5 rgb leds. Thanks!!!

I'm at work right now, ill be back home in some hours, if nobody else did reply i will rethink your problem and try to provide a solution.

One thing tho:

A Breadboard is just the connectors, not a actual electronic piece. You could do this "flying" with a lots of wires...

I was going to do this with a bunch of wires anyway as I need to locate the RGB LEDs in various areas in my PC case (yeah, this is for a PC case mod). Thanks Apogee

I built this now at home. My final outcome is:

This is a waste of I/O Pins, but for your application and as a beginner its well ok i guess.

It draws 20mA out of every Pin which totals about 300mA for all 5 Leds in full white.

You even can control the Colours individually on each Led with this setup.

The 3 resistors i used are 120 Ohms for the G/B and 370 Ohms for the R cathode.

The resistorcolours in the pic above don't really match!

Why would you power this circuit by USB anyway? Just use the 5V from your IDE Power Connector. The Red one provides 5V, the yellow one 12V.

Greets

which totals about 300mA for all 5 Leds

As well as the limit of 40mA per pin there is a limit of 200mA in total for all the pins. So this circuit will over stress the arduino by 50%.

Therefore look into using a transistor to drive the LEDs.

I guess in a RGB Setup you have very few occasions where all 15 Leds are fully lit to display white rather than having like 100-150mA for mixColours.

Would a transistor allow to fade? Or would it just allow to "high" or "low" the output.

Would a transistor allow to fade

Yes as much as digital pins will, that is using the PWM method.

Thanks for the info.

Then using transistors is the better solution when having scenarios where all 15 Leds are fully lit.

You may decide of that xtrykr

Thanks Apogee. The reason why I am powering it via USB is out of convenience because I am sending to the Ardruino a series of feedback representing the CPU load. The values would change the color of the RGB LEDs.

Thanks for the diagram! Its very helpful in understanding how it works!

Lastly, say I do need more voltage, if I have it plugged into the USB, can I plug the IDE connector into the 5V as well to get another 5V? Or is it one or the other only? Thanks again!!!