Announcement

Collapse
No announcement yet.

Switching USB connection On/Off with relay

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Switching USB connection On/Off with relay

    I'm looking for a way to control a USB connection with a relay. I'm thinking that using this method to disconnect my USB keyboard when the car is powered off will eliminate my RF interference when the doors are locked. Anyone know of any small device that will do this? Thanks.

  • #2
    Hi Destin:

    I think we're the only two mac types here! Anyway, how does the interference manifest itself? Does the machine turn itself on, then go to sleep, then turn on again? If this is the case I have an easy solution.

    Did you ever fix the problem with the lines on your display when playing video?

    Comment


    • #3
      I have a hacked USB keyboard which serves as the interface to the steering wheel buttons.
      When I turn off the car, the power supply to the PowerBook is lost, so it immediately goes in "sleep" mode. When I lock the doors after existing the car, RF interference gets into the keyboard, which sends bogus keystrokes to the PowerBook - which wakes it from sleep momentarily. If it wakes up while the external HDD is not powered on - it stays "awake" until it finds the HDD again (this is bad). So, to work around this, I have the HDD always powered on (I leave it running through the day and shut the entire system down at night). This allows the PowerBook to return to sleep mode after the brief wake ups.
      I can think of two possible solutions: 1) Resolve the interference itself, which wouldn't be easy. 2) A USB switch toggled by a relay to disconnect the keyboard while ACC power is off.
      If the keyboard isn't connected, the bogus signals wont get through, and I could have the HDD turn off without causing any problems. The best thing about it would be not having to startup the system in the morning and shut it down overnight - it would always be in sleep mode and wouldn't be draining the second battery. (In sleep mode the PowerBook draws power from its own batteries).
      Anyhow - I'm still looking for the right USB switch to do this with...

      Comment


      • #4
        Hmmm...

        If you would cut the power on the usb-device it will help you right ??

        If you look at a usb connector you will see that there are 4 pins...
        2 for power, and 2 for data..
        You will notice that they don't have the same length..
        This is because you can switch usb-devices while the computer is running..
        But I'm not sure which line (data or power) is cut-off first when you take the plug out. (because off the shorter pins..)

        Maybe you could work around this by just cutting the power to the usb-device..

        Anyone ?? (it's just an idea)

        Greetz
        Raas - The Netherlands
        ME: VIA epia m10000, lilliput 7', opus 150w, 80gb<br>
        GF: IBM Thinkpad 380, ext. 3.5 80gb, 40x4, PB-IR

        Comment


        • #5
          Originally posted by Raas:
          <STRONG>But I'm not sure which line (data or power) is cut-off first when you take the plug out. (because off the shorter pins..)
          </STRONG>
          You would assume that the data is cut first, since cutting the power whilst the data wires are connected could put a shock down the data lines killing the USB port? maybe?

          Its like AUS 240V power plus with the ground pin slightly longer so the device you are plugging in is grounded before power is applied....
          Project - GAME OVER :(

          Comment


          • #6
            No guessing...
            http://www.networktechinc.com/technote.html#pc

            Just use a relay (and a small capacitor) to open/close the circuit on pin 1. Try to shield the whole thing somehow (aluminium foil...?)

            Dimitris

            Comment


            • #7
              yes.... load the relay contacts with a resistor value when they are open. ie use a 1Meg resistor on the normally open pins of your relay to put a 1 megohm load on the wires going to the keyboard button. This way interference won't get in as it's balanced. Then the relay will short the resistor to press the button. This will fix your troubles....
              |-[=]-| this is the 1M res
              ____________|__/__| this is your relaycontact
              wires to |
              keyboard |
              __________________
              BjBlaster! Car MP3 & Carputer!
              bjblaster.com

              "The solution to one problem is only the beginning of another"

              Comment


              • #8
                why can't I edit my post?

                it should look like this.. (I hope

                resist|-[===]-|
                ______|___/___|______

                [ 08-29-2001: Message edited by: Bj ]

                [ 08-29-2001: Message edited by: Bj ]
                BjBlaster! Car MP3 & Carputer!
                bjblaster.com

                "The solution to one problem is only the beginning of another"

                Comment


                • #9
                  I purchased a cheap USB switchbox, and noticed that the switch breaks all 5 contacts at the same time. So this leaves me with the question - if I'm going to break only one of the five contacts with my relay, which is the best? (Power or data? And if data, which of the two?) Any danger of damaging the USB port by switching the power wire on/off?

                  Comment

                  Working...
                  X