Question USB issue using homemade cables

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
Hi all

First of all, I need to make it clear that I am not a PC savvy guy, my thing is that I am building a DIY home cockpit so that I can use a flight sim game. This uses various things including Arduinos, OLEDS, screens switches, all of which I have received assistance from other like minded people.

However this particular issue is one we are unable to understand so would like to seek assistance here. Essentially it is that the USB connection for one part appears to be acting in an unexpected way

My rig uses four Nobsound USB amplifiers to drive eight Dayton Audio bass transducers. I have a four port USB hub that connects to the for amplifiers, with a 24v power supply powering the amps, so they are not drawing power via USB, however I still elected to use a powered USB hub. All these components are mounted onto a dedicated module that fits into the back of the sim rig chair, requiring only one USB input plus mains power supply.

Where the complication for me has set in is where I have had to, for construction purposes, make the USB line in sections. This is due to the line having to pass through a console, then to the seat, and finally to the amp module. To make it in one piece would be messy and also leave the cable exposed to damage

First is a male to male USB A 3.0 cable from the PC (motherboard USB 3.0 socket), to a captive female to female USB 3.0 connector mounted on the front of the console.

A USB 2.0 cable with a USB A connector at the front then runs inside the console to the rear, where the wires have been soldered into a four way male G12 aviation connector mounted on a dedicated output plate (shared with the G16 connector for the mains power).

A short fly lead with G12 female connectors at either end then connects to the seat where an input plate again with a G12 and G16 connector for the USB and mains input are mounted. These then have internal fly leads to the power supply coupling and one last G12 connection for the USB, which is then soldered to the input lead for the hub. It sounds more complicated that it is, and when you actually see it it makes a lot more sense that my word salad above. It is also very neat, with minimal exposed wires

So the issue I have is that I connect it all up , and Windows duly recognises the four amps and it all starts working fine. Then about an hour later, the USB amps are no longer recognised, and disconnecting and reconnecting the USB connection does nothing, apart from sometimes, but not always, coming up with a 'the last USB device connected was not recognised'.

To test, I have rigged up a single USB cable that goes directly from the Motherboard to the USB hub input, bypassing all my home made wiring and this does not fail over time, meaning something about my setup is causing the issues. I have checked continuity, resistance, short circuits on all the cables I have made and cannot find anything wrong, meaning that something else must be at play. The fact that it works fine for a while in itself shows that the cables appear to be fundamentally ok in theory.

Can it be that too many connections can cause interference, or maybe pick up some interference from outside?

If anyone is able to give any pointers I would be pleased to try them

Les
 
As you'd expect, most XLR-type connectors are not rated for high frequency use as they are mostly intended for analog audio (microphone) or power transmission. There are some data-rated types that can meet the transmission performance requirements of Cat5e--but that only operates at 100MHz. USB 2.0 runs DDR so at 480Mbps that's 240MHz squarewave. USB 3.0 is more complicated as it's spread-spectrum but runs somewhere around 2.5GHz, which is why poorly shielded cables can interfere with wifi so badly.

Connectors and terminations not designed for high frequency use will have internal reflections which can interfere with the signal and severely reduce the usual USB reliable length limit of 5 or 3 meters. The solution is to use the proper rated connectors for your application. If you want ruggedness and the security of a locking plug then there are these:
 
  • Like
Reactions: LinuxDevice

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
try disabling usb selective suspending in power profile settings
press start, type "edit power plan", change advanced power settings, usb suspend settings -> disabled
View: https://imgur.com/ruQQu5k
Thanks, I'll give that a go - but would that also explain the 'USB device not recognised' message?
As you'd expect, most XLR-type connectors are not rated for high frequency use as they are mostly intended for analog audio (microphone) or power transmission. There are some data-rated types that can meet the transmission performance requirements of Cat5e--but that only operates at 100MHz. USB 2.0 runs DDR so at 480Mbps that's 240MHz squarewave. USB 3.0 is more complicated as it's spread-spectrum but runs somewhere around 2.5GHz, which is why poorly shielded cables can interfere with wifi so badly.

Connectors and terminations not designed for high frequency use will have internal reflections which can interfere with the signal and severely reduce the usual USB reliable length limit of 5 or 3 meters. The solution is to use the proper rated connectors for your application. If you want ruggedness and the security of a locking plug then there are these:
Understand, the connectors I am using were clearly designed for less specific use, however they do fit in very well with the look of a flight sim cockpit ;)

The total cable run is actually about 1.6 meters, so well below those length quoted, however I suspect that is using fewer, correct type connectors. The ones you show there are simply not available here (Qatar) and I have to use what is available locally, which is pretty limited unfortunately. However one point I noted is your differentiation of USB 2.0 vs 3.0 - the only reason I used any USB 3.0 hardware is because it was what I had, but the equipment used doesn't need it, 2.0 being enough. Is is possible that changing all the 3.0 parts and cables to 2.0 ones and using a 2.0 port on the motherboard that it would reduce the possibility of issues?

Les
 
If you plug it into a USB 2.0 port then the five USB 3.0-only wires aren't connected to anything anyway, so no need to remove them. Only the four USB 2.0 wires will be used, because the USB 2.0 port only has four contact pads in it.

It is already running in USB 2.0 because you have a USB 2.0 cable in there
 
Last edited:

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
So does that explain why it works for a while, then stops working? I'm curious as to the reason for that, I still have other bits and pieces to do so need to try and avoid the same trap

The other point is, are the USB 2.0 ports on the motherboard different from the USB 3.0 one other than the extra wires? Does a USB 3.0 port 'downgrade' the frequency etc to match a 2.0 setup connected to it?
 
There's only so much data corruption the drivers will accept before they decide something must be wrong with the device. "The last USB device connected was not recognized" means the host can see the voltage pulse from the VCC momentarily connecting through a 1.5kOhm resistor so knows something is there, but cannot enumerate the device (configure its speed and assign it an address).

USB 3.0 is fully backwards compatible and will first negotiate to the highest speed both ends support, then fallback to slower speeds if needed, even to USB 1.0 full (12Mbit) or low (1.5Mbit) speeds. It's still a USB 3.0 controller however, so uses its xHCI driver even at the lower speeds. A USB 2.0 controller uses EHCI drivers for SuperSpeed (480Mbps) and either OHCI (NEC) or UHCI (Intel, VIA) drivers for lower speeds. This is relevant because some hardware (including the hub) or drivers may be more tolerant or compatible with running out-of-spec or with some peripherals than others. But I assume by now you've already tried your USB A 3.0 cable in a USB 2.0 motherboard port.

The only two wires that matter are the middle two data lines on the USB A 2.0 connector--the other two are only power and ground which are probably insensitive to crosstalk or noise. Make sure there's no excess solder or wire anywhere along those two lines as that would cause echoes. Try slightly lengthening or shortening them, or moving them to different pins on the connectors. And avoid running those two lines too closely together or alongside any other wires unless they are shielded with foil tape (normally they are run as a twisted pair to reject external interference induced into both lines, even in flat USB cables). High frequency signals often do not behave predictably so it's going to take some trial-and-error to reinvent the wheel--look at how Cat6 cables (rated for 250MHz operation) need to be terminated and have a very strict minimum bend radius, plus the wires cannot be untwisted more than 13mm.
 

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
Thanks for the feedback. I did use old USB cables to make mine, on the basis that they were all colour coded and clearly were USB capable, plus some of them had plugs on one end saving me time. These all had either foil or wire braid sheathing and by sheer luck I chose to keep the cables as neat as possible so the ends soldered to the connectors were kept very short.

Yes, I did try the motherboard USB 2.0 connection, to no avail. I even tried connecting via the PCIe USB 3.0 expansion card in the PC, again with no success. Initially it worked, then after a half hour or so it stopped

I suspect I will have to accept a more compromised setup and put up with a less aesthetically pleasing solution. That also will compromise the modularity a little (we move a lot) but I see the drawing board beckoning!

Thanks to all that gave me input and help on this!

Les
 

Paperdoc

Polypheme
Ambassador
I can see two items that could cause your issue.

1. The G12 connectors. Clean signal propagation at high data rates is affected by the impedance of the entire communication line. Impedance is a frequency-dependant parameter, and can be considered as an "ideal" line that includes resistance, capacitance and inductance components all along that line. Any connector includes particularly some capacitance and inductance elements added to whatever the cable itself contributes, so using the RIGHT connector can be important in high-frequency (data rate) communication lines. In the case of USB cables and lines, the control system requires that signals sent out generate responses within a maximum time frame, and the actual response time can be delayed by a cable with excess capacitance and / or inductance. Failure to meet this response time limit will be considered a communication error. Most comm management algorithms allow for re-tries if an error happens and that often succeeds so the "problem" is ignored. SOME such systems keep track of how often such errors occur and will treat frequent errors, even those solved by re-tries, as permanent errors and shut down. This this type of problem MAY appear to be intermittent. It is possible that your system has enough of these impedance mis-match issues due to the connectors to cause your problem. Different connectors designed for USB2 or USB3 cables MIGHT avoid that. OR, NOT having those connectors at panels - using a continuous cable passing though a panel hole - might help.

2. Cable Shields. The USB specs for both USB2 and USB3 include the requirement of an overall shield in the cable that surrounds the wires in it. This is in addition to the shields around individual twisted pairs in the USB3 system. The overall shield is supposed to connect the metal outer shells of the connectors at each end of the cable, and is a separate connection from the Ground lines in the cable. The shield prevents pick-up of noise signals in the cable data lines from external sources in the vicinity of the cable because those noise signals can alter the information in the data and result in communication errors. Some low-cost cables simply do not have this outer shield, or may have a shield that is NOT connected properly to the exterior shells at both ends. Further, even if the shield is present, the USB specs require that the end-to-end resistance of that not exceed 0.6 Ohms. Now, that can be very hard to measure for any home DIY person, so checking that on YOUR cables may be difficult. Sometimes the only solution IF that appears to be the issue is to go buy an expensive "premium" cable in the reasonable hope that it WILL have a proper shield in it.
 
Last edited:

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
Firstly, I can definitely say that having a commercial USB cable running from the PC directly to the USB hub does work fine, so I am certain that my DIY wiring is the issue. My issue is that having that setup causes me other headaches due to the design of my sim rig (shame I can't post a picture ) so I am willing to try to make this work

With regards to the cable shields not being grounded to the connectors, I can definitely say I missed that

As I mentioned, I cannibalised some old USB cables to make my DIY items. Looking at the leftover bits, I can see that one (which looks like it was a printer cable as it has a USB B connector attached) has the four wires surrounded (wrapped around) by a plasticised metal film, and then that is surrounded by a braided wire sheath, with the insulating polymer around that.

The other type, in addition to the metalised film and braided sheath has a non-insulated multi strand copper wire that is on the outside of the braided sheath. That came from a Male USB A to Male USB A cable I purchased to make the dedicated Amp connecting wires.

If I read your post correctly, I can try and redo the cables using the latter type, and make sure that the copper wire is contacting the body of the connector at each end. I know there is no guarantee but for the sake of 30 riyals (about $8) I can get more of those USB cables and retry the setup making sure that each of the cable terminations have the ground wire correctly attached.

I know there is no guarantee that this will work, but for the small outlay and a bit of work on my side I can at least test it. It might work, but if not a lesson learned

***EDIT***

I will have to find an effective way of connecting the ground line onto the panel mounted male connectors, they are not designed with that facility in mind

Les
 
Last edited:

Paperdoc

Polypheme
Ambassador
If you try to adapt that first type of cable, you may be able to solder a short bare wire to the braided sheath, then to the connector metal sleeve. Just ensure the wire you use is not teeny thin - apparently that is one flaw some people report in cheap cables. I agree the second cable type already has a good wire you can use to make the connection at each end.

At the panel-mounted connectors, the connector bodies are metal as I recall. One way might be to add a simple bare wire soldered to the cable braid (or existing bare wire) and long enough to turn "backwards" to run outside the cable and out of the back of the connector so it is exposed, then turn it and solder to the connector body. That makes the whole connector body an extension of the cable shield, and connected through the panel to the other connector's body. If possible (assuming the panel itself is metal), ensure the panel is connected to a solid true Ground so any noise signals are re-routed away.
 

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
I have made some tabbed washers from 0.025" brass sheet that I can use to solder the copper wire to. However the mounting is MDF and acrylic sheet, so there is no connectivity there.

What I can do is make another thin washer to fit behind and then connect that to a common ground rail that services the RS485, 12v and 5v busses in the console, is that worth doing?
 

Paperdoc

Polypheme
Ambassador
Sure, so you'd just place the washer between the non-conductive panel and the connector metal body and plan that contact pressure of the tight mounting would provide good grounding of the connector body. Seems OK to me. IF you had a multi-toothed lock washer of the right size for that connector body, put that in there, too, as a scratchy surface to bite into the metals and guarantee good contact.

By the way, my favourite way to make a circular connector tab is to get a flat washer of the right size for that hole or bolt and large enough outer diameter and just drill a small hole near the edge to insert and solder the wire. That may not be suitable for the large diameter connectors you have. Besides, you already have some custom -made.
 

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
Actually, it will be pretty easy, I can machine some blank PCB to make it like a washer with a breakout pin and solder on some headers

***EDIT*** it was easier than that, the answer was staring me in the face - I drilled and tapped the washers, I can make eyelet connectors for both the USB ground and the other ground connectors
 
Last edited:
  • Like
Reactions: Paperdoc

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
It took me longer to get all this done than I thought, including reversing two of the wires on one of the new cables that had me scratching my head a bit.

The good bit is that, as of right now it all seems to be working. I am going to have to leave it all connected for a while, as with the old set up after an hour or so it would stop working, So far, after an hour of connection it is still OK so fingers crossed.

The negative is that the original USB hub is clearly not going to be good enough and the powered hub I substituted in the original round of troubleshooting will have to stay, which means a redesign on packaging, The original hub packaged very neatly, but I just need to design around that.

Changing the cables obviously made the definitive difference, but nonetheless it is clearly sensitive to the quality of the USB hub. The original is a cheap USB 2.0 version that you could attach a 5v supply to, but the current working one is a switched 7 port 3.0 version that has a 12v power supply. The fact that it is switched is a pain, as I will need to make the switch accessible until I can source a non-switched version, or grow a double jointed wrist to get my hand in to where it will be

Anyway, progress, so thanks once more to those who gave their input

Les
 

Paperdoc

Polypheme
Ambassador
Glad to hear of success. Just a few notes to help understand.

Access to the switches on the newer Hub should not be a problem. Those switches really are only for use when you NEED to disconnect a device because it will not be used for a long time. There is no problem with leaving a device connected (that is, switch left on) and just not using it.

USB Hub power supply is a little more complicated but not likely to be a problem now. The first issue is the version of USB. The older USB2 hub can supply only 0.5 A max current per port, assuming even that its power supply module can do that. The newer USB3 Hub should be able to supply up to 0.9 A per port. ALL of that is always at 5 VDC. You have noted that the power supply modules included have different VOLTAGE ratings, and that's confusing. What is actually happening in the newer USB hub is that the HUB itself is converting the 12 VDC power it gets from its module into 5 VDC output to its ports. So we need to start working in WATTS of power, knowing that the VOLTAGE is always 5 VDC at each port. One port at 5 VDC and a max of 0.9 A means a max of 4.5 WATTS of power. So the total power available from ALL the output ports of the Hub should be 4.5 W times the number of ports IF all ports will use the max power. Usually some connected devices do NOT need that much, so the power module supplied usually is NOT rated that high. Also, many Hubs include CHARGING ports that can supply higher power but no data transfer, and those require more power from the supply module. But if YOUR use is the standard data ports only, that is not a factor. So, for example, if you are using six USB ports on the USB3 Hub. and each device does use close to the max of a standard port, the power supply module would need to supply 6 x 4.5 W = 27 WATTS max. At 12 VDC output from that module, it would need to be rated for 27/12 = 2.25 A max. That's the sort of calcuation involved.

Congrats and enjoy!
 

lesthegringo

Reputable
Oct 29, 2020
11
1
4,515
This particular USB hub is switched off by default so if it has been depowered, it remains off until you press the switch, which is a momentary press button rather than a bi-stable rocker. I need to find one either unswitched or with a latching type switch which will stay 'on' even when depowered. Trouble is the lack of choice here, so let's see what I can find

Les