DIY USB sharing hub

USB sharing hub

Local shops wanted close to $100 for a mechanical USB switch, to share a USB keyboard and mouse between two computers. I accomplished the same thing with a cheap compact USB hub, an old keyboard and a 3 pole switch for less than $10.

The keyboard is wired to one of the USB hubs ports, the 3PDT switches the hubs two data lines plus the 5v+ rail. In an ideal world, the ground and shield should be switched too, but I only had a 3 pole switch and limited room.

DIY usb hub sharing switch diagram

I decided to put the hub inside the keyboard to reduce clutter, fitting everything in was the hardest part of the project, and not something I’d do again.

It works beautifully but there is a 10 second lag when switching to a Vista machine while it searches for the drivers for the mouse and keyboard, but it’s still easier than swapping the keyboard plug between machines.