I think, sinking/sourcing-capability is quite symmetric on ATmega328... 40mA max. Better stay with 20mA.
The current flows INSIDE the arduino.
So: you don't care too, if you got overdriven by a car backward or forward, if the speed is the same
That's why you should use a transistor or ULN200x or MOSFET or whatever to amplify. (Maybe a relay.... never worked with them, and dont know about their speed.....)
Even one single ULN200x won't handle your current. It's around 500mA.
Ok, I get your point... Next to amplify what? It would be most beneficial to me and other people who may read this post looking for guidance on their own projects if we do not assume I know ANYTHING about transistors. Are you saying I should wire then lights in series and use a transistor to boost the voltage so that only 20 mA is sunk by each pin? Is it even possible to wire common anode LED's in series or only the 6 pin variety? I'm going to read up on these other parts you mentioned but I don't know if I'll be able to find them around town and definitely am not paying for speed shipping for a $2.00 part. Any Macgyvers out there have any different solutions?
I found another post where grumpymike says you can sink 60mA at 25C. This festival is at about 9000ft in the mountains in Colorado and the bar will be open in the middle of the night so I imagine the temp will be around 5-10 deg C. Also the lights are mostly flashing meaning the average power will be half and so less heat. I am not too worried about losing an arduino. I am however worried about not having more lights than our camp neighbors. If I wanted to play on the safe side I wouldn't be going to a festival with a 60 foot bonfire and unlimited free booze. ;D But seriously. what if I drop the number of LEDs in each string down to 6. Increase the resistance to keep the mA at 15. This gets the maximum current at each pin down to 90 mA. ( Keep in mind it will be colder and mostly flashing) Is this reasonable?
Read about transistors in general. There are TONS of tutorials.
If you put the LEDs in series, you need more voltage. So you need a powersource with more than 5V. Assuming 19LEDs in Series, you'll nee around 40-50V. Not a voltage, a beginner should play with....
If you put them parallel, you can use 5V-source with 'enough' amperage.
So your Transistor will boost the current, not controll a higher voltage.
(if you put a small current (e.g. 5mA) in transistor's base, you 'open' the collector-emitter-trail, which will allow a lot more current to flow.(e.g. half an amp) Enough for one LED-Strip) <-----simplified, but i think sufficient.
So you basically need 6 transitors, capable of letting 500mA through at 5V.
6 resistors (~1k. Find out in Transistor-tutorials) to protect the bases of the transistors. (and vice versa your arduino.... Otherwise, it will give what's available. And kill himself and maybe that transistor....)
19*6~120 resistors for all cathodes. There are "resistor-ladders", configured as a star. So you just dont need 120 resistors. Fewer 1-9-Ladders (9 resistors, that share one leg....) (or "longer" ones, if available) will work too, because all ends of your cathode-resisters will be connected together.
That ULN-stuff is just some IC, that integrates 7 "doubletransistors" with some extra stuff
great thanks. I'm slowly coming to the realization I will have to reduce the number of LED's in this strip atleast for now. I'm going to read for the afternoon and see what I can learn about transistors. Thanks for the help everyone.
So..... I've decided to try this out with 12 LEDs. 6 in each string. My current understanding is I can use 6 PNP transistors with emitters tied to the cathodes and the collectors tied to ground. If I used 6 BC748's with maximum collector current of 150 mA and max gain of 125 I could tie the PWM pins to the base pins of transistors and use the same "active-low" code i've written to control the LED's. 120 mA/ 125 (gain) = 1 mA. The PWN pins output 5V at 40 mA max. A 5K resistor in between the PWN pin and the transistor base would would provide 5V/5K 1 mA to the base and a high current of 125 mA stopping the current flow. Does this sound correct? I appreciate your quick replies. I only just finished my first semester of EE and all my teachers are currently on summer vacation.
actually, you want NPN transistors. also, you will want to research how to wire a transistor. the base gots to to the pwm pins through a 1k ohm ressitor. then you connect the annodes to +5. the collector of the transisitors go to the cathode bus. the bus connects through resistors to each led. you want one resistor for every color on every led. the emitter goes to the ground bus.
put more current <20mA (maybe 10mA) into base (for arduino's sake). And so allow the transistor to let it's max flow. And reduce this actual current by resisors in the collector-emitter-stage.
EDIT: Now i read, that jeremie told you, to use a smaller resistor on the base