95
\$\begingroup\$

I heard that the current limit for a USB port is 100mA. However, I also heard that some devices can get up to 1.8A from a port. How do you get past the 100mA limit?

\$\endgroup\$
7
  • \$\begingroup\$ I added a long post trying to explain what goes into each group. If you need 1.8A the short answer is that a computer will not do it. \$\endgroup\$
    – Kortuk
    Oct 25, 2010 at 3:05
  • 7
    \$\begingroup\$ @Kortuk - A computer should not do it. Some probably can, though. \$\endgroup\$ Mar 31, 2011 at 12:50
  • \$\begingroup\$ @reemrevnivek, this was discussed down below, every computer I have used will not deliver 1.8A. I have used a couple that would even shutoff the port if there was too capacitive of a load and you violate the input rush current. \$\endgroup\$
    – Kortuk
    Mar 31, 2011 at 14:58
  • 2
    \$\begingroup\$ @Kortuk, Technically speaking, "Systems that obtain operating power externally, either AC or DC, must supply at least five unit loads to each port." - Section 7.2.1, USB 2.0 Specifications. Note, "at least" 100mA x 5 = 500mA. There is no upper limit. \$\endgroup\$ Sep 1, 2017 at 0:43

10 Answers 10

110
\$\begingroup\$

I think I can attempt to clear this up.

USB-100mA

USB by default will deliver 100mA of current (it is 500mW power because we know it is 5v, right?) to a device. This is the most you can pull from a USB hub that does not have its own power supply, as they never offer more than 4 ports and keep a greedy 100mA for themselves.

Some computers that are cheaply built will use an bus-powered hub(all of your USB connections share the same 500mA source and the electronics acting as a hub use that source also) internally to increase the number of USB ports and to save a small amount of money. This can be frustrating, but you can always be guaranteed 100mA.

USB-500mA

When a device is connected it goes through enumeration. This is not a trivial process and can be seen in detail on Jan Axelson's site. As you can see this is a long process, but a chip from a company like FTDI will handle the hard part for you. They discuss enumeration in one of their app notes.

Near the end of enumeration you setup device parameters. Very specifically the configuration descriptors. If you look on this website they will show you all of the different pieces that can be set. It shows that you can get right up to 500mA of power requested. This is what you can expect from a computer. You can get FTDI chips to handle this for you, which is nice, as you only have to treat the chip as a serial line.

USB-1.8A

This is where things get interesting. You can purchase a charger that does outlet to USB at the store. This is a USB charging port. your computer does not supply these, and your device must be able to recognize it.

First, to get the best information about USB, you sometimes have to bite the bullet and go to the people whom write the spec. I found great information about the USB charging spec here. The link on the page that is useful is the link for battery charging. This link seems to be tied to revision number, so I have linked both in case the revision is updated people can still access the information.

Now, what does this mean. if you open up the batt_charging PDF and jump to chapter three they go into charging ports. Specifically 3.2.1 explains how this is gone about. Now they keep it very technical, but the key point is simple. A USB charging port places a termination resistance between D+ and D-. I would like to copy out the chapter that explains it, but it is a secured PDF and I cannot copy it out without retyping it.

Summing it up

You may pull 100mA from a computer port. You may pull 500mA after enumeration and setting the correct configuration. Computers vary their enforcement, as many others have said, but most I have had experience with will try to stop you. If you violate this, you may also damage a poorly design computer (Davr is spot on there, this is poor practice). You may pull up to 1.8A from a charging port, but this is a rare case where the port tells you something. You have to check for this and when it is verified you may do it. This is the same as buying a wall adapter, but you get to use a USB cable and USB port.

Why use the charging spec? So that when my phone dies, my charger charges it quickly, but if I do not have my charger I may pull power from a computer, while using the same hardware port to communicate files and information with my computer.

Please let me know if there is anything I can add.

\$\endgroup\$
19
  • 4
    \$\begingroup\$ The document you linked to specifies a resistance of "maximum 200 Ohms", which is basically a description of a short. \$\endgroup\$
    – AndreKR
    Feb 21, 2011 at 8:53
  • 1
    \$\begingroup\$ For Apple products, things are a bit more complicated: ladyada.net/make/mintyboost/icharge.html \$\endgroup\$
    – AndreKR
    Feb 22, 2011 at 14:10
  • 7
    \$\begingroup\$ @TonyStewart, it is my understanding that by spec until enumeration is complete you can only be guaranteed 100mA. The fact that it is common for a device to allow 500mA does not mean I would want to design my devices to immediately trust 500mA is available, I would instead design to wait for enumeration to complete. I am open to learning that I can do otherwise though. Many of my links that I have given list that as a requirement of the standard. \$\endgroup\$
    – Kortuk
    May 12, 2012 at 15:09
  • 2
    \$\begingroup\$ Although in theory one should not pull more than 100mA unless you've enumerated, this limitation is rarely enforced in practice. I've seen only one laptop that did this. 99% of devices I've seen provide 500mA at least and likely more, no enumeration needed. \$\endgroup\$ Jan 12, 2013 at 17:45
  • 3
    \$\begingroup\$ @GustavoLitovsky This has been discussed in detail, this probably varies by computer maker but I have seen multiple that enforce such a rule and do you really want to explain to a customer your product is not working because of their computer? \$\endgroup\$
    – Kortuk
    Jan 13, 2013 at 16:20
13
\$\begingroup\$

You can negotiate for 500mA with one of the FTDI USB chips, here's a forum post that talks about it. If you use some other chip, you still need something that can speak the USB protocol and tell the PC that it wants 500mA. Please don't violate the USB spec, your device might work fine for some people, but then it wont work for others, and you risk causing damage to poorly designed PC's.

\$\endgroup\$
7
\$\begingroup\$

The theoretical current limit on a bus-powered USB port (the kind in your computer) is 100mA, negotiable up to 500mA. In practice, you probably won't get as much from the ports on your computer. If you use a self-powered USB hub however, you should be able to get 500mA from every port on the HUB. So if your HUB has 4 ports, you can get 4 * 500mA = 2A.

Beware: make sure your HUB comes with a decent power adapter. Some hubs come with a 1A adapter, because manufacturers think it's an unrealistic scenario for users to draw 500mA from EVERY port.

Check out this wiki article: http://en.wikipedia.org/wiki/USB_hub#Power

\$\endgroup\$
4
  • 7
    \$\begingroup\$ Small correction: limit is 500 mA for USB 2.0 (load unit is 100 mA and maximum is 5 load units). On USB 3.0, load unit is 150 mA and maximum is 6 load units, so that's 900 mA. Computers usually do not support 1.8 A. You could get that much by placing a resistor between data wires (to signalize that device is only using power and not transmitting data) and use USB cell phone charger or similar device dumb power source. \$\endgroup\$
    – AndrejaKo
    Oct 23, 2010 at 13:23
  • \$\begingroup\$ Do self-powered hubs require you to negotiate to higher current levels? I'll have to go home and take mine apart to see what the circuit is... \$\endgroup\$ Oct 24, 2010 at 21:50
  • 2
    \$\begingroup\$ @Kevin - yes, you have to negotiate the 500mA even when you re using a self powered hub. How else would the end device know how much it is allowed to draw from the port. It cannot tell until the enumeration process is complete whether the socket that it is connected to can supply the requested current. \$\endgroup\$
    – uɐɪ
    Nov 2, 2011 at 16:03
  • \$\begingroup\$ @Ian - Yeah, I understand that the spec would work that way, but my (now 1-year-old) investigation of two self-powered hubs I have indicates that the PSU circuit (or rather, the switch in the barrel jack) makes the power available to the device regardless of whether the device negotiates or not. Seems like a cost-effective and reasonable deviation from spec to me. \$\endgroup\$ Nov 2, 2011 at 16:11
2
\$\begingroup\$

I that it differs from motherboard supplier how good the power supply for the USB is. Some cheap B-brand manufacturers may just link the +5V of the power supply down to the USB port. Some better ones may actually include the whole package for overcurrent protection etc.

I got a sweex 4-port (el-cheapo, costed me like 10 euro's) USB hub so I don't have to get under the desk all the time for an USB connection. This sweex port clearly doesn't have any protection. I have smoked shorted MOSFET with it once, which its rated current was 3A.

Anyway, my point I want to make is that no matter what your project is, you probably will not want to get over 500mA of current drawn from a USB port. As a one off, maybe.. if you want to risk blowing it up on your own behalf. Certainly not for anyone else.

I'd like to think that the power provided by USB is mainly to make it possible to have communication with the real device. You might feature an isolation circuit to give better protection for USB hosts. I'd certainly not take USB as a universal 5V power supply, because adapters can do that much better (and in the long-term probably cheaper).

\$\endgroup\$
2
\$\begingroup\$

Adding to the excellent advice from Kortuk:

  1. You should really use a powered hub or a "USB charger" for debugging since you do not want to fry your computer by accidentally shorting something.

  2. All computers I had pleasure with do not bother with limiting current draw below 500mA. (with or without enumeration)

\$\endgroup\$
2
  • \$\begingroup\$ jpc I agree, but your age is showing....USB was just avail when Win98 was out, and everyone was self powered, just needed hub power to do negotiations with drivers. \$\endgroup\$ May 12, 2012 at 15:34
  • \$\begingroup\$ I guess you are right: my interest in USB started around the time Igor Češko released his software based AVR USB implementation in 2003. At that time USB 2.0 was already available. \$\endgroup\$
    – jpc
    May 12, 2012 at 23:34
2
\$\begingroup\$

As far as I know, no one actually bothers to include current limiting in the USB host, so devices are really on the honor system not to draw more than they are allowed. I've seen a lot of devices that claim one power but actually draw a lot more, and I've never seen them shut down or anything. On a desktop, at least, I assume the ports are capable of more than 500 mA.

So if you're making a product that will be used by others, read the USB spec and learn how to negotiate with the computer to draw up to 500 mA. If you're just doing a one-off and you know for some reason that the port is capable of 1.8A, then just draw it.

In reality, many electronics manufacturers still do not strictly adhere to the USB 2.0 specification by not implementing these current limits in the USB ports that they provide. Some (read: most) USB ports allow 100mA regardless of enumeration and continued activity; some ports even offer 500mA irrespective of the required power negotiation. - Maxim

My Samsung phone requests a MaxPower of 2 mA, but then draws ~250 mA no matter what it's plugged into.

\$\endgroup\$
9
  • 12
    \$\begingroup\$ I have actually found the opposite. Almost every computer I have used will disable the USB port if too much power is drawn. They don't necessarily do it based off how much you have requested, but they do have a max current that once hit will notify the OS and shut off the port. Windows will even pop up a message notifying the user that this has happened. In my experience it takes a reboot of the computer for the port to be re-enabled. \$\endgroup\$
    – Kellenjb
    Oct 23, 2010 at 16:19
  • 3
    \$\begingroup\$ @Kellenjb - I've seen this behavior as well, but usually only on laptops where power consumption is a concern. Further, while the computer monitors the power consumption, it often doesn't actually shut the port power off, it just uses the USB control channel to tell the device to power down. They often have polyfuses in line to prevent huge power consumption, but those are often 1A or greater. So one can still pull a significant amount of current from the port, though windows might complain about it. \$\endgroup\$
    – Adam Davis
    Oct 23, 2010 at 16:54
  • 2
    \$\begingroup\$ We have some 6 year old Dell desktops used in a student lab. We have had students all of the time pull too much current and have the USB port shut down until a restart occurs. \$\endgroup\$
    – Kellenjb
    Oct 24, 2010 at 17:09
  • 4
    \$\begingroup\$ On my laptop, a dead (shorted) USB device caused all devices on the bus to shut down, but removing the malfunctioning device seem to fixed the problem. Linux dmesg mentioned overcurrent shut down. \$\endgroup\$
    – Thomas O
    Oct 24, 2010 at 17:27
  • 3
    \$\begingroup\$ On my Macbook pro, I can draw 500mA without even asking, without ill effects. Same with the powered hubs coming from the Dell desktops at my school (and my powered hub for my laptop). Neither computer issues a warning message of any kind. \$\endgroup\$ Oct 24, 2010 at 21:47
1
\$\begingroup\$

The most voted up answer contains misleading information, and better be corrected (due to high traffic).

Any normal USB HOST port must be capable to supply 500 mA of current, See Section 7.2.1 of USB 2.0 specs, or Section 11.4.1 of USB 3.1 specs.

The USB 2.0 specs says, page 171:

"Systems that obtain operating power externally, either AC or DC, must supply at least five unit loads to each port. Such ports are called high-power ports."

Note the language, "at least". So any non-USB gadgets can use 500 mA (or 900 mA on USB 3.0) without much hesitation.

The 100 mA non-enumerated limit must be obeyed by USB DEVICES, so the limit is not applicable outside USB framework. The rare exceptions form 500 mA limit are small battery-powered USB hosts, who can limit themselves to 100 mA per port.

\$\endgroup\$
3
  • \$\begingroup\$ An externally powered port should supply 500mA (think PC, or a hub with a wall wart). The quote from p.171 deals with such externally powered ports. A bus-powered port has to supply only 100mA. Enforcement of these rule varies from one design to another, as has been already mentioned in the answers. \$\endgroup\$ Sep 24, 2020 at 0:18
  • \$\begingroup\$ @NickAlexeev, this is true, in USB2 framework the concept of power balancing did not exist. So the 100 mA per port from a bus-powered hub is true. The 100mA limit is very inconvenient from user standpoint. That's why bus-powered hubs do not exist in marketplace. To be useful, these hubs supply fake information that they are "self-powered". So all these discussions about 100 mA limit are inconsequential. \$\endgroup\$ Sep 24, 2020 at 0:47
  • \$\begingroup\$ There should be some hesitation when drawing more than 100mA. You can't consume more current until after enumeration is complete and the host has sent a SET_CONFIGURATION setup packet identifying the configuration index (and associated bMaxPower) it has chosen. \$\endgroup\$ Jan 13 at 2:11
0
\$\begingroup\$

You can't draw 1.8A from the PC's USB directly. However if you need the high current and connected to the PC at the same time, consider investing in a hub that have it's own supply from the mains.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Yes you can. USB specifications don't impose an upper limit on how much a port can supply. See Section 7.2.1 of USB Specifications. It is up to designer of USB HOST system to decide. A USB device, however, has no rights to take more than 500/900mA; this device will be non-compliant, technically illegal. \$\endgroup\$ Sep 1, 2017 at 0:56
0
\$\begingroup\$

The above 100 mA current upto 500 mA can be negotiated by the device driver. However some devices may not get configured properly at boot time if your BIOS has an option titled: "Enable legacy storage" under USB settings. If this setting is off - you may find yourself re-plugging the device after booting up, in case if it does not work properly. Only with this setting on, if present, the BIOS will provide a current greater than some minimum value, I think 100 mA.

A brute force method may be to get a two male USB to one female USB cable for extra power. CAUTION: may have electrical / power draw safety issues.

\$\endgroup\$
-2
\$\begingroup\$

Mr 404notFound, Sorry to say you cannot increase the limit in a USB device. It is limited by design.

Some early hubs were limited to 100mA, now all hubs are 500mA and with USB3 ports 900mA is available.

Good news is you can find out what your ports are rated for. If older than 5 yrs some may be 100mA, but newer than that, I doubt it.

If running Windows... go to >Device Manager > hardware > USB Hub (pick any) > property (rt mouse)> power enter image description here

I hope this helps!! sorry about the fuzzy image.. this is a Mac .. you can see 500mA per port and the device connected = 0mA It has a built in current meter, what it doesn't do is make it easy for you to identify which physical hub and port it is referring to. I found moving a mouse to each port the easiest way to identify, but my learned colleagues may know a faster way.

BTW All the USB hubs are protected by automatic resettable polyfuses from short circuits. But I have seen at least one motherboard with blown electrolytic caps near the USB ports due to current surges, detected with the traditional popcorn bulging lid.

\$\endgroup\$
5
  • 6
    \$\begingroup\$ Fuzzy image because it's a Mac??? \$\endgroup\$ May 12, 2012 at 14:06
  • \$\begingroup\$ Yes I captured a high resolution image remotely on a Win7 tower and resized onto a low resolution Mac Air and enlarging turned out fuzzy, If you needed more resolution, I could have matched pixel resolution on this Mac by disabling autoscale, but that was hindsight and it wasnt essential. Beside it left some thinking why/how I was using a Mac to report about Windows Current monitoring features. The whole process took 1 minute. Besides with Windows 3rd party Apps I can easily see dpi and xy image sizes and edit. On OSX you need an expensive program to do it or use primitive Preview. \$\endgroup\$ May 12, 2012 at 14:45
  • 6
    \$\begingroup\$ If just resizing makes it that fuzzy you really need a decent image processing software! :-/ \$\endgroup\$ May 12, 2012 at 14:49
  • 1
    \$\begingroup\$ Hey have you seen the USB spec? Their images are just as fuzzy as mine. See Figure 19-3 for example on Device Mgr. I agree thats why I said expensive program.. ( please not Gimp) .. Thats why I love Irfanview owned by Corel now. instant anything including adobe addons. \$\endgroup\$ May 12, 2012 at 15:30
  • 4
    \$\begingroup\$ Most cheap USB hubs I dealt with do not have any over-current protection (neither polyfuses nor series transistors). \$\endgroup\$
    – jpc
    May 12, 2012 at 23:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.