Low resistance 2:1 USB voltage switch - Page 1
Forum section: electronics / projects

author: Degu
author_rank: Newbie
timestamp: February 19, 2014, 03:46:31 pm
content: Hi!Currently I want to build up my own USB switch. It has two USB inputs and "n" USB Outputs.The purpose is to switch between the two USB Inputs to one of the USB Outputs -> like a 2:n MUX switchFor Example:Each of the two USB Inputs are connected to a PC and/or other USB source device (laptop, raspberry pi etc...) and on the USB Output, there are connected some USB devices (I don't want to build up a USB HUB, only a switch).The main circuit for the hole USB part is done and also tested.Everything is controlled by a µC with a micro USB port to control the MUX.Now the USB voltage switch part is on going. In my first prototype I finished it with two 5V relais (quick and dirty solution, only for testing). One relais was reponsible to switch between the two GND's (USB power Input) and the other one for the two 5V rails (USB power Input).Now I want to build it up with P-channel and N-channel MOSFET's. But the current issue is the voltage drop over the MOSFETS.Is there any other solution available for that? Or is existing any other IC's (like a ORing controller or isolated ideal diodes)? I used for testing an P-channel MOSFET IRLML6401 and a N-channel MOSFET IRFRU024N who where in my tray. So I thought thats ok for testing. But I measured a serial resitance of ~150mOhm. Thats to much, because that causes a voltage drop on the 5 Volt USB Output and this should be less as possible.150mOhm @ 2A load (5V USB power)= 0,283V! voltage drop over the MOSFET's. That means, only 4,717V instead of 5V supplies the USB device.Important for the circuit is to split the two USB power voltages (+5V AND GND) because the GND of USB Input 1 and the GND of USB Input 2 does not have the same potential (differences between USB power switching supplies etc.)The easiest way where two relays (one for 5V and one for GND) but it would be nice if there existing a "state of the art" solution.Thanks in advance!Degu

author: papo
author_rank: Regular Contributor
timestamp: February 19, 2014, 04:46:01 pm
content: HiI don't know the numbers off the top of my head, but I believe that your calculation is somewhat flawed. First, you can't draw 2 A out of an USB port just like that, so you should do the calculation with 500 mA instead. Second, be aware that there is a (5%?) tolerance for USB 1 and 2 around the 5 V figure. So the voltage from the PC could be below 5 V already. Third, USB 3.0 allows for more current IIRC, but the tolerance is also larger. In any case, don't forget to take into account drops between your PC and the switch box you are building, as well as drops on cables further down the stream.Then there's specs for USB charging that allow for higher currents, but I don't know anything about those.In any case, you can get FETs with lower RDS(on) values. But it sounds like you are trying to isolate something here. Personally I'd not go for a FET since it does not achieve that, but I guess it's up to you. (How bad is it if the switch malfunctions and shorts out both grounds?). Not having a USB ground at ground potential strikes me as weird somehow.HTH, best regardsMatt

author: Degu
author_rank: Newbie
timestamp: February 19, 2014, 06:53:40 pm
content: Hi papo.yes I know that I can't get more than 500mA from a "normal" USB port, but I have here also components which provide ~3A and stable 5V output (test equipment). For that this HW should able to handle it. I have forgott to wrote that every USB Output has a seperate special USB switch with a over protection circuit. So only the input switch is not done.This scope is for USB 2.0.I also thought about a parallel curcuit with more MOSFETs to reduce the resistance.But the main question stays already in the room: will it work to split the two supplies?I know that the cable and the usb connectors has also a resistance, but I will reduce it to the minimum.A Apple device spec says that the I pad, for example, needs @2,1A load current a stable voltage of 4,97V. Hey how should that work? Anyway, I search a way to switch two voltage sources without a common ground. The usb spec says that the maximum voltage lift of the ground is 125mV.And also if you think about two differnt grounds which connected together, it can be a problem. For example one voltage source comes from a switching supply and the other one from a pc. The ground pin of the usb has here complete difference potential and there can flow some current from ground to ground and that can damage your device.Sorry for mistakes, I just wrote it with the mobile phone...Have a nice day,Degu

author: papo
author_rank: Regular Contributor
timestamp: February 19, 2014, 07:57:08 pm
content: HelloQuote from: Degu on February 19, 2014, 06:53:40 pmI see. Two thoughts here: First, if you have overcurrent protection anyways, maybe you can combine this directly with the switch? Something like a MIC2026 or similar. The parameter you are looking for is RDS(on) and of course the current threshold. Second, it sounds like the 5 V come from a separate supply and not from the PC itself. In that case, you could sense the voltage after the switch to compensate for the drop across it. And even if you are pulling 3 A, any standard USB device will not be allowed to draw more than 500 mA (save from charging stuff and standard extensions that I'm not aware off I guess), so probably this is for specialized equipment or something...Quote from: Degu on February 19, 2014, 06:53:40 pmYou mean whether the two FETs can isolate the devices? As I said, I'd go for proper isolation. Although that might get tricky for 480 Mbps high speed USB.Quote from: Degu on February 19, 2014, 06:53:40 pmI'm not sure what Apple is doing, but I foundthis. Looks like some Apple computers supply 1.1 A for charging. I guess you only get the 2 A with an external charger. Other resources say that at 500 mA, the iPad charges when the screen is off, albeit very slowly. I remember something about Apple pulling one of the differential lines to a particular voltage to allow for "high-current charging", but don't quote me on that.Anyways, the USB spec allows for a VBUS voltage of as low as 4.75 V at the upstream plug. I'm not sure where you got that 4.97 V figure from, but if this is a requirement by Apple, then there's probably no way around boosting it with a DC/DC converter as their spec is tighter as the USB spec.Quote from: Degu on February 19, 2014, 06:53:40 pmYes, I was not really aware of what you are doing. What I don't understand is the term voltage source in this context. At the beginning I though that you would just switch between several ordinary USB devices, but I get the sense that there is more to it. I don't see a problem if these voltage sources are flying as you'd just use ground to reference the two. But I don't feel comfortable giving advice on this one as I don't think I understand completely what you are doing. Let's assume you had all USB devices that you are attempting to multiplex plugged in directly to the PC. Then, all these devices would be fed with 5 V, referenced to ground; all the grounds would be shorted together. And in that case it can't possibly be an issue since this is how USB devices are operated. So why does it become a problem when you multiplex the devices? Maybe that can help my understanding.RegardsMatt

author: Degu
author_rank: Newbie
timestamp: February 20, 2014, 01:24:12 pm
content: Hi!I know all the critical values of a MOSFET. You have to imagine that like this:USB power comes from Input port 1 or 2 (it comesnotfrom an external supply) to the internal 5V & GND lane. -> like a "Y" switch. one common internal power line (+5V and GND) wich provited by the usb input 1 or 2 (see the attachment). Thats the last part which I searching for.From the internal power line (USB +5V & USB GND), it goes to 1 of the USB outputs with a futher secial usb switch (with overcurrent protection).So as I mentioned, I only need a "Y" (2:1 switch, like a relay) with very low R(on) (my test P-channel MOSFET has 50mOhm@Vgs=-4,5V).It is not necessary to isolate the usb data lines, this lines goes directly to the 2:n usb MUX.My main question is about the "Y" switch. Is the circuit (two P-channel and 2 n-channel MOSFETS) ok for that purpose?Thanks for the tip with the MIC2026! Nice IC. But it has 140mOhm on resistance (max.) and also only one GND pin. So you don't think that's a problem with a common GND of two usb Inputs, which comes from totally different DUT's?RegardsDegu

author: papo
author_rank: Regular Contributor
timestamp: February 20, 2014, 02:51:21 pm
content: Hello againQuote from: Degu on February 20, 2014, 01:24:12 pmYes, the circuit is OK for that but it's just what it is, two FETs that "isolate" your device. As for the relatively high RDS(on), there's other chips with a RDS(on) at least one order of magnitude lower than that. One trick to achieve this it so put in a little charge pump and an N-channel FET to do high-side switching. ADP197 comes to mind, but I haven't really checked whether this one is suitable for your application. What I generally do if I know one chip is sort of what I want (e.g. MIC2026 or ADP197): I look up that particular part on digikey and then click the family link -- in this case "PMIC - MOSFET, Bridge Drivers - Internal Switch". Then I start fresh with a parametric search in that section, e.g. excluding those parts with too high an RDS(on), BGA parts etc.As for the second question about switching only the high side... Generally I would confidently say yes but you seem to know what you are doing, hence I'm hesitating on advice on this one. You mentioned high ground currents earlier as a concern. Current needs a return path though; in this case I guess this is the return path, but where is the current coming from?RegardsMatt