When I upload a sketch to my arduino 2560 mega with three modules connected to the 5v and Gnd pins of that mega board directly, the uploading failed. And after I disconnected these power supplies, it worked. I know that pin 0 and pin1 should not be connected while uploading sketch, so that they are not used in my case.
So may I assume that it is due to the fact that the power supply of the usb port on my computer is insufficient?
Will this problem be solved, if I add a second power supply (7V~12V) to the power port of the 2560?
Is it safe to keep both the usb cabled to my computer and the second power supply (7V~12V) connecting?
That would be a start, try it but in the long run add an external power supply to power the external modules, be sure to connect the grounds. You can disconnect one at a time to see which one is causing the problem, I Have a feeling it may have a motor on it or other relative heavy load.
Good Luck & Have Fun!
Gil
SIM modules require up to 2 Amperes and cannot be powered from the Arduino 5V output, or the USB port. Use a separate 5V, 2A power supply and connect the grounds.