1
\$\begingroup\$

I’m working on a design that is essentially a USB battery pack. It will have a USB port for charging the battery and a USB port for that battery to charge some other device. It is a design requirement that both ports can be used at the same time.

The problem I am trying to solve is how to prevent the device from "charging" itself if someone were to connect the two ports. Is this something that the USB-IF has already thought about (I’m guessing yes), or will I have to get clever with this?

My understanding of USB C/PD is that, in my battery pack scenario, I should configure my 'input' port as an “Upstream Facing Port” by placing pull-downs on the CC lines and I should configure my 'output' port as an “Downstream Facing Port” by placing pull-ups on the CC lines. Is there some other feature of the CC lines that I am unaware of that would help me solve this problem?

Presumably someone has negotiated this before: I know that MacBooks have multiple USB-C ports, and one of them serves as the charge port of the device. I don't have a MacBook to try it myself, but I would be very surprised if plugging one of the regular USB ports into the charging port did anything.

Any advice would be greatly appreciated

\$\endgroup\$
4
  • \$\begingroup\$ What's your motivation behind this? I see no real problem if the user does it like that. \$\endgroup\$
    – pipe
    Commented Oct 25 at 1:09
  • \$\begingroup\$ @pipe I guess it isn't the end of the world if the user did that, it would just burn up some battery power. I'd rather not give them the chance to do that if there is a simple way to avoid it. I also ask the question out of curiosity. \$\endgroup\$ Commented Oct 25 at 1:50
  • \$\begingroup\$ Are you going to use PD communication or simply resistors on CC pins? What voltages/currents/wattages you need to support? \$\endgroup\$
    – Justme
    Commented Oct 25 at 4:35
  • \$\begingroup\$ The input would be PD and have an IC to control the communications. Unsure of the wattage target, likely 36W. The output would be basic 5W and set with resistors. Do the power levels make a difference? \$\endgroup\$ Commented Oct 25 at 22:57

1 Answer 1

0
\$\begingroup\$

The problem I am trying to solve is how to prevent the device from "charging" itself if someone were to connect the two ports.

In all modern laptops each Type-C port has individual control for power and for power role. The ports do not become active ("charge themselves") unless Power Delivery finds the matching contract. The roles/powers are defined by technical marketing and implemented with individual PD/CC controllers. The controller's policies are usually defined by Embedded system controller over I2C channels, which also controls many-many MOSFET power switches. The port's policies also can change depending if "unlimited power" (wall-AC-DC connected) is present or not.

For example, dual-role ports alternate pull-ups and pull-downs dynamically, to advertise this function. Some systems even might have an ability to be charged via more than one Type-C port for faster system charging even if each provider has different power capabilities, although it is not cheap.

Not sure about MacBooks, but recent Microsoft Windows Logo requires all Type-C ports to have identical capabilities (including DisplayPort function and USB4/USB3 data function), to avoid customer's confusion.

In short, management of Type-C ports is a VERY SIZABLE computer subsystem, firmware upgradable, with dozens of engineers being involved, starting from PD embedded firmware, EC firmware, and Windows Connection manager.

ADDENDUM: When people make devices with Type-C ports, they usually seek certification from USB-IF authority. A certification Lab will request so-called VIF (Vendor Info File(s)) for each Type-C port, which describes in formalized XML form all properties of the port, so their automated scripts / testers can verify if it is doing what it is meant to do. The specification for VIF (and file generator) can be found in USB-IF library. You may want to examine this document and play with VIF generator to better understand Type-C port requirements/propertis for your design.

\$\endgroup\$
1
  • \$\begingroup\$ Understood that each port has its own PD controller and they negotiate a contract. Maybe I should re-phrase my original question. I guess what I am really after is how can a PD controller tell if it is talking to another PD controller on the same device (e.g. the same laptop) vs another PD controller on a separate device. With this answer, my problem resolves itself with a couple switches gating the VBUS voltage. \$\endgroup\$ Commented Nov 4 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.