0
\$\begingroup\$

I want to know the CC1 and CC2 configurations for my device. There are two USB type-C connectors. Receptacle and plug. The plug will be connected to the cellphone and the charger will be connected to the receptacle. How should I connect the resistors for CC1 and CC2 on both connectors?

Thanks,

enter image description here

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Add a schematic. Your picture tells us absolutely nothing. \$\endgroup\$
    – Turbo J
    May 2, 2023 at 11:03
  • \$\begingroup\$ I want to connect the charger to the female connector and the male plug will be connected to the cellphone. How should I connect the CC1 and CC2 pins? Should I use a pull high or pull low? \$\endgroup\$
    – Mclovin
    May 2, 2023 at 11:08
  • \$\begingroup\$ How to connect the pins depends what you want the board to do. It is unknown how to connect them if you don't say what the board should do and why. Why there is a board and what does it do? \$\endgroup\$
    – Justme
    May 2, 2023 at 11:10
  • 2
    \$\begingroup\$ What components? What voltages these components accept? How do you expect them to work when phone or charger is disconnected? \$\endgroup\$
    – Justme
    May 2, 2023 at 11:19
  • 1
    \$\begingroup\$ Please draw a schematic and add all relevant information into the question body by clicking on edit. There is a schematic editor there as well you can use by clicking on the schematic symbol. \$\endgroup\$
    – winny
    May 2, 2023 at 11:48

2 Answers 2

2
\$\begingroup\$

The proper way to go about building this is to (skim) read the Type-C and PD specs, and then cry: this is almost certainly too much effort for a "buzzer and an LED": USB PD is very, very complicated, and there are several ways to do Charge-Through. At least your usecase is pretty much the kind of thing CTVPD was designed for, if you choose to go that route.

If you prefer to stay in the blissful ignorance of just USB Type-C, and it's simple resistors and voltage dividers, the solution is pretty simple- though obviously you won't get fast charging. 5.1k Rd pull downs on the receptacle, Rp pull-up (just one) on the plug.

Rp resistor table from Type-C spec

Rp tells the phone how much current it can get from the "charger" - but since you aren't the charger, you don't know how much current you have. Two options:

  1. Put the default Rp and cross your fingers. If someone plugs in a default current charger, or more likely, uses a USB A-to-C cable, you're advertising all the current you're (officially) getting from the charger. If the phone uses 100% of that to charge, that leaves 0% for your gadget- maybe if it's low power enough you can squeak under over current protections, but it's not ideal.
  2. Assuming your gadget has a microcontroller with an ADC somewhere, it's possible to check the voltage on the CC pins of the receptacle to figure out how much current the charger is advertising, then switch out your own Rp to either match (which brings the same crossing your fingers approach as option 1, but with slightly faster charging) or de-rate by one level (though that would mean a default charger would effectively derate to nothing. could fall back on option 1 instead though) so you've guaranteed some current for your own device. Sink CC voltages from Type-C spec
\$\endgroup\$
0
\$\begingroup\$

You should not connect them in any way, except directly between the connectors, so the phone and charger can negotiate directly how much current is available from charger and what voltage should be used for charging.

If you decide to connect the CC pins in some other way, the phone and charger cannot communicate. Then the voltage is limited to 5V only and since you can't say to the phone how much current is available, so you have to tell the the phone may charge at minimum/default current, so it might charge very slowly or refuse to charge.

Unfortunately if you do connect the CC pins directly between ports, this means that your LDO must be able to accept up to 20V in, and at 3.3V out it will waste a lot of power as heat, so the LDO is not a good solution.

It also means that when the phone is disconnected, the charger must not output any voltage until the phone is detected.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Your LDO would need to accept up to 48V, not 20V. The current USB C specification goes to 48V. (it probably won't go higher with future revisions, but this was also commonly said about the 20V limit). USB C is designed in usch a way that any wrong connection should never result in damage \$\endgroup\$
    – Ferrybig
    May 2, 2023 at 14:08
  • \$\begingroup\$ I cannot use the PD controller because there will be more components on the board. I want a simple solution with fewer components. The size of the board is small and there are too many components already. Not just the buzzer and the LEDs. I am using a 3.3V LDO which supports an input voltage of up to 20V. Based on Justme suggestion I've connected CC1 to CC1 and CC2 to CC2. I will add a button too which will be used to disconnect the CC1 and CC2 lines and will connect it to the 5.1 resistors which then take power from the phone and disconnect the charger completely. Will it work? \$\endgroup\$
    – Mclovin
    May 3, 2023 at 15:14
  • \$\begingroup\$ It's unclear what you want. You want to push a switch, charger stops charging the phone even if it is connected, and board connects resistors, and you get VBUS out of the phone to your board? While being connected to charger VBUS? Sounds dangerous to me. \$\endgroup\$
    – Justme
    May 3, 2023 at 16:11
  • \$\begingroup\$ No, the VBUS will also disconnect. I am using a DPDT switch. \$\endgroup\$
    – Mclovin
    May 8, 2023 at 12:22

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.