USB Switch Design Help  - Page 1
Forum section: electronics / beginners

author: ohms law
author_rank: Contributor
timestamp: January 11, 2021, 01:30:14 pm
content: Good day,I need some advice - I want to make a USB switch - 1 - A or B "Switch" outHere 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 anythingthe 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'sI 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

author: thinkfat
author_rank: Unknown
timestamp: January 11, 2021, 01:55:43 pm
content: 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.

author: ohms law
author_rank: Contributor
timestamp: January 11, 2021, 01:57:50 pm
content: Thank you was thinking USB2 keyboard and mouse

author: wraper
author_rank: Unknown
timestamp: January 11, 2021, 02:04:25 pm
content: Frankly you'd be way better off with simply DPDT switch on data lines.https://lcsc.com/product-detail/Toggle-Switches_ALPSALPINE-SSSF121900_C97449.html

author: ohms law
author_rank: Contributor
timestamp: January 11, 2021, 02:21:28 pm
content: Thanks for the replyI could also buy a ready made one that does what I want but where is the fun and learning in that?

author: fcb
author_rank: Super Contributor
timestamp: January 11, 2021, 02:35:19 pm
content: 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.

author: Renate
author_rank: Super Contributor
timestamp: January 12, 2021, 08:03:31 pm
content: 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 TS3USB221Just search ebay for that number and you'll find a ton.

author: ohms law
author_rank: Contributor
timestamp: January 12, 2021, 08:16:20 pm
content: Thank you great idea - I found this which can do the data channelshttps://datasheet.lcsc.com/szlcsc/1912032133_DIOO-DIO32320MP10_C444626.pdf& then I can just switch the power with a mosfet