How do USB Powered hubs decide to share loads between hosts and PSU? - Page 1
Forum section: electronics / beginners

author: Musclor
author_rank: Contributor
timestamp: May 07, 2019, 09:22:58 pm
content: Hi, my first post here, been lurking for a while - thank you so much for this wonderful forum!I hope this is not a stupid question, but having bought a bunch of little USB volt/amp meters and hooking them up to my 4 Port USB 3.0 Hub (ST4300USB3EU from startech, technically a kvm without the video), i have discovered major discrepancies between how each 5v supply i used to power the hub behaved. Or is it the other way around?Examples:3 machines connected to the hub.3 devices connected on the other side: 1 mouse (0.05a), a fancy led keyboard (0.3a) and an artificial load for fun (0.65a).First test, no power in. To my surprise, even the hosts not benefiting from the devices shared the load. So that's 1a (total of the above) + 0.1 (to power the hub itself) /3 hosts = ~0.33a per host, well at least in theory, where my macbook only contributed 0.1, the kali linux laptop provided most of the load and the windows nuc on par with the mac.So first question: what kind of magic is this? I thought hubs as per specs were supposed to feed from hosts up to 0.5a then use the external, here we have clearly some 'favorite' hosts pushing a lot more A to the devices.Then the fun started. I'll spare you the details (took me 3 hours to test everything) but i plugged in the 5v dc adapter of the powered up a series of PSUs, with wildly different results despite using the same (20awg) cable.For example, Using a helper with 2x pd and 2x usb 2.4a ports, plugged in one of the usb a i get 5.1v, 0.5a , 2.6w fed to the hub. The load on the machines varied based on how much was fed of course, proportionally to the above based results (with the kali linux laptop topping at exactly 0.5a, i imagine that's the limit allowed by the standard).But plugging in a wonderful raspi3b+ 5.1v adapter from the mains gave me 5.2v , 0.6a for a total of 3.2w average.It got really wild when various ports from another Helper branded (single pd port this time) gave me different , but consistent (tested 10x times each) readings: 5.2v for the QC3+ port with 0.67a, while the other port was giving me 5.0v and 0.4a.For fun, I tried portable chargers, and even the cheap lame crap chargers they give you in pound stores. Ironically, some of the cheapest stuff did very well , while the 'official' mac 80+watts adapters spewed out 1.6w at most.While the result per brand/adapter and even ports were all over the place, they were consistent - meaning i didn't mess up my readings.So, my stupid question:WHY?... why does the hub pull 'variable' amount of voltage/amperage from each PSU?.... why do some fare WAY bettter than others, to the point where the osx adapters coundl't even power up the keyboard and the mouse kept disconnecting?... is it the hub that decides? Or is it just some form of 'quality' factor associated to each charger?.. and finally... why doens't the hub take ALL the power from the PSU when we provide it? Why only take up to 3.5w total (ish) and then split the load between host? And how is the split decided and by whom?Thank you so much and i hope i'm not asking something too stupid

author: soldar
author_rank: Super Contributor
timestamp: May 08, 2019, 10:55:06 pm
content: >> 3 machines connected to the hubI do not understand this. It is a hub which can only be connected to one machine/host.

author: grifftech
author_rank: Frequent Contributor
timestamp: May 09, 2019, 02:06:58 pm
content: Quote from: soldar on May 08, 2019, 10:55:06 pmOP said it was a KVM switch with out the video, 3 computers "connected" only one communicating at a time.

author: soldar
author_rank: Super Contributor
timestamp: May 09, 2019, 03:00:01 pm
content: Quote from: grifftech on May 09, 2019, 02:06:58 pmI know the op said that but I looked it up and is is a hub, not a KVM switch. That's why I am asking.

author: Brumby
author_rank: Unknown
timestamp: May 09, 2019, 05:13:49 pm
content: I'm also interested in how 3 machines are connected to one hub.

author: tooki
author_rank: Super Contributor
timestamp: May 10, 2019, 06:37:24 pm
content: I wonder if the OP is actually using thishttps://www.startech.com/Cards-Adapters/USB-3.0/Hubs/usb-3-peripheral-sharing-switch~HBS304A24Aand simply copied the wrong model number off the website, since from the front they look quite similar.

author: mvas
author_rank: Contributor
timestamp: May 10, 2019, 07:23:23 pm
content: Quote from: tooki on May 10, 2019, 06:37:24 pmI agree!Not this "4 Port Hub" per message #1https://www.startech.com/Cards-Adapters/USB-3.0/Hubs/4-Port-SuperSpeed-USB-3-Hub~ST4300USB3EUBut is this "4x4 Pheripheral Sharing Switching" ?https://www.startech.com/Cards-Adapters/USB-3.0/Hubs/usb-3-peripheral-sharing-switch~HBS304A24AMakes more sense, but either way ...How they share the amps, will vary be based on thespecificvoltage produced by each USB port.

author: tooki
author_rank: Super Contributor
timestamp: May 10, 2019, 07:58:17 pm
content: Assuming it's the switcher one, I'd expect it to behave like any other hub: draw nothing from the hosts it's not connected to, and draw only up to 500mA from the host; all the rest would come from the power socket, which in this device appears to be implemented as a micro USB connector.That or maybe it uses diodes to allow each port to draw a certain amount of juice.

author: Musclor
author_rank: Contributor
timestamp: May 13, 2019, 02:10:00 am
content: Hi, OP here, thank you for all the replies! I wasn't sure if it was allowed to post link to products, but yes, I am using the :https://www.startech.com/Cards-Adapters/USB-3.0/Hubs/usb-3-peripheral-sharing-switch~HBS304A24Afrom startech.I still do not understand my results. As one commented said, the device should take "up to" 500ma from each host, which is why startech recommends to use the product with all 4 machines connected and on. However, my tests (which i reproduced to be sure), shows that:a) the hub takes far less from each connected hostb) the hub takes variable amounts of amps from each host, albeit consistently (meaning depending on what it uses from its own power socket, at least what it takes from each host stays at the same proportion between tests)c) some power sources provide far more amps than others at the same voltage, reducing the load on each host.This highlights that some power sources are 'better' than others, as per the results I listed. I'm trying to understand how that can be considering I'm using the same cable for the test between power sources (it's a micro usb plug), and ALL of the power sources are rated to be able to deliver at least 5v/2.4a, if not far, far more in some cases (but that has no correlation to the results).Thank you for any insight you might be able to provide!

author: magic
author_rank: Super Contributor
timestamp: May 13, 2019, 07:09:10 am
content: Don't turn it on, take it apartPerhaps they use some "ideal diode" to connect the various 5V inputs and the input with the highest voltage provides most of the current until it sags below the other inputs.Maybe there is some active multiphase switcher which tries to take power from various inputs independently, who know how that could be designed to work.I would hope that they don't just short all 5V rails together as that could be a problem for the PSUs involved.

author: Musclor
author_rank: Contributor
timestamp: May 13, 2019, 10:51:53 am
content: Taking it apart is actually a brilliant idea, because I've stopped using in prod anyways as it was behaving badly:a) at each button press to switch hosts, it would power off and on each device, meaning that for devices like the vortex pok3r LED or programmable mice, it was back to 'profile #1' and having to do a little dance each time i switched hostsb) despite grabbing FAR LESS than it could from each host, and FAR , FAR less than it could from the PSUs, it would actually turn off power to the pok3r led keyboard and rapidly turn it off and on for no reason, and that can't be good under any scenarioVery disappointing product considering how expensive it was, I've given up completely on USB hubs now and am using NX to type this on my mac remoting from my kali install. Much nice setup with a stable power supply to each device.