Prevent USB VBUS backfeeding on UART-driven USB HID for KVM

Hello everyone,

I’m having trouble getting a UART‑driven USB HID device to reliably enumerate on my under‑desk KVM without back‑feeding USB power into the device. Here’s what I’m trying to achieve:

Goal
Have a UART‑driven USB HID device always enumerate on my under‑desk KVM, regardless of power‑up order, and prevent any USB VBUS back‑feeding.

1. Bench‑test wiring

FTDI TX      ──► CH9328 RX  
FTDI GND     ──► CH9328 GND  
CH9328 USB‑C ──► Laptop USB port

2. Pi UART wiring

Pin 8  (GPIO14 TX) ──► CH9328/SAMD21 RX  
Pin 6  (GND)       ──► CH9328/SAMD21 GND  
CH9328/SAMD21 USB‑C ──► KVM USB port

I plan to use a SAMD21‑based Arduino later (which uses the same RX/GND pins), but I haven’t yet tested the serial connection on it.

This is where I started from: CircuitPython and Python | Adafruit CH9328 UART to HID Keyboard Breakout | Adafruit Learning System

Expected vs. Observed (CH9328 tests)

  • Expected: CH9328 always enumerates when USB is plugged in, even if its serial RX line is already driven.
  • Observed:
    • No resistor: serial‑first drives VBUS to ~3.5 V → no enumeration.
    • With 1.1 kΩ on TX→RX: VBUS drops to ~1.5 V → still no enumeration.

What I’ve tested

  1. FTDI → CH9328 → Laptop
  • USB first → serial: works
  • Serial first → USB: browns out, no enumeration
  1. Series resistor (1.1 kΩ) on TX→RX
  • Cuts back‑feed from ~3.5 V to ~1.5 V; enumeration still fails
  1. Power‑rail test
  • FTDI 5 V → CH9328 VCC + GND → GND lights the LED; USB enumeration untested (concerned about dual‑5 V conflict)

Questions

  1. What’s a simple way to stop the TX line from feeding power into the CH9328 when its serial line is live first?
  2. Are there alternative approaches I should consider to achieve the same goal without encountering back‑feeding issues?

Thanks so much for your help!

Normally I would tell you to read the pinned post re 'How to get the most from the forum', but I fell asleep half way through your word salad.
I think a picture of a well labelled clear hand drawn diagram is a good start then maybe you could provide a more focussed description of what you want to happen.

I edited my initial post to try to make things more clear.

It's considered bad netiquette to edit an old post.

Maybe someone will help, I can't follow any of that.

Sorry, this is all new to me and I'm trying my best to be as clear as I can. I'm trying to make my existing Pi act as a keyboard for my KVM.

My thought process was to start with an Arduino microcontroller between a Pi and the KVM. But then I discovered the CH9328, so I've made more progress on that, until I ran into the back feeding issue. I technically haven't used the Pi yet, since it was faster to use a USB UART adapter. I'm assuming the electrical connections would be the same (?).

I'm struggling to ask the right questions as I don't know what I don't know. My experience is almost entirely software.

I edited the initial post because you were right, it was a word salad and I didn't want people to look at that get instantly confused.