Wednesday, November 27, 2013

Wireless SNES controllers

I saw something neat on hackaday a few days ago: wireless SNES controllers!  They use the logic board from a Logitech wireless keyboard. All Logitech wireless devices use the Logitech Unifying receiver now, which is minuscule and can pair with up to six devices at once. I decided it would be awesome to build at least a pair of them for multiplayer Super Nintendo emulator gaming on the living room media center computer. The cheapest keyboard with unifying receiver support I could find turned out to be the Logitech k360, frequently available for less than $20 brand new, but I picked up a refurbished model for $15 on amazon. A smoky smelling but otherwise pristine SNES controller was sourced from eBay, and I set to work stuffing one inside the other!

I'm really happy with the result, the only external modifications are the LED in place of the cord and the slide switch to turn off the controller when not in use. The guy who built the controller featured on hackaday used a model of keyboard that runs on 1.5 volts but I found that mine contains an NRF24LE1 Nordic Semiconductor 2.4GHz radio SOC that needs at least 1.9V to operate. Space is tight inside the controller and the original keyboard is advertised as having 3 year battery life on 2 AA batteries, so I decided to use a 3v CR2032 coin cell battery to power my controller. According to Logitech, the three year life quoted corresponds to 2 million key presses per year, or 6 million total. That's conservatively about 6600 key presses per mAH, so my single coin cell ought to last for about 1.2 million key presses, or thereabouts. That should be plenty for a couple years of occasional use, and the battery is in a holder inside so replacement just requires unscrewing five screws and popping a new battery in. 
I used my meter to trace the membrane switch traces to figure out which two pins to connect for each of twelve keys, then cut traces on the snes controller PCB and wired each button to the appropriate pair of pins. I will make the second controller use a different non-overlapping set of keys since the emulator program can't tell the difference between the same key on two different keyboards. 
The board from the k360 has the key membranes clamped directly to its contacts, which are a very thin copper trace covered with some kind of conductive ink, so soldering wires to them was tricky. After the black ink is cleaned off there's not much copper there to solder to. 
My keyboard also has no power indicator to show that it has been turned on, so i rigged up a simple circuit to flash an LED briefly when when the switch is flipped, to indicate that the battery is not dead and to show which position of the switch is on without having to make any marks on the case. When the switch is moved to the "on" position, current flows through an LED and charges a small capacitor, causing the LED to flash briefly. When the switch is turned off the capacitor discharges through a schottky diode and a resistor.

No comments:

Post a Comment