1
\$\begingroup\$

I am trying to pass a USB connection through a USB-controlled relay bank so that my computer can switch on and off whatever device is plugged in at the other end, past the relay bank.

At the moment, I am just testing whether I can get a USB signal across at all, without the relay bank, and I cannot. I have a PCB with a pre-mounted mini-USB female with a "fan" of 5 soldering points (where I only use GND, D+, D- and VCC, so ID is not connected.) The PCB was bought as one unit, and so should be above suspicion. I will call it X.

At the other end, I have a standard type A female socket with soldering ears, which I shall call Y. I connect the two with 4 ordinary wires (insulated, about Ø0.5 mm.)

Then I use an ordinary USB cable, standard USB oin one end, mini-USB on the other, plug it into my computer on one end, and into X at the other end. Then I plug a memory stick into Y.

This, I had hoped, would trigger a response in my Windows computer, showing the contents of the memory stick. Instead, I get the message "Do not recognize USB unit" (translated from Norwegian.) If I plug the memory stick directly into the computer, it works fine.

To get the wiring correct on the large female socket, I consulted this youtube video

At 5:55, it shows where the different cables go. I have tested the connections end-to-end with a multimeter, finding that all connections work, and there are no shorts.

Could it be that the +- 15 cm of unshielded, plain, separate-cables connection between X and Y allows for enough interference so that the signal gets garbled?

\$\endgroup\$
3
  • \$\begingroup\$ Welcome! Please post schematic and layout. How are you impedance matching your USB? \$\endgroup\$
    – winny
    Apr 6, 2023 at 11:05
  • \$\begingroup\$ Thanks. As noted in my comment to the answer belog, I am probably way out of my league here. So, my answer to your question is "I am not". \$\endgroup\$
    – Tafle
    Apr 6, 2023 at 11:20
  • 1
    \$\begingroup\$ @Tafle There's your problem then. USB 2.0 needs to be impedance matched to 90 Ω differential, give or take a bit, to get a connection. You might be able to get a USB low speed device (like a cheap USB keyboard with no fancy features) to work over that link, but anything that tries to use full speed, let alone high speed, is going to have problems. \$\endgroup\$
    – Hearth
    Apr 6, 2023 at 14:18

1 Answer 1

2
\$\begingroup\$

Yes, it is definitely possible that 15 cm of completely incorrect medium not intended for high speed signal transmission will make it not work properly.

Other possibilities also exist, such as incorrect wiring. Maybe data wires are swapped.

\$\endgroup\$
7
  • \$\begingroup\$ While I do sense a slight irony in the answer, the answer itself is very helpful, since I am (obviously) completely clueless about the finer points (as well as the coarser points). I'll try shortening the cables, twisting them, and wrapping them in aluminum foil as soon as I can get some. \$\endgroup\$
    – Tafle
    Apr 6, 2023 at 11:16
  • 1
    \$\begingroup\$ Just get USB cable for USB use. Having random wires twisted together and wrapped in foil still does not give you a cable with specifications for USB use, it would still be something random. \$\endgroup\$
    – Justme
    Apr 6, 2023 at 11:21
  • \$\begingroup\$ Good point. When all else fails, do it the right way. \$\endgroup\$
    – Tafle
    Apr 6, 2023 at 11:30
  • 1
    \$\begingroup\$ Anyway, shortening and twisting the data cables helped. So until I can get some proper cable, that helps me along. Thanks for your comments and advice! :-) \$\endgroup\$
    – Tafle
    Apr 6, 2023 at 11:57
  • \$\begingroup\$ Also, I hope you are not trying to switch all four wires through relays. Generic relays are not intended for high speed data signals, so you should not do that. USB also is not intended to switch data and power lines at the same time either, that's why data lines are shorter on USB connector so power lines connect before the data. Also the connector shell mates first to equalize potentials. Basically, you are doing things that should not be done with USB. \$\endgroup\$
    – Justme
    Apr 6, 2023 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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