General > General Technical Chat
What happens when you draw too much current from a usb port?
<< < (3/5) > >>
tom66:
In my experience, most USB ports have a hard current limit (greater than the 500mA specification) and cut the power to the port, or sometimes all ports on a device, when that limit is exceeded.  If you do this on a Windows PC, you'll usually get a notification about a device malfunctioning, and then wonder why you can't type on the keyboard any more.  In many cases, this can only be recovered from by hard power cycling the whole PC (suspend is not sufficient).

Very few (I've never encountered one) actually meter the current or implement the unit load limiting as specified by USB-IF, so whatever the limit is applies regardless of whether the device has negotiated.  Personally, I'm not a fan of the way USB negotiates power, it should have been designed to always be a guaranteed x mA output current, though admittedly USB hubs do make this problem more difficult.  As implemented, it prevents moderate power system-on-chip devices from complying to the USB specification, since these devices have to boot themselves up to negotiate the current required - a little tautological.  So, it's good that the limit just appears to be a single hard limit - though of course you're on your own here if anything goes wrong.
langwadt:

--- Quote from: tom66 on December 23, 2023, 12:13:06 am ---In my experience, most USB ports have a hard current limit (greater than the 500mA specification) and cut the power to the port, or sometimes all ports on a device, when that limit is exceeded.  If you do this on a Windows PC, you'll usually get a notification about a device malfunctioning, and then wonder why you can't type on the keyboard any more.  In many cases, this can only be recovered from by hard power cycling the whole PC (suspend is not sufficient).

Very few (I've never encountered one) actually meter the current or implement the unit load limiting as specified by USB-IF, so whatever the limit is applies regardless of whether the device has negotiated.  Personally, I'm not a fan of the way USB negotiates power, it should have been designed to always be a guaranteed x mA output current, though admittedly USB hubs do make this problem more difficult.  As implemented, it prevents moderate power system-on-chip devices from complying to the USB specification, since these devices have to boot themselves up to negotiate the current required - a little tautological.  So, it's good that the limit just appears to be a single hard limit - though of course you're on your own here if anything goes wrong.

--- End quote ---

well USB does guarantee a current, 100mA and more would be problem because as you mention what would you do if every port on a hub uses 500mA?

what PC actually do varies, I've had a laptop that seemed to have not limit at all, shorting the usb bus would just instantly shut down the whole computer
But think I've heard of MAC users that couldn't get a devkit to enumerate because it used over 100mA

tom66:

--- Quote from: langwadt on December 23, 2023, 12:29:27 am ---
--- Quote from: tom66 on December 23, 2023, 12:13:06 am ---In my experience, most USB ports have a hard current limit (greater than the 500mA specification) and cut the power to the port, or sometimes all ports on a device, when that limit is exceeded.  If you do this on a Windows PC, you'll usually get a notification about a device malfunctioning, and then wonder why you can't type on the keyboard any more.  In many cases, this can only be recovered from by hard power cycling the whole PC (suspend is not sufficient).

Very few (I've never encountered one) actually meter the current or implement the unit load limiting as specified by USB-IF, so whatever the limit is applies regardless of whether the device has negotiated.  Personally, I'm not a fan of the way USB negotiates power, it should have been designed to always be a guaranteed x mA output current, though admittedly USB hubs do make this problem more difficult.  As implemented, it prevents moderate power system-on-chip devices from complying to the USB specification, since these devices have to boot themselves up to negotiate the current required - a little tautological.  So, it's good that the limit just appears to be a single hard limit - though of course you're on your own here if anything goes wrong.

--- End quote ---

well USB does guarantee a current, 100mA and more would be problem because as you mention what would you do if every port on a hub uses 500mA?

what PC actually do varies, I've had a laptop that seemed to have not limit at all, shorting the usb bus would just instantly shut down the whole computer
But think I've heard of MAC users that couldn't get a devkit to enumerate because it used over 100mA

--- End quote ---

Yeah, the trouble is 100mA isn't enough for a lot of modern devices.  Even some mid-tier microcontrollers are approaching limits like that, so you have to be careful to keep things like e.g. display backlights off when powering up over USB to avoid exceeding it.  We make devices with a Zynq in them - operating current is about 300mA - no way to negotiate that via USB without having the Zynq on so we're just stuck violating the spec.
Smokey:
I recently made a device that constant current charges an internal battery over USB2 (MicroB).  I was not initially doing any enumerating/signaling with the host/adapters, and I never had a single host/adapter restrict me to 100mA. 
David Hess:
I have seen all kinds of behavior.

The oldest Intel USB ports that I had reported current draw in the driver interface down to the milliamp, and if the device violated 500 miliamps, or 100 milliamps if not enumerated, then power to that port was removed.  You can find USB power controllers which support this.

Strict protection seems to have been dropped, and later ports I used had a polyfuse at most, and sometimes nothing, so enumeration for 500 milliamps was irrelevant.

Now everything seems to expect at least 900 milliamps without enumeration.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod