I'm designing a compact product consisting of several independent PCBs, which all should be permanently connected via the custom USB2.0 hub inside the device. The required USB cables should only be a few centimeters long, they do not need to be detachable. Using standard USB plugs and sockets, like USB-A or even USB-C seems to be a huge waste of space. So, the question is: is there a standard for the in-device USB cables wiring? Simple things like PC mouses or laptop embedded cameras usually have cables attached to PCB via the XH-type connectors. Is there a document or guide on how to properly design such interface? Thanks!
-
What else do the PCBs connect to (what kinds of connections, how many, how long (or variable if external), are they shielded or grounded, etc.), and will they be within a metallic enclosure or no? – Tim Williams Jul 19 '23 at 14:06
-
1@tim-williams The PCBs have common ground at USB-hub side. Hub itself is connected to the small battery-powered OBC (like raspberry-pi) with off the shelf 15-20cm USBC-USBC cable. All this is located in aluminum enclosure. The completed system has no earth grounding or connection to mains. – dmivaka Jul 19 '23 at 15:00
3 Answers
There is a de facto standard that motherboard manufacturers use for front-panel USB: 0.1-in male headers, often in pairs in a 5x2 format with a key, sometimes 4x1 or 5x1. Consequently case companies have made USB-A adaptors with that matching pinout. The only real advantage of using this pinout is that you could get standard parts for testing, debugging, soak-testing and so on.
This is from Intel's DN2800MT, a very widely-used flat Mini ITX motherboard, very commonly used as an embedded motherboard.
From DN2800MT manual
Note that pin 10 is sometimes used for things like LEDs (see same document, fig 17).
Dell uses the same pinout for all the motherboards I looked at. (5x2, key on 9). Other adaptors have been on 5x1 and 4x1, for single USB ports.
Casing and cabling companies offer all kinds of adaptors, here is just one
Startech USBPLATE4 drawing

- 12,049
- 3
- 27
- 60
-
3Note that the GND+shield is brought through from header to expansion slot bracket; a metallic enclosure is required to meet EMC. – Tim Williams Jul 19 '23 at 14:16
-
OP might find himself needing to consider the ID pin, which I think is outside the scope of PC mainboard connections. – Mark Morgan Lloyd Jul 20 '23 at 09:25
-
1@MarkMorganLloyd OP has apparently a hub and various slaves, so the ID pin is not needed. It's only used when a device can change between host and slave. https://electronics.stackexchange.com/q/35462 – jonathanjo Jul 20 '23 at 09:34
is there a standard for the in-device USB cables wiring?
I'm only familiar with the desktop PC motherboard-typical Pin headers.
These are unsuitable for your use case, probably, though, as they use as much space as a vertical USB-A jack. (and you'd probably use only one USB port anyway). I think you're misrepresenting how small USB-C is; you'll not have an easy time finding connectors for all 4 USB lines that are significantly smaller. They're, still, relatively expensive and expensive to solder.
USB2, especially over short distances, is pretty forgiving. There should really be no downside in using just any 2-pin (if you only need the data pins) or 4 pins (if you need +VUSB and GND as well) connector of your choice. For cabling within low-density devices, that's typically something like the ubiquitous JST 2.5mm pitch self-locking pin sockets.
You'd typically crimp the cables into the female counterparts to this yourself (or order the cables custom) to get them in the exact length you'll need.
Is there a document or guide on how to properly design such interface?
Sure, the USB standard is freely available and implementation-wise detailed.
However, this being USB2.0, things are not very hard: Keep D+ and D- close together on the board, if you can, aim for 90Ω differential characteristic impedance. For the cabling, where longer than 10cm and if using HighSpeed (480 Mb/s), you want to have twisted pair cabling; generally a good idea, because you want a length matching of better than a few centimeter. AWG26 or larger, and less than 13Ω in total. If you get to choose colors, stick to green for D+ and white for D-.

- 88,280
- 5
- 131
- 237
-
2Even over short distances (~10cm), shielded cable is preferred; USB is not fully differential (SE0 symbol), and there may be EMC concerns as well. The next best thing is multiconductor cable, with every other line grounded; the differential impedance will be a bit high though, making this unsuitable for longer distances. – Tim Williams Jul 19 '23 at 14:21
-
2@TimWilliams What kind of multiconductor cable you mean, and why would every other line be grounded if you can wire the USB as differential pair in adjacent wires guarded by grounds? Flat flex cables also come in various sizes and can be selected to approximately have 90 ohm differential impedance in SGGS configuration. – Justme Jul 20 '23 at 09:47
-
1@Justme Ribbon cable for example, has a ~130 ohm differential (GSSG), so would either have as much mismatch, or need several interleaved lines in parallel (there's probably a configuration with grounded and floating conductors; it would take up a lot of space and be a bit of a mess); generic multiconductor cable you don't know which colors are adjacent, but the enclosed arrangement has a better chance of getting the right impedance (if you can resolve the arrangement, that is!). Flat flex if 2-layer can simply be an extension of the PCB, and would do excellently. – Tim Williams Jul 20 '23 at 15:49
-
@TimWilliams, ribbon cables have different pitch, and 0.025 cables have much more acceptable characteristics. Their plastics, however, is not so good and they have high frequency loss, so only short cables are usable (10-20cm) – Ale..chenski Aug 05 '23 at 08:44
Many laptops today use flat cables to do interconnect between mainboard and separate peripheral mini-boards with USB connectors. The flat cables can be designed to have shield/return ground (copper/aluminum planes) on both sides of the cable,
and ZIF connectors are used (image from Ali Express).
If the connection is not detachable, soldering a twinaxial miniature cable with diff impedance of 78-100 Ohms will do the job, like the cable used for SATA connection.
Alternatively acceptable results can be achieved using 0.025" flat ribbon cable, but you might need to experiment a little bit with measuring the actual differential impedance of your connections and keep it in 90-Ohm range. GssG or GsGsG wiring schema can be used.

- 38,845
- 3
- 38
- 103