1
\$\begingroup\$

electronics noob here. This is more of an educational project for me, so I would like to have some feedback on the design I put together. What I am trying to accomplish is a simple 2-in-1-out micro usb mux, where both in can be connected and I have a switch to change between them. Here is my design (J1 out, J2, J3 in): circuit design of usb switch

Few questions for me:

  • Is this generally sane or are there some obvious drawbacks that I missed?
  • I am not entirely sure how to connect all the VBUS pins from USB inputs. Is it fine to just connect them all together? I have seen several designs making use of diodes like D1 and D2 placements, are they really needed here or can I assume that the USB host can handle this? Is the forward voltage drop a problem or can I assume that the USB device does not care too much? Am I right to assume that having these prevents me from using this as a 2-out-1-in setup?
  • The USB Mux (U2) has absolute maximum VCC rating of 7V. Therefor do I really need the voltage regulator? I suppose it is advised to use it, to get into the recommended VCC range?
  • Do I need to worry about current flowing through the voltage regulator? It has a maximum rating in the 600~mA range which is fine for the USB Mux, so can I assume as long as the Mux does not draw that much current, the regulator is fine even though current on the VBUS can be higher?
  • I basically just inserted C1 and C2 because I saw that being used everywhere else. Why is this needed?
  • I have seen other circuits adding ESD protection diodes to the common VBUS. Do I need this?

Edit: Datasheet for the regulator, Datasheet for the USB Mux

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Please link relevant datasheets you have looked at. \$\endgroup\$ Commented Feb 23 at 15:00
  • \$\begingroup\$ Are you familiar with how to lay out a PCB with controlled-impedance differential pairs? That will be necessary if you want full USB 2.0 High Speed performance. \$\endgroup\$ Commented Feb 23 at 15:05
  • 1
    \$\begingroup\$ Before I answer, is the "output" on the left also a MicroUSB-B receptacle like the input ones on right? Or in general, what's the purpose of this device, what does it allow you to do? Switch a phone between two PCs? \$\endgroup\$ Commented Feb 23 at 15:51
  • \$\begingroup\$ @Andyaka Added the links \$\endgroup\$ Commented Feb 24 at 8:01
  • \$\begingroup\$ @Hearth No, please enlighten me. \$\endgroup\$ Commented Feb 24 at 8:02

1 Answer 1

2
\$\begingroup\$

The first sanity check is, does cables exist to allow this device to connect devices like you want. No USB "host" should have a USB Micro B connector. Well, there are phones that are hosts with Micro-B connector, but that's not allowed as it should be a Micro-AB and they use the ID pin for determining the port role.

The two VBUS lines cannot be connected directly together. Do not assume that hosts handle such a scenario. Without diodes you could be backfeeding 5V from a USB power supply into your desktop PC that could be unpowered. Instead, expect damage and be surprised only if there is no damage, not the other way around. The diodes do drop voltage, and we can't possibly say if your USB devices care about getting less voltage in or not, but if it is out of specs it does not have to work. You also don't specify a diode, so no idea if it will work or not. USB devices can officially pull up to 500mA, but they might not adhere to that rule so likely more than 1A should work.

The USB mux indeed has absolute maximum rating of 7V. But it does not mean it can work outside recommended ratings of 4.3V. Using a 3.3V regultator is mandatory.

The current consumption is in the order of 1 microamp. Therefore 600 milliamp regulator will be sufficient. Vbus current does not pass through the regulator.

Capacitors are needed as explained in the regulator data sheet. It also has a page that explains why the type and value and many other parameters of the capacitors are important, basically, in short, the regulator will be unstable and oscillates if it has no capacitors, wrong value, wrong type, wrong ESR or simply placed incorrectly or too far. If you are asking why it needs capacitors at all, this may be too demanding regulator to choose the capacitors correctly. Also, USB requirements say that 10uF is the maximum capacitance you are allowed to hot-plug in so it leaves no room for capacitors in your output port if your mux board already has all the allowed 10uF.

ESD protection is not mandatory, but of course it means you have no separate ESD protection. The MUX already contains ESD protection but you can decide if it is enough. The other devices either have protection already or have left it out.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the detailed answer. As for the setup, it is supposed to drive a small speaker which will get input from 2 PCs. Am I missinterpreting what the host is in this case? I would plug in a MicroUSB - USBA cable into the PCs. I suppose the female J1 plug is not entirely correct, ideally this would just become a new MicroUSB cable. As for the diodes D1,D2, I was not sure how to choose them. Do you have any advice here? \$\endgroup\$ Commented Feb 24 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.