Electronic – Drawing 100mA / common ground for a bus-powered USB hub

usbusb deviceusb-host

I am trying to provide an external 5V power supply to a (previously) bus-powered USB hub.

My first attempt at this was to just connect the USB host's data pins to the hub's data pins, and the external 5V to the hub's power pins, like so:

PSU 5V  ----- Hub VCC In
PSU GND ----- Hub GND In
Host D+ ----- Hub D+
Host D- ----- Hub D-

However, the hub (and attached devices) were not detected by the host PC. My assumption was that as the Host GND and Hub GND were no longer connected, the levels were off, so I added that connection:

PSU 5V  ----- Hub VCC In
PSU GND ---=- Hub GND In
Host GND--/
Host D+ ----- Hub D+
Host D- ----- Hub D-

Still no luck. I then read that a USB host expects a device to draw around 100mA in order for it to be detected, so assuming that the host would output 5V, I added 50R of resistance between it and the host GND so that 100mA would always be drawn:

PSU 5V  ------ Hub VCC In
PSU GND ----=- Hub GND In
Host GND -=/
          |
         50R
          |
Host 5V -/
Host D+ ----- Hub D+
Host D- ----- Hub D-

In this configuration, with the host PC and the PSU turned on, I measure 70 mV across the resistor and zero resistance. When I unplug the USB cable from the host, I measure the 50R properly.

Am I missing something here? Why would the USB host not detect the hub, and why would it appear to short its own 5V and GND pins?

Note: I have read this question, in which the answers suggest that just connecting the ground lines would be enough, and this one, which confirms my belief that it's OK for the USB hub to just draw 100mA and not negotiate for its current requirements.

Best Answer

USB doesn't have Tx and Rx, it has D+ and D-. These need to be connected by name (so D+ to D+ and D- to D-)

If you connected these the wrong way round it's possible the host will shut the port down to prevent damage. You shouldn't need a resistor from Vcc to GND anyway, the host doesn;t need to have 100mA drawn to detect a device, it detects it with a pulldown of one of the datalines)

If the hub has a separate supply, then you just need to connect the ground lines - you don't want to connect Vcc together. Obviously if it doesn't you need to power it from the host supply (i.e connect both)