USB Diverter

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
Hey everyone,

So I undertook a project on which I would like some help.

I want to create a device that will divert a USB channel from one port to another. A crude representation of what I am trying to achieve. (Basic Structure.png)

So far I have created this circuit (Primary Circuit.jpg).

R1 is used to bring the base current down. I have yet to find its value.
B1 is one of the buttons showed on Basic Structure photo.
X1, X2, X3, X4 are the transistors used as a switch. I am not sure that this will work but this is what I could come up with.

I did not complete the second part to avoid confusion but think it will be same as the others.

The first thing I want to know is if this is even possible? Am I on wild goose chase?
If this is possible then will my circuit be able to achieve it or do I have to make other arrangements?

Thank you for your time.
Basic Structure

Basic Structure.png

Primary Circuit
Primary Circuit.jpg
 

Papabravo

Joined Feb 24, 2006
12,693
The Bipolar Junction Transistor (BJT) is manifestly unsuitable for this job. What you want is called an analog switch.
You also want to be very careful about connecting the two power supplies from the computers together.
 

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
@Papabravo yes, I too think that BJTs are not suitable. However which analog switch can I use. Also what kind of danger am I looking at here?
@bertus yes I did know about those before I decide to build one but I wanted to build one by myself. :p

Thanks.
 

Papabravo

Joined Feb 24, 2006
12,693
@Papabravo yes, I too think that BJTs are not suitable. However which analog switch can I use. Also what kind of danger am I looking at here?
@bertus yes I did know about those before I decide to build one but I wanted to build one by myself. :p

Thanks.
I refer you to this thread:
http://forum.allaboutcircuits.com/threads/can-i-use-2-dc-power-supplies-together.27346/

You can start with the CD4066 or the CD4016. If those prove to be unsuitable or unobtainable, then maybe something from the DG series like this will do the job.
http://www.vishay.com/docs/70053/dg441.pdf

If I was doing this I would use a center neutral toggle switch that implemented a break before make protocol. That is in the center position, both computers are disconnected from the keyboard. In the left position the left computer and keyboard are connected and in the right position the right computer and the keyboard are connected. Does that make sense?

One more thing -- you don't have to switch the grounds. They can be tied together.
 
Last edited:

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
@Papabravo won't the center neutral toggle switches have to be toggled manually. I was thinking using CD4066 or CD 4016 or one of the dg series. I will have to check in my local store.
And won't the IC switches do the center neutral toggling internally?

Sorry if I am asking stupid questions this is only my second project.
Thanks
 

tcmtech

Joined Nov 4, 2013
2,868
It could be done with a simple 4PDT toggle/rocker/rotary/whatever switch being you manually have to switch it to tell it what computer to go to anyway.

If you want push buttons then a simple relay latching circuit that runs a pair of 4PDT relays could do it as well.
 

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
@tcmtech any idea what, if any, kind of software problems I might face. I think I will go with 4PDT toggle switch for now and then in version 2 use the ICs. But still I will build the circuit now.

I will post my progress here tomorrow.

Thanks.
 

tcmtech

Joined Nov 4, 2013
2,868
If they are USB based plug and play systems then nothing. Switching on and off should be no different than plugging in or unplugging from the USB ports.
 

Papabravo

Joined Feb 24, 2006
12,693
@Papabravo won't the center neutral toggle switches have to be toggled manually. I was thinking using CD4066 or CD 4016 or one of the dg series. I will have to check in my local store.
And won't the IC switches do the center neutral toggling internally?

Sorry if I am asking stupid questions this is only my second project.
Thanks
Switches bounce, and you don't want them to be connecting and disconnecting at the same time. What you don't want to happen is to have the connection on both sides being repeatedly made and broken. You want the break to happen first, then the make -- without any overlap.
 

Papabravo

Joined Feb 24, 2006
12,693
@Papabravo So will the quad Bilateral switches be doing it internally or do I have to use 4PDT switches do it. I am assuming 4PDT switches do this.

Thanks.
If you use the quad switches you must ensure that you break the connection(s) of one set BEFORE you allow the other set to make. That is the requirement. How you decide to do it is up to you. The 4PDT switch will do what you want without any ICs involved.
 

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
@Papabravo the PDT switches seem a little crude to me but I think that I will use them and in the second version I will use the ICs.

I will report my progress tomorrow.

Thank you.
 

Thread Starter

D@rkL0rd

Joined Jun 22, 2014
25
Okay guys, I am back after my exams and all ready for completing this project. I am sorry for not coming back after for so long.

So does anybody know any good simulator that I can use to simulate the CD4066?

I have tried 123circuits.com and fritzing simulator.

Thanks.
 
Top