Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm having some issues with my Nexus 7 drawing just 500mA from a USB port able to supply 2.1A (test with my iPad). Details in this question. However, there is a comment posted "The Nexus obviously detects the 'data' pin connected, and assumes it is not permitted to draw more than 500mA (which is the proper USB spec)."

That got me thinking, how does a device really know how much it's allowed to draw from the USB port? It can't be just via wiring of the D+/D- pins because then you wouldn't be able to communicate over the USB port (eg. Sync'ing or transferring over the USB port). The iPhone and iPad clearly are able to draw higher power from the USB port even during a sync/data operation. So I was thinking, the power it might be officially dictated within the USB comm. protocol itself, perhaps some packet/header.

So, how does a USB device know whether to draw 500mA, 1A or 2.1A from a computer USB port?

Does the answer change if the USB port is on a "dumb" wall charger? Or is it a wild west where each device/charger does it's own thing for high current situations?

share|improve this question
1  
technically it needs to negotiate it with the port before it may pull more than 100 mA –  ratchet freak Apr 10 '13 at 20:20
    
This doesn't really answer your question, but I have a Nexus 7 and a Galaxy Nexus phone, and I was finding that different combinations of cables and power adapters gave different charging times. It got to where I sat down with a Kill-a-watt and tried various combinations until I found what worked best. It's not just the charger or the device that's a variable, it's the cable also. –  trpt4him Apr 10 '13 at 20:49
    
I'm not the downvoter, but the question is borderline on topic for the site. I think it's a fascinating question, but don't see how as the kind of programming-related question we deal with. It may belong on Superuser or another site. –  James McLeod Feb 5 at 11:04

3 Answers 3

the minimum a port needs to provide is 100mA so all usb devices can assume that is available

if the device needs anything more than that it needs to negotiate it with the port, the standard 2.0 port can handle 500 mA

there is an exception with dedicated charging ports which don't have any electronics to negotiate the draw and are recognizable by a shorted D+ and D- line

share|improve this answer

Automatic Detection of USB Port vs Wall Adapter Power

When a device is connected to an actual USB port, the system detects a USB host ID and can then set the battery charge controller to a level at or below 500 mA to match the current capacity available from most USB ports

Using a USB controller to detect and set the charger I/C for USB charging works well for devices that possess such capabilities. However, for low-cost products that do not contain a USB interface controller or do not have a requirement for data transfer, detecting the presence of a USB port versus a higher power wall adapter can be problematic.

The AAT3685 can solve this dilemma with the addition of a simple external circuit using just two resistors and a general purpose NPN bi-polar transistor.

share|improve this answer

Actually there will be 3 kind of USB devices; Low, Full, High and Now super speed devices.

The amount of power drawn is not common to all USB devices. http://www.extremetech.com/computing/115251-how-usb-charging-works-or-how-to-avoid-blowing-up-your-smartphone Please refer to this link. It explains how USB charging takes place.

share|improve this answer
    
Answers which just contain links are considered bad practice. Please summarize the content here (don't copy/paste) so the answer can stand on its own. If you don't you run the risk of your answer being removed, especially if the link ever dies. –  Martijn Pieters Feb 5 at 10:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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