Extending USB Connection

Started by DonpK, May 05, 2022, 04:49:19 PM

DonpK

I'm mounting a Moteino MEGA USB inside a small enclosure and I need to bring the MEGA's board-mounted USB micro connection out to a micro USB breakout board. I've wired the USB V+ and GND to the MEGA board and it powers up okay.

The USB D+ and D- lines I've connected with ca. 3" of hookup wire to the USB side of the 27Ω resistors (see image). The PC isn't seeing the MEGA as a USB port. I realize that in USB cables, D+ and D- are a twisted pair. Is a 3" section off non-twisted wire enough to mess up the data continuity, or am I missing something else?

Felix

#1
Quote from: DonpK on May 05, 2022, 04:49:19 PM
Is a 3" section off non-twisted wire enough to mess up the data continuity, or am I missing something else?
USB D+/- are differential signals, so you need to match their lengths, and they need to be "married", meaning they live together right next to each other as much as possible.
Twisted would be much better in fact.

The reason is those signals are (=differential) complements of each other (when one is HIGH the other is LOW and vice versa) and they travel at very high speed so propagation speed really matters (the rising speed of the signal edges), you want the edges to arrive as close as possible, or else the signal sampling might catch a wrong edge compared to the complement and hence it's not recognized by the USB protocol.

Wires of different lengths or thicknesses or even curving around the board cause the signals to arrive at different times, or be distorted, or couple noise into them, and thus render the serial signal useless.

DonpK

Thanks for the answer. I won't spend anymore time on the "hookup wire" approach.

I'm familiar with differential (balanced) signals from audio which is a little bit slower than USB :)