0
\$\begingroup\$

In a pinch I bought a $3 "phone recharger" from the bin shown below, but now I am too scared to connect it directly to my phone, which costs orders of magnitude more. While a poor design could present undesirable qualities to the 5V power output, I have no idea if there's something inside connected to the data lines - part of the 21st century USB angst that has many people saying "not in my USB port you don't". See this security SE answer for some background on USB angst.

I'll check my "cable museum" drawer for a power-only USB link to connect it to my phone's power without connecting to the data lines. If I can't find one I am planning to just carefully cut into a USB cable and sever the two data lines which I am assuming will be a twisted pair, leaving the black and red power lines, and do whatever seems to be necessary to temporarily repair the mechanical and shielding integrity.

Am I missing something important here, or should this be as simple as I think?

enter image description here

enter image description here

above: From here.

enter image description here

above: From a USB 2.0 specification (update) at USB.org.

enter image description here

above: Image borrowed from this question.

\$\endgroup\$
  • 3
    \$\begingroup\$ If you cut the data lines, your phone won't recognize the charger as being able to deliver higher charge current. Your phone will charge very slowly. \$\endgroup\$ – JRE Aug 16 '17 at 11:01
  • \$\begingroup\$ @JRE wow, so I should generally expect there to be a legitimate connection to the data lines in most/all phone chargers? \$\endgroup\$ – uhoh Aug 16 '17 at 11:06
  • \$\begingroup\$ @uhoh see electronics.stackexchange.com/questions/123172/… \$\endgroup\$ – Mark Aug 16 '17 at 11:10
  • 1
    \$\begingroup\$ @JRE These chargers can be pretty awful. The charge speed on my cheap charger is incredibly fast, but really harmful to my phone; the battery gets so hot I can barely hold it (heat is a battery's worst enemy). They also have a tendency to drain the cellphone's battery if the charger's charge is lower than the phone's. It doesn't even have a simple diode to prevent this. Don't use these chargers unless there are no other options... \$\endgroup\$ – Mr. Cheezits Aug 16 '17 at 11:54
  • 1
    \$\begingroup\$ I strongly recommend not to use a cheap charger: These can kill you, not just your phone. \$\endgroup\$ – Turbo J Aug 16 '17 at 12:34
2
\$\begingroup\$

The data lines should be shorted together to identify the charger as a dedicated charging port (DCP). Some phone manufacturers, however, have their own non-standard ways of identifying charging ports.

Now, the phone charger may not like being treated like a DCP, but alternatives are it is a standard downstream port (SDP), which is slow and allows data transfer, or a charging downstream port (CDP), which is fast and also allows data transfer, or something non-standard. Some devices can change how they appear. Your phone may refuse to change if it does not like how the USB port is configured.

Definitions for DCP, SDP, CDP can all be found in Maxim's Tutorial 4803, The Basics of USB Battery Charging: A Survival Guide.

USB charing ports from https://www.maximintegrated.com/en/app-notes/index.mvp/id/5801

Source: https://www.maximintegrated.com/en/app-notes/index.mvp/id/5801

\$\endgroup\$
  • \$\begingroup\$ Thank you for the excellent answer! Not only have you addressed "...as simple as cutting the data lines?" but you've anticipated the next two questions I'd be likely to ask: Why doesn't this work? and Why does this still not work? It's great when someone takes the time to post a complete and helpful answer with supporting material. \$\endgroup\$ – uhoh Aug 16 '17 at 11:59
  • 1
    \$\begingroup\$ The odds of the charger actually being a proper dedicated charge port is pretty darn low. In a previous job, we had a device where we looked for the DCP. We bought and opened up over a dozen chargers to find one that truly was a DCP, and it was hard to source. The number that had pads for a resistor between the data lines unpopulated though... The big boys and their custom voltages on the data lines have really dilluted this "standard." \$\endgroup\$ – Matt Young Aug 16 '17 at 16:59
1
\$\begingroup\$

The maxim tutorial @uhours pointed you to is a good resource. Note that in addition to doing the resistor patching you can also introduce your own USB power controller chip.

You can set the correct resistor patching for high current draw from your battery bank then put in a usb power controller chip that will negotiate with downstream devices (your phone, other phones, etc) that implement the standard differently. That way your downstream devices will both be isolated and able to negotiate on their own without you having to get the resistor patching correct on a per device basis.

Various commercial usb data blockers are available that do this for you if you don't want to make it yourself. YMMV with regard to their negotiating abilities though.

\$\endgroup\$
  • \$\begingroup\$ Thanks! Actually if you look at the edit log I added that myself. I should have walked past that bin and not bought the device in the first place. I'll probably take it apart and see what I can learn, to try to add a little more value to my "$3 electronics education". It's good to understand what is going on with power negotiation though, and that usb data blockers exist. But probably with any project involving lithium batteries, one should either purchase something of reasonable quality, or do a well-researched project with sufficient research. \$\endgroup\$ – uhoh Aug 16 '17 at 14:58
  • 1
    \$\begingroup\$ Trying to professionally interface to cheap USB devices on occasion has taught me that they're almost invariably done wrong. I'd encourage you to open it up and take a look but I doubt you'll learn the right way to do anything in there :) \$\endgroup\$ – cgram Aug 16 '17 at 15:01
  • 1
    \$\begingroup\$ Oh, and thanks for the tip on the edit log; I'm new and didn't know to go take a look at that. \$\endgroup\$ – cgram Aug 16 '17 at 15:01

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.