1
\$\begingroup\$

I am designing a device in which will have a phone with a USB-C port (host) connected to a USB 2.0 device (OTG mode). When the phone is connected to the device, it provides power to the device. I would like that when I connect a charger, the phone becomes a power sink rather than a source (and of course power to the USB 2.0 device is also maintained) so that it can be charged.

I have read this whitepaper and I know I need atleast a USB Type C port controller that supports Dual Role Power. For now, I do not care about USB PD. I have concluded that the TUSB320 will probably get the job done and I would like someone to confirm that the reference design below is in fact what I am looking for.

This is my planned design (and understanding). I would connect D+,D-,GND and 5V to my USB 2.0 device, connect the ID pin to a logic level FET (Source to 5V, Drain to VBUS). When no charger is present, the CC and ID pins will be set such that the phone provides 5V through the FET to the USB 2.0 device. When a charger is connected on VBUS, the CC pins will be set such that the phone sinks the power. My VBUS will be 5V.

Will this design work?

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Can you define all the interface specs and tolerances? \$\endgroup\$ Aug 10 at 16:05
  • \$\begingroup\$ @TonyStewartEE75, I am not sure I understand your question. In general, I just want to implement a USB-C compliant device. My only hard requirement is >=500mA charging current which is the minimum possible USB 2.0 gives (but can be increased by programming the TUSB320) \$\endgroup\$
    – mbyamukama
    Aug 10 at 17:44
  • \$\begingroup\$ It appears to be the correct use of the CC controller to provide dual mode power. \$\endgroup\$ Aug 10 at 18:09
  • \$\begingroup\$ How does the chip get VDD the first time though? It looks like we may have to wait until an OTG connection has been made to get a 5V rail from the phone to power the chip. So I wonder how the controller knows who is supplying VBUS when a charger is connected. \$\endgroup\$
    – mbyamukama
    Aug 10 at 20:42
2
\$\begingroup\$

Very quickly, there are challenges to your design.

I have read this whitepaper and I know I need atleast a USB Type C port controller that supports Dual Role Power. For now, I do not care about USB PD

You must implement USB PD in your design. USB PD is required because your intended ultimate state involves your phone acting as a Power Sink, while simultaneously acting as a Data Host (or DFP).

Whenever power and data are reversed independently of each other (without PD, the only allowed states are SRC/DFP and SNK/UFP), you must use one of USB PD's *_Swap processes.

In your case, you want your phone to end up as a SNK/DFP, and your board to end up as a SRC/UFP.

See page 3 of the whitepaper you posted, and look for the words "data-role swap" and "power-role swap".

I have concluded that the TUSB320 will probably get the job done and I would like someone to confirm that the reference design below is in fact what I am looking for.

You can use the TUSB320, but you also have to make sure to program the firmware of the chip to enable USB PD, and to enable the correct Swap processes.

Furthermore, your design actually requires TWO controllers, because your proposed architecture allows for the connection of a USB-C charger, which you have to have a chip like the TUSB320 to negotiate with as a sink on the other side.

Basically, you're building a pass-through charging portable USB docking station.

You're basically buliding this, sans the video side of it: https://www.apple.com/shop/product/MUF82AM/A/usb-c-digital-av-multiport-adapter

It has a USB-A port that supplies 5V power from the host when no charger is connected, when you connect the charger to the USB-C receptacle, power roles are reversed, but 5V is not interrupted on the USB-A.

You're building a complex product.

\$\endgroup\$
1
  • \$\begingroup\$ Coming back to you on this. Thanks for your answer. We were able to use the LDR6023C from the Shenzen Legendary Tech. Company. This is a firmware-free solution that enables simultaneous charging and OTG (USB 2.0/3.0) \$\endgroup\$
    – mbyamukama
    Nov 16 at 22:32

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.