I am not able to edit the post. So I am posting the update as reply:Hi Brian,
Now, I have another requirement which I learn from you reply - to switch all the three signals simultaneously - I did not consider this in the beginning (that stems from the ignorance of the USB protocol).
So, if it has to be switched simultaneoulsy I don't have anyother option other than a muliplexer IC.
Can I use this IC? CD4053 ? It can switch three signals. I am not sure whether it can handle USB signal frequency. It also has on-off-on switching pattern.
Also, I don't want to use separate powersupply (from the datasheet I see the current requirements are pretty low for this IC).
Can you please share your thoughts on this?
Thanks.
Adding to Klaus' excellent advice, FS USB is critical of trace lengths, if possible try to match the lengths of D+/D- for each channel. The channels don't have to be the same but the data lines within each channel should be. Your PCB package may have a feature to do this.
Brian.
Hi,
The PCB layout is far from being optimal.
especially the GND pin connection of the ouput USB port vias the shielding/case is a no-go.
But there are other issues likely to cause problems:
*don´t leave the A and B pins of the 4052 floating. Use pull up or pull down. and add a third pad for GND. Any A/B wiring needs a suitable reference (GND).
* use a bulk capacitor for 5V and add a 100n ceramics capacitor close to the supply pins of the xx4052
* I wonder how much ON resistance is allowed to be within USB specification. For sure a 74VHC4052 has much lower ON resistance.
* sooner or later I expect that ESD will kill the xx4052. I recommend to install typical USB signal line protection diodes.
Don´t get me wrong... for your own usage it willl not the big problem if it fails. But if you want to sell thousands of them ... I´d improve them ;-)
Klaus
See your own schematic. A and B are the inputs to select which USB channel to use.Will floating A/B inputs add any cap loading? I thought they were the other end of the turned off TGs and keeping them floating should be okay.
Also, I did not understand the point on adding the third gnd pad and reference for A/B inputs? Could you explain it a bit more?
See your own schematic. A and B are the inputs to select which USB channel to use.
They must not float.
You need to control them somehow. It's not shown how you do this. You need to provide this information for further discussion about A and B.
To control them you need at least one power signal, I recommend GND.
Klaus
CD4052 is a very old device and not as good as more modern switches.
Just a thought and I have not tried this:
There are some very inexpensive 'logic level shifter' boards on the market. These typically have four channels each with a signal connection at each side, a 5V supply and a 3.3V supply pin. They are normally used as bi-directional interfaces between 5V logic systems and 3.3V logic systems. On the boards are four FETs (usually BSS123) and some resistors.
If you use two of the boards and ignore two channels on each, I'm pretty sure you can join the high voltage sides in parallel to go to your USB-A and use the low voltage sides to go to the two USB-B connectors. You should be able to switch the boards on or off by grounding (off) or applying 5V (to the 3.3V input). They should work at high speed. If you search you will find the schematic for them, you could build it from discrete components yourself as it is only 3 components per signal route. BSS123 FETs are very inexpensive and easy to buy.
Brian.
Oh you refer to that?I got it confused with X/Y
This exactly is what I thought.The connector on A/B is an off board connector, where I solder jumper wires, which I connect to my bluepill (STM32F103X uC). They aren't floating, and the bluepill also shares the same gnd line. This is a quick (and dirty) design I made to check proof of concept.
that's why we have schematics with naming the signals/parts ;-)
This exactly is what I thought.
You should wire the according ground along with the A/B wires.
The GND is a part of the A/B signals.
Don't rely on the USB cables as GND. They may carry currents, HF noise ... and increase the ESD problematic.
Now that I hear you use a microcontroller my - more exact - recommendation:
* install pull ups on the 4052 board
* Use GND / OPEN on the microcontroller board to control the A/B lines. The same way as you do with mechanical switches.
This has one "life saving" benefit: in case the USBs are powered down, then the 4052 has no power supply. In this case when you "push" HIGH voltage from the microcontroller to the 4052 you violate it's "signal input voltage range". The inside protection diodes become activated ... current will flow...for longer than just microseconds.
Don't think in hours ... even seconds may be too much time.
If you don't want to use it with this project maybe it's worth to think about with your next project.
General ESD recommendation: put protection on every signal that enters/leaves the PCB.
Klaus
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?