Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Computer Accessories Switcher

Not open for further replies.

Electric Rain

New Member
Hi, I'm in need of help for something... I need to build a switch for my computer, that will let me switch from a set of Computer Accessories, to a compleatly difererant set. I need to be able to flip one switch and have my computer be using a differant monitor (Standard 15 pin VGA), mouse (Stardard PS/2), keyboard (Standard PS/2), and a pair of speakers (STEREO of course). How could I build one of these? Thanks a lot, :)


Edit: And if it matters, the cord to go to the other set of accessories only needs to be about 10 feet long, and the switch needs to be at the end of the cord that all of the jacks for the secondary set of accessories are.
It's very simple, but complicated at the same time. You need a mulitipole two way switch.

The chances of finding a mechanical switch are pretty slim, so you will probably have to make an electrical one. It would probably be as well to do each section independently,

You could do it using relays, CMOS switches, or even plain FET's - the complications come from the large number of switches you require. For the power to the keyboard and mouse you may need to use relays, or switching transistors, CMOS switches may not be able to pass enough current.
It's really no problem at all -- simply buy a standard PS/2-type KVM switch and add in a circuit for the speakers. You only need to switch two wires -- the right and left channel leads; the common can be left connected to both system units at all times.

Here's what you'll need:
-- 1/8" mini-stereo jacks panel-mount style (3 needed)
-- 1/8" mini-stereo male to 1/8" mini-stereo male patch cords (2 needed)
-- 1N4002 diode (1 needed)
-- 5VDC mini PCB relay (1 needed -- see below)
-- hook-up wire

Mount the three 1/8" mini-stereo jacks to the switch housing. One of these will be used as the "out" to the speakers; the other two will be for the "in" lines from the two system units. wire the common (shell or ring) terminals of the three jacks to each other. Wires from the remaining two terminals of each jack will go to the relay as described below.

Switching can be accomplished fairly easily using a 5V DPDT miniature relay such as the G5A-234P-DC5 (sealed) or G5A-237P-DC5 (vented) from **broken link removed**. Both are stocked by Mouser. This relay has a 125-ohm coil, drawing about 40mA for operation, and is designed to switch very low signal levels.

Each set of relay contacts will have a C (Common), NC (Normally Closed) and NO (Normally Open) terminal. For each set of contacts, the C terminal will go to the speaker, the NO terminal will go to the appropriate channel of the less-used system unit, and the NC terminal will go to the appropriate channel of the more frequently used system unit.

The relay coil will get connected to Pins 4 (+5VDC) and 3 (GND) of the PS/2 Keyboard port for the less-used system unit, and a 1N4002 diode should be placed across the relay coil, with the cathode to the +5VDC side. The diode is there for anti-spike protection, intended to shunt current induced by the collapse of the relay coil's magnetic field. This is necessary, so don't leave it out! The relay can be mounted to a convenient location inside the switch unit housing using double-sided mounting tape or hot glue.

What this circuit does is provide relay switching of both audio channel signal lines from the two system units simultaneously. When the KVM switch is set to the position of the more frequently used PC, the audio signals flow through the NC & C terminals of the relay, thus going from the input jack for that PC to the output jack. When the KVM switch is then set to the less-frequently used PC, the relay coil is energized by the +5VDC now being available at Pin 4 of the PS/2 keyboard port for that unit, causing the relay contacts to shift from the NC-C pairing to the NO-C pairing, and allowing the audio signals to be routed from the opposite input jack to the output jack.

I have built many of these for customers, and they work very well. If you need further information how to wire this, post back... :)
Use a QS3384 10 bit bus switch for the VGA
**broken link removed**

At +-5ohm's per switch you hardly notice it.
It's far better then using relais, VGA is a very delicate signal, relais contacts degrade, and the capacitance of the relais make your image degrade, especially in higher resolutions.

I've got this idea from an old Voodoo 3D accelerator card wich used this chip to switch between 2D card and 3D. The results are quite good.
:? :( Wow, I'm sorry ChrisP... You typed all of that up for me and I guess I wasn't specific enough... :oops: I think you got the impression that I needed to be able to use the same keyboard, mouse, monitor and speakers with multiple computers... I only have one computer, and I have 2 sets of accesories (keyboard, mouse, monitor and speakers) that I need to be able to switch between. I'm sorry, do you get what I'm trying to say? :?:

Anyway, if I'm not going to switch everything all at once with one switch, then I can do this:

The monitors do not need to switch between each other, they can both be on at the same time and it won't make a bit of a difference. For that, can I use this circuit?: If someone can verify for me that this circuit will work, then I'll be using this for the monitors. :)

As for the speakers... there are a thousand different ways I can do this. Different things I can buy and/or build. But what I think I'll do for these, is use a DPDT switch to switch the left and right channels from the computer back and forth between the two sets of speakers. And like ChrisP said, the common can stay on both. So actualy, since I'm switching between two sets of speakers, and not two computers like ChrisP thought... I can just use an SPDT switch to switch the common back and forth right?

Therefore, my main problem now is just the mouse and the keyboard. So can I just switch the power line between the two mice and the two keyboards? Or should I switch a different line like the ground? I'm pretty sure I can just switch one line on both the keyboards and the mice and disable one of them because they only have 5 lines, but I'm not sure which line it should be.

So my questions now are: 1. Will the monitor circuit work? 2. Can I switch the common on the speakers by using an SPDT switch, or should I switch the left and right channels by using a DPDT switch? 3. What line should I switch off for the keyboards/mice?

Only 3 more questions and I'll have it figured out! :D Can anyone answer them for me? Thanks again everyone!


P.S. Sorry again ChrisP!!! :oops:
Not open for further replies.

New Articles From Microcontroller Tips