i have a led cube with 5 layers, to choose the layer i want to switch the ground pin to the different layers, but it has to switch really fast, is there a component i can electronically use as a switch?
A transistor, darlington or logic-level MOSFET. Google "low side switching transistor" or such.
With 5x5x5 cube there might be 20mA x 25 = 0.5A per layer to switch, which is getting close to
the limit for a single transistor - a darlington or logic-level MOSFET might be a safer bet (MOSFET
should run cooler with less voltage wasted).
It might be wise to post a complete diagram of that cube instead of a camera tripod.
If you're using 74HC595 shift registers for the cathodes, consider replacing them with the TPIC6B595.
That chip is (almost) the same as the 74HC595, but has stronger mosfet outputs.
Leo..