USB (master-slave disconnector)

Hello.
I am new to Arduino. I am trying to build a system that disconnects the game controller from the Xbox 360. I need a little help in this aspect since I am not an electronics engineer. Hence can't use the phrases. I can however use google.

So here is what I want to do.
I want to be able to send a signal from my desktop, over ethernet, to Arduino. This should reside between two USB devices (the master and slave). It should break the circuit as and when I send the signal and reconnect the circuit when I send a different one.
In effect, it will emulate pulling the controller from the Xbox 360 when I send a signal over ethernet.
How can I do this with Arduino? If not Arduino do you have any other suggestions?

Thank you and I appreciate the help.

  • Chaitanya

Well, assuming you can find the connectors for the controllers (maybe hack up a multi-tap? I don't anything about the XBOX)...

The easiest way to connect/disconnect the controller would be by using a relay; if I am understanding things correctly based on my googling, the controller on the 360 uses USB, so it probably has 4 or five pins. Find a 4 or 6 pole, double-throw relay (4PDT/6PDT), and hook it up to the Arduino (I won't go into detail here; plenty of examples abound on the net). The relay will sit between the secondary joypad connector and the console's joypad connector; you will need one relay per joypad; somethng like this:

http://www.allelectronics.com/make-a-store/item/RLY-503/5VDC-4PDT-DIP-RELAY/1.html

Alternatively, you could use 2 or 3 DPDT relays.

From there, you just need a WiFi or wired ethernet shield (you could also communicate with the Arduino over USB). After that, it is a lot of coding and testing; you need code on the Arduino to listen for commands from the WiFi/ethernet/usb and set/reset the relay as commanded. You would also need code on the PC to send those commands.

Finally, a sweet enclosure of your design to show how 1337 you are.

Good luck, hope that helps! :smiley:

As a solid state alternative to a relay you could use a 4051 analogue switch to control the connection routing. It needs to be analogue to cope with the bi-directional communications.
Here it is shown as an input multiplexer for the analogue input:-
http://www.arduino.cc/playground/Learning/4051

Do you need to switch all of the lines? wouldn't cutting power work?

You don't actually need a double-throw relay: a 4PST would do. Or even a 3pST one: you could skimp a little by leaving the ground connected, and only switching the data lines and the plus side of the power. But the one cr0sh2 found is a nice bargain, so you might as well go with it, and ignore the contacts you don't need.

You can find the info you need on controlling the relay in the Playground area.

To interface your gadget via Ethernet, check out the Webduino library.

wouldn't cutting power work?

No because the lines are still connected and the active device would try and drive the powered down device. The load of the powered down device would interfere with the powered device. That is why you need to switch but not all four wires just the two signal wires, leave the +5 and ground connected.

That is why you need to switch but not all four wires just the two signal wires, leave the +5 and ground connected.

This is pretty close to being completely backwards: the Xbox controller interface is USB, so there won't be any "interference" because the USB standard requires dedicated drivers and receivers on each port of the hub.

Additionally, simple devices designed to be hot-plugged are likely to require being power-cycled in order to be properly reset.

Even though the Xbox peripherals should be designed so they'll tolerate having their inputs driven when they're not powered, conservative design philosophy says they should be disconnected when simulating an unplug, just in case the peripheral designer cut corners.

But the power must be shut off, because not doing so makes the disconnect look like a failure of the hub or the cable, instead of a normal unplug. There's a significant risk that such an operation wouldn't work correctly.

Ideally, both power and data should be disconnected. But, if you're only doing one, it should definitely be power.

Ran