Home made KVM switch


I was kinda getting tired of manually moving my keyboard and screen from one server to the other to check stuff, so yesterday I decided to build my own KVM switch. Most of the times I’m not typing from the actual systems, but use Putty to connect remotely from my PC, instead. However, when I do have to use the server-side keyboard and screen, it’s a pain in the ass to move the cables from one server to the other, awfully annoying and extremely time consuming. I was planning to do this for a long time, but I always postponed it, until I thought “well, enough is enough, I’ll do this TODAY”.

The approach was very simplistic. I only used a bunch of relays, and that is all there is to it. 9 relays, to be exact. I had 6 simple, single-contact relays lying around, I used those for the video RGB signals (3 color signals, each with it’s own ground, so 2×3). Then I needed 6 other wires to be switched, 2 video synchronization signals for the display (horizontal and vertical sync) and 4 wires for the keyboard. Theoretically, you would need only 2 of them to be switched for the keyboard, as the other 2 are only power connections (+5V and GND), but I wanted to be sure it works, so I switched all 4 wires of the keyboard. I used 3 extra relays, this time double-contact, one of them for the 2 sync signals for the video, and 2 more for the 4 wires of the keyboard.

I power it up using an old cell phone charger, and do the switching using a power supply on/off button that I mounted on the display:

kvm_button kvm_general

The green connector you see is actually used for one of the keyboard ports. Remember kids, this is a linux environment and we don’t need a mouse. Real men don’t click.

It looks nothing like the beast at the beginning of the article, but it’s simple, cheap (did it for around 5$), and it works. I don’t really consider a diagram would be of any help, as this is the simplest thing you can possibly imagine. It’s just a bunch of relays all powered up together, switching from one side to the other. I think the picture with the board will be enough. It is actually more difficult to prep all the cables and connectors, figure which wire is which etc.

By sinekt

5 comments on “Home made KVM switch

    • I just never thought of drawing a diagram for something so simple, you just pass the wires through relays. But if you want me to, I’ll draw it, won’t take long.

  1. The wiring is very simple, you just pass each wire through a relay and that’s it. So, yes, the grounds are independent. I tried to keep everything simple and avoid any problems, and for how much a simple relay costs, it’s just not worth the trouble.

    I power up the thing with a 5V phone charger, using a simple power supply switch that I incorporated in the LCD Display (when the switch is off, there’s no power, and the relays connect to computer 1 and when the switch is on, the relays power on and switch everything to computer 2).

    Also, you could use multiple-contact relays to reduce the component number, but simple, one-contact relays are so cheap that it’s really the best option.

  2. This is incredible work! I’m looking to do a similar project, but am having a difficult time getting started. DId you create a bus for all the ground(s) to connect to, or are they handled independently? Would you mind sharing a wiring diagram?
    Again great work! Thanks for sharing.

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