How Shit Works: Drawing Power from USB Ports

By LZ

Art by Hato Suzume

The design of a proper USB port on a host device like a PCs or a laptop computer can source at least 500mA, or five "unit loads" per USB socket (please don't ask your toshiba laptop to do this, it goes into a horrible state, and starts throwing alerts to the use controller). The specifications define a term called a "unit load", "one unit load" is in fact 100mA. Therefore a standard port can supply up to five unit loads.

The same goes for Self-powered USB hubs, they too can supply five unit loads. However, if you choose to use a Bus-powered (no external power supply) USB hub, you can guaranteed to supply only 1 unit load (100mA).

Further, the spec states - see Figure 1 - that a minimum available voltage from a USB host or powered hub at the peripheral end of the cable is 4.5V, while the minimum voltage from a USB bus-powered hub is 4.35V. So, as you can see, you must be careful with your designs.

Figure 1. USB Voltage Drops (from Universal Serial Bus Specification Rev 2.0)

Once connected, all USB devices must identify themselves to the host. This is called "enumeration." Now here is where things get interesting... All devices that plug into a USB port must start out drawing no more than one unit load, in other words 100mA. After handshaking with the host communicator, the device can determine if it can take/deliver the full five unit loads (500mA). In the identification process, the host determines the power needs of the USB devices and gives, or denies, the OK for the device to increase its load from 100mA maximum to 500mA maximum.

Okay, by now you must be saying to me, what the shit? Here goes... further reading of the spec allowed me to discover this, and communications with several designer that "skirt the rules" allows us to determine how implementations and actual practice generally diverges from the specifications or how undefined parts of the spec take shape. These are some of the observed USB characteristics that may not be obvious, yet can influence your designs.

  • USB ports do NOT limit current. Though the USB spec provides details about how much current a USB port must supply, there are limits that we can push a whale through on how much it might supply. Though the upper limit specifies that the current never exceed 5A, a wise designer should not rely on that. In any case, a USB port can never be counted on to limit its output current to 500mA, or any amount near that. In fact, output current from a port often exceeds several Amps since multi-port systems (like PCs) frequently have only one protection device for all ports in the system. The protection device is set above the TOTAL power rating of all the ports. So a four-port system may supply over 2A from one port if the other ports are not loaded. Furthermore, while some PCs use 10-20% accurate IC-based protection, other will use much less accurate poly-fuses (fuses that reset themselves) that will not trip until the load is 100% or more above the rating. Do the simple math ... 4 amps is maybe the protection limit.
  • USB Ports rarely (never) turn off power: This one has got to be my favourite, tweak your setting in the power management of the BIOS or your operating system, no matter what your system documentation says, there always seems to be power available as long as you are plugged into the wall. The USB spec is not at all specific about this, but it is sometimes believed that USB power may be disconnected as a result of failed enumeration, or other software or firmware problems. In actual practice, no USB host shuts off USB power for anything other that an electrical fault (like a short). There may an exception to this statement, but I have yet to see it. Laptop and motherboard makers are barely willing to pay for fault protection, let alone smart power switching. So no matter what dialog takes place (or does not take place) between a USB peripheral and host, 5V (at either 500mA or 100mA, or even maybe 2A or more) will be available. This is born out by the appearance in the market of USB powered reading lights, coffee mug warmers, and other similar items that have no communication capability. They may not be "compliant," but they do function.