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
- FTDI → CH9328 → Laptop
- USB first → serial: works
- Serial first → USB: browns out, no enumeration
- Series resistor (1.1 kΩ) on TX→RX
- Cuts back‑feed from ~3.5 V to ~1.5 V; enumeration still fails
- Power‑rail test
- FTDI 5 V → CH9328 VCC + GND → GND lights the LED; USB enumeration untested (concerned about dual‑5 V conflict)
Questions
- What’s a simple way to stop the TX line from feeding power into the CH9328 when its serial line is live first?
- Are there alternative approaches I should consider to achieve the same goal without encountering back‑feeding issues?
Thanks so much for your help!