Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

remote usb switcher?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

remote usb switcher?

by Squishymonster on Tue May 04, 2021 11:01 am

I have a disabled friend who would like a way to plug / unplug various USB devices without physically manipulating the plug. I mean we plug the USB inline with such a device and leave it, then he can connect / disconnect without manipulating the cords. I assume there'd then be an additional USB cable to send the connect /disconnect signal.

Ideally the interface would be via a PC app, but Android app would likely work just as well. I thought it was possible to disable / enable a USB device via windows, but he says that after disabling, it is not possible to get windows to recognize it again without physically re-plugging the cable.

I was searching USB Switches, which are _almost_ what we need, but the physical button that 99% of them use are a show stopper. I also found a couple of "industrial" options that are in the multiple hundreds of dollars but that's just not viable.

I found one circuit board shipped from the EU (We are in US) and the price was fine around $35, but shipping was $45, which makes it a bit too expensive. Before going that route we want to see if there is a more affordable option - especially considering that we'd end up paying shipping twice - one to buy a test unit, and again to buy more units if it tests well.

I have seen one or two arduino projects for this, but the cost would get close to the EU option, and really it'd be nice to spend our soldering time on other unrelated solutions if possible. But, we'd definitely go that route if it comes down to necessity.

If anyone has any ideas, please post! Thanks a ton : )

Squishymonster
 
Posts: 1
Joined: Mon Mar 21, 2016 5:33 pm

Re: remote usb switcher?

by blnkjns on Tue May 04, 2021 5:06 pm

I would hack something into an USB switch. Use one port for a small arduino, like the Itsy Bitsy 32U4, and connect a bunch of relays to its digital pins, which can be activated to apply 5V to the 5V pins of the other ports, or if you don't use bus-powered devices, the relays could switch both data lines at the same time.
Now we only need to choose the right USB protocol to let the OS control the Arduino. I think USB-HID has options to explore.
https://www.adafruit.com/product/3677
Can't find simple relays here, but they should be an easy find, 1-2 bucks each.
With tiny solid-state relays you might even be able to cram the whole thing into the HUB for nice clutter-free USB powered operation.
Or make your own PCB, with solder islands for the Itsy Bitsy, I think the internals of a USB switch are really dumb, so this won't be that hard. If the prototype works, you can use a custom PCB to skip buying switch and make the soldering go really fast.
Last edited by blnkjns on Tue May 04, 2021 5:19 pm, edited 1 time in total.

blnkjns
 
Posts: 624
Joined: Fri Oct 02, 2020 3:33 am

Re: remote usb switcher?

by adafruit_support_bill on Tue May 04, 2021 5:16 pm

but he says that after disabling, it is not possible to get windows to recognize it again without physically re-plugging the cable.

It is possible to both enable and disable USB devices in software via low-level Win32 calls. NativeSetupDiLib is one example:
https://github.com/thedarkprojects/devj ... upDiLib.cs

adafruit_support_bill
 
Posts: 81308
Joined: Sat Feb 07, 2009 10:11 am

Re: remote usb switcher?

by blnkjns on Tue May 04, 2021 5:21 pm

But if there is really many items, limiting power may be one problem to deal with as well.

blnkjns
 
Posts: 624
Joined: Fri Oct 02, 2020 3:33 am

Please be positive and constructive with your questions and comments.