4

For my PIKVM I want to use the OTG functionality of the USB-C port of my Raspberry Pi 4 to control the mouse and keyboard, however, I want to power the Raspberry via the GPIO pins instead, because I don't really like the Y-cable solution so much - and as far as I know, the RPI 4 doesn't have a polyfuse for the USB-C port anyway, so there is no benefit from exclusively using the USB-C port.

However, is it enough to connect the host (mainboard) using a USB 2.0 <-> USB-C cable to the Raspberry and to disconnect VBUS? In this tutorial where they show how such a Y-cable is made they only disconnect VBUS:

enter image description here

On the other hand, in this answer a user explained that only connecting D+, D-, and GND is not really that safe because the voltage level of D+/D- could be higher than VBUS. What I understood is, that one would have to make sure that the cable from the host to RPI is not plugged in before the PSU for the RPI is. Why is that?

Both server and PIKVM will run 24/7, so they are not regularly disconnected, but I don't want to risk anything.

Tintenfisch
  • 163
  • 7

1 Answers1

0

USB data lines use differential signalling and the voltage will NEVER exceed 3.6V for Full-speed and considerably lower for High-speed. (The reasons for this require an understanding of transmission line characteristics.)

I am unaware what capacitance Schottky diodes on USB data lines would have but connecting ANYTHING to them is undesirable. At the least it would change the termination impedance and reduce performance.

Upstream USB connectors supply power at a nominal 5V DC via the V_BUS pin to downstream USB devices.

A USB host is designed to supply power to downstream ports, but if these are powered there should be NO V_BUS connection.

"What I understood is, that one would have to make sure that the cable from the host to RPI is not plugged in before the PSU for the RPI is. Why is that?" USB plugs are designed to connect V_BUS & GND before data lines. This is mainly to ensure the device has time to startup. It is desirable to do this, IMO not necessary for a powered device, but the diode in the answer by Dmitry Grigoryev should ensure this is safe. I have never bothered, although I sometimes use a Schottky diode to prevent back-powering (which was a problem with older Pi).

Milliways
  • 62,573
  • 32
  • 113
  • 225