1
\$\begingroup\$

I'm trying to come up with a simple way of sharing a USB peripheral between two USB hosts (computers) so that the host that is currently turned on controls the peripheral. I'm targeting low-speed USB1.1 devices. Full-speed devices would be nice. High-speed (USB2) devices are not really needed.

My first stab is the circuit below, made up of two diodes and some MOSFETs. I only show Vcc and D+ for clarity. D- gets the same treatment as D+, and the grounds are connected together. You can play with the circuit using the falstad simulator applet. I added two 10k loads to make sure the outputs don't float. When the circuit is part of a USB connection, the resistors in the host and in the device should take care of that.

USB Switch Circuit

Questions

  1. Is the basic idea of switching USB signals with MOSFETs sound? I understand that the channel in saturation mode behaves like a resistor, and that the resistance can (depending on gate voltage and device) be in the order of milliohms. Is this correct?
  2. The output Vcc will be a full diode drop lower than the input Vcc. I think this will put me outside the tollerances of the USB standard even if the input Vcc is 5.00V. What can I do to prevent/lessen this drop?
  3. In this circuit, if both PCs are switched on, the results are all messed up. Specifically, if both Vccs are high and one D+ is high while the other is low we get into a short circuit situation. Is there an easy way (with little additional circuitry) to shut everything down if both Vccs are high? Should I just bite the bullet and put in a small micro-controller to act as a gatekeeper?
\$\endgroup\$
9
\$\begingroup\$

There are actually IC's available that do this sort of thing, essentially analog switches but designed specifically for USB 2.0 such as the FSUSB42MUX -- IC USB switch DPDT. Only $1.70 in single quantities from Digi-Key.

enter image description here

They appear to only be available in SMT packages, such as 10-MSOP, but these can be soldered by hand easily enough, and even placed on a breakout board for prototyping.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ As I was wiring up the sim I was thinking that it would be a really good application for an integrated circuit, as it's basically all wiring and silicon. It never occurred to me to check whether it already existed though! Thanks for the pointer. Ten leads on a chip 9 mm2 sounds like a tall order for my soldering skills, but maybe I should just try. Anyway, you have not addressed the issue of the diode drop on Vcc, and as far as I can tell this IC does not have any special provisions for the Vcc line. Do you care to comment on that? \$\endgroup\$ – drxzcl Apr 4 '12 at 14:47
  • 1
    \$\begingroup\$ @drxzcl, If you use a Schottky diode, the voltage drop will be much less and you should remain in spec. The 95SQ015, for example, has a maximum Vf of 0.22v at 500ma, according to its datasheet. \$\endgroup\$ – tcrosley Apr 4 '12 at 23:33
0
\$\begingroup\$

My advice would be to add some simply circuitry to make the switch. This is a common problem that needs to be solved in high reliability systems where you have multiple power supplies that must be ORed together. Texas Instruments, and many other companies, have components that make ORing easier.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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