1
\$\begingroup\$

I'm struggling with making a USB3 connection work. The PCB needs two USB3-A female receptacle, to play sort of a "man-in-the-middle" role.

I cannot provide much detail, since it is part of an ongoing research project --- however, I boiled down the issue to a minimal PCB that we actually manufactured (as a debugging test). Here's the layout, designed with gEDA PCB:

enter image description here

The thin traces are 12mil wide, the thick VBUS and GND traces are 35mil wide. The through-hole connections for the receptacles' pins have a hole diameter of 28mil (minus the plating thickness), and a pad diameter of 43mil.

The idea is that I connect from the PC to this board with a male-male extension cable, and then connect the device from the other receptacle on this board (using the same cable I would use to connect the device directly from the PC). The receptacle I used is the Amphenol 10117835-002LF.

The board was manufactured with "High Frequency" material, at 1mm thickness (the "Advanced PCB" option at Seeed Studio). However, one detail is that I did not manufacture with impedance control (nor did I do any calculations of trace impedances --- on the one hand, I didn't think it would be necessary --- at this point in time I'm not sure whether it is; and on the other hand, the receptacle specifications do not include characteristic impedance).

The trouble I'm having is: it works intermittently; or maybe I should say unreliably. I'm testing with a USB3 logic analyzer we have, and that one seems to work well (I set up capture at the highest rate the device supports, and it does capture, without reporting any errors). However, I try with a USB3 camera, and that one works some times, it report errors some times, the camera freezes once in a while, etc.

Any ideas on what I did wrong (specifically, things that could explain the unreliability), or suggestions to make it work more reliably?

\$\endgroup\$
2
\$\begingroup\$

There are few things to consider:

  1. "a male-male extension cable" is an illegal construction from USB standard viewpoint. As such, these cables cannot be officially certified in a qualified Lab, and whoever crafted that cable in a sweatshop China factory have no idea what they are doing, nor proper equipment to test anything. So the overall transmission quality of this cable is a prime suspect. This is a factor #1.

  2. Your board is essentially a "female-female" converter, which allows you to re-configure you male-male extension cable into "male-female" extension (which is also against USB specifications BTW). On this way you have introduced one more mating connector in the link. The reason that extenders are excluded from USB specifications is that they introduce extra connectors and, as it was noted in this SE EE question, it is physically difficult to maintain good uniform differential impedance across non-coaxial connections. These imperfections can have nearly arbitrary form and cannot be corrected in USB 3.x receivers, unlike the plain cable losses. Any impedance inhomogeneity along the channel introduces reflections, which, combined together (aka "inter-symbol interference") cause horrible jitter, and USB clock-data recovery circuits can't tolerate/adapt to this. The bad thing about your combined cable is that it has two extra pairs of mating connectors, which likely breaks any expected quality of the channel even if your traces/pads are designed in the best possible way.

  3. Some USB 3.x logic analyzers are designed using active repeaters, to sniff on the traffic and branch it for recording and analysis. As such, they can re-shape and re-time the signal, and that's why it might "work" a bit more reliably.

  4. USB 3.0 cables have no formal limit on how long they can be, provided that their loss characteristics do not exceed specifications, so abilities of USB receivers to "equalize" (adapt to) the losses during channel training are not exceeded. So the cable can be as long as you can make its losses low (which costs). Practice however shows that most standard A-B cables can't meet quality requirements (insertion loss, far- and near-end cross-talk limits) is they are longer than 2m. If micro connectors are used, collective wisdom of USB-IF consortium determined that the cable longer than 1m isn't worth to consider, use, and test. And again, all these considerations do not apply to extenders, since they introduce imperfection that cannot be universally modeled and therefore common correction algorithm is impossible.

  5. Not all USB devices and hosts are made equal, particularly in the sense how well their receivers can equalize channel losses and how tolerant they are to accumulated signal jitter. A certificate of USB-IF compliance is a good start to be somewhat confident that the link will work reliably. If any of components in the link are not USB-IF certified, there is a good chance that they break some USB requirements and can't provide reliable communication, although exceptions do occur. This includes your "a USB 3.0 camera".

Therefore, it shouldn't come to any surprise that your double-extended USB link works only intermittently. You must be lucky that it works at all.

To make it work reliably, you should exclude any extenders, or, at least use natural male-female extenders, there are some good quality ones. However, you never know this unless you have expensive differential TDR (Time-Domain Reflectometer) or network analyzer to test your channel quality. If a distance is of concern, you should use "active" extenders based on new class of USB devices called "Repeaters-retimers".

\$\endgroup\$
  • \$\begingroup\$ "··· a 'female-female' converter, which allows you to re-configure you male-male extension cable into 'male-female' extension (which is also against USB specifications BTW)" --- which part is against USB specifications? A "male-female" extension? Or using a female-female to re-configure the male-male into a male-female? \$\endgroup\$ – Cal-linux Oct 26 '18 at 19:42
  • \$\begingroup\$ "To make it work reliably, you should exclude any extenders, or, at least use natural male-female extenders, there are some good quality ones" --- would I have better chances of success if the board goes from micro-B female to A female? That way, I use two camera cables (which should be more reliable than my questionable-origin A-male to A-male extension, right?) \$\endgroup\$ – Cal-linux Oct 26 '18 at 19:57
  • \$\begingroup\$ @Cal-linux, every passive extender or gender-changer is against USB specifications. \$\endgroup\$ – Ale..chenski Oct 26 '18 at 21:00
0
\$\begingroup\$

The layout looks wrong.

Looking at the bottom connector pin 1 (bottom row, left position) the red trace goes to its equivalent on top connector.

Now look at the two pins directly above it, top row 1 and 2. These would be StdA_SSRX− and StdA_SSRX+. These connect to the pins underneath the beige trace. I'd expect them to be routed to the pair underneath the red trace on the top connector.

These seem to connect to StdA_SSTX− and StdA_SSTX+, have you got TR and Rx wrongly connected here ?

\$\endgroup\$
  • \$\begingroup\$ No, because the cable makes the complementary connection --- I want the "output" USB3 connector to present the exact same pinout/pin assignments as the connector on the host / PC. Does this clarify, or am I still missing something? \$\endgroup\$ – Cal-linux Oct 26 '18 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.