Controlling an Xbox 360 controller with an Arduino

Some years ago, I was really obsessed by the Gears of War games and really wanted all the Xbox achievements, but they were really boring to grind through and I didn't want to do THAT. So I bought a broken corded controller from a friend and set out to figure out how to connect it to an Arduino and how to program an Arduino.

The code for the various "macros" can be found here.

Cat-5e cable is great for this btw. Copper wires come in two variants: solid and stranded. Solid wires are a single strand of conductor. They are great for prototyping because they stick well into protoboard holes. The downside is that they suffer heavily from metal fatigue much faster and therefore have a tendency to break at the bends. Stranded wires, on the other hand, are the variant of choice for production. Their only downside (difficulty with prototyping) can be remediated by twisting the ends and soldering them. I'm not sure where I got the solid wires on the adapter circuit, a cheap Cat-6 network cable probably.

Frankenstein's Monster or the Xbox 360 controller
The various adapter circuits on my protoboard (see schematics below)
A regular Arduino Uno used to run the code

Schematics

Below are the 3 adapter designs for each type of input on the controller.

Adapter 1

This design is a tri-state adapter used for the joysticks. We need 4 (LSx, LSy, RSx, RSy).

ButtonWireArduino pin
LSxWhite-blue11
LSyBlue10
RSxWhite-brownA1
RSyBrownA2
Arduino (input)Controller (output)Note
Hi-Z0.8Voff
High (5V)1.6Von (up or left)
Low (0V)0Von (down or right)

Adapter 2

This one is the "standard" adapter for all "push to enable" buttons. We use it for all other buttons. I have used 11 instances, but would have technically needed 15 (I didn't wire the D-pad since I ran out of Arduino pins and didn't really need it anyway).

ButtonWireArduino pin
LBWhite-orange9
RBWhite-blueA5
LSbtnBlue (thick)13
RSbtnGray (thick)A4
BackYellow (thick)8
XboxOrange (thick)7
StartGreen (thick)6
AGreen2
BOrange3
XBlue4
YWhite-orange5
Arduino (input)Controller (output)Note
Hi-Z0Voff
High (5V)1.8Von
Low (0V)0Voff

Adapter 3

This design is two-state and is used for the triggers (LT and RT). One problem with it is that setting the Arduino pin High could be damaging. A transistor or a Zener between the Arduino and the controller would have been better.

ButtonWireArduino pin
LTWhite-brown12
RTWhite-green10
Arduino (input)Controller (output)Note
Hi-Z1.3Voff
High (5V)BADMust not happen
Low (0V)0Von