Electronic – USB data transfer without charge

power supplyusb device

This is a total hardware noob question, but I really need an answer to this one:

I have 2 devices, A & B that are both self-powered. I would like to disable the +5VDC cord inside USB port, but still send data between devices through Data+ & Data- cables. Can this be done?

Best Answer

With standard spec-compliant USB, no. The device must detect the 5V from the host before it's allowed to connect its pull-up resistor to the data lines. If you're building a custom device you can probably keep the resistor on all the time, which will fail USB certification but should still work on Windows.

If you want to connect two devices together, again the answer is no. One side of the connection has to be a host (master), and the other side has to be a device (slave). The host has to enumerate the device by requesting its hardware descriptors and selecting an operating configuration. The host starts all data transfers, so two devices will never spontaneously talk to each other. If you're building custom devices with custom firmware, you can have one device act as a host, if your USB controller hardware supports it.

USB is intended for connecting plug-and-play peripherals to PCs. Another protocol would probably be more useful for whatever you have in mind. Your options will depend on the desired data rate and any special needs you might have.