switch to connect devices

Im new to arduino and circuit development so please forgive me for not being up on the lingo, or if this is a dumb question (yes i have googled for it but im not even sure if im searching for the right thing)

I have several devices that are accessed by a serial console cable and I would like to create a switch that connect each device together dynamically

Some things are sensors that connect to a server, but i want to change the server it is connected to for testing, which is why i want to be able to connect any device to any device.

Im just not sure what to use, is there a single chip that can handle switching like this? do i use relays or transistors?

here is a example of what im trying to accomplish

device 1 to device 5 device 2 to device 6 device 3 to device 4 or dev 1 to dev 2 dev 3 to dev 5® dev 4 to dev 6

thanks for your help

The answer, as always, is "it depends what you want to do and spend".

"several" is a bit vague.

Is this just a test jig that will be scrapped after use, or something you will use again and again?

Relays are probably cheapest and easiest but for large values of "several", their numbers can get unmanageable.

Is it literally "any device to any other device", or is there an underlying hierarchy?

Depending on signal levels, you may be able to get away with analogue switches.

devices that are accessed by a serial console cable

I assume that these are RS232 level signals we are talking about. One thing to consider is if it is just the signal lines (TX & RX) that need connecting or is it the handshaking lines as well. If so is it all of them because it then gets complex.

Anyway the best bet would be to take the signals down to TTL levels with a MAX232, do a cross point matrix switch and then back up to RS232 levels. Then you can route the signals by controlling the switches on the matrix.

You can get matrix chips, it's the sort of thing they use for telephone exchanges, or you can build them out of analogue switches like the 4066.

For each signal you will need a plane of a matrix switch.

Just a warning, this is not an easy project, I would advise you draw everything out before you try buying anything. The trick is remembering that an output can be connected to many inputs but an input can only be connected to one output.

You got me thinking about FPGAs, so I did a little googling, and came across this:

http://www.digilentinc.com/Products/Detail.cfm?NavTop=2&NavSub=419&Prod=CMOD

FPGA development kits are still a little spendy for hobbyists, but that "breakout board" is only $18, and there are free software tools available to develop for them. Plus it's through-hole for us oldpharts. ;D

Xilinx even has an app note for an 8x8 crosspoint switch:

http://www.xilinx.com/support/documentation/application_notes/xapp380.pdf

Unfortunately, it uses the next size up of the CPLD, but it looks like it's more complicated than what you need, so you might be able to make the smaller chip in the C-Mod do the job.

Ran