Help!Pins

hello,
I need some help! I am working on a led's dress and I tried to :-[ figure this out myself but yet, I am very confused.
is it Ok?

I am using the 13 digital pins and I want to put as many leds as possible.

Each DC Current per I/O Pin = 40 mA + 5V
LED = 20 mA + 1,6 V - 2 V

If there are in serial: maximum will be 2 leds because of = (2x20 mA) =40mA (one resistor of ?)
If there are in parrallel: maximum will be 3 leds because of =(3x1.6V)=5V (3 resistors of 220)
so I guess the total I can put on my arduino is 13 pins x 3 leds =(39leds)

but why on this video they have 8leds per pins and it is working?????

:o

Please help! :-[

hy!

take a look of this:

Thanks a lot ::).
So, if I use a transistor.... then how many leds can I have on one pin....
could it be more then 4 in parrallel then?
???

if you use a big enough transistor you could have 100 leds! But you would need a very big battery.

Find the transistor and see how much current it can take, then divide that by 20ma.

If you use a 2N2222 transistor, you can swtich up to about 800ma, so about 40 leds absulute maximum.
If you use a TIP102 transistor, you can switch up to 8000 ma, so in theory you could switch up to 400 leds with one pin!
That would need a big heatsink on the transistor....
In practice though, you won't want to do that much wiring, and also you will find that one little wiriing mistake will make lots of smoke, and also you want to only use about 80% of the current capacity just to be safe and not to generate too much heat.

I would try one of these configurations:

2N2222 with up to 20 leds
TIP102 with up to 40 leds, along with heatsink.

You have to be sure to use resistors in series with each led. See the diagram above.

D

Thank you so much Daniel. You really make my day!
This is Wonderful!
:smiley:

Have a great thanksgiving!
Alisha

Daniel,

How would someone use that pin to drive more than one transistor and avoid the heatsink issue?

if you use a big enough transistor you could have 100 leds! But you would need a very big battery.

Find the transistor and see how much current it can take, then divide that by 20ma.