Author Topic: Charging via the USB port  (Read 13435 times)

antennaboy

  • Member
  • ***
  • Posts: 7
Charging via the USB port
« on: March 07, 2013, 02:44:05 pm »
Hello Forum,

The Iphone, for instance, can be considered a USB device since it can be charged via a USB port.

Small solar chargers have a USB port where we can connect our phone. What is important is that port has a 5V voltage, correct?

Usually the solar cells have low voltage. A voltage booster converts that voltage to the 3.7V of Lipo batteries inside the charger. Another booster converts the 3.7V to 5V (required by USB).

the Iphone takes those 5V and reconverts them to 3.7V to charge its internal Lipo battery....

Does that sound correct?

How about current? I think some devices require a max current of 500mA while some other devices a max current of 2A...
thanks,
Kavan

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Charging via the USB port
« Reply #1 on: March 07, 2013, 05:22:22 pm »
The battery charging spec defines two types of charging ports.

A charging downstream port is a conventional downstream-facing port on a host or hub that also supports charging.

A dedicated charging port is a downstream-facing port that supports charging but not enumerating of attached devices. A solar charger would most likely have a dedicated charging port.

The requirements for each differ. The output voltage of a charging downstream port is 4.75-5.25V. The output voltage of a dedicated charging port can be as low as 2V.

Output current from a charging downstream port can range from 1.5A - 5A. Output current from a dedicated charging port can range from 500 mA - 5A.

The charging requirements of different devices vary, but generally, you can charge a device with a lower current; it just takes longer.

The spec also defines protocols for detecting when a charging port is attached to a device.

The battery charging spec that spells all of this out is here:

http://www.usb.org/developers/devclass_docs#approved

antennaboy

  • Member
  • ***
  • Posts: 7
Re: Charging via the USB port
« Reply #2 on: March 07, 2013, 11:07:07 pm »
Thanks Jan.

I still don't have enough knowledge about the two different charging ports...but I will soon :)

It is interesting that what you call a dedicated charging port can have an output as low as 2V...

I have just bought this small solar gadget that has a USB port:

http://store.solio.com/Solio-Store/Solio-Bolt-Solar-Charger-S620-AH1RW
These are its specs:

Max Wattage: 5 Watts

Discharge Rate: Fixed 5V, 1,000mAh   
Charge Rate: 5-5.5V 450mAh

Are these 5V referring to the voltage coming out of the USB port? The battery, see next, is a 3.7V and the 5V should have nothing to do with it...
I know what the discharge and charge rate are. They are different for the two charging and discharging. But the 5V should be the voltage of the battery....but the battery should be 3.7V

Battery:

3.7V/2,000mAh Li-Poly


So the internal battery is 3.7V. The solar cells charge this internal Li-Poly battery which, once it is charged, can charge a smart phone through a USB port....

thanks,
antennaboy

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Charging via the USB port
« Reply #3 on: March 08, 2013, 10:35:27 am »
I have this same device.

This is what I think the specifications mean:

When the device's battery is charging from a voltage source of 5-5.5V, the charging rate can be as high as  450mA.

When the device's battery is providing power at 5V, the discharge rate can be as high as 1000mA.

The battery itself is 3.7V, so the device likely has circuitry to boost it to 5V.

Here is a discussion of charge and discharge rates:

http://www.headsuprc.com/servlet/the-1619/Lipo-Battery-Frequently-Asked/Detail

antennaboy

  • Member
  • ***
  • Posts: 7
Re: Charging via the USB port
« Reply #4 on: March 08, 2013, 03:20:24 pm »
Thanks Jan.....

So you can charge a 3.7 V battery using 5V?

I know the charging voltage must be larger than the voltage of the battery being charged, but only slightly larger... the difference from 3.7 to 5 seems quite large...
maybe it is not

thanks!

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Charging via the USB port
« Reply #5 on: March 08, 2013, 04:15:07 pm »
If you disregard charger ports for the moment, a device can draw as much as its specifies in its configuration descriptor, once its configured. A port can provide 100mA (bus powered) or 500mA (self powered), the host won't configure a device if it specifies more current than the port can supply.

The most common case is a device which specifies 500mA and a port which can supply 500mA. A lot of devices don't respect that limit though and will actually draw more. The iPhone that you mention will respect the 500mA limit, unless its told to draw more power with a vendor specific command.

Jan made a fair summary of the USB-if style charger ports, however Apple invented its own charger standard (before the USB-if made their standard). In the Apple standard the voltage of the D+/D- lines tells the device how much power the power supply can supply. The iPhone will respect that limit. Most iPhones can actually charge at 1000mA if they find a suitable port. iPads go up to the 2.1A or more.

antennaboy

  • Member
  • ***
  • Posts: 7
Re: Charging via the USB port
« Reply #6 on: March 21, 2013, 01:15:47 pm »
Hello and thanks for the replies.

I recently read about blocked USB charging:

some manufacturers like Apple and Sony have blocking USB charging. This is a method of ensuring that you can only charge the device using a computer or a company charger. The USB cable has 4 pins, two for power and two for data. When connected to a computer, all 4 are in use. When connected to a charger, only the power pins are being used. These companies make devices having electronics that disable charging if there is no data activity.
 
In essence, Apple does it 'their way' with a non-USB compliant, proprietary, patented and licensed solution. If the Apple device doesn't detect an Apple charger it treats it as a standard USB port, ie can supply up to 500mA.  So charging will take longer.

Should I plug a non-Apple device into an Apple charger? People tell me NOT to do so. Why?

On the other hand, we can plug an Apple device into a non-Apple charger and this may run at lower capability than if we had used an Apple charger.

How do go around this issue? Do we need to connect some circuitry to the data wires of the USB cable in the charger?

thanks,
antennaboy

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Charging via the USB port
« Reply #7 on: March 21, 2013, 03:56:36 pm »
The issue isn't limiting use to just the company's chargers, but complying with the USB spec.

A lot of devices just draw power from a USB port irrespective of what's happing on the data lines. This is not following the USB spec, and is basically anarchy. If you plug a device into a charger with floating data lines, the device pullups will usually cause a J state to be seen on the bus. (What happens to the non pulled up line is not entirely certain, but is usually weakly pulled down.) The spec will tell you that a continuous J state on the bus is suspend. The spec also tells you you're only allowed 2.5ľA of power in suspend, which is zero power for all intents and purposes.

We care about being spec compliant, so you can't just say if you plug into a random USB port (which you don't know if its a charger or sleeping computer or what), just draw 500mA. The spec is telling you that the power is not available.

Apple's charger, and later the USB-if's charger scheme were hatched to make it easy to create a charger which communicated enough information to the device to know that it was attached to a charger port, so the device could charge. In Apple's case you need 4x1% resistors, which some manufacturers think is too much hardware to put in a charger. In the USB-if's case, all you need is a short. Just short the data lines on your charger and your device should know that it's safe to charge from that port. No spec violations needed. I even made my self a cable for one device which had the data lines shorted, that way I could plug the device into any port that I found (which I knew was capable of sustaining the charging current), and the device would charge.

If you plugged a USB-if compliant charge capable device into an Apple charger port, it wouldn't see a charger port, so probably wouldn't charge. I would not expect any harm to come of it. (You could use a shorted cable like I did, it worked with Apple chargers.) If you plug a dumb device (which doesn't check for charger ports) into an Apple charger it should just charge. The Apple chargers are quite well designed and make a nice compact chargers.

The problem is there wasn't a standard extant when Apple faced the problem, and the USB-if used a different method when they did specify charger ports. So now you have two incompatible standards.

RodgerGoldenberg

  • Member
  • ***
  • Posts: 1
Re: Charging via the USB port
« Reply #8 on: February 05, 2014, 03:53:31 am »
Hello Forum,

The Iphone, for instance, can be considered a USB device since it can be charged via a USB port.

Small solar chargers have a USB port where we can connect our phone. What is important is that port has a 5V voltage, correct?

Usually the
solar panels have low voltage. A voltage booster converts that voltage to the 3.7V of Lipo batteries inside the charger. Another booster converts the 3.7V to 5V (required by USB).

the Iphone takes those 5V and reconverts them to 3.7V to charge its internal Lipo battery....

Does that sound correct?

How about current? I think some devices require a max current of 500mA while some other devices a max current of 2A...
thanks,
Kavan

Sounds very exciting to me.. Were you able to charge your Iphone in this manner? Hope you will share some more information..
« Last Edit: February 06, 2014, 11:06:13 am by RodgerGoldenberg »