59
\$\begingroup\$

A number of Android tablets are powered through the Micro B USB port but also provide USB Host support through the same port (e.g. Motorola Xoom 2, Acer A510/700). I need to be able to use USB Host support while charging, at the full power the device accepts (or at least sufficient power to keep the tablet from draining under modest use).

I have rigged up a system with splitter cables and a powered hub. This works on some devices (HP TouchPad, Archos) but not others (Google/Asus Nexus 7, Coby Kyros). And when it does work, it slow charges (probably at USB 2's 500ma).

How can this problem be solved? Are there any solutions on the market that will solve my problem? I see there are some USB chips by Silego (their Battery Charger ID line) that may solve the problem, but I don't know of any cables, hubs, etc. that use it.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Obviously this depends on the details of the particular tablet's charging and USB scheme. There can be no uniform answer. \$\endgroup\$ Commented Jun 28, 2012 at 21:02
  • 1
    \$\begingroup\$ Ironically, in some of the devices where USB host mode is not officially supported (especially phones) but has been enabled by owner-installed kernel changes, its often been the case (at least initially) that the charge pump to drive 5v out the USB port was either non-existent, or not being enabled. In those cases, you probably could do at least a USB-current-limit charge - and you nearly had to, as you had to provide an external source of USB bus power for the use of the peripheral. \$\endgroup\$ Commented Jun 29, 2012 at 3:24
  • 1
    \$\begingroup\$ Since a 2.0 USB Host is expected to provide power (either 500 ma or 100 ma, depending on the request from the peripheral during enumeration), then supplying power in the reverse direction while acting as a host wouldn't seem possible, unless some non-standard circuitry was available, which I doubt you could count on being in every Android device. \$\endgroup\$
    – tcrosley
    Commented Jun 29, 2012 at 22:30
  • \$\begingroup\$ Apparently you can create the non-standard circuitry using pretty standard cables, also, on the practical side, this guy even says it worked for him, still thinking if it would be wise to try, or if the aiwintermute knows what he talks about... check: community.spiceworks.com/topic/… : "First you need to buy this cable:..." \$\endgroup\$
    – ntg
    Commented Dec 29, 2015 at 17:37

8 Answers 8

23
\$\begingroup\$

Apparently it is possible to charge the Host-Device! --> http://en.wikipedia.org/wiki/USB_On-The-Go

Under "OTG Micro Plugs" it says that a USB OTG cable with a 36.5 kΩ resistor between Pin 4 (I suppose its pin 4) and Pin 5 allows you to connect a B-Device (Slave) and (!) a Charger to the Smartphone/Tablet.

The Phone and the B-Device can be supplied by the external power source.

USB-Power Specifications: http://www.usb.org/developers/docs/devclass_docs/batt_charging_1_1.zip (updated link)

\$\endgroup\$
2
  • 2
    \$\begingroup\$ I just sifted through the docs because I didn't trust Wikipedia's implicit data on which of the three resistances I should use. Here you can find the official Battery Charging v1.2 Spec and Adopters Agreement: usb.org/developers/docs/devclass_docs In this case you want 124kΩ, because you want the OTG device (=tablet) to be the A device (=host). \$\endgroup\$
    – matega
    Commented Jan 21, 2016 at 9:55
  • \$\begingroup\$ This arrangement is officially called "accessory charger". Use of this mode requires a special comparator to detect the special resistor on ID pin, which might be not supported on every portable device. And the function must have proper firmware support to turn the power role while keeping the host functionality. \$\endgroup\$ Commented Apr 4, 2018 at 5:58
17
\$\begingroup\$

Yes this can be done - definitively!

We actually got this to work by combining the USB Universal Charging spec with the USB OTG spec. This does require a custom cable to accomplish, but it does work. We took the idea from this post and altered it into a single cable solution, whereas the post has a separate power source and data cables.

Wiring diagrams:

Post schema

\$\endgroup\$
1
  • \$\begingroup\$ This is awesome! Is there an updated OTG w Power diagram for the newer USB Type C connector ? \$\endgroup\$ Commented Sep 6, 2016 at 15:29
6
\$\begingroup\$

The USB Battery Charger specification does not allow this, as the data pins are uses to indicate the presence of the charger - so they would not be available for data.

Are there any solutions on the market that will solve my problem?

The USB Power Delivery spec seems to be work in progress so there is no product on the market - or even announced - yet.

\$\endgroup\$
8
  • \$\begingroup\$ High rate chargers do not necessarily use the standard USB pins. \$\endgroup\$ Commented Jun 28, 2012 at 21:11
  • \$\begingroup\$ @ChrisStratton, USB complaint ones should :) but it is messier then that, I would agree. \$\endgroup\$
    – Kortuk
    Commented Jun 28, 2012 at 21:18
  • 2
    \$\begingroup\$ @Kortuk - they tend to be backwards compatible with USB, but extend it in custom ways. Often the charger is a unique cable with extra contacts, but a mini/micro USB cable will work fine for data, and in many cases charging at USB-compliant rates. \$\endgroup\$ Commented Jun 28, 2012 at 21:20
  • \$\begingroup\$ @ChrisStratton That gives me some hope -- perhaps someone is providing a proprietary solution for ASUS, Acer, Motorola, etc. devices? \$\endgroup\$ Commented Jun 28, 2012 at 21:20
  • \$\begingroup\$ @JohnBeatty - probably not for that wide a variety. Maybe in one or two specific cases though. That's the problem anytime you want to do something non-standard - you loose portability. \$\endgroup\$ Commented Jun 28, 2012 at 21:21
5
\$\begingroup\$

Generally, you are not supposed to charge a device when using it as an USB host. That does not mean that you can't.

Usually the USB PHY circuit and ID pin are interlocked in software with the charging circuit. One problem is that if you enable the charger before connecting the USB cable the charging circuit will load down the Vbus and you will never get a valid Vbus condition.

You can usually fool the charging circuit to do whatever you want by sending commands to the driver. For example, on my Nook Touch, I can charge at 500 mA by doing:

echo 500000 > /sys/devices/platform/bq24073/force_current
\$\endgroup\$
2
\$\begingroup\$

Normally Android 3.1..4.1 is equipped with USB port and can connect to host, not other way around. The host provides 500mA charging power according to Android Open Accessory Protocol. ADK Accessory is possibly the best way to have connectivity + external power + Accesory sub-device controlled by Android. (when will we see those ADK oscilloscope DIY projects ?)

But, you are asking about Android being the host and receiving charging power at the same time, instead of providing it as USB host should. It is not specced in Android documents. So answer is "No" (as of June 2012). Unless you swap roles and follow ADK. Even if you follow ADK 1.0 and 2.0 (Accessory Development Kit), not all 100% of devices will be able to run your software, because ADK exists since Android 3.1 only.

Are you sure that "micro-USB" connector is actually a host ? How many USB connectors are on device total ? If less than 2, then it can only be a USB peripheral, not a host.

\$\endgroup\$
1
  • \$\begingroup\$ Since Android 3.1 operating as a USB host been a standard-api option which manufacturers could implement. In most cases this is done by using the same connector as is used in USB device mode, though a few of the more laptop-like tablets have had a separate USB "A" connector. \$\endgroup\$ Commented Jun 29, 2012 at 3:22
2
\$\begingroup\$

Actually, this is possible, and it is also an official USB standard. But, in order for this to work, you need to have a USB host (mobile phone etc.) with a USB micro-AB connector, like, e.g. the Sony Xperia S, which I have. See the desription under "OTG Micro Plugs" in the article "USB On-The-Go" on Wikipedia.

Unfortunately, so far I have not been able to find an adapter that does the trick, but it should be possible to have a manufacturer make one for you. There are several manufacturers that accept orders for custom cables.

At present I am using a Delock Adapter USB micro-A male to USB2.0 A-male to connect to storage on my Xperia S, and that seems to work fine. This will, though, not make it possible to charge my Xperia S at the same time, so it will drain my battery if used over time.

Does anyone know of an adapter that will make this possible on a micro-AB connector?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ The pinouts on the a, b, and ab are the same. I don't see any reason why this has anything to do with charging behavior, or why a custom cable will help. The OTG standard includes the connector, but goes well beyond that \$\endgroup\$ Commented Oct 3, 2012 at 10:41
2
\$\begingroup\$

One of my Android satellite tracking apps uses a third-party IO board (called IOIO Board, see https://github.com/ytai/ioio/wiki) that accepts an input voltage which is passed on to the USB cable to the phone and charges it. As earlier posts mention, this is the USB On-The-Go (OTG) protocol. I use the IOIO board to further process data that is written from my app while the phone is being charged.

\$\endgroup\$
1
\$\begingroup\$

There is a device that I saw today on Kickstarter that allows you to use the same micro USB port to charge from an adaptor and to connect devices at the same time. This will be great for tablets with single USB ports. The company is planning on shipping units around April to May of this year. For those interested here is the link:

+port: Power + USB at the same time

\$\endgroup\$
2
  • 3
    \$\begingroup\$ +port does not work on Android devices. It was designed for Dell Venue 8 Pro. I note that some folks have different resistors on those Y cables. For example there are some with 100K and some with 60 odd K, as well as those with the 37 or so K which are standard. Couldn't help wondering if someone wired in a variable resistor to a Y cable, whether that would help to locate the sweet spot for enabling charging and otg simultaneously? \$\endgroup\$
    – user51870
    Commented Aug 23, 2014 at 6:01
  • \$\begingroup\$ I also found this +port product on Kickstarter - but can't find them anywhere online to buy to try it out on my device...! Bah. \$\endgroup\$ Commented Feb 23, 2017 at 11:02

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