94

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?

200ok404notfound
  • 1,594
  • 3
  • 15
  • 22
  • 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. – Kortuk Oct 25 '10 at 03:05
  • 5
    @Kortuk - A computer *should* not do it. Some probably can, though. – Kevin Vermeer Mar 31 '11 at 12:50
  • @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. – Kortuk Mar 31 '11 at 14:58
  • 2
    @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. – Ale..chenski Sep 01 '17 at 00:43
  • Related: [What is the ideal way to handle data pins D+ and D- on a USB power adapter to be compatible with fast charging on devices?](https://electronics.stackexchange.com/questions/123172/what-is-the-ideal-way-to-handle-data-pins-d-and-d-on-a-usb-power-adapter-to-be) – brhans Aug 16 '20 at 19:25
  • Putting this in the comments because it's not a guarantee, but I've designed a few "dumb" devices that hook into USB power ports, and I've only rarely seen ports that won't supply 500mA to an unenumerated device. As per the standard, this shouldn't happen, but real-world implementations and standards are often not quite the same. – Platytude Sep 24 '20 at 03:27
  • Related: https://electronics.stackexchange.com/q/532928/142 – endolith Mar 30 '21 at 22:32

10 Answers10

110

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.

endolith
  • 28,494
  • 23
  • 117
  • 181
Kortuk
  • 13,362
  • 8
  • 60
  • 85
  • The "termination resistance" of a dumb charger is really just a short. – AndreKR Feb 20 '11 at 15:12
  • @andreKR, this is not always true, but yes, often people hard short it. – Kortuk Feb 20 '11 at 21:28
  • 4
    The document you linked to specifies a resistance of "maximum 200 Ohms", which is basically a description of a short. – AndreKR Feb 21 '11 at 08:53
  • @AndreKR, I believe it has to be a measurable resistance if you want an IPhone to use it, that is how iPhones originally had their own separate chargers. – Kortuk Feb 21 '11 at 12:47
  • 1
    For Apple products, things are a bit more complicated: http://www.ladyada.net/make/mintyboost/icharge.html – AndreKR Feb 22 '11 at 14:10
  • @andreKR, yeah, apple does make your life easy... – Kortuk Feb 22 '11 at 15:08
  • Kortek, I challenge your statement " USB by default will deliver 100mA " If the USB HUB if designed for 500mA per hub it has no default limit per port it will deliver all as needed and available. So each port can consume the max but all the ports shared by that hub must not exceed the same max. limit defined in the above screenshot. So **there is no default 100mA limit** unless by hardware design, that hub is a legacy 10yr old design when peripherals all consumed < 100mA. – Tony Stewart EE75 May 12 '12 at 14:58
  • 7
    @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. – Kortuk May 12 '12 at 15:09
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/3418/discussion-between-kortuk-and-tony-stewart) – Kortuk May 12 '12 at 17:39
  • 2
    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. – Gustavo Litovsky Jan 12 '13 at 17:45
  • 3
    @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? – Kortuk Jan 13 '13 at 16:20
  • 1
    @Kortuk: You have to take into account that adding chips that enumerate is a large expense in some cases, so for many it didn't make sense for a long time. – Gustavo Litovsky Jan 13 '13 at 16:30
  • @GustavoLitovsky Yes, I realize the associated cost, it just seemed worthwhile to explain what the spec demands. You could edit in a section explaining what the computer side must do and why it can be skipped, sounds like fun to me, but for now I think this explains what your device must do to get power pretty thoroughly. – Kortuk Jan 13 '13 at 16:52
  • *Some computers that are cheaply built will use an bus powered hub internally* is there a typo or just I can't understand? Shouldn't it be "USB" instead of "bus"? – clabacchio Mar 27 '13 at 15:38
  • 1
    @clabacchio I clarified. I mean bus powered. they literally have an unpowered USB hub inside them to give you your ports, this means that none of your USB ports can deliver more then 100mA as they are really all ports on an unpowered USB hub. – Kortuk Mar 27 '13 at 16:30
  • 1
    @AndreKR your Apple products charging link is broken. Here's a working one: http://learn.adafruit.com/minty-boost/icharging – ravron Jul 04 '13 at 18:40
  • This 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. 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 themself to 100 mA per port. – Ale..chenski Feb 17 '17 at 19:46
  • 1
    related- https://superuser.com/questions/690074/what-is-the-power-output-of-a-usb-port – barlop Oct 05 '17 at 11:58
  • "It shows that you can get right up to 500mA of power requested. This is what you can expect from a computer." And if the computer (hypothetically) refuses? – endolith Oct 23 '20 at 05:05
13

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.

davr
  • 6,802
  • 2
  • 25
  • 37
7

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

Vincent Van Den Berghe
  • 1,290
  • 2
  • 14
  • 21
  • 7
    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. – AndrejaKo Oct 23 '10 at 13:23
  • 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... – Kevin Vermeer Oct 24 '10 at 21:50
  • 2
    @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. – uɐɪ Nov 02 '11 at 16:03
  • @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. – Kevin Vermeer Nov 02 '11 at 16:11
2

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)

jpc
  • 5,302
  • 1
  • 24
  • 45
  • 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. – Tony Stewart EE75 May 12 '12 at 15:34
  • 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. – jpc May 12 '12 at 23:34
2

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.

Ale..chenski
  • 38,845
  • 3
  • 38
  • 103
  • 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. – Nick Alexeev Sep 24 '20 at 00:18
  • @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. – Ale..chenski Sep 24 '20 at 00:47
2

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.

endolith
  • 28,494
  • 23
  • 117
  • 181
  • 11
    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. – Kellenjb Oct 23 '10 at 16:19
  • 3
    @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. – Adam Davis Oct 23 '10 at 16:54
  • 1
    I've seen the message in Windows, too, but only from a current spike, not continuous draw. The USB spec has restrictions on both. – endolith Oct 23 '10 at 18:09
  • 1
    I have seen this from both. current spikes and overcurrent. Current spike detection seems to vary by computer pretty heavily, but overdrawing current has made most every computer i have used turn it off. – Kortuk Oct 24 '10 at 16:11
  • My behavior may be because I was using name brand computers. – Kortuk Oct 24 '10 at 16:12
  • 2
    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. – Kellenjb Oct 24 '10 at 17:09
  • 4
    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. – Thomas O Oct 24 '10 at 17:27
  • 3
    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. – Kevin Vermeer Oct 24 '10 at 21:47
  • what hardware were you using when you did that? – Kortuk Oct 25 '10 at 14:48
2

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).

Hans
  • 7,238
  • 1
  • 25
  • 37
0

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

Jason Han
  • 1,720
  • 9
  • 22
  • 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. – Ale..chenski Sep 01 '17 at 00:56
0

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.

Ujjwal Singh
  • 131
  • 5
-2

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.

Tony Stewart EE75
  • 1
  • 3
  • 54
  • 182
  • 6
    Fuzzy image because it's a Mac??? – Federico Russo May 12 '12 at 14:06
  • 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. – Tony Stewart EE75 May 12 '12 at 14:45
  • 6
    If just resizing makes it that fuzzy you really need a decent image processing software! :-/ – Federico Russo May 12 '12 at 14:49
  • 1
    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. – Tony Stewart EE75 May 12 '12 at 15:30
  • 4
    Most cheap USB hubs I dealt with do not have any over-current protection (neither polyfuses nor series transistors). – jpc May 12 '12 at 23:37