How to switch multiple 5-V loads via microcontroller
You might consider this circuit. I draw this only for one channel, but of course you can replicate for as many channels as you want.

A little explanation:
V1 is your 5-V power supply. V2 is your GPIO of your microcontroller. R1 keeps the pMOSFET in the OFF state. This is very important, as many microcontrollers have floating GPIOs during reset, and you do not want the gate of that MOSFET floating around, picking all the noise.
"LOAD_1" is your load. I just put 10 Ohm for the simulation. Of course you must put your load instead of that 10-Ohm resistor :).

M1 MUST BE A 5V LOGIC LEVEL MOSFET!

R2 - C1 ensure a soft turn on, limiting inrush currents. This is mandatory if your are switching capacitive loads, otherwise you'll have a huge drop on your 5V line, possibly causing the RESET of your microcontroller.
Adjust the time constant as per your requirements.

EDITS:

I have added also a possible suggestion if you have 3.3V GPIOs. Note that in this case the function is inverted, because of the presence of the BJT Q1, which is put as a level shifter.

The function of R5 is to make sure that the BJT is OFF when the GPIO is not initialized (e.g. during reset). In other words, it has the same function of R1, i.e. to prevent that during reset the OUTPUT1 powered.

D1 can be omitted. I just placed it, because in this way, the turn OFF time is not determined by R1+R2, but just by R1 (this is useful if you want a faster turn OFF than a turn-on).

The resistor values are randomly placed. You should adjust them as per your requirements! (Still, with these values, it will work).







simulate this circuit &ndash; Schematic created using CircuitLab