Paul Jimenez wrote:
Hi Michael,

This is a good start, very informative.

Thanks.


Some good additions, I think,
would be:
  * Why does computer/usb charging max out at 500mA? is that a
  limitation of the USB spec?

Exactly, but good point. I'll add this.



  * you mention 'other manufacturers' that 'identify their own chargers'
  with various resistors... if I have one of those chargers, is there a
  way to get the phone to ID it?

There are two issues here: First of all, you have to know the value and location (i.e. between which two pins) of the resistor. There is no standard, no gathering place of all this information. You can search the Internet in case someone has posted this.

I'm not sure how we measure the resistor. My guess is we measure the current and deduce from this. Measuring the current requires an analog to digital converter (ADC), which we must have wired up to the pin in question. If an arbitrary charger uses a different pin, and if we don't have an ADC on that pin, we won't be able to detect the resistor there.

That said, the most common location for a resistor is the same as ours, so you're in good shape.

Next, you have to modify the code to do this. Trivial for all you developers.



  * for hacking purposes it would be good to document what other mfrs
  chargers use and how easy they are to hack into moko fastchargers.
  This should be a wiki page and community driven, of course, but you
  could get it jump-started with whatever info you have on this issue.
  I, for one, have a small pile of motorola chargers with mini USB on
  them that I'm more than willing to hack into moko fastchargers given
  some basic instructions.

Since I feel the utility of this isn't tremendous, I think my time is better spent elsewhere. However, if others want to do this, I would suggest you start your search at lady ada's forum where they discuss getting the minty-boost charger to work with different models of iPod. That seems to be one of the most comprehensive discussions of USB charger identifications I have ever found. (If anyone knows of a similar, or better one, I would love to hear about it.)

The reason I think this is of limited use is that I would guess that most of you will simply read the label on the charger, and then use a utility to override all the automatic detection and simply tell the charging logic that 500mA or 1A is available. Automating this is a lot of work for little gain.

Remember, all of this charger identification interferes with automatic detection, but does not prevent manual override.



  * you/we should make the charging status *VERY APPARENT*. People are
  going to be unhappy if they plug it in and it doesn't charge when they
  think it will (consider the case of a cheapo usb hub that won't supply
  the power), but this can be avoided if the phone makes it obvious when
  it is or isn't charging.

I agree, but I'm not too worried about it.

That's just software, and so I assume will continue to be improved.



Just my pair of pennies,

  --pj

On Friday, Apr 18, 2008, Michael Shiloh writes:
Hi everyone,

With input from the experts who designed the system, I've tried to document precisely how charging works on the Neo Freerunner.

I welcome your feedback:



The Neo Freerunner charges the battery when 5VDC is provided at the USB
port, whether from a computer USB port or from a dedicated USB charger.

The Neo Freerunner can charge most rapidly when it can pull 1 Amp from the power supply connected to the USB socket. However, not all chargers or computers can provide this much current.

When the Neo Freerunner detects that power has been provided at the USB port, it will attempt to draw only 100mA. This minimum is mandated by the USB standard. This amount of current is insufficient to both power the Neo Freerunner (or even just its backlight) and to charge the battery, and therefore the battery will not be charged. (The battery discharge rate, however, will be slightly lower, as the supplied 100mA will be used to augment the battery.)

(When a charger is connected to the USB port, the Neo Freerunner automatically powers up. Thus, if charging at 100mA is desired, the Neo Freerunner must be shut down after the startup process has completed.)

After detecting USB power, The Neo Freerunner will attempt to negotiate, via the USB protocol, a higher charge rate of 500mA. If the device powering the Neo is capable of doing so, the Neo Freerunner will charge at 500mA.

USB chargers do not implement the USB protocol, and thus can not respond
to requests for higher charge rates. Some manufacturers have worked
around this issue by installing resistors of different values between
different pairs of pins in in order to "identify" their own chargers of known capacity. This is not part of the USB standard and is completely up to each manufacturer.

The USB charger provided with the Neo Freerunner can source up to 1A. In
order to identify this special charger, there is a 47K ohm resistor between the ID pin and ground. If the Neo Freerunner detects this resistor, then the Neo Freerunner will charge at 1A.

In summary, the Neo can charge at 3 different rates: 100mA, 500mA, and 1A.

Notes:

1. USB negotiation and resistor detection is performed in software, and is thus under developer control. A developer might write an application to indicate that 500mA or 1 Amp are available, bypassing the USB negotiation and the 47K ohm resistor detection.

There is nothing preventing the software from charging at a higher rate than then power provider can supply, although there is danger in doing so.

The danger in drawing more current than a charger or computer USB port
can provide is that components overheat and may become permanently
damaged, or even catch fire, although most USB host devices implement current limits that will depower the port on overcurrent.

2. The Neo Freerunner charger is a single assembly which includes
the USB cable. The cable is NOT a separate item and can not be removed
from the charger (without cutting).
3. Any third-party charger that does not contain the 47K resistor will cause the software to assume it can draw only 100mA, regardless of how much current the charger really can source.

4. In its hard-coded configuration, the PMU doesn't charge the battery
at all. The hard-coded configuration is used when power is applied to the PMU after a period of complete absence of power, including the backup battery.

When the system comes up, it reconfigures the PMU to enable charging. Most of the configurable items are also preserved by the PMU if it powers the system down, but the PMU itself still has power - either from USB, main battery, or the backup battery. (This is the PMU's STANDBY mode.)

5. All of this discussion is for setting the maximum current that the Neo Freerunner can safely draw from the USB socket. The battery charging current may actually be lower, if the charging logic determines that a lower charge rate is appropriate.

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to