Re: [NTLK] (Slightly OT) Power via USB

From: Gopi D Flaherty (gf2e_at_andrew.cmu.edu)
Date: Tue Jan 03 2006 - 12:10:57 PST


On Tue, 3 Jan 2006, Adriano wrote:
> USB power is limted to 5V at 500mA and every desktop/laptop must be
> built respecting such specs.

I believe that this is a misunderstanding.

A USB device is limited to 100mA until it requests more power from the
host; it is then permitted to draw up to 500mA.

Note that this is what the device is permitted to do - if a device exceeds
these limits, then it violates the spec.

The spec for hosts says that they must work with devices that do this.
However, the spec does _not_ say that if a device draws 150 mA without
asking, or 700 mA instead of 500mA, that the host must immediately notice
and terminate the connection.

In other words, the spec says that the host must provide a _minimum_
amount of current.

I just checked the USB 2.0 spec from usb.org:
Section 7.2.1.2.1 Over-current Protection
To summarize, USB hosts are required to provide over-current protection.
The current limit must be sufficiently above the maximum allowable current
so that short transients - plugging devices in, things starting up, etc.
don't accidentally trip it.

The spec says that this limit may be up to 5A.

In most cases, this limit is likely to be on a per hub basis rather than
per port as well.

Thus, if a computer has two USB ports, and has an aggressively set
over-current detector, it could easily provide 1.3A continuously - 500mA
per port, and a 30% margin for transients.

The bottom line is that you _must_not_ assume the USB system will limit
your current in any meaningful way.

> When buying an usb charger say made for car or wall use, you will
> need to be sure that the adapter respects above mentioned specs
> cause often i find usb car chargers which can charge 5V at 1.3A and
> could ruin your MessagePad, iPod, mobile, etc.

Any device that is damaged by a USB power supply that puts out a properly,
regulated 5v, is defectively designed. USB guarantees you a certain
minimum amount of power; it doesn't promise to enforce its limits tightly
at all.

Most USB chargers don't actually follow the spec properly at all. If you
buy a USB charging cable for your cellphone, chances are it just sucks USB
power without asking - possibly an amp or two, maybe more - the phone
doesn't know that it's hooked up to a USB port, it just knows it's got
power.

If the device has USB built-in natively, such as an iPod or a newer
Motorola cellphone, or many WindowsCE handhelds, it will follow the spec
and only charge if it's allowed to.

The Motorola RAZR phone charges over USB. If the computer has no USB
driver for the phone, it won't actually charge. Many of the WinCE
handhelds I've used have had an option to turn on USB charging, and let
you select high or low power charging - presumably 100mA or 500mA.

The other thing to remember is that most over-current protection is really
not very accurate. A "5A fuse" is a fuse which can provide 5A continuously
without failure. Give it 5.1A, and it'll probably keep going nearly
indefinitely.

USB ports have to use an electronic fuse that self-resets. A polymeric PTC
fuse will behave similarly to a normal fuse - it gets hot when current
flows, and thus will not turn off until the temperature goes up enough to
trigger it - so it may take awhile before the fuse cuts out.

I think that the Newton's technique for recharging batteries is a very old
one; recent devices are very, very unlikely to work like that. It is
_extremely_ dangerous to try to charge Lithium Ion batteries by expecting
the power supply to behave in some specific way - rather, the charging
circuit is in total control, and just expects the power supply to give it
power.

I hope this makes some sense; let me know if you have more questions. And,
please let me know if you think I'm wrong. I'm a professional computer
scientist, but only an amateur electrical engineer; the only USB device I
have built was a coffee maker :)

gopi.

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Tue Jan 03 2006 - 12:30:04 PST