I am building a 4x4 Arduino controlled USB switch The idea is as follows:
- 2 sets of CMOS analog switches form a 4x4 matrix to switch the D+ and D- USB signals using MAX4652SE chips
- The USB devices are not powered by the hosts but by the switcher and power is controlled to each device with TPS2066D Power switches
- All of these are controller by 74HC595 Shift registers set by the Arduino
The devices can draw quite a lot of current, e.g. 500ma. So I am powering the device with a 2A 5V supply. The 5V supply just goes directly into the circuit. No other power regulation happens
The Arduino part (display, keyboard etc) is working fine but I am having 2 issues with the switching part:
- When attempting to power up devices, the first 500ma device powers up ok, but the second one fails to, when I reverse the order of devices, it behaves the same, so it's not the devices.
- When testing simple USB switching (a mouse connected to a PC) only about half of the connections worked (i.e. the mouse worked on the PC), the other half I got a 'device not recognized on the PC.
some thoughts: Issue 1:
- Do I need to somehow treat the power going to the power switches differently to the power to the rest of the circuit? it's just 5V coming in and sent to everything equally now
- The TPS2066D is rated at 1A, are they appropriate for powering USB devices?
- Could something be limiting the amount of current going to my devices?
- Are these CMOS switches not appropriate for USB? (They have an on-resistance of 4Ohms, which seemed pretty low)
- if they are ok, do I need some kind of buffering from the USB in -> out data lines? (I noticed the off resistance between points varied from >50Mohm, down to around 200kohm, which I couldn't understand why)
- I used the auto router function in eagle to make the board, and there are hundreds of vias and it seems very complex, could this cause interference on the USB data signals?
Thanks, any help is appreciated as I am not sure how to progress from here...
Bit of project background and why I needed this device: This for switching USB devices between several musical instrument from a company called Monome (https://monome.org/) I have 3 USB host: The Teletype, Ansible and Norns (2 usb ports) and 3 USB devices: A bluetooth key, Arc and Grids.
All of the devices can be used on any of the hosts. So I wanted to:
- Allow for fast swapping
- Reduce physical ware by not actually having to disconnect
This is the closest schematic I could find to what I wanted which is simple a 2->1 but uses a switch. So I thought I could replace the switch, with cmos ones.
I suppose I'm trying to make something like this (USB2) with a better UI: https://www.startech.com/en-au/cards-adapters/hbs304a24a