I am a novice in circuitry and I'm trying to make an 8x8x8 LED Cube using an instructables guide for a school project. I have ordered all the parts and was testing the grounding circuit for each layer (pictured below). I am trying to understand how the PNP and NPN transistors interact. The PNP is a TIP42C and the NPN is a 2N2222.
The PNP's (O1-O7) Emitter is connected to 5V, the Collector is connected to the cathode end of 64 LEDs, and the Base is connected to 5V through a 10Ω resistor and to the collector of the 2N2222 through a 1kΩ resistor.
The NPN's (T1-T8) base is connected to a MUX through a 1kΩ resistor, the emitter goes to ground, and the collector is from the PNP. I understand how this portion works.
R1-R8 and R17-R24 are 1kΩ. R25-R32 are 10kΩ.
What I don't understand is why the PNP transistor is necessary. I tried to build one line of the diagram:
Green Wire: High/Low to NPN Base Black Wire: Ground from NPN Emitter Orange Wire: Cathode from 64 LED Array (simulated with 3 LEDs) Red Wire: 5V to PNP Emitter White Wire: 5V to LEDs
But the issue I ran into was with the 5V into the Emitter of the PNP (Red wire). If I took that out, the LED's lit up, but the diagram clearly has the emitter of the PNP wired to 5V.
Is there some fundamental property of PNP transistors that I am missing? I calculated the total current of the 64 LEDs (~1.2A). (Is this right?) and would this circuit support that?
FYI, each line from JP2 in the first picture is a ground line from a 64 LED array and the lines from the IC1 are driven by an arduino uno.
I've been racking my brain over this for the last week and can't figure it out so any help would be greatly appreciated! Thank you!