Powering issues with mega

That is always the proper way to power the Arduino itself.

You may come across warnings regarding providing 5 V to the "5V" pin on the UNO/ Mega 2560/ Leonardo when it is also connected to a PC via USB. There is some concern that if the 5 V supply voltage is higher than the USB 5 V, feeding current back into the PC may cause it to malfunction or be damaged.

So arrange it so that whenever you have the Arduino plugged into the PC USB port, you disconnect the "5V" pin from the supply first. :sunglasses: