1
\$\begingroup\$

This is the opposite of the question posted here:

What is the ideal way to handle data pins D+ and D- on a USB power adapter to be compatible with fast charging on devices?

While that question is focused on how to design a charging port so that devices will be charged from it, I'm curious about designing an end device that I want to be charged with maximum current from all potential ports, if I don't need to use the data ports of the USB for anything else.

My device has a Li-Ion IC that self limits and can charge my Li-Ion battery up to 2A. How do I tell chargers to give as much current as they can? If I short D+ and D- on my board, I will appear as a dedicated charging port. Does that mean that wall outlets will give 1.5A or more if they can, and that laptop hubs or other sources may limit out at 500 mA? Is there any chance of a proprietary charger requiring something else other than D+ and D- being shorted in order to maximize charge current?

Edit:

I'm looking to make my own variant of this PCB from Adafruit. While the part is made to only supply up to 500 mA (despite the schematic labeling), I want to make a version that can charge a 4,000 mAh battery at 0.5C. I also want to remove the USB connection to the AtMega so it can't be reprogrammed.

So take the BQ2425 series for example. I know this is also a "power management" chip which also takes care of regulation in addition to battery charging. But there aren't any equivalent MCP73831 chips I could find that do simple battery charging, just with a higher current.

The point still stands though. If my USB is meant to sometimes pull 2A if the chip is charging, or much less if it's fully charged and maybe just powering the MCU, what do I so with the USB D+ and D- lines on my PCB? Already the two answers I've gotten don't agree, one says short them and one says leave them open.

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

In the answer you linked, the DP/DM termination is shown for the ‘host’ (downstream facing) port, be it a regular USB or a power-only port. This termination is how an endpoint can determine the host’s charging viability without having to enumerate as a USB device: the ’device’ (upstream facing) port senses the terminator and limits its current draw accordingly. The exact details of this are a bit of a mess - there’s the USB way, the Apple way, the Sony way, etc.

Fortunately, for a simple power connection you don’t have to do anything in the endpoint. Just leave the DP/DM pins open. The host’s current limiting will kick in if your device exceeds what the downstream-facing port can deliver.

More here: https://www.maximintegrated.com/en/design/technical-documents/tutorials/5/5801.html

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I would also add solderable pads to the data lines on your circuit board so you can do something with those data lines in the future. \$\endgroup\$ – Dwayne Reid Feb 22 at 19:02
  • \$\begingroup\$ Thanks for the link, although again it seems more focused on charger design rather than peripheral design. I added some more details in the original post. In this case, a wall outlet USB charger would definitely be a DCP style port and supply 1.5A or more if my peripheral is sinking it? Without any sort of enumeration? \$\endgroup\$ – Eric Feb 25 at 4:07
  • \$\begingroup\$ Yes. No enumeration needed. \$\endgroup\$ – hacktastical Feb 25 at 4:14
  • \$\begingroup\$ Leaving D+/D- pair open will not guarantee the maximum current draw from a charging port. For an ordinary USB 2.0 port of PC, yes, the current limiting function or another internally protection (e.g. blowing a fuse) can kick in so the port limit itself at 500mA or stop power delivery. But for "smart" wall type chargers, they may not allow the end device to draw more than an internally-defined current (say, 1A). \$\endgroup\$ – Rohat Kılıç Feb 25 at 5:04
  • \$\begingroup\$ Nope. The whole point of the BC spec (and its proprietary variants) is that the device can be charged without enumeration. A 1.5A BC port will deliver 1.5A on just GND and Vbus. No DP/DM needed. \$\endgroup\$ – hacktastical Feb 25 at 5:23
0
\$\begingroup\$

The linked question and the answers really cover the topic (my opinion).
The shorting of the datalines is not universal but works. Going forward, if your device is still in a stage where you can modify or add some circuits er using a standard charging port IC. One such example is http://www.ti.com/product/TPS2511

To be able to charge from most of the host/charging slots consider using a dedicated controller.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I believe you're talking about the charger port side, right? I'm asking about what to do if I want DCP on the peripheral side. \$\endgroup\$ – Eric Feb 25 at 4:09
0
\$\begingroup\$

The device to be charged (let's call it DUC - Device Under Charging) cannot draw more than 500mA from an ordinary USB 2.0 port of a PC, probably the controller on the MoBo will limit. Wall type chargers/adapters can provide 2.4A or even more. So the DUC should be smart enough to detect the port type that it's plugged in. So it's obvious that you shouldn't cut or disable the D+/D- pair.

You may want to take a look into BC 1.2 Specification. Or, simply, read the section 7 of the TPS2511 datasheet that @User323693 have shared in his/her answer. There is an explanation about how a DUC performs USB charging port detection:

The hand-shaking process is two steps. During step one, the primary detection, the portable equipment outputs a nominal 0.6-V output on its D+ line and reads the voltage input on its D– line. The portable device concludes it is connected to a SDP if the voltage is less than the nominal data detect voltage of 0.3 V. The portable device concludes that it is connected to a Charging Port if the D– voltage is greater than the nominal data detect voltage of 0.3 V and less than 0.8 V. The second step, the secondary detection, is necessary for portable equipment to determine between a CDP and a DCP. The portable device outputs a nominal 0.6-V output on its D– line and reads the voltage input on its D+ line. The portable device concludes it is connected to a CDP if the data line being remains is less than the nominal data detect voltage of 0.3 V. The portable device concludes it is connected to a DCP if the data line being read is greater than the nominal data detect voltage of 0.3 V and less than 0.8 V.

NOTE: Please refer to BC1.2 specification for what SDP, CDP and DCP are.

| improve this answer | |
\$\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.