1

Is there are special circuit that says to USB socket how much current the device needs?

Our device needs at up to 200mA or little bit more.

I have been searching but I do not find a clear answer anywhere. Should there be resistors on data lines or something else? Unit load for USB 2.0 is 100mA and for USB 3.0 it's 150mA according to Wikipedia. How does a the host know how much current to supply? How does the slave ask for load units?

3 Answers3

1

For USB 2, a device cannot take more than 100mA until it has enumerated with host and it has host permission to draw more. Host keeps track how much devices have already requested and how much is still available for more devices, and based on this it either allows the device to use requested power amount or not. Basically, a device can't draw 200mA without asking.

For USB 2 chargers, the charger is just a power supply and has resistances to indicate to device that how much the device can draw.

Justme
  • 127,425
  • 3
  • 97
  • 261
1

USB devices report their power consumption needs in "configuration descriptor", in MaxPower field of it, see an example for a USB 3.0 flashdrive:

enter image description here

This info must be revealed to host during initial stage of USB enumeration, when any USB devices don't take more than "one unit of load".

Classic USB devices (before the PowerDelivery era) do not ask for anything, they just "inform". In theory a USB host is supposed to look at the MaxPower data in early stage of device enumeration, and compare it with the available power budget (it should be known to a properly designed system) and either admit or refuse the new connection and let the device to consume up to its MaxPower.

However, if your USB host is on AC power, each port is mandated to supply "at least" 5 units of load, see details here. And here. And here.

Ale..chenski
  • 38,845
  • 3
  • 38
  • 103
0

For USB 2.0 from all of my testing I have not yet found a host computer that limits the current drawn for my devices to 100mA before enumeration. I have been told multiple times that to draw the allowed 500mA enumeration is needed but I have see multiple Hosts where this is not the case. I have also found that there are some Host that will easily give even more than 500mA (granted with enumeration).

shmueld
  • 76
  • 7