This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TUSB320: DRP application

Part Number: TUSB320
Other Parts Discussed in Thread: TPS65987D

Tool/software:

looking for a simple solution to the following.

  1. I have an iPad and my device encased in a sealed housing.
  2. permanent USBC cable runs from iPad to my device to power my device
  3. a single USBC jack is exposed from the sealed unit which is only required to charge the iPad (no data connection required).

There are reasons to use an iPad instead of a battery pack that aren't relevant, but basically the iPad is acting as a battery that also needs to be recharged.

My problem is figuring out how to configure my device to allow the iPad to both source and sink power. I am not an USB expert and am really looking for a complete, simple, solution/example to copy. I would like it to be hardware configurable so that no i2c/programming/mcu is required.

I have tried a P-Channel MOSFET with a 5k1 resistor on the cc1 line, but I am struggling with dynamically sourcing/sinking from the iPad. The iPad doesn't switch to sinking as required.

Block diagram of the concept. My device requires 5v ~100ma from the iPad. Power can be cut off to my device (or not) while charging.

  • Hi Michael,

    We have CC controllers that work to sink or source power over the USB-C connection. This would allow your USB-C jack to receive power from a connected source or provide power to a connected sink over the USB-C cable.

    Correct me if I am wrong, but it sounds like your USB-C receptacle is exposed and only intended to connect to a power source to charge the Ipad. Our CC controller can be used on the receptacle to draw power from the external source, but I do not see how we fit into the "?" box in your system. Can you elaborate on how you want to route the Type-C connection?

    Best,

    Shane

  • Hi Shane. Thanks for your reply!  I don't fully understand the USB protocols, but what I essentially want to do is:

    1. connect an exposed USBC permanently to the USBC on the iPad so that it can be charged
    2. permanently connect the iPad USBC to my custom pcb and treat the iPad as a power source
    3. when I plug the charger into the exposed USBC, I want the iPad to switch from being a power source to being the power sink
    4. that "?" is whatever I need (TUSB320?) to provide enough intelligence to tell the iPad to switch from source to sink (and sink to source when the power is removed)
    5. I don't need any data handling, D+/- isn't connected
    6. I tried to solve this already by putting a 5K1 on CC1 and using a P-Channel to disconnect that in the hopes of having the iPad change roles, but that isn't working the way we need it to. It's not switching roles. I think we need a more sophisticated solution.

    please let me know if you need any more information. This is my top priority to get done.

  • Hi Michael,

    Do you need the USB-C from the Ipad to switch between source and sink while the connection is maintained? Our CC controllers only support one role per attachment. The USB cable needs to be physically unplugged before the role can change between source and sink in DRP mode.

    If you need to switch dynamically while the USB-C is attached to the Ipad, a PD controller might be a better option. CC controllers like the TUSB320 are relatively simple devices that do not support dynamic role swapping.

    I drew an example block diagram of how your system might look using our TUSB320 CC controller. I recommend looking at the TUSB320 EVM for an example of how this device can be implemented as a DRP

    Best,

    Shane

  • Yes! this looks very promising as that diagram is exactly what I am trying to accomplish.

    1. yes. the iPad to switch between source and sink while the iPad's USBC connection is permanently maintained. 
    2. The external (charger) USBC will accessible to be plugged and unplugged.
    3. I understand the TUSB320 is not the right choice because it is a CC Controller and not a PD Controller
    4. What PD controller do you recommend? I just want to use the easiest solution.
    5. The block diagram power path seems perfect, but because it uses the TUSB320 I assume that diagram would only work if the iPad could be physically unplugged before the role can change between source and sink could take place? So not a workable solution for me.
    6. The only connection that can be unplugged/plugged is the external USBC, which is internally and permanently connected to the iPad.
    7. Unplugging/plugging the external USBC should trigger the source/sink state of the iPad.
  • Hi Michael,

    You would need to confirm the PD properties of the iPad itself to test this block diagram.

    On the initial plugin the PD controller of the "free" receptacle and the PD controller inside the iPad will need to negotiate and confirm that the iPad has source and sink capabilities for power. If this connection is established, then no unplugging and plugging will be required. 

    However, we have no means to confirm this, so you may need to reach out to Apple regarding their IPad capabilities. You can also use a CC analyzer to capture the CC negotiation to see the PD capabilities of the iPad.

  • Thanks! I can confirm that it is an 2021 Apple iPad Mini 6 and that it has sink and source capabilities. I was able to sink and source the iPad Mini 6 by connecting and removing a 5K1 resistor on CC1. The iPad both sourced (5v to my custom device) and sunk (charged) as expected. I'm not familiar with what a CC analyzer is or does so if you have one to suggest I will look into it.

    My problem is being able to dynamically change the iPad from sink to source. Currently I have been manipulating the resistor for testing, but I require the iPad to react solely on whether the charger is plugged or unplugged into the external USBC.

    Also, I am confused about TUSB320... Is this the component from the block diagram that I would want to use? Maybe I misunderstood, but I thought TUSB320 is a CC Controller and I need a PD Controller? Will the "PD Controller" be a different part number?

  • Hi Michael,

    Yes you are correct that a CC controller like the TUSB320 cannot dynamically switch between source and sink. A PD controller we've used for USB-C EVMs in the past is the TPS65987D. I recommend submitting an E2E with this as the part number to double check whether TPS65987D will support your use case.

    Best,

    Shane

  • thanks! I copied much of the above information to a new post specifically for the TPS65987D

    e2e.ti.com/.../tps65987d-dynamically-switch-source-and-sink-in-drp-mode