I'm had problems with multiple devices connected to my mega 2560 at the same time if the power supply was not shared. Mostly with LED stripes but also with other devices.
I found my way with sharing the same 5v PSU for all devices and had good results.
I'm powering my mega with the USB cable when connected to a PC; mostly to upload new versions or to read the serial output. Then I swap the USB cable with another one that I stripped. The USB cable has only the 5v and GND cable to the 5v PSU and the D+ D- are not connected.
I hoped I could use the normal PC to Mega connection and replace only the 5V and GND to supply the Mega from the same source and also use the D+ D- to the PC.
The PC is not recognizing my Mega 2560 serial connection without the 5v and GND connected to the arduino. I was wondering why this is so and if my laptop is turning of the USB port if nothing is drawing power or...and how to resolve it.
Thanks for the advice, this is still a prototype but here we are.
The correct way to do what you're trying to do is (probably) to connect the Arduino to your PC using a USB cable, AND connect an external power supply to the DC barrel connector. You shouldn't need to modify any USB cables. If a suitable external power supply is connected to the barrel connector, the Arduino will automatically select it. USB function will be unaffected. Here's a relevant thread: http://forum.arduino.cc/index.php?topic=22132.0
The barrel connector needs 7+ volts. I have only 5. And if done so, the on board regulator will switch to the external PSU. But if I do so, I have to use the 5v supplied from this regulator on the Mega. That is not providing enough power for other circuits that need 5v. If I power those devices from the regulator on the Mega,the LED stripes etc.. won't even reset properly.
I wanted to use the USB connector, that has also a fuze,and power it from the external 5v power supply that other devices use. But then the D+ D- on the PC won't work for some reason. IF i don't do that, if I leave the Mega to draw power from the PCs USB...again, nothing would work properly.
I see. Probably the answer is to not connect the shields to the Arduino's 5V at all. Only connect the ground. Then power your shields with your external 5V power supply. Regardless, modified USB cables are not the answer.
Interesting. So GND from the external 5v PSU and the GND on the Mega should be connected together so I get rid of those issues I had when I was not using the same power source?