Author Topic: USB Switch Design Help  (Read 1070 times)

0 Members and 1 Guest are viewing this topic.

Offline ohms lawTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
USB Switch Design Help
« on: January 11, 2021, 01:30:14 pm »
Good day,

I need some advice - I want to make a USB switch - 1 - A or B "Switch" out

Here is the design I have come up with - I just want to pass through all 4 pins - I am not sure if the CD4006 will be able to handle the 5V current through the switch or if I need to use it to trigger a mosfet? or is there a better IC for this job? I don't want to have to program anything

the design I have attached, USB1 is connected to U1 & U2 and the switch - switches 5V into U1 or U2 all control pins for U1 are connected together 
 & U2. once the U1 Control pins are connected to +5V all IO's for U1 are turned on and when U2 is switched on the same applies for U2 IO's 

 I am very new to electronics and struggle to understand the most basic things. so please if there is something I need to do please just be very clear this connects to that otherwise I will just have more questions.

Thank you in advance
« Last Edit: January 11, 2021, 01:35:39 pm by ohms law »
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2155
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: USB Switch Design Help
« Reply #1 on: January 11, 2021, 01:55:43 pm »
Well, one thing to understand is the bandwidth of the CD4066, it's 40MHz (-3dB cut-off). This is probably enough for a full-speed link, but not adequate for hi-speed.
Everybody likes gadgets. Until they try to make them.
 
The following users thanked this post: ohms law

Offline ohms lawTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
Re: USB Switch Design Help
« Reply #2 on: January 11, 2021, 01:57:50 pm »
Thank you was thinking USB2 keyboard and mouse
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17581
  • Country: lv
Re: USB Switch Design Help
« Reply #3 on: January 11, 2021, 02:04:25 pm »
Frankly you'd be way better off with simply DPDT switch on data lines.:-DD https://lcsc.com/product-detail/Toggle-Switches_ALPSALPINE-SSSF121900_C97449.html
« Last Edit: January 11, 2021, 02:14:37 pm by wraper »
 

Offline ohms lawTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
Re: USB Switch Design Help
« Reply #4 on: January 11, 2021, 02:21:28 pm »
Thanks for the reply

I could also buy a ready made one that does what I want but where is the fun and learning in that?

 

Online fcb

  • Super Contributor
  • ***
  • Posts: 2129
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: USB Switch Design Help
« Reply #5 on: January 11, 2021, 02:35:19 pm »
Pretty bad idea to use a 4066 to pass through all 4 lines.  Can imagine that it will only work in a handful of cases.  Also, you're only going to be able to 'float' the unconnected channel a small amount (say a 4066's input protection diodes worth).

If your aim is to switch USB data and power I can't see why you wouldn't have a common ground. You'd also be better off with switching the USB +5V with perhaps a pair of DMG2305 P channel MOSFETS or frankly any P channel MOSFET - the 4066 has an on-resistance at 5V of perhaps 100-200ohms.

Also, as another poster has pointed out, the BW of 4000 series isn't very high.  Probably better with something like a 74HC4066 or better still a 74HC4053 (triple changeover switch).  You could build the whole thing with 2/3 resistors, a pair of MOSFET's and a single 74HC4053.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 
The following users thanked this post: ohms law

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: USB Switch Design Help
« Reply #6 on: January 12, 2021, 08:03:31 pm »
I've made such a multiplexor with reed relays, but I wouldn't recommend it.
Definitely keep a common ground.
Probably switch the Vcc using something besides a horrible old CMOS mux.

I bought a USB mux breakout board on ebay. The one I have is based on a TS3USB221
Just search ebay for that number and you'll find a ton.
 
The following users thanked this post: ohms law

Offline ohms lawTopic starter

  • Contributor
  • Posts: 11
  • Country: gb
Re: USB Switch Design Help
« Reply #7 on: January 12, 2021, 08:16:20 pm »
Thank you great idea - I found this which can do the data channels https://datasheet.lcsc.com/szlcsc/1912032133_DIOO-DIO32320MP10_C444626.pdf & then I can just switch the power with a mosfet

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf