USB controlled USB3 relay switch for data recovery tasks - Page 1
Forum section: electronics / projects

author: Inflex
author_rank: Regular Contributor
timestamp: December 31, 2016, 04:46:00 am
content: Latest thing I've been spending way too much time on is sorting out my USB controlled within linux (and now also just RPi / logic-line).I use this to let me reset the power to USB drives, which is somewhat needed when you're dealing with these new integrated USB3 bridge portable drives (otherwise I just load them up in to the recovery server which has a 3.5" loader dock with a controlled power switch in that).Unit pictured is the previous revision, sadly the USB3 data lines and my reading of the USB3 connector datasheets was slightly botched up and I've had to spin another revision (I have a couple of YouTube videos on my dismay of that)

author: Monkeh
author_rank: Super Contributor
timestamp: December 31, 2016, 06:55:58 am
content: Crazy notion: You're aware you can perform a soft reset from the OS with much the same result and less abuse of the head offload mechanism.. right? You might already have tried that tack, though, I'm not sure all controllers will react properly.And that giant relays aren't really needed for this..

author: Inflex
author_rank: Regular Contributor
timestamp: December 31, 2016, 07:01:19 am
content: Quote from: Monkeh on December 31, 2016, 06:55:58 amVery well aware, but there's some failures that do need hardware cycling (and I've tried several various software methods including bus reset and -w with hdparm). They only get to this point if the next step is off to the clean room and the client isn't interested in paying quite that level of coin.QuoteAgain, quite aware, but I have a few hundred of these left over from my prior R/C manufacturing feedstock, so that's what I'm using

author: Monkeh
author_rank: Super Contributor
timestamp: December 31, 2016, 07:03:22 am
content: Fair play on both points. Post more details!Also, hi Paul, nice to see you here.

author: Inflex
author_rank: Regular Contributor
timestamp: December 31, 2016, 07:18:09 am
content: Quote from: Monkeh on December 31, 2016, 07:03:22 amThanks Monkeh, over in the UK?Tools used:* ddrescue 1.22-pre5 (http://download.savannah.gnu.org/releases/ddrescue/), utilise the --exit-on-slow, though this has changed in the newer releases to another flag* waitfordevice (https://github.com/inflex/waitfordevice)* USB controlled relay switch based on the OBDev/V-USB Atmel switch using an Attiny2313 and 12MHz resonator (https://www.obdev.at/products/vusb/powerswitch.html)* YT video of the data recovery process:https://www.youtube.com/edit?video_id=DHykaRlfRwc(there's a few other videos, including a build of the latest board and then fixing the routing... badly)I'll make the Eagle sch/brd files available once I've absolutely confirmed all is good with the USB3 side with the new boards.Boards are done by iTeadStudio, been using them for protos many years, used to use GoldPhoenix for production runs though.While people might not use it for data recovery, it still can be used for switching the power to other USB devices. I have other generic DC input variants of this board too, might add the headers for a terminal block on this one as an additional item.I've not used it in Windows, but I know the powerSwitch.exe file exists for it.Biggest gripe I have at this point is that you can't have multiple units plugged in without confusing the powerSwitch app (no way to distinguish), though at least you can expand these out to 8 ports of switching, but then people probably will find it cheaper/simpler to go with existing relay boards.

author: Monkeh
author_rank: Super Contributor
timestamp: December 31, 2016, 03:30:14 pm
content: Quote from: Inflex on December 31, 2016, 07:18:09 amV-USB supports the use of serial numbers (actually they're strings) to discriminate devices, it should be fairly easy to sort that.

author: Inflex
author_rank: Regular Contributor
timestamp: December 31, 2016, 03:47:08 pm
content: Quote from: Monkeh on December 31, 2016, 03:30:14 pmMight have to make that tweak, because a couple of my recovery servers have the switches internally, but now and then I want to use an external unit (for things like these integrated USB bridge drives).