# Beginner Question...

Jun 9, 2016
16

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
I've just noticed this is the S3 (3NO + 1NC), I would need the S4. The hunt continues...

* Have now found S4 variant available

* And another candidate... http://www.ebay.com.au/itm/RA4-5W-K...586462?hash=item2a6042559e:g:bhQAAOSwqrtWpzcp
will fulfill the requirement of switching 4 circuits but I do have reservations.

When this thread started I had a mindset that you needed to switch the USB 5V supply line only. As it turns out your switching very high speed data. I think my desire to give you a quick solution overrode many years of dealing with high frequency and necessary circuit design attendant to dealing with it. I can't guarantee that either one of these relays won't cause serious degradation in signal quality. I certainly would appreciate input from my colleagues here but thus far we seem to be alone.

I don't want to see you throwing good money after bad so I'm going to keep looking for another solution.

Chris

#### BobK

Jan 5, 2010
7,682
It's worse than that. The contacts are only rated at 45mA and USB power is rated at 500mA minimum, with higher allowed for devices that implement the protocol and ask for it.

Bob

#### Ledbetter14

Jun 9, 2016
16
The data sheet for both indicate higher contact currents but the eBay one I believe is cutting it a bit close at 1A. That is if I'm reading them right.

Chris, if it makes a difference I will only be switching things like game controllers or webcams, nothing I'm too concerned with corrupting or anything. Either way I will wait for your approach before I pull the trigger on anything.

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
It's worse than that. The contacts are only rated at 45mA and USB power is rated at 500mA minimum, with higher allowed for devices that implement the protocol and ask for it.

Bob
Bob, thanks for catching that. I've spent quite a bit of time searching USB distribution devices but have come up empty. At this point I'm liking the solenoid approach that I dismissed as crude, earlier in this thread. It may be clunky but it would keep his switch box circuit intact.

Chris

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Searching further for a 100% solid state solution in the form of a Logic Gate had me a bit befuddled because I've never dealt with Differential I/O in the realm of logic blocks. Since USB uses Differential I/O that's what I searched for and landed on "On Semiconductors" Differential AND, NAND, OR, NOR gates. These chips are in the ECL logic family. Here's a short list of some of these chips:

MC10E404
MC100E404
MC10EL05
MC100EL05

If any of these or similar chips can be used to switch the D+ D- data lines On/Off then perhaps the +5V line from each host device can be tied together through 4 Schottky Diodes and all 4 Host GND lines and Client GND made common to each other.

Thoughts anyone?

Chris

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Further searching produced this product.
https://www.iogear.com/product/GUS404/
It appears to use a pig-tailed push button switch to switch between one of four USB Hosts connected to one USB Client device. If the switch is only switching a High / Low control voltage it will make your life much easier because interfacing your IR/GPIO to step the switch lines should be straight forward.

There are other manufactures too but I stopped on this one because of the dongled switch and cable.

Chris

#### Ledbetter14

Jun 9, 2016
16
Do you think this product will allow individual selection of a source or will it only cycle through? It is pretty important to my implementation that I can just select a source without having to track and guess current input.

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Obviously that host selector steps through each host upon press of the momentary switch. The product also has 4 LEDs that indicate the currently selected USB host. It wouldn't be a big deal to write code that would output the correct number of switch press pulses that would be determined by which host LED was currently active. It's true that you would have to tap into the LED indicator circuit to use their state as inputs to your uC. Here's some pseudo code to give you an idea what I'm referring to.

Code:
If IR Code = Host2 And CurrentHost = Host4 Then
Step 2     ';// Generate 2 Output pulses to simulate 2 switch presses.
End If

On the other hand you could use an entirely different approach that wouldn't require tapping into the LED indicators. This would also be handled in code. For instance if the push button switch is not removed you will have both manual and IR control by paralleling the switch with an open collector NPN driven by the uC's GPIO. If you then manually preset the selected host to "1" with the switch then your code can keep track of which host port is currently selected from that point forward. That's the beauty of uC's. It has the ability to make logical decisions based on your code. It can also remember its last selected host port.

Another option for you is purchase a different distribution box that uses 4 separate momentary push buttons to select the host port. Ebay has quite a few items 'that appear' to be momentary. You can search ebay with these search terms: "USB Distributor", "USB Distribution", "USB Selector", "USB Selector Switch", etc.

All that said please don't totally dismiss my suggestion of 4 solenoids to electrically press your current manual switch box. Yes, you would have to discard the enclosure and mount the board on a wood base along with the 4 solenoids but the only thing you'd have to change (as far as your code is concerned) is your 4 outputs would be coded to activate the solenoids for about 1 second. This is because your switches employ a mechanical latch and don't need (the solenoid selected) to remain activated. I believe 4 NPNs or logic level FETs connected to each GPIO and each solenoid is all you'll need to drive them. There are also Transistor Array chips available where multiple driver transistors are packaged in a single chip. The ULN2xxx series of chips are an example.

Chris

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Here's one method of interfacing the solenoids to the uC's GPIO ports.

Chris

#### Ledbetter14

Jun 9, 2016
16
I like the solenoid idea, if only for the chance to try them out. The entire set up will be deep in a cupboard in another room so I'm not to concerned about the aesthetics. What would be the best way of going about it?

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
You need to somehow measure how many ounces of pressure your switches need to depress them. Then measure the distance the switch needs to move forward to latch in the closed position. I think with that data we can select a proper push type solenoid. A pull type solenoid can be used but it would require more mechanics to convert the pull action into a push action. I think the pull types are far more common but I could be wrong.

Chris

#### Ledbetter14

Jun 9, 2016
16
It's around 15 ounces of pressure and travels approx 3.5mm

#### CDRIVE

##### Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
There are quite a number of 12VDC and 24VDC solenoids available on Ebay that will fill your force and stroke requirements. Keep in mind that you'll be powering them from a wall pack, which can be a 12VDC or 24VDC model. A 24V solenoid will draw about 1/2 the amount of current that a 12V model will. Either voltage will work. Keep in mind that the solenoids will only be drawing current for less than 1 second. Because of this a wall pack with a current rating less than the solenoid could conceivably still be used by adding a large Electrolytic Cap across the wall pack's output.

Remember that these 4 solenoids will be sitting in tandem with each other so size is important when looking through the Ebay listings. Here are some of them..

http://www.ebay.com/itm/DC-24V-10mm...510000?hash=item51b96142b0:g:Ld8AAOSwDNdViUeQ

http://www.ebay.com/itm/DC12V-24V-1...325859?hash=item486207d563:g:dcsAAOSwDNdVlYib

Main listings for 24V Solenoids:
http://www.ebay.com/sch/i.html?_fro...C2.A0.H1.X24v.TRS1&_nkw=24v+solenoid&_sacat=0

Main listings for 12V Solenoids:
http://www.ebay.com/sch/i.html?_fro...C2.A0.H0.X12V.TRS1&_nkw=12V+solenoid&_sacat=0

Chris

Replies
4
Views
247
Replies
5
Views
938
Replies
44
Views
2K
Replies
14
Views
893
Replies
7
Views
1K