0

I have built a circuit that supplies a steady 5 volts and I would like to fast-charge my tablet computer.

If I simply connect 5 volts, the tablet will charge slowly. The tablet supports USB-PD. How do I tell it that it's allowed to take more current?

user253751
  • 11,998
  • 2
  • 21
  • 37
  • Note: although this question is a little broader than average, I believe it is still well within the site guidelines as it admits an answer that plainly states the requirements for USB-PD charging. I didn't find any other duplicate question. – user253751 Jun 07 '23 at 07:51
  • 1
    Why don't you use a dedicated PD controller? ST and TI have some chips for that purpose. – Rohat Kılıç Jun 07 '23 at 08:03
  • Ale..chenski posted a good answer here: https://electronics.stackexchange.com/questions/516858/does-a-usb-pd-source-supply-any-voltage-to-a-non-usb-pd-compliant-usb-c-device – winny Jun 07 '23 at 08:04
  • I don't have the experience to answer for USB PD, but the old way to tell USB devices that they can take more power was to short the data lines and I think it was good practise to place a resistor divider (several kilo ohms) so that the shorted lines are at around 2.5 V. But that is USB Battery Charging and not USB PD, which is quite a bit different. – Arsenal Jun 07 '23 at 08:05
  • @RohatKılıç If that's how you would do it, that would be an answer. Note that although questions asking for product recommendations are not allowed, answers **are** allowed to recommend products as supplementary information. – user253751 Jun 07 '23 at 09:18
  • @winny yes, this seems to give an overview of the design, but it does not properly answer what I should do if I want to implement it, which could be something along the lines of (totally making this up) "wait for the powered device to pull D+ low and release it, then wait 100ms and pull it low 100ms if you support 2A or 200ms if you support 3A, then connect a 0.8V differential UART to D+/D- and send the ASCII magic string 'xyzzy' at 12345 baud." It's not a sufficient answer to simply say "you communicate with the powered device" – user253751 Jun 07 '23 at 09:26
  • Does the phone use USB-C? If so, you can advertise the current capability at 5V with resistors, which might be sufficient in your case. – Finbarr Jun 07 '23 at 09:53
  • 1
    I would first check whether the phone supports USB Battery Charging. While USB-BC only gives you half the power (7.5W instead of 15W) compared to USB-PD, the USB-BC protocol is *infinitely* simpler, to a point where it doesn't even deserve to be called a "protocol". USB-PD is complex enough that you won't be able to get away without some sort of compute device in your charger (µC or dedicated chip). The USB-BC spec is here: https://usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement – Jörg W Mittag Jun 07 '23 at 10:09
  • 1
    If you are asking how to implement USB-PD, have you read the specifications how to implement it? That's the document which tells how to send data packets and what kind of data packets to comnunicate PD. – Justme Jun 07 '23 at 10:13
  • @Justme Note that the purpose of Stack Exchange is to build a repository of useful Q&A *on Stack Exchange*, not send people to other resources. If you believe this makes a good answer, you can re-state the information in the specification. – user253751 Jun 07 '23 at 10:54
  • @user253751 Copying information from documents and specifications and republising it here may violate copyright and sometimes documents are not public. Sometimes documents and standards are updated with newer versions. What you really might want to do is to not implement it yourself, but get a chip that implements it for you, and then you just use the chip as said in the chip documentation. – Justme Jun 07 '23 at 11:47
  • I wonder, if you indeed want to fully implement USB PD, then why stop at 5V? After all, PD 3.1 allows up to 50V. Who knows, maybe your next phone will be able to charge in 10 minutes using that one... – Maple Jun 11 '23 at 06:01
  • FWIW: after learning some more I don't think my phone supports USB-PD, but my tablet does have a PD logo on it so I changed it to tablet. Not that it really matters. – user253751 Jun 11 '23 at 07:51

1 Answers1

0

How do I tell it that it's allowed to take more current?

To start, there are Type-C basic "fail-safe" specifications, which use CC wires and indicate with various pull-up values that your supply has 900mA, 1500mA, or 3000mA capability all at +5V. Then the phone can take the current per the CC connection level, see https://electronics.stackexchange.com/a/382116/117785

If you need more (5A @5V or higher voltage profile), you need to implement Power Delivery specifications.

How do I implement USB-PD?

To implement USB-PD, you have three options:

  1. Read, understand and implement a subset of PD specifications. Keep in mind that the latest PD specs have 870 pages of text, while USB3 specifications have only 550 pages (and USB2 only 650 pages). You will need an IC that starts communicating with CC lines (communication channels of Type-C specification first), and then switches to PD physical layer protocol (BMC). Then you will need a 32-bit-grade MCU to implement PD protocol itself and its policy engines, including discovery of cable properties/capabilities and link partner capabilities. This will take maybe just few thousands lines of C++ code and several engineering man-years to implement all this.

  2. Take a Texas Instruments PD chip or Infineon/Cypress PD chip, and ask them to implement a specific set of power profiles that your power source is designed for. But they likely won't talk to you unless you guarantee to buy their chips in quantity (say, 100,000 per week). And they won't share their firmware code with you.

  3. Go to AliExpress/eBay and get a little board that implements most of the necessary controls, search for "power delivery trigger board".

The choice is all yours.

Ale..chenski
  • 38,845
  • 3
  • 38
  • 103