USB Diverter

Discussion in 'The Projects Forum' started by D@rkL0rd, Apr 17, 2016.

  1. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    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
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,173
    1,797
    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.
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
  4. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    @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.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,173
    1,797
    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: Apr 17, 2016
  6. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    @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
     
  7. tcmtech

    Well-Known Member

    Nov 4, 2013
    2,043
    1,674
    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.
     
  8. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    @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.
     
  9. tcmtech

    Well-Known Member

    Nov 4, 2013
    2,043
    1,674
    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.
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,173
    1,797
    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.
     
  11. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    @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.
     
  12. Papabravo

    Expert

    Feb 24, 2006
    10,173
    1,797
    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.
     
  13. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    @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.
     
  14. D@rkL0rd

    Thread Starter New Member

    Jun 22, 2014
    25
    1
    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.
     
Loading...