5
\$\begingroup\$

I want to remove the Vcc pin from a USB cable and connect my computer to a device. My goal is to allow the device to communicate with the computer while not charging the device.

Does some section of the USB spec permit this? Is my plan flawed in some way?

  1. Will communication fail to happen?
  2. Is the device likely to charge the battery anyway from the D+ pin?
  3. Is there an error in this plan that I'm not anticipating?
\$\endgroup\$
7
\$\begingroup\$

Yes, communication should fail - the reason is, devices are not allowed to feed any current into D+ or D- (which is how they communicate) until they observe Vbus (the 5V) high. This is actually guaranteed by the cable in many cases, because the device will 1) only have power from Vbus, and 2) not be connected to D+/D- until after Vbus and Gnd. Obviously 1 does not apply to self-powered devices.

That's assuming the device operates to the USB spec, and many devices do not. Another part of the spec they tend to ignore is that they may only draw 100mA until more has been negotiated. Requests for more are typically rejected only when connected to bus-powered hubs, as they don't have more power to grant. That's also why they tend to have four ports, as the hub registers to draw 500mA, needs a bit of power itself, and then must provide those 100mA on each downstream port.

In all, you'll probably have to modify the device or its battery connection rather than the USB cable to prevent charging. The specifics will depend on your device.

\$\endgroup\$
  • \$\begingroup\$ I have a feeling a number of devices do not wait for V+ to be connected to communicate, but my designs have always required USB power due to design. Just makes everything work better. +1 \$\endgroup\$ – Kortuk Nov 28 '10 at 23:53
  • 1
    \$\begingroup\$ I still think there is a good chance it could work. But I also think there is a good chance it will not. It is very hard to tell without looking at hardware. \$\endgroup\$ – Kortuk Nov 28 '10 at 23:54
  • \$\begingroup\$ What would happen if you just placed a (relatively) large resistor in series with V+? Assuming that there is a power source keeping a brownout from happening, would that starve the charging circuit? Maybe 470 - 2k2 ohms is what I'm thinking. \$\endgroup\$ – W5VO Nov 29 '10 at 8:52
  • \$\begingroup\$ You'd get a voltage drop when power is drawn, which might starve the charger while heating the resistor. It's also possible, however, that the device will see Vbus drop below a threshold (it's supposed to be over 4.5V, after all) and see that as getting unplugged, turning communication off, or cycling plug/unplug events. Depends on the device. \$\endgroup\$ – Yann Vernier Nov 29 '10 at 11:28
3
\$\begingroup\$

The spec allows a device to expect to have 100mA available.

  1. Communication should not fail.
  2. No, no device should pull power from D+.
  3. I often design devices to use the USB power to power whichever chip I use as an interface. This means that without 5V power my communication chip does not power.

In the end you may just want to try it out and see if your device specifically has a problem. What is the device that you need to disconnect power for? If you have a device that has a primary function of charging a battery they probably designed the device around your power as a charger does not need to function if there is no power.

Also, you will still have ground as a reference, and the differential signal uses differential signaling with an occasional common mode signal but it should work with a ground reference, unless they designed their circuit as I noted above.

\$\endgroup\$
  • 1
    \$\begingroup\$ Agreed, try it and see. Its not uncommon to use the +5V line to trigger an interrupt or use it in some other manor to indicate to the device processor that a USB cable has been connected. If your device is designed in this manor it may not activate it's USB functions. \$\endgroup\$ – Mark Nov 28 '10 at 22:58
0
\$\begingroup\$

You can prevent charging by splicing a Schottky diode in series with the battery. Current goes out, it doesn't go in.

\$\endgroup\$
  • \$\begingroup\$ Hmm, what would a 0.4V drop do to a LiPo? The device would probably think the voltage was too low. This is of course assuming the OP has a device with a LiPo, but it's difficult to find any other type of battery in a device these days. \$\endgroup\$ – Thomas O Nov 28 '10 at 23:49
  • \$\begingroup\$ @ThomasO, almost all good battery chargers are boost/buck, but there is no way for us to tell that and is almost completely pointless to discuss it. \$\endgroup\$ – Kortuk Nov 29 '10 at 0:59
  • \$\begingroup\$ @Kortuk, there would be no way to compensate for the 0.4V drop without overcharging the LiPo or any other cell for that matter. All I'm saying is I don't think it would work unless the device could tolerate such a drop in voltage. \$\endgroup\$ – Thomas O Nov 29 '10 at 11:16
  • \$\begingroup\$ @ThomasO, stating that there is no way to compensate "unless the device can tolerate the drop" does not say anything. if they have a buck/boost style intelligent charger it means their efficiency is high and it means they can design to work over a large range of input voltages and they can vary their output to suite what the battery wants. I am not saying they use this, just that they are becoming significantly more predominant for chargers. \$\endgroup\$ – Kortuk Nov 29 '10 at 13:29
0
\$\begingroup\$

It really depends on the implementation. A common set up is to power the interface device off the VBUS. If that is used the device will of course fail without it. But even if the interface is self-powered, VBUS is sometimes used to hold an active low RESET pin high, so the interface chip is held reset if VBUS is not present. (Cable unplugged is what they are intending to check for).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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