USB switch

Discussion in 'General Electronics Chat' started by kubeek, Nov 30, 2011.

  1. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I need to build a remotely controlled USB switch, that is not a USB hub, but a device that chooses one output port at a time.

    The controlling part poses no problem for me, but the reliable switching is. I would like this to be USB 2.0 compatible, but this uses 480Mbit signalling rate. USB bus should have 90ohm impedance, so this is no job for 4066 or anything the like.

    I was thinking to use some small relays to switch the data pairs, but will something like this be usable at such frequency?
    Anyone any experience with this?
     
    Last edited: Nov 30, 2011
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    A relay is a mechanical device, and hence is never "high speed." One place I worked a while ago in the test department completely banned that type of relay as they just do not work in the long term. I've had better results with relays such as this.

    I did not follow anything you had to say about the USB in your 2nd paragraph. What is the 4066 you are using?
     
  3. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    I can't read that language but assume that its a reed relay which they typically offer faster switching speeds than your typical mechanical relay.. It should work if its speed is suitable for your application. The switching speed is typically indicated on the datasheets.
     
  4. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    This is not about speed of switching, that will happen about once per minute or so.
    My question is if the relay´s contacts will pose any problem to the USB communication, since the data is pretty high speed and the data pair should be a 90ohm transmission line.

    As for the cmos 4066, it is usually used as a signal switch for similar purposes. The problem is that even if the silicone would handle the frequency, which it won´t, it´s on resistance is in the order of 300ohms which is way too much to be in series with a 90ohm transmission line.
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
    If you want reliability you would scrap the reed switch idea. You can design a data selector switch with digital ICs. Put a USB 2.0 transceiver chip on each port and switch digitally.
     
  6. Gdrumm

    Distinguished Member

    Aug 29, 2008
    684
    36
    Could you buy a USB hub (5 port for example), and hack it?
    On top, install 5 small on-off switches, one for each port, and wire it accordingly.

    Seems easy enough?
     
  7. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Mrchips, it doesn´t have to be a reed switch, a normal relay would do just fine.
    Any tips on the usb transceiver chips? Even if they are able to communicate over a parallel bus, the bit rate would still be too high for standard logic chips.

    Gdrumm, the problem is it the switchover has to be remotely controlled via a computer, so manual swithces are out of question. And the same problem applies for manual swiches as well as relays.
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Are the two USB devices you want to switch the same?

    If not, the OS will want to negotiate every time is switched.
     
  9. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I don´t know that as of now, but it is likely they will be different. Basically this is meant for testing mobile phones and preloading them with data, so you connect fifty phones to the switch and then let the computer do the job without manual labor. The negoation would be part of the process even if you were connecting them manually.

    So let me restate my question, do you guys think that it is possible to carry 480Mbit 0/400mV digital signal through a relay?
     
  10. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Yes, I've seen USB cables with red and green cut and barely twisted back together, holding by a strand and corroded that still worked at full speed.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I've used the Teledyne 172 series relays to switch RF circuits nearing 1GHz.
    Datasheet:
    http://www.teledynerelays.com/pdf/electromechanical/172.pdf
    One problem with them is that they are quite expensive at ~$23 USD and up.
    I really have to wonder why you can't simply use a number of USB hubs, and just address the phones individually by their ID? Or do they all have the same ID?
     
  12. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Aparrently there is some need for the device to be physically disconnected from the port. This is my preliminary research for a friend of a friend who needs such a device, and I have yet to talk to him to get the details why they can´t use it like you said.

    The relay looks cool :) Well I guess I will have to wait till the guy replies and then hook it up and see how it works.
     
  13. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Ok, so far a 500MHz analog switch IC wired dead bug style, and a relay too, failed to switch the USB reliably, so I am back to multiple hubs and switching power to the end device.

    But, I have another question(s).
    Please keep in mind that all the ~120 devices will be spread over 6-8 boards stacked one ontop each other, with connectors in between to keep it compact.
    As for the USB bus, I will have to make controlled impedance paths on the boards to keep the 90ohm impedance, that is obivous.

    But now imagine that I need to switch a SIM card as well to those devices, which use standard CMOS signalling levels on frequencies up to 20MHz. I think that the analog switch should work better in this case than for the USB, but how would you go about routing the traces?
    I would like minimal interfering with the signals, so I don´t want to for example input the data line through amplifier into a transmission line and then back, also the data line is bidirectional.

    I can imagine having them on top of ground plane, maybe even with guard traces with ground around, but wouldn´t that increase the capacitance a lot? What do you think is a practical trace length achievable at those frequencies?
     
  14. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    So far so good, the SIM works just fine even when connected through ~60cm of wiring with about 15cm of it being loopy and convoluted.
     
  15. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    It's a differential signal, so twisted pair wiring for external, and put the traces parallel with a trace width (~0.1") spacing between them, keep the spacing even throughout board.

    Make sure you don't end up with board capacitance and inductance that would self resonate below 40Mhz on the board, which is pretty easy unless you try to do it. Use wide traces and many decoupling caps.

    Perfect for this would be the CNC "etched" boards where only a minimum gap between traces is removed and the rest of the copper is left on the board, then connected to either V+ or GND, or signal, of course.
     
  16. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Sorry for the confusion, the USB is differential @ 480MHz, while the SIM connection is single-ended - optional clock and bi-directional data @ 20MHz max, which means the clock isn't necesarily in phase relation to data.

    Thanks for the info you posted, but how would that relate to 25x higher frequency? Also, the USB will be routed through a tree of 7-port hubs, so the signal runs will probably not be longer than ~15cm.
     
  17. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    At 500Mhz, there's just more of the same stuff, like termination, otherwise, keep signal line inductance and capacitance low by using wider tracks spaced well, and the same length, so if you make a turn, try to make a turn the other direction as well so the lengths balance.

    You are in the realm of RF, but don't want it to behave like RF, so keep it as resistive as possible. Do you have an LCR meter that works with various frequencies? Not a requirement, but gives a bit of insight. Think roughly 15nH/inch for 0.05" trace and 8nH/inch for 0.1" trace. Capacitance will be minimal since the distance is large and the dielectric is poor. Use chamfered or dual 45° turns. If using a double sided board for signals, put signals vertically biased on one side, and horizontally biased on the other side.

    Use about 0.1" tracks and about that same space between them for signal. Use the rest of the copper area for ground or power plane and lots of little SMD caps between Ground and Power, one every 3 inches or or 1 per IC if there are multiple ICs in 3".

    Use good components and lots of bypass caps, same rules as always, except don't simply stop a signal line trace unless it's terminated. The IC's you use should have info on that in the datasheet, most USB 480MBit are self terminating when not in use.

    Use twisted pair for the inter-board runs, and try to use as much surface mount as you can.
     
  18. kubeek

    Thread Starter AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Thanks, just one more question for now, why do wider tracks have lower inductance? I can´t recall any relation that would cause this behavior?
     
  19. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Changes from a square cross-section to a rectangular cross section. You don't need to drastic about it if you don't have the room.
     
Loading...