Automatic USB 3.0 Switch

,

I have 2 host devices and an USB hub, an want the hub to be automatically connect to whatever device is active (only one of them is active at a time). I haven’t found any ready made product.

My plan now would be to use one with I/Os that can electrically switch and use something like one of these Raspberry microcontrollers that can emulate a USB device on both devices to see which one is active and send a signal to the switch accordingly.

Has anyone any alternative solutions or maybe knows of similar projects or has experience with those microcontrollers?

1 Like

I have only seen one auto-sensing before and it was not reliable at all.

Synergy comes to mind, which is software that acts like a KVM, but I haven’t tried it out for a looooong time.

OOOOOR get Wendel’s KVM :wink:

Nah don’t want a software solution, wouldn’t work anyway as only one of them is (physically) on at the same time. Plus just putting software on your work notebook, generally not a great idea. KVM would probably work, but is like way overkill for what I need (and pretty expensive). Really only need something to switch USB 3.0.

Best thing I have found right now is something like this: USB Switch but nothing I could readily buy. My idea was to get 2 of these: Raspberry Pi Pico series – Raspberry Pi and do some custom detection with them. Maybe I could get grub to signal it to switch for the desktop and for the laptop maybe I could read whether power is delivered or something like that (I’d have to check my hub though, whether it’s constantly supplying power). It should be able to emulate things like USB HID or Storage devices, so that sounds reasonable.

Worst case I could maybe just use the Power LED of the desktop and switch to the laptop every time it’s off.

You’re right my fellow Alman, way overkill, sorry! Respect for even finding the biamp switch. I would keep the USB cables as short as possible though.

PS. Is your did you edit the MATE logo to be your profile pic?

This might be overkill, but I got this type c display and usb switch recently

Using my monitor’s built in usb, I can switch between my desktop and my laptop passing through my keyboard, audio interface, mic, and speakers when I push the button. With USB C connection, the switch, and my monitor’s built in usb ports I effectively have a kvm

Though it sounds like you already have a plan with the picos. If you do go for the raspberry pi solution, you could use pikvm as your software

Nah, I don’t need to switch display stuff at all, the monitors just Auto-Switch. They also don’t have USB-C in. And the Pis (and they are just microcontrollers, not full Pis) also would just detect whether a device is active.

Still want a PI KVM though one day, if can ever get Pis again. Just might be difficult with the multi monitor setup. Just not the right tool for this problem though.

Kinda can’t keep them that short, need 1m or so to the PC (laptop only need very little to the TB dock though), but USB 3.0 shouldn’t require that much signaling precision, it’s only 5Gbps. And I’d need a switch that I can actually just buy… Also just found out that the Laptop dock only outputs power on USB when the laptop is on, so I might just be able to keep it switched to the PC, as long as the laptop is off. Maybe with a single MOSFET I might even be able to do it fully electrically as long as I get some proper voltage indications on that switch and don’t mess up the USB power measurement.

Also starting to think that I just need to buy one with 2 buttons and take a saw to it… Buttons are just manual transistors after all…

PS: Yes it totally is. I like the color, it did work at the time with the C and it was available as SVG. Should probably switch though, I may not strictly adhere to the license…

Sorry bud, I’m a real stub, and just have a long USB cable from each of the hosts, and the hub strapped down,. I literally just plug in the machine I want to have the hub…

I have a USB2 push button kvm, but wanted a little more bandwidth.

And if I am in hands reach of my keyboard, I’m in reach of the hub…

Well that’s exactly my current solution. But I’m lazy and want to save those 3 seconds every morning. Also I want those cables not on my desk anymore (which would be a huge problem with the push button, it would need to be accessible).

1 Like

I mean you could buy a usb switch and just plug your hub into the switch. Some include remotes

Well I still need to remember to press a remote for that. And then I have a remote lying around… I’m not doing it with the cheapest or easiest or practical solution, already have that, but I want to do it because I can and because it’s cool :slightly_smiling_face:

My current solution is pugging a hub prom one extension into the other, takes like 3 seconds. It’s a classic first world problem. (It’s the same reason I’m currently working on getting aluminium plates to pass the thunderbolt through my desk and not around the edge and why I got a square USB hub that I’ll try to fit into the desk vertically. The goal is to only have one mouse pad and cables for my mouse and keyboard on my desk.)

You know that just reminded me of this setup I saw a while back

This guy was wirelessly controlling his display, volume, window tiling, room lighting desk height, and usb hub with just a server he hosted on his desktop, a macropad and a bunch of small compute devices tomanage all the signals.

You could probably adapt what he did with the usb switch, but add in some logic to check if there’s a electrical signal for when a usb is plugged into a hub port, automatically switch to it

2 Likes

Yeah that’s pretty much what I want, just switch the keypad for some automation and done. Will have a look at it in the evening.

1 Like

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.