loading
Picture of Diy Xbox wireless controller adapter for Pc
2012-01-17_19-29-09_794.jpg
This instructable will go over the steps to connect a RF module from an RROD xbox to your computer so you can use a wireless controller with your computer. ******DISCLAIMER******* DONT TRY THIS IF YOU DONT HAVE ANY EXPERIENCE WITH ELECTRONICS/SOLDERING OR COMPUTERS IM NOT RESPONSIBLE IF YOU SCREW UP.... now that we've gotten that out of the way 

Parts List:
Arduino UNO - a wonderfull microcontroller board you can get it on ebay or at radioshack 
RF Module - from a broken xbox/ ebay
Soldering Iron - mine is a cheap radio shack model 
Solder - also avalible at a local radio shack 
USB cable - scavenged from old electronics (i found it in my parts bin)
2 1N4001 diodes
Wire cutters - for cutting wire....
Wire strippers - for stripping wire...
pliers - for holding small things/ bending wire...
Wire - i have bolth some 22 AWG wire from radioshack and some fancy 30 AWG Kynar wire (easily avalible on ebay) pretty much any wire will work as long as it is small enough to solder to the connectons on the RF shield
 
Remove these adsRemove these ads by Signing Up

Step 1: Soldering ....

Picture of Soldering ....
2012-01-17_19-28-36_816.jpg
First strip the usb cable, inside there will be a black wire, a red wire, a white wire, and a green wire. there will also be some shielding and a shield ground wire (usually not covered) these you can cut back to the plactic. strip about an 1/8th inch of plastic off each of the four wires.
 
Next you will need to solder the diodes to gether in series ->-> and then solder the side with the line on it to pin 1 and the side without the line to the red wire in the usb cable **** make sure the diodes are the right way around before soldering**** 

Now you can solder the white wire to pin 2, the green wire to pin 3, and the black wire to pin 4 

solder a piece of wire to each of pins 5-7 too, make sure they are long enough to connect to your arduino 

Step 2: Code

/* Arduino code to communicate with xbox 360 RF module.
Original work by (yaywoop) / additional ideas from Alexander Martinez - modified by dilandou (www.dilandou.com, www.diru.org/wordpress)
First sends LED initialisation code followed by LED startup animation code, then sleeps until a button press for sync command.
RF module must be powered with 3.3V, two diodes in series with USB 5v will do. Connect the USB wires to a host computer, and the data and serial wires to Arduino.
of course, make sure to have a common ground */

#include <avr/sleep.h>

#define sync_pin 2 //power button repurposed for sync button (pin 5 on the module)
#define data_pin 3 //data line (pin 6 on the module)
#define clock_pin 4 //clock line (pin 7 on module)

int led_cmd[10] =  {0,0,1,0,0,0,0,1,0,0}; //Activates/initialises the LEDs, leaving the center LED lit.
int anim_cmd[10] = {0,0,1,0,0,0,0,1,0,1}; //Makes the startup animation on the ring of light.
int sync_cmd[10] = {0,0,0,0,0,0,0,1,0,0}; //Initiates the sync process.
volatile boolean sync_enable = 0;

void sendData(int cmd_do[]) {
  pinMode(data_pin, OUTPUT);
  digitalWrite(data_pin, LOW);    //start sending data.
  int prev = 1;
  for(int i = 0; i < 10; i++){

    while (prev == digitalRead(clock_pin)){} //detects change in clock
    prev = digitalRead(clock_pin);
      // should be after downward edge of clock, so send bit of data now
    digitalWrite(data_pin, cmd_do[i]);

    while (prev == digitalRead(clock_pin)){} //detects upward edge of clock
    prev = digitalRead(clock_pin);
  }
  digitalWrite(data_pin, HIGH);
  pinMode(data_pin, INPUT);
}

void initLEDs(){
sendData(led_cmd);
delay(50);
sendData(anim_cmd);
delay(50);
}

void wakeUp(){
  sync_enable = 1;
}

void sleepNow() {
  set_sleep_mode(SLEEP_MODE_PWR_DOWN); // set sleep mode
  sleep_enable(); //enable sleep bit
  attachInterrupt(0, wakeUp, LOW);
  sleep_mode();
  sleep_disable(); //disable sleep bit
  detachInterrupt(0); // disables interrupt 0 on pin 2
}

void setup() {
  Serial.begin(9600);
  pinMode(sync_pin, INPUT);
  digitalWrite(sync_pin,HIGH);
  pinMode(data_pin, INPUT);
  pinMode(clock_pin, INPUT);
  delay(2000);

  initLEDs();
//  sendData(sync_cmd);
}

void loop(){
  Serial.println("Sleeping.");
  sleepNow();
  delay(200);
  if(sync_enable==1) {
    Serial.println("Syncing.");
    sendData(sync_cmd);
    sync_enable = 0;
  }
}

or you can get it from here http://diru.org/wordpress/hacking/xbox-360-rf-module-arduino/ 

you will need to program your arduino with this code

I did not come up with this code all credit for this code goes to dilandou and Alex Martinez

Step 3: Software

download this http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows
and install 

go to the install folder (Microsoft Xbox 360 Acessories) in your program files

find Xusb21.inf this is the driver file for the software you will be modifying it so it will recognise your hardware 

open it with a text editor or a program like Notepad++ (recomended)

find these headers [MSFT.NTx86.6.0], [MSFT.NTamd64.6.0], [MSFT.NTx86], and [MSFT.NTamd64].

you are going to replace the 5 lines of code under each of them 

the original code looks like this 

%XUSB21.DeviceName.Wired%=CC_Install, USB\Vid_045E&Pid_028E
%XUSB21.DeviceName%=CC_Install, USB\Vid_045E&Pid_0719
%XUSB21.DeviceName.Wired%=CC_Install, USB\MS_COMP_XUSB10
%XUSB21.DeviceName%=CC_Install, USB\MS_COMP_XUSB20
%XUSB21.DeviceName.Jump%=CC_Install, USB\Vid_045E&Pid_028F

what you will put in its place looks like this

%XUSB21.DeviceName.Wired%=CC_Install, USB\Vid_045E&Pid_0291
%XUSB21.DeviceName%=CC_Install, USB\Vid_045E&Pid_0291
%XUSB21.DeviceName.Wired%=CC_Install, USB\UNKNOWN
%XUSB21.DeviceName%=CC_Install, USB\UNKNOWN

now save it (make sure you save as a .inf file or it wont work)

now hook up the three extra wires on the RF module to the arduino if you havent already and plug the usb cable into your computer  it should light up but controllers wont sync yet

change the Microsoft Xbox 360 Acessories folder so that it is no longer read only

now open the device manager and find the unidentified usb device (the one with the yellow triangle)

right click and select update drivers then in the update driver software window select browse my computer then let me pick from a list of drivers for my device then select show all then have disk

finally navigate to the modified Xusb21.inf file and select it and install 

after you install the drivers the controller should sync with the RF Module just hit the power button which has been repurposed as a sync button and sync like you would to an xbox 

it should now work with any game that allows you to use a gamepad 




Step 4: Explaination and credits

Picture of Explaination and credits
the picture is my project sill on the breadboard ... im planning on cleaning it up and possibly putting it in a nice case seeing as its an extremely usefull piece of hardware for me ( i like the xbox controller and the multitude of mods for bestheda games on pc like fallout 3/ new vegas, and skyrim/ morriowind)

the rf module works like any other usb device as long as you have the drivers and you dont have to sync it the arduino's purpose in this project is to initialize the RF module and to allow you to sync the controller. the modified Xusb21.inf file allows the drivers for an official adapter to work with the RF module which is seen as an unidenified device otherwise. the whole thing could be improved by switching out he two diodes with a 3.3 volt regulator and adapting it to use just an AVR microcontroller and not an entire arduino board and mabe ill make these impovements in the future when i have the time/money but this works fine for now. 

i just made the instructable and took some pictures of how i did this.... all credit should go to Alex martinez and dilandou for the original code and project 

here are some links to dilandou's writeup on this whitch is helpfull but not in instructable form 

http://diru.org/wordpress/hacking/xbox-360-rf-module-arduino/ - the code
http://diru.org/wordpress/2011/03/wireless-xbox360-controller-on-a-pc-without-the-commercial-dongle/ - the writeup
http://diru.org/wordpress/about/ - about dilandou
brandon92713 months ago
Have anybody hacked one of these modules to a raspberry pi? That would be awesome! So many great emulators for the pi and it connects right to the TV..It would be a perfect. Not sure if there are Linux drivers for the RF dongle though. Probably not. lol

Works just fine on a pi just plug it in via usb and install xboxdrv and your good. only downside is that it registers 4 controllers and trying to use different controllers with retro pie is already an issue and I find this complicates it a bit further. But if your only using xbox 360 controllers your golden.

awesome. I actually don't have my Pi yet but its on the way. I'll probably just use Snes and/or PS2 controllers for emulators. The d-pads on the 360 gamepads aren't ideal for retro stuff IMO but I have them already and they're wireless. Id love to have original controls for every retro system emulated but that's just not practical :)

I just build one with an ATTINY85, it works great, its small and effective!

Timinator01 (author)  matstermind1 year ago

That's great I've been meaning to update this instructable for a while, now that I have access to a better camera and a better understanding of everything (I'm a freshman Computer Engineering student now). Maybe i will this summer ... anyways my point was the ATTINY85 is a much better choice because of how little you actually have to do with the arduino

Hey I shot you a PM about permissions to use your images. Maybe if you'd rather get the views, I could write up a page on how to use it with my board? :)
http://snuletek.org/ohw/works/RoLUSB/

Reason that I want to use you images is because I don't actually have an xbox myself :P

Throw_away5 months ago

Untested ATmega328P port (AVRGCC)

http://pastebin.com/RPYCBD1C

ОлександрР made it!6 months ago

I made it:) wired and wireless gamepads work fine, next time I make casing for this things

BWagDdVVf20.jpg
joshikins made it!1 year ago

Awesome. I had one of the ones made for windows but it died. Picked up a ROL board on ebay for a few bucks and needed a way to sync my controllers. This is exactly what I needed :D

2014-01-30.jpg
Alex_93v1 year ago
I think you can write that any diode from 1N4001 to 1N4007 is ok... there are no differences between them apart for the "reverse peak voltage" and it's not an important attribute for this use... correct me if i'm wrong
does it work with Skyrim v
Timinator01 (author)  johnsonb56162 years ago
It is the same as using a controller base you bought its just the DIY solution for someone with the spare parts ... btw its The Elder Scrolls V: Skyrim .... this is the first one named skyrim (assumming thats what you're talking about ... just so you don't get picked on next time you visit gamestop)
kshutt2 years ago
Great instructable! I just used this with an Arduino Uno R3 and an "X802779-010 Rev B" RF module; works flawlessly! Just out of curiosity, since the R3 has a 3.3v onboard output, would using this instead of the USB+diodes cause any problems? I don't have any diodes or voltage regulators on hand so this was my only option for powering the board :P
Hey im going to try and make a cleaner version here soon and ill post pictures when i do.Great instructable though!
Timinator01 (author)  camtheman12832 years ago
cool i've been meaning to do it for a while i just haven't gotten around to it comment whith a link when you're done
madsonviana3 years ago
Can I receive controller data information on arduino?
jtc105123 years ago
Is there any way to do the sync thing without an arduino? like, say an MSP 430?
(I'd need tutorial on how to correctly install the IDE, and how to make the code work)
Timinator01 (author)  jtc105123 years ago
Sorry it took so long for me to reply ... I belive it can be done with any microcontroller ... the microcontroller is only used to.send a signal to tell the board to sync I don't have much experience with anything other than aduino but I belive it would work with msp430
jayjayhaxor3 years ago
can i use this on a arduino pro mini ............would the pins and programming be the same ?
Frys also sells the arduino board, but it is know as Osepp uno.
Timinator01 (author)  Computothought3 years ago
yah a lot of suppliers are starting to sell ardino and the clone boards too i noticed that jameco sells arduino and all kinds of shields now as well as a clone or too
Been using Jameco for a long time.
Timinator01 (author)  Computothought3 years ago
i usually shop around a bit and i buy a lot of the more common parts on ebay but jameco is pretty good for small orders as long as you order more than 15$ worth of parts ... otherwise you have to pay a proccesing fee. i think the last thing i bought from them was a wall wart that i used in a simple power supply for my Commodore 64.... (i found it in a pawn shop for 10$)