Hi, hope this is the correct place to put this, this is my first post :)
I'm not new to electronics but I'm new to arduino and what it likes/doesn't like. I'm looking for some advice regarding using transistors to switch current from a 9V battery to groups of 4 parallel LEDs. There are 25 groups, so 100 LEDs in total (think of it as a 5x5 matrix, where there are 4 LEDs for every 1). Each group will be switched by its own transistor using an arduino mega.
This schematic shows 3 of these groups to give you an idea:
I know it's not good practice to use only one resistor to limit the current going to parallel LEDs, but it works and the resistance is enough to prevent a single LED blowing. Using a 9V source and a 360 ohm resistor each LED receives 6.25 mA of current. If all LEDs are on at once, a current draw of 625 mA from the battery will be required. I am willing to add another 360 ohm resistor to each group to lower the current as the brightness of the LEDs does not suffer too much when I do this.
I plan on using 2N2222 NPN transistors which have a beta value of ~100, so what I want to know is: - What base current would be required from the arduino to provide an emitter current of 25 mA (from the battery)? - Will the arduino be able to provide enough current to all pins so that 625 mA will be drawn at once? (I will be using a pin for each transistor as I will not be multiplexing). In the case that I double the resistance of each group from 360 to 720 ohms, the max current will be 312.5 mA.
Am I going in the wrong direction completely? I would really appreciate any help any of you could give me, thanks :)
Edit: I have just realised my schematic is slightly off - the LEDs are connected correctly in reality.