Wiimote Wireless Modification for Persons With Disabilities

This Instructable further builds upon the previous version by incorporating wireless buttons separate from the remote. A lap tray with a velcro layer was also created to allow the user to place external buttons where he or she chooses.

The wireless unit utilizes an Arduino XBEE chips to operate.

The Instructable is divided into three sections:
1. Programming the Arduino
2. Building the circuit boards for the wireless unit
3. Wiimote Modification (Receiver)
4. Lap Tray Unit (Transmitter)

The first step is to configure the Xbee chips so that they are able to communicate effectively with each other. Xbee chip configuration requires the X-CTU Software.

1. Download and install the X-CTU Software from the Digi website
2. CAREFULLY remove the microprocessor from the Arduino board. A flathead screwdriver is a good tool to use for this. Be sure not to damage the microprocessor’s pins. Note the position of the microcontroller since you will need to replace it after the Xbee module has been configured.
3. Place the Xbee module into the Proto Shield
4. Attach the Xbee module and the Proto Shield onto the Arduino board
5. Switch the two jumpers on the Proto Shield from XBEE to USB.
6. Attach the USB cable to the computer and the Arduino board. You should be able to see and LED on the Proto Shield blinking. NOTE: NEVER CONNECT THE POWER ADAPTOR TO THE ARDUINO AT THE SAME TIME AS THE USB CABLE
7. Open the X-CTU program
8. Under the PC Settings tab, select the proper COM port for your Arduino.
9. Make the Baud rate=9600, Flow Control=NONE, Data Bits=8, Parity=NONE, Stop Bits=1
10. Hit the Test/ Query button. If a message comes up that says “Communication with modem..OK” then proceed to the next step. If an error occurred then change the baud rate until you can establish communication with your Arduino.
11. Select the Modem Configuration tab and select the “Read” button. This displays the settings that are currently on the Xbee module
12. Click on PAN ID and change it to 3137. This can technically be changed to any four-digit number as long as is it the same across all Xbee modules in your network. It is recommended to change this value from the default value since you may experience from other Xbee module in the area.
13. Change the SH-Serial Number High to 13A200 (this may not be needed for setup)
14. Change the SL-Serial Number Low to 404BF3B6 (this may not be needed for setup)
15. Change the BD- Interface Data Rate to 19200. This value is for newer chips. You may also want to test higher baud rates since this increases transmission speed. Note that each Xbee module has a maximum baud rate before a buffer overflow error occurs. If you are testing higher baud rates then make sure to use the same baud rate among all Xbee modules or you will not be able to successfully communicate between modules.
16. Press the “Write” button. At the bottom of the window you should get a message that says that the write was successful.
17. You are now done with configuring the Xbee chip. Switch the two jumpers on the Xbee Shield back to XBEE. Remove the USB cable. CAREFULLY re-insert the microcontroller into the Arduino board.

The same setup above should be used to configure the other Xbee chip. The only difference is that in step 13, the SH-Serial Number High should be set to 404BF3B6, and in step 14 the SL-Serial Number Low should be set to 13A200. Steps 13 and 14 may not be needed.

Step 2: Program the Arduino: Transmitter

The Arduino transmitter was programmed so that when one or more of the switches connected to the digital I/O 2-13 was pressed that a certain letter of the alphabet would be wirelessly transmitted over serial. For example, it switch 1 was to be off, the letter “a” was sent wirelessly over serial. If switch 1 was to be on then the letter “b” was sent wirelessly over serial. If switch 2 was to be off, the letter “c” was wirelessly sent over serial. If switch 2 was to be turned on then the letter “d” was sent. An example of the entire serial transmission for 12 switches can be seen below:
• Example 1: Switch 1 and 3 are closed, all other switches are open
o “bcfgikmoqsuw”
• Example 2: Switch 2, 3, and 5 are closed, and all other switches are open
o “adfgjkmoqsuw”

Below is the breakdown of how the Arduino transmitter was programmed.
1. Remove the Proto Shield from the Arduino that you choose as the transmitter. The ATMEGA microprocessor should be in the Arduino board.
2. Download the Arduino program from the Arduino website (www.arduino.cc)
3. Connect the Arduino to a computer via the USB cable.
4. Open the Arduino software program on your computer
5. Select Tools -> Serial Port -> and then select the COM port that refers to your Arduino board. This is usually the first COM port in the list.
6. Copy and paste the following code into the Arduino code window. Note that this code is for transmission at a 19200 baud rate. If you need to transmit at a different baud rate than wherever in the code it says 19200, change it to your desired baud rate.

// for some reason it seems to help to send an arbitrary character first
//then pause for the guard time before requesting command mode
Serial.print("X");
delay(1100);
// put the XBee in command mode
Serial.print("+++");
delay(1100);
// wait for a response from the XBee for 2000 ms, or start
// over with setup if no valid response comes

if (returnedOK() == 'T') {
// if an OK was received then continue
}
else {
setup(); // otherwise go back and try setup again
}

// set the PAN (personal area network) ID number
// this example uses 0x3330, but you'll want to choose your own
// unique hexadecimal number between 0x0 and 0xFFFE
// (note the comma at the end of the command which indicates that another command will follow)
Serial.print("ATID3330,");
// set the Destination High to 0x0
// to select 16 bit addressing mode. These addresses can
// be assigned and changed by sending commands from a microcontroller
Serial.print("DH0,");
// set the Destination Low (16 bit address)
// this example uses 0x0 for send and 0x1 for receive but you'll
// want to choose your own hexadecimal numbers between 0x0 and 0xFFFE

Serial.print("DL1,");
// exit command mode (note that we use Serial.printLN here to issue a linefeed that completes the command sequence)
Serial.println("CN");

// the preceeding commands can also be sent on a single line like this, using a single AT command with commas:
// Serial.println("ATID3330,DH0,DL1,CN");

// the preceeding command line could also be sent as separate commands, by reissuing the AT command:
// Serial.println("ATID3330");
// Serial.println("ATDH0");
// Serial.println("ATDL1");
// Serial.println("ATCN");

// wait for a response from the XBee for 2000 ms, or start
// over with setup if no valid response comes

if (returnedOK() == 'T') {
// if an OK was received then continue
}
else {
setup(); // otherwise go back and try setup again
}

char returnedOK () {
// this function checks the response on the serial port to see if it was an "OK" or not
char incomingChar[3];
char okString[] = "OK";
char result = 'n';
int startTime = millis();
while (millis() - startTime < 2000 && result == 'n') { // use a timeout of 10 seconds
if (Serial.available() > 1) {
// read three incoming bytes which should be "O", "K", and a linefeed:
for (int i=0; i<3; i++) {
incomingChar[i] = Serial.read();
}
if ( strstr(incomingChar, okString) != NULL ) { // check to see if the respose is "OK"
// if (incomingChar[0] == 'O' && incomingChar[1] == 'K') { // check to see if the first two characters are "OK"
result = 'T'; // return T if "OK" was the response
}
else {
result = 'F'; // otherwise return F
}
}
}
return result;
}

7. Once the code has been copied into the Arduino code window, select “Compile” to verify that there are no errors in the code. If no errors are present then press the “Upload to I/O Board button”.
8. Once the code has been uploaded to the Arduino board, disconnect the USB cable, and reattach the ProtoShield (including the Xbee module). You are now done uploading the code to the Arduino transmitter.

Step 3: Program the Arduino: Receiver

The receiver was programmed so that it received serial data from the transmitter and then sent 5V through the appropriate Digital I/O pins. For example, if “a” was received, the receiving Arduino board would make Digital I/O 1 be 0V. If “b” was received, the receiving Arduino board would make Digital I/O 1 be 5V. If “c” was received, the receiving Arduino board would make Digital I/O 2 be 0V. If “d” was received then the receiving Arduino board would make Digital I/O 2 be 5V. Below are the steps necessary to upload the code for the receiving Arduino:

1. Remove the Proto Shield from the Arduino that you choose as the reciever The ATMEGA microprocessor should be in the Arduino board.
2. Connect the Arduino to a computer via the USB cable.
3. Open the Arduino software program on your computer
4. Select Tools � Serial Port � and then select the COM port that refers to your Arduino board. This is usually the first COM port in the list.
5. Copy and paste the following code into the Arduino code window. Note that this code is for transmission at a 19200 baud rate. If you need to transmit at a different baud rate than wherever in the code it says 19200, change it to your desired baud rate.
// This program receives information from a MaxStream XBee radio.

// start up the serial connection with 19200-8-n-1-true (non-inverted):
Serial.begin(19200);

// for some reason it seems to help to send an arbitrary character first
//then pause for the guard time before requesting command mode
Serial.print("X");
delay(1100);
// put the XBee in command mode
Serial.print("+++");
delay(1100);
// wait for a response from the XBee for 2000 ms, or start
// over with setup if no valid response comes

if (returnedOK() == 'T') {
// if an OK was received then continue
}
else {
setup(); // otherwise go back and try setup again
}

// set the PAN (personal area network) ID number
// this example uses 0x3330, but you'll want to choose your own
// unique hexadecimal number between 0x0 and 0xFFFE
// (note the comma at the end of the command which indicates that another command will follow)
Serial.print("ATID3330,");
// set the MY (16 bit address)
// this example uses 0x0 for send and 0x1 for receive but you'll
// want to choose your own hexadecimal numbers between 0x0 and 0xFFFE
Serial.print("MY1,");
// exit command mode (note that we use Serial.printLN here to issue a linefeed that completes the command sequence)
Serial.println("CN");

// the preceeding commands can also be sent on a single line like this, using a single AT command with commas:
// Serial.println("ATID3330,MY1,CN");

// the preceeding command line could also be sent as separate commands, by reissuing the AT command:
// Serial.println("ATID3330");
// Serial.println("ATMY1");
// Serial.println("ATCN");

// wait for a response from the XBee for 2000 ms, or start
// over with setup if no valid response comes

if (returnedOK() == 'T') {
// if an OK was received then continue
}
else {
setup(); // otherwise go back and try setup again
}

void blinkLED(int targetPin, int numBlinks) {
// this function blinks the status LED light as many times as requested
for (int i=0; i
digitalWrite(targetPin, HIGH); // sets the LED on
delay(250); // waits for a second
digitalWrite(targetPin, LOW); // sets the LED off
delay(250);
}
}

char returnedOK () {
// this function checks the response on the serial port to see if it was an "OK" or not
char incomingChar[3];
char okString[] = "OK";
char result = 'n';
int startTime = millis();
while (millis() - startTime < 2000 && result == 'n') { // use a timeout of 10 seconds
if (Serial.available() > 1) {
// read three incoming bytes which should be "O", "K", and a linefeed:
for (int i=0; i<3; i++) {
incomingChar[i] = Serial.read();
}
if ( strstr(incomingChar, okString) != NULL ) { // check to see if the respose is "OK"
// if (incomingChar[0] == 'O' && incomingChar[1] == 'K') { // check to see if the first two characters are "OK"
result = 'T'; // return T if "OK" was the response
}
else {
result = 'F'; // otherwise return F
}
}
}
return result;
}

6. Once the code has been copied into the Arduino code window, select “Compile” to verify that there are no errors in the code. If no errors are present then press the “Upload to I/O Board button”.
7. Once the code has been uploaded to the Arduino board, disconnect the USB cable, and reattach the ProtoShield (including the Xbee module). You are now done uploading the code to the Arduino receiver.

The circuit diagram for the transmitter can be seen in the current step. This diagram represents only one of the switches. This circuit was constructed for each one of the switches. This circuit was connected to the Arduino transmitter. The DI/O was the digital input/output on the Arduino board. The +5V and ground also came from the Arduino. This circuit is a pull-up switch. The function of this circuit is that when the switch is open, the digital in reads 0V. When the switch is closed the digital in reads 5V.

On an empty circuit board, create 11 of these circuits and solder the connections together.

Step 5: Build Circuit Board: Receiver

The receiver circuit is shown in the current step. This circuit was made for each button on the Wiimote (11 buttons total). When 5V is sent from one of the D I/O pins on the Arduino, this circuit closes a button on the Wiimote. An NPN transistor is used for this circuit to close the Wiimote switch when 5V is received from the Digital Out on the Arduino.

On an empty circuit board, create 11 of these circuits and solder the connections together.

Note that it is possible to power the Wiimote from the Arduino board since the Arduino board has a 3 V output pin. To do this, the 3V pin from the Arduino needs to be connected to the proper battery terminal on the Wiimote, and the ground needs to be connected to the proper power ground terminal on the Wiimote.

This completes the setup of the wireless devices. Now when a switch is closed on the Arduino transmitter, the switch on the Wiimote should close.

Note that it takes about 10 seconds for the Arduinos to start successfully transmitting wirelessly after they have been given power.

Be sure to label each Receiver circuit beginning with 1 and ending with 11. Also, try to make the Receiver circuit use as little area as possible because it will be attached to the Wiimote circuitry.

Step 6: Wiimote Modification: Disassemble the Wiimote

Begin by removing the batteries. Remove the four triangular head screws. For best results use a triangular-end screwdriver. However the screws can be removed using a small enough miniature flathead screwdriver. Crack open the case with a miniature flathead screwdriver by releasing the pressure clip at the front part of the case. Take out the circuit board.

Step 7: Solder Wires to Wiimote Circuit Board

The images provided display the soldering points for the wires to be connected to the circuit. Before soldering, cut 13 wires measuring about 2 inches in length. 11 of these wires should be one color. In our example, the color used is blue. Finally, make sure the red and black wires are power and ground respectively. This step is not necessary. However, it helps easily identify wires to connect later on. Plus, the wires used should be flexible for reasons mentioned later.

Please wear safety glasses when soldering. It is important to solder to the correct side of the button contact or the button will not function properly.

Once the wires are soldered to the buttons on the board, take the Receiver circuit board built earlier and connect and solder the wires to the Receiver board as indicated in the circuit diagram. Also, be sure to write down and note which button corresponds to which connection on the Receiver circuit board.

Step 8: Connect Wiimote Wires to DB-15 Connector

As before, cut another set of 13 wires about 6-8 inches in length and use the same color scheme that was followed before. Solder 11 of the button wires to the Digital Out input of each circuit on the Receiver board. Solder the Power and Ground wires directly to the Power and Ground connections.

Now that the wires are soldered to the Receiver board, take a Male DB-15 connector to be soldered onto. Before beginning, write down which buttons correspond to which wire from the board. On the DB-15 connector, leave the first two pin connections for power and ground. Pins 3-15 can be set aside for digital out connections.

Use the table below to help with connection notes.

Button || Rcvr Board Pin || DB-15 Pin (Male/Female)
=================================================
A
B
Up
Down
Left
Right
Back
Forward
1
2
Home

Step 9: Build New Case for Wiimote

A new case must be built in order for the wireless XBEE unit to be attached to the Wiimote. This case consists of a dowel for the user to grip, a box large enough to house the XBEE, and the actual case itself. The original Wii remote case is a hard plastic case that allows the Wii to slide in and out.

From looking at the associated image, take note that the grip is made to hold the Wiimote in a vertical orientation. The dowel grip is also padded with foam for comfort and the circular end ensures the dowel grip does not slide off from the user's hold. The box holds the XBEE case and contains a DB-15 (female) connection to connect to the Wiimote.

Step 10: Set Up XBEE Receiver Housing

Using the box from the previous step, further modifications are necessary to connect the Wiimote. First, cut or drill holes large enough to add a DB-15 female connector and a toggle switch. Again solder wires of about 3-4 inches in length onto the DB-15 female connector. Afterwards, take the ends of the wires and solder them onto terminal pins to be connected to the XBEE unit. Again, take note which pins on the XBEE correspond to which buttons on the Wiimote. Use the previous table that was filled out and note the XBEE pin. The only pins that will not be soldered to the terminal pins are the power and ground connections. They will be connected in the next step. Only pins 2-13 on the XBEE unit can be used for button connections.

Once finished, mount the DB-15 connector, toggle switch, and XBEE unit into the housing. The XBEE unit is to be mounted using plastic holdings, which can be superglued to the housing itself.

Step 11: Add Internal Connections of Receiver Housing

Because there is a limited amount of power generated by the batteries from the Wiimote itself, a consistent power supply is needed to power the XBEE unit. To solve this, a step up voltage pack is incorporated into the unit which is a DC to DC Step Up - VPack PCB found from the Sparkfun webpage. Connect VPack as described by the datasheets to the XBEE unit. The switch, however, connects power and ground together on the VPack. This switch connection will turn on the unit and allow the VPack to generate the 5V needed to run the unit.

Step 12: Put the Modified Wiimote Together

One final thing to do is the modify the actual casing on the Wiimote. The top cover of the Wiimote must be modified to accommodate the additional Receiver board and can be seen in the pictures. The modified cover removes everything except for the Power button and the LED indicator lighting. It can be seen in the final image with the device connected together and functioning.

Step 13: Lap Tray Unit

Take a sheet of Lexan and cut out pieces to construct a box of dimensions of 14”x 8” x 2”. Glue the pieces together except for the top cover with epoxy glue. The epoxy is stronger than superglue and can withstand higher pressure and force. Once, the main base of the lap tray is created, let the box sit for at least an hour to ensure that epoxy is settled. Proceed to drill one hole on each corner of the box to allow for mounting of the top cover. Do the same for the top cover and make sure the holes on the box align with the holes on the top cover. Also, the drilled holes should allow for a screw to be fitted and to help hold the top cover in place.

Proceed to drill holes on the front side of the lap tray box so that connectors can be placed within these spaces. Be sure, to drill them in such a way that is logical and easy to connect. Also, drill a hole so that a toggle switch can be added in.

Step 14: Mount and Connect the XBEE Unit and Transmitter Boards

Using the plastic mounts from before, mount them with hotglue to the lap tray. The mounting spacing should correspond to the holes on the XBEE. Once the plastic mounts are dried and settled in, proceed to mount the XBEE unit and transmitter board.

The connections from the Transmitter board should be numbered already. Now take 11 wires and cut them to at least 6 inches in length and solder them to the digital inputs of the circuits located on the Transmitter board. Solder the ends of the wires to terminal pins to be connected to the XBEE unit. Also be sure to note which connector is connected to which XBEE pin when connecting the transmitter board.. The following table should provide for further mapping of the connections.

Proceed to attach stereo connectors as followed by the circuit diagram given by the Transmitter board schematic and place them inside the connector holes.

Step 15: Connect Switch

Once everything is connected, proceed to connect the toggle switch to the battery pack.

Step 16: Add Layers of Velcro to Top Lid

Take rolls of Velcro and fit it over the top lid. Layer Velcro strips as to minimize any white space that may exist in between strips. Also, avoid placing Velcro over the screw holes. The final layer of Velcro on the top lid should look similar to what is seen in the picture.

Step 17: Mount the Top Lid and Start Playing

Mount the top lid to the lap tray with screws and connect buttons. In the picture, only one button is shown.

Before playing, be sure that all the switches and button connectors are labeled correctly. Once this is done, power on all units using the switches and the power button on the Wiimote. Now the new wireless Wii system is ready to be played with.

Comments

Excellent project also as a disabled person myself i'd like to thank you we need more inventors thinking of ways to help improve life for not just every day disabled people but also as a way to help support injured vets and their families

About This Instructable

Bio:
The Rehab Engineering and Applied Research (REAR) Lab undertakes applied research and development targeting the increased health and function of persons with disabilities. Specific areas ...
More »