0
\$\begingroup\$

I tried to make a micro USB to USB-C adapter by making the connections shown with red lines below (so 11 of the 24 USB-C pins are used and other pins float). This is the view looking into the USB-C plug (as if you are the matched USB-C receptacle) and the 4 connections at the top connect to the GND, VBUS, D-, and D+ on the micro-USB receptacle (ID floats).

My USB-C phone then charges, but unfortunately does not notice when a keyboard gets connected to the micro USB (through a normal OTG hub with charging). For me, the spec isn't clear about data because it focuses more on power delivery...should I really not get data with this setup? If not, can I add an "Ra" resistor on VCONN (or some other pin) to get data? Sorry if I'm the only one who can't read the spec well, but I'm just trying to find the cheapest way to charge and use a keyboard simultaneously.

(For the record, adding a 5kohm resistor from CC1 to GND makes the micro USB keyboard work, but then I cannot simultaneously charge the phone.)

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Does USBC still require OTG resistors? I can plug stuff into my USBC phone and it just works, no special OTG adapter requires (which I did need back when I had a micro-usb port on my old phone) \$\endgroup\$
    – Joren Vaes
    Commented Jun 3, 2020 at 6:26

2 Answers 2

1
\$\begingroup\$

What you need is called "accessory charging device".

When making "initial connection", by default of CC pins pulls the power role as source is associated with host function, and sink is associated with device function. When a dual-role device flips it advertising from source to sink and back, the data role switches accordingly.

There is no way to keep the data role and reverse it the sink/source role by means of resistors alone. If a device supports host mode but needs charging, the only way is to use Power Delivery communication. Both link partners must re-negotiate the power contract by exchanging "Structured VDM" messages, DR_Swap in particular. Sorry for the inconvenience :-)

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. Here's an idea some phones might already be using. Without any new USB spec, it seems a good phone should realize (just after CC goes low but before the phone starts powering VBUS) that VBUS is already powered and offer the user 3 host options: POWER VBUS (the normal USBC spec), FLOAT VBUS (letting that external power instead do the work), CHARGE FROM EXTERNAL VBUS (letting that external power do the work and charge the phone). Any harm in that? It seems most phones could implement this in a simple firmware update since the switches and sensors needed are already there. \$\endgroup\$
    – bobuhito
    Commented Jun 4, 2020 at 8:00
-1
\$\begingroup\$

i hope i have understood your question correctly, if not pull up the two pins to vcc in the first diagram.

As for charging I don't think charging is possible simulatinously using otg. You would require a kernel patch.

enter image description here i suppose vconn and cc1 should be pulled to ground to signify its a sub device. and a7 and a6 on the diagram are marked clearly d-, d+.

and don't forget on the micro usb side u are supposed to short two pins for it to detect as otg input. enter image description here

watch this great video for clarity. implement for sub device instead of host

https://www.youtube.com/watch?v=V-vFtiDYiIw&t=826s

https://www.pinterest.com/pin/315814992595252872/

Image one is a screen grab and image 2 is from here

\$\endgroup\$
2
  • \$\begingroup\$ You missed my need for simultaneous charging. Can you fix your answer for that? \$\endgroup\$
    – bobuhito
    Commented Jun 3, 2020 at 12:15
  • \$\begingroup\$ I would like to know what u mean by simulatinously charging . If you mean charging the phone while on otg mode I am sad to report it does not seem to be possible because the host is trying to send power out while you are trying to send power in \$\endgroup\$
    – theCNN
    Commented Jun 3, 2020 at 19:58

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.