Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does a component exist that functions as a switch for multiple connections at once, 3 in my case.

So power, ground, and data are coming in from the top. When the switch is in the left position (as pictured) they will get connected to the power, ground, and data lines on the left side. When the switch is flipped to the right position all 3 power, ground, and data are moved over to their respective matches on the right side.

Essentially it's like having a 3 switches, one each line and flipping them all at the same time.

3 lane switch

share|improve this question
1  
A 3P3T switch? (3 Pole 3 Throw) – Wesley Lee yesterday
6  
@WesleyLee: I think he only wants a 3PDT (three pole double throw). These (and 4PDT) are readily available as toggle switches from many suppliers. Three (or more) switches are generally available as rotary switches, although there are some multi-position slide switches. – Peter Bennett yesterday
2  
    
Note that in some applications, regulations may require that the contacts make or break in a particular sequence - e.g. neutral makes before live(hot), but live breaks before neutral. [I'm remembering this from UK regs, but sorry I can't give a reference.] – Dreamer 23 hours ago
up vote 22 down vote accepted

Each of your "lanes" is a "pole" in switch terminology. 1P (or SP), 2P (or DP), 3P, 4P...

The number of ways you can connect those to outputs is a "throw" (T) - Single being ST, double being DT and after that, numbers. 3T, 4T...

Some switches add "center-off." Single-throw switches are "off" one way and "on" the other, while DT are always on in one direction or the other UNLESS they are "center off."

3P DT will do. Input goes to common.

3PDT from StewMac

I have some lovely old modem A/B switches that switch all 25 pins (though most do fewer pins, all 25 being overkill for the average modem) so those are 25P-DT

share|improve this answer

NKK M-2033 3PDT switch - This 3PDT switch may meet your needs. Se datasheet for connection and ratings information.

Switch (bottom) Switch (top)

This is the relevant pole & circuit table from the datasheet:

Switch diagram table

share|improve this answer
    
Adding the internal diagram helps others to quickly check your answer too. – Umar yesterday
    
link – mad_fish yesterday
2  
@mad_fish Link should be in answer and noticeablly identified - easily missed in notes and more likel;y to vanish with time. – Russell McMahon yesterday

You might only need to switch the data pin, since even with power and ground this will switch data between devices with no harm.

This type of switch would be a "SPDT switch" (1 pole 2 throws)

If you really do wish to switch off the bus power too, then leave the ground connected as it is of no consequence (there are even positive reasons to not break and reconnect ground lines)

This would require a "DPDT switch" (2 poles, 2 throws)

To kill all three lines (almost certainly not necessary) then use a three pole two throw switch... but like I say, there's almost never a good reason to do so.

Now, consider whether you need to ask for a three position double pole switch with a "centre off position" ... This would cut the connection to both devices simultaneously.

A 'centre off' could also be achieved by upgrading the above switches to triple-throw (1P3T/SP3T, 2P3T/DP3T) ... this gives three outputs. To use this you'd connect the first set of outputs to Device 1, leave one set of output pins unconnected, and connect the last set of outputs to Device 2. This is basically what a "centre off" switch does, except they simply miss out the un-needed pins from the package, making the pinout simpler.

Unless there is a strong reason not to, I'd go with the SPDT switch on the data line.

Also, bear in mind that switching data on and off whilst the devices are talking may result in errors and bad data... depending on the error correction available on the devices, this data might be acted on - resulting in unintended consequences.

A better procedure entirely is to use a digital switch, these will let you swap data lines cleanly and without mechanical bounce between multiple sources using cheaper switches. With a little extra circuitry you can delay actual switching till a '1' has not been detected on the line for over a threshold period - set this close to your inter-message delay and you'll never be able to 'chop' messages in half. Ask an electronics hobbyist to help with the design of such a digital switch as it requires some thought.

Also, the protocol is important. Some messages might set context for future messages, and switching between devices can result in the wrong registers being written to and potentially stop the device from working, possibly even permanently (called 'bricking')

Whichever way you do this, if the devices are important - it may be advisable to turn off the devices before switching paths, then start them back up again. This isn't always necessary, but devices with complicated configurations and protocols may well benefit from this safeguard.

share|improve this answer
    
considering the question, OP might have already assumed the alternatives too. The answer is not to the point. Any suggestions shall go as a comment. – Umar 16 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.