Multiple LED PWM and Analog pins resistor question

Hi,

I've searched around for this problem but couldn't find an answer. Sorry if this has been asked before. (I'm sure it has)

I have several LEDs that are each being powered by separate pins( the pwm and analog pins). Right now my code fades each led independently and I have tested it using a resistor for each LED and I have also tested it with one resistor for all LEDs. Both have had success. The LEDs are 100mA so I'm using a 50 ohm resistor.

Of course I'd rather just use one resistor but, I'm worried because I know if all LEDs were arranged in parallel then a single resistor would be a big no no, but if they are in series then its ok.

So, is this arrangement in series or parallel?

Here is a picture of the unfinished project. The resistor is in the heatshrink. I only have one LED installed so you'll have to use your imagination to visualize where the remaining LEDs would go.

This is a test project which is using different LEDs, but is pretty much what I want to do with the nano. It's setup with one resistor. Here is a video of the LEDs fading.

Thanks in advance.

It's most likely in parallel.

100mA from a single Arduino output?! Brace yourself for some magic smoke in the near future.

Pieter

The LEDs are 100mA so I'm using a 50 ohm resistor.

That is not a 50 ohm resistor. It looks like a 150R which is probably what saves your Arduino pin.

and I have tested it using a resistor for each LED and I have also tested it with one resistor for all LEDs. Both have had success.

You are clearly using the word success in a meaning that I have hither to been unaware of. Or you have not tested correctly, or not understood what you have done or are not interpreting the results correctly.

So, is this arrangement in series or parallel?

It is nether each LED is connected to a separate pin so the LEDs are not connected together in either series or parallel.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html

OPs Layout;

Can you tell us where you got the LEDs from and how do you know they are 100mA?

IF you are only going to turn/fade each LED one at a time, in other wards you will never have more then one LED working at a time, you can use one resistor.

IF you are going to operate them so more than one at a time is working, then each LED needs its own resistor.

My advice, put a resistor on each LED so you you can do any combination of LED flashing.

Tom.. :slight_smile:

Thanks for the replies!

TomGeorge - I just ordered some resistors. I'm gonna hook each LED up with one. Thanks for the info!

Grumpy_Mike - The green leds are just for testing which is why it's a 150 ohm resistor. If you watch the video you'll know what I meant by success! haha! Thank you.


These are the leds I was planning on using in the final project.

PieterP - You mentioned I shouldn't draw so much current. I see now 40-50mA is the max recommended current for each pin. Thank You!

Uromastix87:
Thanks for the replies!

PieterP - You mentioned I shouldn't draw so much current. I see now 40-50mA is the max recommended current for each pin. Thank You!

Keep your current down to 20mA max per pin.
As advised here;

Tom... :slight_smile:

I see now 40-50mA is the max recommended current for each pin.

No that is not the maximum recommended current, 40mA is the current that starts to cause damage and the data sheet warns that prolonged use of 40mA will cause damage. The specifications state 20mA and say any higher current will not work inside those specifications.
Note that some people misinterpret the maximum to mean it will supply no more where as it means should not be connected to anything that will draw over this current.

The manufacturer's data says that the continuous forward current is 30mA, and forward voltage is 3.5.

Since you can't supply more than 20mA from an Arduino data pin, they may not be as superbright as you expect.

The resistor calculation is (5-3.5) / 0.02 = 75 ohms.

I wonder if the OP is getting confused by the peak current rating of 100mA? Peak current is only for very quick pulses if you try and run an LED at that current for longer than a mS or so it will burn out. Note it says

Peak Forward Current (1/10th duty cycle, 0.1ms pulse width) IFM 100 mA

So that is like a parking sign that says one hour no return for three hours, only it is turn it on at 100mA for 0.1 mS and don’t turn it on again for at least 1mS.

Hi,
UV LED specs, 3.5V 30mA, 100mA peak forward.


Tom... :slight_smile:

UV 5mm LED - 400 nm - Ultraviolet T1 3_4 LED w_ 30 Degree Viewing Angle _ Through Hole LEDs _ Component LEDs _ Super Bright LEDs.pdf (518 KB)