LEDs, Resistors, and wiring question...

I was thinking of using my arduino to control a group of LED's on 1 pin. Lets say they have a Forward voltage of 2.6V @ 20mA and I want to use 4 in parallel config on pin 4. I know the arduino is rated at 40mA or so per pin "DC Current per I/O Pin 40 mA", so what kind of setup would I have to use? I honestly am trying to figure out the setup, but some direction would be very appreciated.

Hi

Checkout http://ledcalc.com/ - a very handy site for working these things out. Plug in 5V for your supply voltage, 2.6V forward voltage and I always look to 20mA output so you have some headroom on your pin. Tell it you have 4 and it will give you a diagram using 150R current limiting resistors with how to wire them up.

Cheers ! Geoff

I know the arduino is rated at 40mA or so per pin ...

40 mA is the absolute maximum rating. So it isn't 40 or 41 or 42.

Design for 20 mA. Even then there are limits on groups of pins.

http://www.gammon.com.au/uno

Awsomdk: I know the arduino is rated at 40mA or so per pin "DC Current per I/O Pin 40 mA",

40mA is where damage starts to happen. It's not rated at 40mA continuous use per pin.

Awsomdk: so what kind of setup would I have to use? I honestly am trying to figure out the setup, but some direction would be very appreciated.

Use a transistor as a switch. Google it.

You don't need to run the LEDs at maximum current. Even dropping to 0.5 or 0.25 times will result in a very similar brightness level as the human eyes response to intensity is logarithmic.

It wouldd be advisable to learn how to use a transistor to switch higher loads from an Arduino output pin as you'll need this sooner or later.

However, in this case, you could just wire your LEDs in parallel and run each at less than 10mA to stay within the limits of the pin output. Running at 5mA each would be best, to give a maximum 20mA on the Arduino pin.

And, if you can't get enough brightness at 5 or 10mA, you can simply try a brighter LED. A quick look at my Jameco catalog shows some standard red LEDs with output less than 10 mcd up to "super bright" LEDs that put-out 8000 mcd or more. Brightness varies a LOT from LED-to-LED.

So, Arduino is 5v @ up to 40 mA but 20 mA is the safe-zone? And if all I have is 1/4 watt resistors, how do I modify the circuit that is wanting 1/8 watt resistors? Thanks for all the help!

RankUpGamers: So, Arduino is 5v @ up to 40 mA but 20 mA is the safe-zone? And if all I have is 1/4 watt resistors, how do I modify the circuit that is wanting 1/8 watt resistors? Thanks for all the help!

Yes, and if 1/8W is adequate then anything higher like 1/4 W resistors will be perfect.

I have some white LEDs that are too bright to look at directly with only 3mA flowing through them. For LEDs in parallel each one needs it's own resistor.

Aaand... How much current does USB provide? Kinda off topic, but I plan on making a light for my keyboard after messing with my arduino some more.

RankUpGamers: Aaand... How much current does USB provide? Kinda off topic, but I plan on making a light for my keyboard after messing with my arduino some more.

The USB standard sets 500 ma as the limit.

Lefty

is that at 5v?

RankUpGamers: is that at 5v?

5.00±0.25 V