Introduction: Mod Xbox 360 Controller Using Arduino (MW3)
I didn't want to buy a modded controller chip for two reasons one they only do the one thing and two they become out off date quickly making them useless for new games. So the arduino I just picked up seemed perfect, it's programmable meaning that if there is an update and it stopped working I could just modify the code and it would work again and the arduino is useful in a near infinate amount of projects. Also because I only wanted this mod for splitscreen and private matches absolute perfection wasn't needed. So if you're looking for the best rapid fire out there, go buy a chip.
But if your not a perfectionist and you want to turn that Dragunov into the AK that it really is or shoot the Barrett like a p90 then this is for you. First off you should know that like all other Xbox controller mods there are some risks. First opening the controller voids the warranty (I void warranties), If you do the soldering wrong you could damage you're controller permanently, and if you use it on live I think there is a potability you could be banned (I've played a few games on live so it's not instant). I take no responsibility for the affects of this project. There you go you've been warned.
Update: Two extra peices are required for better performance, a resistor (Gold,black,red,gold) and a diode (I think any will do).
Attach the diode to the wire from the button that goes to Vin making sure that the black end goes into the Vin pin and the silver(-) end goes on the buttons wire. Attach the resistor onto the other wire from the button that goes into pin 4 (it doesn't matter which way resistors have no polarity). Fell free to experiment with other resistor diode combos, if you have one that works well please leave a comment.
I've also included a crumby video for your viewing pleasure (or lack thereof)
But if your not a perfectionist and you want to turn that Dragunov into the AK that it really is or shoot the Barrett like a p90 then this is for you. First off you should know that like all other Xbox controller mods there are some risks. First opening the controller voids the warranty (I void warranties), If you do the soldering wrong you could damage you're controller permanently, and if you use it on live I think there is a potability you could be banned (I've played a few games on live so it's not instant). I take no responsibility for the affects of this project. There you go you've been warned.
Update: Two extra peices are required for better performance, a resistor (Gold,black,red,gold) and a diode (I think any will do).
Attach the diode to the wire from the button that goes to Vin making sure that the black end goes into the Vin pin and the silver(-) end goes on the buttons wire. Attach the resistor onto the other wire from the button that goes into pin 4 (it doesn't matter which way resistors have no polarity). Fell free to experiment with other resistor diode combos, if you have one that works well please leave a comment.
I've also included a crumby video for your viewing pleasure (or lack thereof)
Step 1: Materials
Materials :
1 x arduino
1 x Xbox 360 controller
1 x computer (with arduino software installed)
1 x usb to arduino cable
1 x 9v to arduino connector (link to make your own)
1 x 9v battery
1 x special TORKS 8 H screwdriver or use this method (worked for me)
1 x momentary switch (two pins)
50 cm of solid core wire or a few more jumpers
1 x wire strippers
some jumpers (about 4)
Hot Glue gun
hot glue gun sticks (only one probably)
Solder (lead free)
soldering iron
third hand (semi-optional)
heat shrink tubing (option)
electrical tape (optional)
Small saw (or knife)
allot of patience
1 x arduino
1 x Xbox 360 controller
1 x computer (with arduino software installed)
1 x usb to arduino cable
1 x 9v to arduino connector (link to make your own)
1 x 9v battery
1 x special TORKS 8 H screwdriver or use this method (worked for me)
1 x momentary switch (two pins)
50 cm of solid core wire or a few more jumpers
1 x wire strippers
some jumpers (about 4)
Hot Glue gun
hot glue gun sticks (only one probably)
Solder (lead free)
soldering iron
third hand (semi-optional)
heat shrink tubing (option)
electrical tape (optional)
Small saw (or knife)
allot of patience
Step 2: Opening the Controller
First this is much easier said than done. There are many methods of doing this the first and most simple is to order a T8H screwdriver, however I didn't. Search the site and you'll find many ways to open an xbox controller. I used this Instructable. Once it's open be careful all the buttons like to fall out. When the controller is opened up we need to locate the pins that the right trigger is connected to. Flip the PCB around and find the three pins in the middle part of the board (see pictures).
Step 3: Soldering Wires
the next step is to solder solid core or long jumper wires to two of the pins on the PCB. I think that the two top pins are the correct ones (look at the first pic). In some of the pictures there are three wires soldered that is because in the beginning I didn't know the correct ones. This would be a good time to apply the heatshrink tubing or wrap with electrical tape. Be vary careful while soldering because any stray solder or joined pins may short out and wreck controller. In my case I got a small amount of solder onto the little resistor (or diode) next to the trigger pins.
Step 4: A Little Surgery
In order to get the wires to come out of the controller and get everything to fit in again I needed to cut a small groove into the shell of the controller. You should probably find a better place to make the incision as mine was sort of uncomfortable to hold afterwards. I also applied some hot glue to my connections to ensure they didn't break after a little bit of rough handling. Depending on your soldering skills this may not be necessary.
After the cut is made everything should fit back together with the wires coming out of the controller. Now if you bought the T8H screwdriver you can put all the screws back in place, but if you didn't i recommend putting some more user friendly screws back instead.
I also recommend trying out the controller here to ensure there are no soldering mistakes and that everything works, otherwise take it apart and double check everything. This is were allot of patience is needed.
After the cut is made everything should fit back together with the wires coming out of the controller. Now if you bought the T8H screwdriver you can put all the screws back in place, but if you didn't i recommend putting some more user friendly screws back instead.
I also recommend trying out the controller here to ensure there are no soldering mistakes and that everything works, otherwise take it apart and double check everything. This is were allot of patience is needed.
Step 5: The Button
The momentary push button is easy to install. First solder solid core wires or jumpers onto both pins of the button. Next find a comfortable place for the button on the controller. After hot glue on. just make sure the button is still pressable after the hot glue is applied.
Step 6: Wiring
the wiring is also quite simple.
middle wire of trigger to pin 2 on the arduino.
top wire (black) of trigger to gnd on arduino
one side of button to 3.3v on arduino
one side of button to pin 4 on arduino.
middle wire of trigger to pin 2 on the arduino.
top wire (black) of trigger to gnd on arduino
one side of button to 3.3v on arduino
one side of button to pin 4 on arduino.
Step 7: Programming
Now this step was problematic because the Xbox runs allot faster than the Arduino, meaning that I couldn't use a normal debounce for the button. I posted this question and steveastrouk was vary helpful. I have two sketches one that is vary rapid fire but doesn't stop vary well, the other is slightly less rapid but stops quickly after letting go of the button. I'm not sure how well these sketches will work for different games and have tailored them to MW3. Any help is appreciated (please comment it or pm me) as this is an ongoing process. I will update if I make a break through. Thanks for reading, and if you make this please don't use it for All or Nothing as shooting ruins the game mode.
First sketch rapid but glitchy:
int val = 0; // stores values of the digitalread of the button
int button = 4; // positive leg of buttton connected fromm 3.3v to pin 4
int shoot = 2; // positive wire comming form the trigger/button on xbox controller
void setup() { // setting pinmode and starting serial connection
Serial.begin (9600);
pinMode ( button, INPUT);
pinMode (shoot,OUTPUT);
}
void loop() {
val = digitalRead (button); // reading button storing value
Serial.println (val); // just checking make sure button works
if (val == HIGH) { // if button is pressed
digitalWrite (shoot,HIGH); // needs to go high then low inorder
digitalWrite (shoot,LOW);// to fool conntroller
}
val = LOW; // resting val
}
second sketch is in a file bellow please ignore all the gray stuff. It took allot of work I left it there to show others who want to improve it what didn't work for me.
First sketch rapid but glitchy:
int val = 0; // stores values of the digitalread of the button
int button = 4; // positive leg of buttton connected fromm 3.3v to pin 4
int shoot = 2; // positive wire comming form the trigger/button on xbox controller
void setup() { // setting pinmode and starting serial connection
Serial.begin (9600);
pinMode ( button, INPUT);
pinMode (shoot,OUTPUT);
}
void loop() {
val = digitalRead (button); // reading button storing value
Serial.println (val); // just checking make sure button works
if (val == HIGH) { // if button is pressed
digitalWrite (shoot,HIGH); // needs to go high then low inorder
digitalWrite (shoot,LOW);// to fool conntroller
}
val = LOW; // resting val
}
second sketch is in a file bellow please ignore all the gray stuff. It took allot of work I left it there to show others who want to improve it what didn't work for me.