Electrical – Bidirectional USB Type C charging

bidirectionalpower supplyusb-c

Recently I bought a ready PCB that is basically a power bank when 18650 batteries are connected This. It has a micro USB port to charge the 18650s and two USB type A one of which output is 1A and the other 2A. I also bought a USB Type C breakout board The female one. Now, I try to convert that power bank to support Type C. I want it to be bidirectional. So when it detects external voltage at the Type C port to switch to charging mode and apply that voltage to the micro USB connections. But when there is no external voltage at the Type C port it will output voltage from the 2A Type A port. Can that be done with the use of simple electronic parts? If not what components sould I search for? I tried to find documentations on USB Type C on the Internet on that topic but I cannot find what I want.

Best Answer

The USB Type-C doesn't work as you described. The load of ideas how the port should opreate (as dual-role port) is described in the original USB Type-C specifications, which are freely available from USB.org, as part of entire USB 3.2 zipped package.

Initially none of Type-C port will have any voltage on VBUS, so you can't use it as detector who is provider, and who is consumer. The role of a port is determined by pulls (up or down) on CC pins. And the CC wire goes from one port to linked port over C-C cable. Once the right combination is established and recognized, the source will put out VBUS, and the consumer will take it. For details please examine Section 4 of Type-C specifications, all variants of connectivity are pictured there.

Related Topic