David’s wireless game controller

Complet outside - smaller
custom 3D printed controller made using a keyfob

 

David’s Video Player allows David to choose which video to watch. It requires essentially no training and very little hand control. You can see it in action here.  Instructions for making the player are on-line and the software is open source.  The video player can be operated with one or two standard adaptive switches. However, David’s system can also be operated wirelessly.  It responds to a 1-button, 2-button or 4-button Adafruit Keyfob (see photo).

Adafruit keyfob
Adafruit keyfob

David cannot operate a keyfob, so he uses a keyfob that has been installed into a game controller.  I have made 3 versions:

  1. keyfob glued into a custom 3D printed case, with rechargeable battery
  2. keyfob glued into a gutted game controller and operates off of coin cells,
  3. keyfob glued into a gutted game controller, with rechargeable battery.

The glue I use is J-B Weld 8276 KwikWeld (2-part epoxy). I have tried other methods, like hot glue, but this epoxy works the best. You can order it from Amazon.com. The part number is B0006O1ICY.

 

Controller made from custom 3D printed case

Parts list

Adafruit 1391   Keyfob 2-Button RF Remote Control – 315MHz (4-Button will also work)
Adafruit 1904   Micro-Lipo Charger
Adafruit 1903  PowerBoost 500 Basic – 5V USB Boost @ 500mA from 1.8V+
Adafruit 1131  JST-PH Battery extension cable 500mm

Digi-Key 1832-1053-ND   Lithium ion polymer battery   3.7V, 1AH
Digi-Key CKN5059-ND   Slide switch SPDT 0.4VA 20V
Digi-Key CKN10742-ND  Tactile Switch SPST-NO 0.01A 32V  (qty=2)

Amazon B07DL4FNTF  Hilitand 20 Sets/Pack Micro JST 1.25MM 3-Pin Male&Female Connector

Hardware store  4-40 x 3/8″ Flat head machine screws (qty=7)
Hardware store  2-56 x 3/8″ Pan head machine screws (qty=2)

3D printed parts: Case top, Case bottom, battery holder, short button, tall button.

Tools
#50 drill bit and 2-56 tap, #42 drill bit and 4-40 tap. Soldering iron and rosin core solder. Some light weight insulated wire (e.g., 26 gauge).

Schematic
LiPo circuit

Parts layout
Complete inside 1

Steps
1. Drill and tap battery hold-down for 2-56 screws
2. Drill and tap 7 mounting posts for 4-40 screws. Do this slowly and carefully to not snap the mounting posts. Clear holes with a 4-40 screw.
3. [Warning: the battery is very powerful. Do not short the two battery leads together.] Cut the connector off of the battery. Cut the JST-PH Battery extension cable in half. Take the female end of the extension cable, trim the leads to about 3″. Strip the battery leads and the extension cables leads. Solder red to red and black to black. Trim excess from the joins and use the epoxy to insulate each connection.
4. When the epoxy is dry, mount the battery with 2-56 screws.
5. Disassemble the keyfob. You will only need the circuit board. Remove the tape that holds the two pushbuttons in place. Each pushbutton has a ring and a center contact. Use the female Micro JST 1.25MM 3-Pin connector. Carefully solder the red wire to K1 center contact, yellow wire to K2 center contact and black wire to one of the rings.
6. Place the keyfob into position for gluing. The K1 and K2 solder connections will be against the case. A tiny LED at the top of the keyfob should line up with a hole in the case. Flip the case over holding the keyfob in position to get a good idea of the alignment. Tape the keyfob into position and epoxy either the top or bottom along the edges. Wait the for epoxy to cure, remove the tape, then epoxy another edge of the keyfob.
7. Take 3 wires about 5″ long and solder two to the center two ground connections and the third wire to the battery connection. See photograph. In the photograph I have used green wires for the ground and orange for the battery.
8. Glue down the two tactile switches. Put epoxy on each square post and push the switch firmly down into the epoxy. See closeup.

Very close up pushbutton switches

9. Fit the slide switch firmly into position and glue each flange inside the case. Keep the switch in place until the glue cures enough to hold the position.
10. Fit the charger board into its position. It should fit with the circuit board pushed partially into a slot in the case. Tape down the wires, if necessary, to keep it in position. Epoxy the charger board into place using the two rear posts and the flat tab behind the charger.
11. Place the PowerBoost circuit board into place. Note its orientation carefully. Glue the 4 corners. Two of the corners have indicator LEDs on the component side. Try not to block the light getting from these LEDs through the case of the controller with any drip from the epoxy.
12. Wire the  tactile switches to the mating end of the Micro JST connector. Note the thin blue jumper wire that connects the two switches together in the closeup picture. Install a jumper wire. The black wire of the connector goes to the jumper wire. Use epoxy to tack down the cable wires as shown in the closeup.
13. Solder the power connections for the battery (the unused side of the JST-PH Battery extension cable). The red wire goes to the center of the slide switch. The black wire goes to the large circular area of the keyfob. Check the photograph for how much wire to use.
13. Use the schematic and photographs to finish wiring up the controller. One of the ground wires from the Micro-Lipo Charger goes to the large circular area of the keyfob. The arm of the battery holder is used as the positive connection to the keyfob. It connects to the +5v connection of the PowerBoost board. When wiring up the switch, note the labels: chrg and ON. In the ON position, the switch connects the battery to the PowerBoost board. In the chrg position the switch connects the battery to the Micro-Lipo Charger board. Keep the battery disconnected while finishing the wiring.
14. Double check all the connections. Turn the slide switch to chrg. Join the two circuits by connecting the battery and switch connectors. Turn the slide switch to ON. Watch the top of the controller while pressing one of the tactile switches. The light on the keyfob should light up brightly. Test the other switch.
15. Slide the switch back to chrg. Place pushbuttons into the two holes. Lift the controller so the buttons are suspended, being held in place by gravity. Close the two halves of the case, using a thin screwdriver to manipulate excess wire from the battery cable. Avoid trapping the wires either on the outside edges of the case or by one of the inside posts. There is room for excess wire on the battery side of the case.
16. When the case closes easily and completely, start installing the 4-40 flat head screws. Do not over-tighten the screws. Once assembled, the buttons should operate the tactile pushbutton switches easily, with good tactile feedback.

In the chrg position, the controller is off and can be charged using a standard cell phone charger and a micro-USB cable. The charger LEDs will go from red to green when the battery is fully charged. In ON position, the battery is in use. The LEDs from the PowerBoost board should be visible: green when ON, but turns to red when the battery is low. The keyfob LED should light read when a button is pressed.

 

Controller made from game controller using coins cells

Game pad example 1 - smaller
Keyfob and coin cell holder inside game controller

Here is a simple recipe for making a coin cell powered game controller. After stripping the electronics from a PC or Xbox game controller, trim most of the internal plastic ribs and supports away.  You need room to mount: 1) 2-button keyfob, 2) larger coin cell holder, and 3) tactile switches under the A and B buttons.  The hardest part is mounting the tactile switches.  The best switches are Omron B3F-5050 (Mouser Electronics part number 653-B3F-5050) snap action pushbutton switches.  Working inside the controller, use wire cutters to trim the plunger.  Carefully lay the snap action switch on either the red or green button.  Make sure the controller is supported so the button is not being pressed.  The plunger is trimmed properly when pushing the controller button operates the snap action switch smoothly. Hold the switch in place with one finger as you test the button operation. The challenge next is to glue the switch in place without letting any glue interfere with the pushbutton plunger action.  Early versions used hot glue.  Recent versions use J-B Weld 8276 KwikWeld (2-part epoxy). The epoxy seems to work better. It takes a lot of gluing to withstand repeated pressing.  After the switch is glued in place, you can insert a piece of plastic or foam to support the back of the switch when the controller back is screwed in place.

Once the switches are in place and operational, find convenient spots for the keyfob and coin cell holder. The Adafruit keyfob uses two very thin coin cells. For longer battery life, larger coin cells are placed in a big holder (Keystone 1025-7, Digi-Key part number 36-1025-7-ND).  Two CR2430 coin cells fit into that holder.  Two cells provide 6 volts, which is more than the keyfob circuit can handle.  A 5.6 ohm resistor (Digi-Key 5.6QBK-ND) and a 1 μf capacitor (Digi-Key 445-173374-1-ND) are used to restrict the voltage.  The positive connector of the coin cell holder is connected with a red wire to one end of the capacitor and one end of the resistor. The negative lead of the battery holder connects with a black wire. The black wire and the unused end of the capacitor connect to the ground of the keyfob (see photo).  The other end of the resistor connects to the rim of the coin cell holder, which was the positive contact of the keyfob battery holder.

Battery filter 2

 

Although it may sound complicated, the keyfob wiring is rather simple. You have to peel off a clear membrane to expose the switch contacts on the keyfob circuit board.  The contacts are circular. The inside circle is the switch contact. The outer circle is the ground. I use fine wires to connect the switch contacts to the snap action switches.  The switches have 4 pins. Use an ohm meter to figure out which pins are connected when the button is pressed.

keyfob circuit

The main advantage of the coin cell controller is that the controller is always “on”.  The main disadvantage is that the controller has to be disassembled to replace the batteries.  Batteries last about 2 weeks with heavy use. Don’t store the controller with something on top that may press the buttons.

Rechargeable Controller made from game controller

Building a rechargeable game controller is more work than building the coin cell controller.  The 3D printed case makes it much easier. Some of the steps, like gluing snap switches under each button, are the same as the coin cell controller. The rechargeable version uses a smaller LiPo battery (Adafruit 1578 or similar) than the 3D printed model. The remaining parts are similar: Micro-Lipo charger (Adafruit 1904), PowerBoost 500 Basic (Adafruit 1903), and small slide switch (Digikey CKN5059-ND or similar).

Inside of LiPo wireless controller 1 - smaller

Conceptually, the circuit is very simple. The battery is switched to the charging circuit board for recharging, or the battery is switched to the PowerBoost circuit board for powering the keyfob.  The selection is made by a small slide switch sticks out of one end of the controller.  The charger port is a micro USB connector built into the charging circuit board.  Here is the wiring.  A 1 μf capacitor (Digi-Key 445-173374-1-ND) can be used for the capacitor.

LiPo circuit

I have been able to fit all the parts into a $12 retro (SNES/super nintendo) game controller. That assembly was not difficult.

 

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.