0
\$\begingroup\$

I am creating a custom dual female USB Y cable for a hardware modification project in a USB mouse. I have the wiring set up as shown, is it correct?

RED, WHITE, BLACK, GREEN, THICK BLACK from female 1 are all connected to male 1

RED, WHITE, BLACK, GREEN from female 2 are all connected to the middle of the wire of female 1 to male 1 making a connection and insulating the wire so points don't touch.

to my knowledge

Green - D+ White - D- Black - Ground Red - Positive Thick Black - ?? Extra ground??

Will this work if I have a usb mouse in one end and a flash drive in the other

\$\endgroup\$
  • 3
    \$\begingroup\$ I wouldn't call any configuration where you split D+ or D- "correct". \$\endgroup\$ – Wesley Lee Aug 30 '19 at 22:53
  • 2
    \$\begingroup\$ duplicate \$\endgroup\$ – andre314 Aug 30 '19 at 23:32
5
\$\begingroup\$

No. USB connections are point-to-point with a computer or hub on one side and a peripheral on the other side. It's not going to work if you have two peripherals connected together to a computer on a single port.

If you don't have spare ports on your computer you can use a hub and connect the mouse and the flash drive on different ports of the hub.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I have a usb hub that does this, why can't mine do it either? \$\endgroup\$ – Abdel Seaf Aug 30 '19 at 22:57
  • 3
    \$\begingroup\$ @AbdelSeaf I don't believe that your hub simply connects the white and green wires. It won't work. \$\endgroup\$ – Elliot Alderson Aug 30 '19 at 23:02
  • \$\begingroup\$ My understanding is that you're proposing to connect the same D+ and D- wires to both the mouse and the flash drive, please correct me if I'm wrong. The USB interface was not designed for this scenario. The hub is a somewhat complex active device that takes two point-to-point data connections and channels them into a single point-to-point connection with a computer or another hub upstream. \$\endgroup\$ – joribama Aug 30 '19 at 23:03
  • \$\begingroup\$ @joribama Yes, the mouse will running off the same cable just the cables from another usb are conjoined. Can you recommend something like an arduino nano or a dijispark to help me with making a hub? What would be the consecuence if I did it? Would it not work or will there be data issues? \$\endgroup\$ – Abdel Seaf Aug 30 '19 at 23:10
  • 1
    \$\begingroup\$ @AbdelSeaf Something like an Arduino would make a very, very slow USB hub...if it worked at all. If you insist on building one, look for an IC that is designed for use as a USB hub. \$\endgroup\$ – Elliot Alderson Aug 30 '19 at 23:15

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