Go Down

Topic: XBOX 360 Controller Hack (add macro ability) (Read 11586 times) previous topic - next topic

A_Gamer

#15
Jan 13, 2012, 03:18 am Last Edit: Jan 13, 2012, 04:37 pm by A_Gamer Reason: 1
Updates on the project...




First of all, I figured out how to get the analog sticks to work. Short the wiper pin to 'low' for full one way, and short it to 'high' for full the other way. Keep in mind that the controller does not use the full motion of the pot, so I inserted a small (220 ohm) resistor (in addition to the resistance of the optocoupler). For anyone doing this with transistors, I measured about 480 ohm at the lowest/highest points when in the enclosure by connecting the controller to a PC and using the raw calibration data from the Properties dialog. You could probably short it (I know I did once or twice while tinkering and the controller survived) but adding a small resistor (330 to 470 ohm) would make it appear more like the original pot was creating the motion. The 'low' is the ground for analog sticks on both matrix and CG controllers. The 'high' is common to ALL of the analog sticks (i.e. common high?) but is not the same as the 5v or 3.3v elsewhere on the board. So I ended up needing 1 wire for ground (already had it for the other CG buttons anyway), 1 wire for high (from one of the pot high pins), and 4 wires for the sticks (2 wipers per stick). However, you will need 8 optocouplers (or transistors?) - one to pull high and one to pull low for each wiper wire. It may be possible to use transistors to trigger the sticks since they use common ground, but I used optocouplers (since I already had them anyway).

Although I have my analog sticks wired to the PWM capable pins on the Arduino (via the optocouplers), I haven't gotten around to testing PWM yet. But, I have a hunch I will be able to generate something close to analog movement on those sticks. When I have some time I will hook up a pot to one of the Arduino analog in pins and see if I can generate the corresponding analog responses on the controller. I probably won't get around to this until I encounter an actual need for anything other than full displacements.

I also added a buzzer (so that the Arduino-controller could get my attention when a step needed my intervention), as well as a display for feedback (had some debugging issues with one of the scripts, and knowing where in the script the Arduino thought it was would have come in handy). No specific reason for the 2 digit display, other than I happened to have it laying around. The two shift registers were used to reduce the number of pins needed to drive the display.

Also, since I have a couple pins free on the controller side, I will probably end up moving the 'trigger buttons' into the controller a little below the A button (using through-hole tact switches).

In theory, I would call this a 'debug shield', and a smaller production board could be created without the display/shift registers and trigger buttons. With a little tinkering, I think I could fit the smaller "non-debug" shield entirely within the size of the battery compartment. And, if I switch over to a smaller Arduino (nano/mini?), there would be nothing sticking out. Course, with only 14 outputs, I would have to either figure out how to get 3 states out of a single pin (for the analog sticks) or skip 2 of the buttons (probably the 'click' of the analog sticks).

Now to find a case/enclosure to wrap it all up nice and neat...  ;)

nintendo9713

HOLD THE PHONE BATMAN.

I did a similar project to this and I would love to know more details on what you did.  I took the PCB of the controller, unsoldered the triggers and joysticks and then I connected digital potentiometers to replace them.  It worked flawlessly with controlled input. 

That being said, my buttons were nightmares.  I used an exacto knife to scrape the trace and solder to that tiny tiny piece with enameled wire.  It was terrible and unstable.  How are you handling your connection to the buttons?  I think this project is great and glad someone else has a similar interest!

A_Gamer


I did a similar project to this and I would love to know more details on what you did.  I took the PCB of the controller, unsoldered the triggers and joysticks and then I connected digital potentiometers to replace them.  It worked flawlessly with controlled input.

I had never heard of digital potentiometers until I read your post. Did some Google-ing and am quite intrigued. Obviously I don't have any laying around my workshop... If it turns out that PWM doesn't work and I really need an analog pot situation, I will have to go out and buy a couple. Thanks for the heads up.


That being said, my buttons were nightmares.  I used an exacto knife to scrape the trace and solder to that tiny tiny piece with enameled wire.  It was terrible and unstable.  How are you handling your connection to the buttons?

Agreed. That was the hardest part of the 'wireless' version of the project.

The wired 'matrix' controller (and possibly the wired CG one, too) has test points for every button in question, so that was easy to solder up (although I did have to remove the triggers to get at a couple of them). And, if it hadn't been for the success with the 'wired' version of the project (albeit double the wires), I probably would have given up.

The wireless controllers (all of them based on my research) don't have any easy to get at points for the buttons (except d-pad right -- TP9). The rest of them were indeed the pass-through points, many of which were only accessible from one side and required the removal of the triggers, etc. I had a real hard time with the first controller. I just could not get the solder to stick on a couple of the points, even after I had carefully scraped off what I deemed was more then enough of the 'paint'. I ended up setting that controller aside (it still works normally, for now, but I had to re-wire one of the d-pads directly to the chip -- ugh), and moved on to a second. By then I had determined that I could carefully (and I mean VERY carefully) use a cordless Dremel with a fine metal 'ball' tip. I was able to get a nice copper shine with just a few very light passes (a vice and support for both forearms is highly suggested). Then, I cleaned the points with isopropyl alcohol, applied a little flux, lightly wiped off any excess flux and was able to put down itsy bitsy solder points. Finally, I pre-tinned my [28 AWG?] hook up wire (no idea how I ended up with a spool of it), snipped off the excess wire after the insulation shrank, and attached them to my solder points. I was able to insert the wires about half the depth of the circuit board, effectively making little 'hooks' on the ends. Since those points are undoubtedly fragile, I made sure the wire was already mostly bent along the final path it would have to take before soldering it down, and immediately pinned it at several points, initially with masking tape strips, and finally with a dab of hot glue here and there (usually a couple wires running next to each other at a time). All of the wires were tracked back to one of the rumble pack spaces (permanently removed) and zip-tied into a nice little bundle so that no one wire gets tugged on when I move things around.

If I was anywhere near as confident as that paragraph may sound, I would open up the controller and take some pics for ya... But, I will be the first to admit that I am afraid the simple act of opening the case one too many times could cause one of those flimsy solder points to pull off, possibly even pulling the tiny coper ring (which I may have ground down to almost nothing), would pop off, too, wrecking the controller completely. So sorry.

If I am ever going to prep another controller for this project, it will be a wired CG (I will have to go and buy one though). Since I doubt I will ever run my scripts wirelessly due to battery concerns, I really don't know why I bothered with the wireless controller in the first place. I just happened to have a few of them laying around, so that is what I used. But, I won't do that again.

nintendo9713

I was helping another forum member in this post with the same thing you want.  He wants a macro ability to take panorama shots in halo reach.  He said for his buttons he used fine grit sand paper to remove the coating on the button pads which gives him a much bigger solder joint.  I did enameled wire and hot glue, which is similar to yours. 

I removed the sticks and triggers from mine, I just want the board, so with that being said, I would love to find a version of a controller that has ample test points for buttons and sticks.  I'll look into the Matrix model you described and see.  I'm using a wireless CG model. 

In the above post, it shows where to order the digital potentiometers for free (University or work email), and how I used them so give it a read and feel free to ask questions!

A_Gamer


I was helping another forum member in this post with the same thing you want.  He wants a macro ability to take panorama shots in halo reach.  He said for his buttons he used fine grit sand paper to remove the coating on the button pads which gives him a much bigger solder joint.  I did enameled wire and hot glue, which is similar to yours.

Interesting read. I found the reference to the CD4066B (quad bilateral switch) worth looking into aswell. Although it is only 2 wires less per DIP, it could be an alternative if I run out of optocouplers.

I removed the sticks and triggers from mine, I just want the board, so with that being said, I would love to find a version of a controller that has ample test points for buttons and sticks.  I'll look into the Matrix model you described and see.  I'm using a wireless CG model.

I think that both of the wired models will have the test points for everything you need. But I don't think there is a way to differentiate the two wired controllers without cracking them open. Here is a link to a thread that has scans of the various controller PCBs: http://forums.xbox-scene.com/index.php?showtopic=660109

In the above post, it shows where to order the digital potentiometers for free (University or work email), and how I used them so give it a read and feel free to ask questions!

I am looking over the digital potentiometers list now. Lots of interesting stuff there. Sadly, not many DIP. And, I don't have a way to mount TSSOP/SOIC.  :~

nintendo9713

I'm finally back in school and in the project spirit. I pulled out the 360 controller I was working on, used an Exacto-Knife, and successfully removed the carbon pads revealing some nice large soldering points for the buttons!

I love the way you have your controller set up. Mine looks so unorganized compared to yours and I want to change that! How exactly did you get that ribbon cable adapter mounted on the back and set up the wires inside? 

Thanks!

A_Gamer

The connector on the bottom of the controller is a normal female header. The kind that you would solder onto a PCB, not kind you would scavenge from a ribbon cable. I used a Dremel to cut the hole in the bottom and glued the header in place. I used a 2x15 header, but in hindsight realize that I should have used a 2x16 instead. Since everything is in fours, it would have made for much neater wiring matrix (4 buttons, 4 trigger/bumpers, 4 dpad, 4 analog pot wipers, etc). That would have left a couple more connections available for stuff like status LEDs in the actual controller (i.e. when a script is running, etc), or additional tact buttons for additional scripts/actions.

I am going to be opening up the controller to add some tact buttons to the front of it. I will take some photos then.

This is in preparation of a much 'smaller' v2 shield that won't have a display or the large dpdt switches. I am thinking about using a couple shift registers to reduce the number of Arduino pins needed significantly, and possibly go with a Nano/Mini/Ardweeny and 2 small stacked shields (1 for the Nano, the shift registers and the AD5204/6, and the other for the optocouplers/CD4066B?). I hadn't used shift registers until this project, where I didn't have enough pins for the 2 digit display. I suspect that they would be plenty fast to handle the controller 'buttons'. And, with a few 74HC595 chained, one would really only need 3 pins for all of the buttons (would want to control OE so as to avoid the random button presses when powered up). Plus another 4 or 5 for the digital potentiometers. And, a couple digital input pins for the tact buttons. Nothing a Nano/Mini/Ardweeny wouldn't be able to handle.

But, I am not going to start on that until the digital potentiometers arrive and I have had time to tinker with them. Having full analog control of the analog sticks would be worth the v2 'upgrade'. Otherwise, the project is working fine, so why tinker with it.  :P

nintendo9713

How are you wiring to the controller buttons?  Do you have one line from each button? I imagine the inside bundled with wires but I love the idea that the controller can be used without using the added components.  I want to use a ribbon cable header (50 pins?) just to provide some spare GND / Power and keep it organized unless you have another suggestion.  I know I need the 16 for buttons, 6 for triggers, power for controller, power for analog potentiometers, and GND.  I want to have a plug in mounted in the back that I can simply unplug if I wish to not use it for that but plug in a ribbon cable going to an Arduino or other microprocesser circuit and take over it.

flyingbuddha

I'd love to see a wiring diagram /schematic or detailed photos for this project. It's been something I've been trying to tackle for years but have less experience than most.

Go Up