Electronic – arduino – 5-pole, double-throw relay

arduinoswitchestransistors

I am working on an electronics project where I need a two way switch,
that can be controlled using an arduino and can be soldered by hand.
I tried to Google for it, but without luck. Does anyone know of such a component?

EDIT: for clarity: I need to switch between two usb lines coming from a phone. I need also to switch the id line. So usb line from phone -> (usb line 1 OR usb line 2). (USB micro has 5 lines, so I need a five pole, double throw)

Here is a diagram of what I mean:
Switching Diagram

Best Answer

USB Micro has the following lines:

  • VBUS (+5v)
  • Data+
  • Data-
  • ID
  • Ground

Of these, ID is generally not carried over a cable: It is either shorted to signal ground (host device) or left open (slave device). It does not carry any data.

Both VBus and Ground can be left connected to both endpoints in the scheme, thus reducing the switching requirement to 2 lines, D+ and D-. (Another line for ID if it must be carried across, but never seen that done). This is why USB multiplexer ICs typically carry just 2 channels.

There are several USB 2.0 multiplexer ICs that would do the job, for instance Intersil ISL54200, Maxim MAX4906/4907, or Texas Instruments TS3USB221E.

A TTL-controlled bidirectional analog multiplexer/demultiplexer like the HC4053 may be less expensive but will not work for this purpose, due to data speed requirements and capacitance matching issues.

As noted by others in the comments, USB does not take kindly to endpoints being switched. The USB protocol is not a basic TTL logic connection, it involves identification of the USB device and negotiation of speed (and also current limits). Until this handshake is done, the connection is not done.

Related Topic