1
\$\begingroup\$

As a follow-up to my other question: what components I could use instead of a 4PDT switch to create the desired effect of switching a USB device such as a keyboard between two systems? I'm new to electronics and am seeking some solid basic information.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ You can't use switches or relays for this. \$\endgroup\$
    – Ron Beyer
    Jun 2, 2020 at 2:42
  • 1
    \$\begingroup\$ Dan, connectors are designed to do this... when switching, you want to remove D+ and D- first, then \$V_\text{BUS}\$ and GND. Then you want to engage first GND and \$V_\text{BUS}\$ on the switched-to system, followed by connecting up D+ and D-. It should be in that order. At no point in time should any of this even momentarily connect any of the four wires from the switched-away system to the switched-to system. And power must the last to be removed, and the first to be connected up. I would use relays and a cheap MCU for this. \$\endgroup\$
    – jonk
    Jun 2, 2020 at 2:53
  • 1
    \$\begingroup\$ @ron yes you can. Usb 1.1 is incredibly forgiving. \$\endgroup\$
    – Passerby
    Jun 2, 2020 at 4:25
  • \$\begingroup\$ Indeed mechanical switching can work, I have the 4-port version of this one: amazon.com/Selector-Switch-Printer-Keyboard-interface/dp/… and it works just fine to use mouse + keyboard with up to 4 PCs. OP: why not simply buy one of those? \$\endgroup\$ Jun 2, 2020 at 7:08
  • 1
    \$\begingroup\$ CD4066 & CD4051 transmission gates could (probably) be used as electrical switches. These are bidirectional switchable channels. Current levels and possibly bandwodth MAY be issues. Asl for more on these if of interest. \$\endgroup\$
    – Russell McMahon
    Jun 3, 2020 at 11:50

1 Answer 1

1
\$\begingroup\$

There are dedicated ICs designed for proper usb slave switching. While usb is complex, you can often get away without all the extra passives and esd circuitry, just make a pcb with tight control of the usb data pairs. The USB switching ICs will come with datasheets that show typical application schematics and you can get the board layouts from the demo boards. Without looking into a specific one, google usb switching ICs and demo boards. Read the datasheet for a good rundown of what needs to be done. You may also need a power switch. And some time with pcb design software and a pcb manufacturer. It's a bit of an endeavor.

\$\endgroup\$

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.