Modding a mechanical USB switch to control it via serial/USB

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
shawly
 
Posts: 1
Joined: Wed Sep 16, 2015 5:58 am

Modding a mechanical USB switch to control it via serial/USB

Post by shawly »

Hello people, I want to mod my USB switches to control them via my home automation system on my Linux homeserver. I hope I'm in the right subforum for this, but since I need a microcontroller for this, I guess I'm right?

Requirements

I have three mechanical USB Switches from Delock.

One of them is for switching my keyboard and mouse between my PC and my XIM4 adapter for my gaming-systems.
One is for switching the XIM4 adapter between my four gaming-systems.
And the last one is for switching my Xbox 360 Controller between my PC and my HTPC.

So what I want, is to be able to switch these switches with my home automation system, that's I need to mod them, so I can switch the inputs via my home automation system which is based on Linux. For example that if my Xbox turns on, my home automation recognizes that the Xbox is turned on and it automatically switches the inputs of the second switch to input 1 which is connected to the Xbox. Or if my HTPC turns on, my home automation system recognizes this and it automatically switches the third switch to input 2 which is connected to the HTPC. I hope I explained it properly, the thing I need to be able to is control the switches via USB so I can send the signal via a shell script or whatever.

Why not use the GPIO pins of the Raspberry?

There are two reasons, one is the price of a Raspberry, compared to a simple controller. Second is, I would need one Raspberry for each USB switch or else I'd have to use really long cables for each switch to the RPi since they are located at different places in my room. So putting the controller into the case of the USB switch, which has plenty of room if I desolder the switches, is much cleaner and more convenient and also cheaper.

Why don't you use a KVM switch with hotkeys or a console switch with a serial port?

Hotkey KVM switches are not possbile, since the only switch that has a keyboard connected to it, is the first switch, the other ones don't have a keyboard connected which means I can't use the hotkey shotcuts to switch inputs.

Console switches are inconvenient because they are too big, way too expensive just for this purpose and they need 230V but I don't have any sockets left behind my TV. So nope..

There is only one USB switch which can be controlled via serial and this is the Extron SW4 USB Switcher, but I can only find it on ebay for the price of a console switch and it's also pretty big and needs 12V so I can't use USB to give it the power it needs. Also nope..

Switches that can be controlled via software are also a no go, except if you can show me one that is Linux compatible without hacking my own software and has a good quality, because most of the reviews on Amazon show that they are low quality.

The only possible alternative

Since it could be difficult for a newbie like me to mod my mechanical switches, it would be possible to mod this USB switch, someone on reddit said, I could replace the buttons with transistors and then control the switches, but 30 bucks per switch are a little expensive, so I want to give modding my current switches a try first.

Problem

With my current knowhow it's not possible to mod the mechanical switches on my own, so I need some help for doing this.. I opened one of my switches and made some pictures of the PCB, here it is: http://imgur.com/a/plZJP

Someone on reddit also said for my current switches I'd need relays to switch the inputs, sorry for the dumb question, but why?

Can someone help me with this and give me some hints on how to accomplish my mod and what parts I need for this?
I can solder and I think I have the right state of mind to understand what I'm doing, but I currently don't know what I have to do, that's the problem.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Modding a mechanical USB switch to control it via serial

Post by Franklin97355 »

Your first task is to take one of the switches apart and see what kind of switch it has and how it is connected to the circuitry. Truthfully I don't see this happening for less than $30 each.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”