Remote-controlled USB switch

When [beerninja] wanted to swap his USB keyboard from one game console to another without mucking about with wires, he asked the Hack A Day forums for some help. [Meseta] (AKA [UAirLtd]) came to the rescue and built [beerninja] a remote-controlled USB switch.

After opening up a no-name USB switch, [Meseta] discovered that the switching is done with simple relays and switches. A hugely overpowered Forebrain ARM dev board was used to pull each switch low for a few hundred milliseconds to switch the output USB port.

For the infrared remote control, [Meseta] dug into Lady Ada’s IR sensor tutorial and decoded buttons 1 through 4 on a Sky TV remote. Each button from one to four corresponds to the buttons on the USB sharing switch. The ‘0’ button was also decoded as a convenience to put the Forebrain into its reprogramming mode. After drilling a small hole for the IR receiver, the finished project was stuffed back into the original steel enclosure.

Check out the video of the switch in action after the break.

Comments

  1. insapio says:

    Fairly elegant. Especially considering it all fit back in the original enclosure.

  2. Chris says:

    The Ken Shirriff library mentioned in the article is the much easier way to handle IR signal, IMHO. Just create an instance of the IR receiver class, and you’ve got a real simple way to retrieve and handle codes without needing to worry about pulses and pulse length.

    I built a remote control model rocket launcher with the same library. It made decoding the two dozens buttons that I needed quick and painless.

  3. atomsoft says:

    This is awesome but that using a Forebrain Cortex M3 dev board is definitly a OVERKILL. You could recreate this with a small PIC micro. I would say … PIC18F14K22 which cost $2.20 at digikey

    With a custom PCB i would say about $8 USD total give or take a few bucks…

    That USB Switch cost $16

    http://www.ebay.com/itm/4-Port-USB-2-0-Printer-Scanner-Auto-Sharing-Switch-Box-/190555443405?pt=LH_DefaultDomain_0&hash=item2c5dfd50cd

    So i would say about $25 total cost for this…

  4. Bogdan says:

    I thought such switches used something more elegant than relays. Now i know that it is easy to make one.

  5. raidscsi says:

    A cheap product uses relays, and it shows. A higher end USB KVM will emulate the host USB devices including monitor to the non selected PCs. Would not trust this with any storage devices.

  6. MoJo says:

    I did something like this a couple of years back, but fully isolated so that it could safely switch mains voltages. I must get around to documenting it.

    USB isn’t easy to isolate so instead I used RS232. My server has two serial ports as headers on the mobo. I used opto isolators for the RX and TX lines, and the ground is not connected at all. As a bonus the opto isolators do level conversion to TTL for the microcontroller, and are powered on the PC side from the serial port itself.

    A made a little command line program to control it is I can use it in scripts. I have a USB HDD that is fully disconnected from the mains and USB when not in use, so even a severe power spike from lightning wouldn’t be able to damage it. Plus it saves power when not in use by eliminating standby mode.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 94,652 other followers