I am trying to work out a power budget for a battery powered device i am making.
I have a USB hub with 4 ports. Each port has a device that needs communications (that is, none of them are for charging or running any kind of electromechanical device). I measure the current at the 12V supply to the hub.
In standby, i measure 146 mA @ 12V. When the hub is active, i measure the same.
I have code that controls the communications, so there should be no communication in standby.
Wikipedia (and other posts) say USB3.0 allocates power in units of 150mA @ 5V. From that I would expect at minimum to see 150mA x 4 ports = 600mA when active. This should show up at a change of 250mA @ 12V at the power input.
Can someone explain what is going on here? Why is active the same as standby? And why is it lower than expected?
41 Answer
There is no such thing as "standby" in USB framework. There is SUSPEND state, and several active link states with various degrees of power management.
Again, nobody "allocates" anything like the 150 mA. The 150 mA in USB3 is a mandatory minimum of 5 V power, and "active" devices can take whatever they need, up to 900 mA. Or less. All depends on "devices". Therefore it is illogical to expect 150 mA x 4 consumption, especially from a compound device with 4 embedded functions.
If your host driver stops communicating with all four downstream devices, it doesn't mean that all links will automatically enter low-power states, the host driver should FORCE each link into lower power states. Devices in USB 3.0 framework can also request and turn their respective links into U1 and U2 states, but they must be enabled to do so. But not into U3. And again, the controlling silicon will still be active. To get into "true SUSPEND" (U3), host must force all links into U3 (SUSPEND) states.
However, if you are making a self-powered compound device (hub+devices), there is no specific requirements on its own consumption, all up to designer, whether it is made to conserve power, and to what degree. Even if the upstream link is forced into U3, self-powered device can do whatever it wants, it is up to "green certification" or whatever requirements to make it power-savvy.
In this particular case the compound device either was not forced into U3 state by host, or the device itself ignores the state of upstream link, and does nothing to change its power consumption.
Overall, the USB power management was historically a challenge for system software, and for years this feature was disabled in USB3 framework. Even in the USB2 framework there are still glitches and incompatibilities, suffice to mention the frequent advice to "disable selective suspend" mode.