Introduction: Hacking the Xbox 360 Controller
So you read my Xbox S controller tutorial, then you went out and tried to mod a 360 controller. Well, it's a little bit different.
Here I highlight the differences and show you how to get a microcontroller to perform different button functions with the new controller. And more importantly, I show you how to stuff it all into that sleek little case.
This tutorial covers the wired controller.
If you look at the pictures below, you will see step by step how to install using the smt optocoupler. But refer to step 4 to see how to make the smt optocoupler.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: The Buttons
Here, I show your the places where to access the X and Y button signals. The switching is different, so we need to switch these with use of optocouplers. Unlike relays, optocouplers are unidirectional, so we have to pay attention to how we hook them up.
What's an optocoupler? An optocoupler is a little light emitting diode placed next to a phototransistor in a plastic chip package. Here, I'm using the 4n27, which is a 6 pin device. I am using the DIP package, meaning it's full size with through-hole pins. Could I save a lot of space by using a surface mount part? Well, sort of. Surface mount mainly reduces the height of your circuit, rather than the width... especially considering the extra circuit board you would need. As you will see if you open up your controller, there isn't a lot of space here, but just south of the B button, there is a very tall space that we can utilize.
You can see that I placed a 1k axial resistor onto the R trigger potentiometer output so that it sticks str8 up. This makes it easier to acess after we have glued on the other chips, and if you clip it right, there's just barely room enough inside the case for it to stand str8 up like that.
The chip on the bottom is a microcontroller. It is deadbugged, with the notch pointing up.
The chips on the right are two stacked photocouplers.
Step 2: What the Hell Is That Thing?
This is a pictorial showing how to cram two dip optocouplers inside the controller. After you finish this, refer to the schematic in later step for wiring.
Step 3: Theres Two Traces for Each Button! WTF?
The switching is done differently on the 360 controller. There will be two traces for each button. We can't just ground/pullup one trace to make the X or Y function happen.
The trace on the left of the button will transmit a signal to the trace on the right of the button. This is important. As discussed before, the optocoupler is unidirectional. Do you see what I mean?
So for a common 6 pin photocoupler, such as the 4n27, pin 5 is the phototransistor collector. This must attach to the left trace for the respective button. Pin 4 is the phototransistor emittor. This has to be connected to the trace to the right of the button.
Now pin 1 of the coupler is the anode of the light emitting diode that is hidden inside of the chip. This means we can attach pin 1 to our positive rail.
Pin 2 is the cathode. So we can attach this to our chip... But wait a minute. If we won't put a resistor in there, somewhere, we will burn out the diode or our microcontroller.
Pin 3 is normally unused, so we can solder a small smt resistor between pin 2 and pin 3. Then we can attach out microcontroller output pin to pin 3 of the coupler.
Step 4: SMT Version
So ok, I found these really really small tsop smt dual channel optocouplers. I had to give these a go, they just look so neat. Follow the pics to see how I made a mini interface using this part and a bit of protoboard.
Step 5: Where to Put the External Buttons
If you use the type of switch commonly called the 6mm tactile switch, as I do, there is a nice place for it to go.
I find that the length of the cap should be around 6-7mm tall for best feel. My buttons are actually 9.5mm, and I have found that with a sharp razor blade, you can cut them down to the desired length.
The proper place, IMO, for the buttons, is just about level with the middle screw line, just at the crease where the handles start to form. This spot also just happens to have enough space for placement. Any further out or much further up, and you will run into space problems.
Step 6: Schemmy
The top chip is the optocoupler, a 4n27 in this case. Actually it's two of them, stacked. The outer leads represent the bottom coupler. The inner leads are the top coupler. The pins are bent up, in this scemmy.
The bottom chip is the microcontroller. It is deadbugged, thus the numbering is backwards. The pins are not bent in this case, but left as is.