USB cable data + power not together

Hi everybody, and, at first, thanks to all.
I am making a project and I need power arduino by a DC-DC power adapter (12v to 5v), by USB, but I need connect arduino to a laptop by USB to update the software and, sometimes, debug. So, I need the arduino USB to connect both power adapter and laptop, together and at the same time, with out disconnect power or laptop.
So, my idea is make a USB cable from power to USB arduino only with positive and negative (GND) and in the same arduino USB connect (soldering) the data+, data- and the negative (GND), so the laptop not power the arduino at all, only communicate with it.
(The wired diagram will be: positive power to positive arduino USB; negative power to negative arduino USB and to negativo laptop USB; data+ arduino USB to data+ laptop usb; and data- arduino usb to data- laptop USB)

The question is, is there any problem with this connection? Any problem with the laptop, or any overvoltage or something like this can be damage the laptop or the arduino?

Thanks for all!!!

I hope that you get the power polarity right. :o

There may be no problem at all, or things may not work as expected because some things are powered and connected by data line to other things that are not powered. Because the data lines are USB, I hope that the USB interfaces can take care of this.

Yes, I will take care with the polarity, of course.
I test already the cable made by myself, with a raspberry pi, but I powered the raspberry pi and the arduino with the same power adapter. So, I already make it and everything work (I could get data from the serial USB arduino in the laptop by command line) , but the question is if is there any problem powering the arduino with a dc-dc power adapter and powering the laptop with its own battery?

No body know anything?

No, you want to power the Arduino via its 5 V pin with your regulated 5 V supply.

The concern is in regard to connecting both the USB port and the 5 V pin for power.

There is absolutely no suggestion that this can damage the UNO itself; transfer of power beyond 500 mA in either direction might trip the polyfuse.

The suggestion is that if the external 5 V is higher than the USB 5 V, you might "back-feed" the USB port on the PC or laptop and to avid ths you break (only) the 5 V line on the USB connection. This is in itself, a valid concern as there seem to be reports of USB ports being damaged in this fashion.

The point against this being likely however, is that many or most powered USB hubs do in fact, connect the accessory 5 V supply rated at something like 2.5 A directly to the 5 V terminal on all outputs and the input because without the accessory 5 V supply, the input must feed those outputs and you do not want to insert any device - such as a diode - which will cause a voltage drop.

So given the relative number of Arduino UNOs (some even genuine) and powered USB hubs, I feel if this were a frequent problem, it would be announced to a far greater audience than this forum!

If you are going to make up funny USB cables, best to make one for the actual power supply to connect directly to the 5 V and ground pins, and a simple one for the USB port with the 5 V broken.

Paul__B:
No, you want to power the Arduino via its 5 V pin with your regulated 5 V supply.

The concern is in regard to connecting both the USB port and the 5 V pin for power.

ummmmhhh no, I want not to do that. I want to power arduino only via USB port. Not tis 5V pin.

So, I repeat the question. The homemade cable I want is:

  • USB arduino 5V to regulated 5V supply.
  • USB arduino GND to regulated GND supply and to USB laptop GND.
  • USB arduino data+ to USB laptop data+
  • USB arduino data- to USB laptop data-

The arduino will be powered only by USB from regulated supply. And only in that direction. The regulated 5v supply not get in touch with USB laptop. This is the idea.

Furthermore, I already make this cable, and it works. But I test it connecting to a Raspberry Pi, not to laptop. And the raspberry pi was powered with the same regulated 5V supply. But with the laptop, the laptop will be powered by its own battery. Here is my question, will have the laptop or arduino any problem because they are not powered with the same power source? Because, although they will get not connected in any point to the same 5V source, the data+ and the data- of the USB will be connected between them, and here is my doubt.

Anyway, I understand you that It will have not any problem, does it?

Thanks!

Paul__B:
... many or most powered USB hubs do in fact, connect the accessory 5 V supply rated at something like 2.5 A directly to the 5 V terminal on all outputs and the input because without the accessory 5 V supply, the input must feed those outputs and you do not want to insert any device - such as a diode - which will cause a voltage drop.

I don't think it work in this way. I don't think the powered USB hubs are connected 5V supply power to all 5V usb devices outputs (mouse, cams, etc.) and 5V usb input (computer), because this will make a short-circuit between computer power and external usb hub power. The GND, yes, because it must be connected between all, inputs and outputs, because they need something to reference voltage to communicate.

I found a scheme by internet (something like a external powered hub USB ), I want to do something like this, but without diode, because I will not need it, and without capacitor. In the scheme, all 5v are connected, but in the point to get connected to 5v usb computer PC, to prevent the 5v will go from external power to computer power. This will cause a drop as you said, but I don't know how manage this the circuit. Anyway I will "break" in that point to separate 5v external power from 5v computer USB port.

Paul__B:
If you are going to make up funny USB cables, best to make one for the actual power supply to connect directly to the 5 V and ground pins, and a simple one for the USB port with the 5 V broken.

Yes, I thought that in the first time, but I don't like because the "normal" pins are not hardy or robust, because of that I prefer the usb connector.

Anyway It will be the same or close to the same, because the +5V pin and +5v usb in arduino are connected together, maybe (and probably) with some circuitry, but connected together, doesn't it?