USB hub/switch IC for double Circuitpython board

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bludin
 
Posts: 97
Joined: Thu Apr 16, 2020 8:57 am

USB hub/switch IC for double Circuitpython board

Post by bludin »

I would like to design a double-MCU circuitpython board, i.e. with two SAMD51 MCUs. The board should only have one USB-port, so it needs an onboard switch/hub. Has anybody done like that and would like to share the knowledge or schematics even? What would be a good USB chip that works reliably and needs as few external parts and as little configuration as possible?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: USB hub/switch IC for double Circuitpython board

Post by adafruit_support_mike »

It depends on what behavior you want from the USB switch.

Just making and breaking the connections is easy.. you can do that with logic buffers or single-pole/double-throw relays. One control signal connects D+ and D- to microcontroller-A, and the other control signal connects them to microcontroller-B.

You'll lose one USB connection completely when the connections change, and there's no way around that. There's no such thing as a partially disconnected mode for USB. Among other things, the USB Host sends out keep-alive packets at regular intervals (typically 1ms) that the connected device has to acknowledge. If the Host doesn't get an ACK, it assumes the device has been disconnected and tears down that connection.

User avatar
bludin
 
Posts: 97
Joined: Thu Apr 16, 2020 8:57 am

Re: USB hub/switch IC for double Circuitpython board

Post by bludin »

adafruit_support_mike wrote: Sun Nov 20, 2022 12:22 am It depends on what behavior you want from the USB switch...
Thanks for your answer and sorry for being unclear. I really meant an onboard hub. Basically I want to combine two Circuitpython boards and a USB switch on one board such that both Circuitpython devices/disks are visible to the PC. I'm looking that ICs like the USB2412 or USB2512 and wonder, which one would be the most efficient choice.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: USB hub/switch IC for double Circuitpython board

Post by adafruit_support_mike »

Got it, thanks.

We don't have any experience designing USB hubs, so all I can do is toss out a few generalities: the biggest is "avoid speculative generality". It's tempting to look for a device with all sorts of options on the chance you'll want them someday. Usually that leads to fighting unnecessary complexity for no real payoff.

Start with the simplest device that has all the features you know you'll use, and use that to get familiar with the problem domain. That will give you the background to make better choices about new features.

The next is that you can't really compare devices from the datasheets. Most of the information that will build a preference comes from testing devices in specific applications. Fortunately it's easy to order parts in small quantities so getting familiar with a new device isn't painfully expensive.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”