I'm building a [relatively] low-tech game, and part of the functionality is bright, flashing lights, which I'm creating from an array of LEDs.
Several questions around the practical use of transistors arose when trying to design the system, which I'll enumerate below.
To add some additional context, I've already built the LED segments (they're a single strand of lights in a ring, six rings total). The Internet suggested that a combination of series and parallel connections was the appropriate choice, short of putting a resistor on every LED. I'm happy to have feedback here for future projects, but I'm not rebuilding the rings, which look fantastic when lit!
Last, I'm using TIP41A transistors because I happen to have them on-hand and no others at the moment - although if this is a poor choice I'm not against buying some other ones (especially since we're only talking 6).
1) When do I need to use a resistor on the output of a GPIO to a transistor? I connected one of the rings up to a transistor that was connected directly to GPIO and it worked fine with <2mA of current from the GPIO (I'm not suggesting I /don't/ need one, I just want to understand!)
2) (Follow-up to #1) What value base resistor should I use? Based on suggestions to use a resistor, I found http://www.kpsec.freeuk.com/trancirc.htm, which has a section on determining the base resistor. I used 5V as Vc, hFE 75 (DC hFE(max) per the TIP41 datasheet) and 100mA for Ic (the current through one of six rings is 80mA but I rounded up), which gave me 750 ohms. Is this reasonable? Or should I have used 18V as Vc? I assume that too high of a resistor would not drive the base to saturation, and too low could somehow cause too high of a current draw from the GPIO.
3) Must the load on a transistor always be on the Collector side, or could it instead be on the Emitter side?
4) If the load was 10x greater (say, 800mA) is the appropriate solution to use a logic-level gate MOSFET as markus_b suggested in an earlier post? If so, are there any other changes would I need to make to the circuit (other than eliminate the base resistor)?
5) n1ist suggested adding a 330nF and 100nF capacitor to my power supply, which I placed in the schematic. It seems odd to me to have the two caps on both sides of the 7805, but I honestly don't understand why the nF caps were suggested. Should I keep these? If so, do they need to be electrolytic or can they be ceramic disc?
Any additional comments and observations are very much welcome. If you've gotten this far, thank you for taking the time to read and consider my questions!