3

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.

1 Answer 1

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).

5
  • Thanks! What other answer in the link do you mean? So, the scheme as shown in the tutorial is enough - just disconnecting VBUS because the USB-C shall only be used for data and the Raspberry is already powered -, correct? Feb 11, 2023 at 0:04
  • Dmitry Grigoryev in his answer said, that "D+/D- lines may then have higher voltage levels that VBUS" if VBUS is not connected. How come this could happen if it will never exceed 3.6V? Feb 11, 2023 at 0:12
  • My mistake. There was another answer about diode clamps which he commented on. His connections are correct but he obviously didn't know the technical detail.
    – Milliways
    Feb 11, 2023 at 2:50
  • "His connections are correct but he obviously didn't know the technical detail." – Here you refer to Dmitry? Not that I become confused now. Feb 11, 2023 at 2:54
  • The comment by Dmitry is misleading and has been misrepresented and I believe adds no value. There is no prospect of the Pi supplying incorrect voltages to the "server" because by the time it is active Pi voltages are stable. The "server" is incapable of supplying voltages exceeding its V_BUS.
    – Milliways
    Feb 11, 2023 at 5:07

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.