Below should be everything you need to know in order to make a wireless KTRL gamepad. It all comes down to these steps: Get the needed parts, prepare the gamepad case, solder the components, program the microprocessor* and finally, put it all together.
*) or get the microprosessor preprogrammed from me.
For guides how to assemble the receivers, click a link below
I have designed the PCB to fit the cheap SNES style USB gamepads available on eBay and elsewhere. There are a few different models out there but the best ones I have found for this are the iNNEXT branded ones. They look like this:
This gamepad comes in black and gray. Search for "innext snes" on eBay and you should find several sellers selling these, usually in packs of two for about 7€ and up plus shipping.
You will need a 3.7V 500mAh li-po battery. You can find these online on eBay etc. or in your local electronic components store. Look for one that is 20*40mm in size.
I will be able to supply a limited amount of these modules. You can also find them on itead.cc, eBay, Aliexpress etc. There exist counterfeit versions of the chip used on this module that are not as good as the original, ITEAD are selling modules with original chips, I buy them from there. These go for around 2 to 3€ a piece.
You can order the PCB from me on Amibay.com.
The microprocessor used by the KTRL CD32 is the Atmega328P-AU (TQFP-32 package). You can buy this from eBay, electronic component retailers or buy them preprogrammed from me on Amibay.com.
I also sell the other electronic components needed in the same Amibay.com thread as a set. Here is the list of other components if you want to get them from somewhere else:
0603 SMD components | |
7K5ohm (85B) | 1 |
0805 SMD components | |
2K2ohm (222,2201) | 1 |
10kohm (103,1002) | 1 |
22nF (223) | 1 |
100nF (104) | 4 |
Other SMD components | |
RT9193-33 LDO Voltage Regulator (SOT25) | 1 |
Through hole components | |
47µF electrolytic cap 10+V | 1 |
100µF electrolytic cap 10+V | 1 |
LED (red, 3mm, flat top) | 1 |
Other parts | |
TP4056 USB li-po charger module* | 1 |
Slide switch, vertical, 2.54mm or 3mm pitch | 1 |
Wired battery male & female connectors (JST) | 2 |
Wire, red, ~6cm (2 1/3") | 1 |
Wire, black, ~6cm (2 1/3") | 1 |
Pin headers (2,54mm pitch) | 6 |
Shrink tube, dia: 4mm, length: 6mm | 1 |
*) Two corners of the TP4056 module have been cut so it will fit in the gamepad case:
The "KTRL" logo and cheat sheet stickers are included when you buy the PCB in the Amibay.com thread.
To program the Atmega you will a USBAsp programmer. These are very cheap and available readily on eBay. Search for "usbasp" and you should find them for less than 2€. For this you also need Dupont jumper wires (Female-Female) or you can use the cable supplied with the USBAsp with a 10pin to 6pin adapter (used for Arduino). Search on eBay for "dupont male female". Note that if you buy the Atmega preprogrammed from me you don't necessarily need this but I might release updates to the firmware later.
Unscrew the five screws of the gamepad to open it and remove all the parts. You will need the small shoulder button PCBs connected to the main PCB so don't throw anything away just yet.
Do the three mods to the top shell according to the picture below (hole for LED and micro-USB, cut protruding pin).
Do the two mods to the bottom shell according to the picture below.
Cut an inset for the RF24 radio module (bottom shell).
Make a hole for the power switch.
Note! The removal of the face button sticker is
Optional (not recommended): Remove the face button sticker (with the A,B,X,Y markings). The KTRL Wireless will work on multiple systems, including SNES emulators etc., so I don't recommend that you remove the sticker. If you decide to remove it, I have found that the best way to do this is to use a hair dryer to heat up the sticker (for about 10-15 seconds, don't overdo it if you have a powerful hair dryer), then the sticker usually peels off without leaving any residue on the gamepad case.
Optional: Apply the stickers. The logo sticker can cover the "iNNEXT" logo entirely. The cheat sheet sticker goes to the back (in the recessed area).
Replace the resistor marked in the picture below with the supplied 7K5 (0603 size, marked 85B) resistor.
Solder the longer cable with a female connector to the BAT+ (red) and BAT- (black) solder points on the module. Secure the module to the top shell with hot glue. Avoid hot glue to the plastic pins etc. in the surrounding area.
Be careful not to short the red and black wires of the battery! Add the thin heat shrink tubes to the wires of the shorter cable with a female connector, then solder the ends of those wires to the wires of the battery. Finally cover the solder joints with the heat shrink tubes and heat them.
1. Bend the legs of the LED 90° about 5mm from the actual LED and cut the legs about 5mm after the bend, leaving the longer leg about 1mm longer so you still know which leg is which.
2. Solder a red wire to the longer leg and a black wire to the shorter leg.
3. Use the heat shrink tube to cover the solder joints.
4. Solder the wires to the PCB, red to LED+ and black to LED-.
Solder the the PCB components according to the following layout (Click the picture to view a larger version). SMD capacitors are either marked with codes or colours as in the layout image.
When all components etc. are soldered, give the PCB a proper clean with rubbing alcohol, the flux residue can cause noise in the circuit. Check for any shorts between the legs of the Atmega. Verify the polarization of the electrolytic capacitor a final time.
Connect the USBAsp to USB port. Don't try to find a driver, cancel the automatic driver install if possible.
Download and run Zadig for easier driver installation: http://zadig.akeo.ie/
In Zadig, choose USBAsp in the drop-down list. If you can't see the device in the list, go to the Options menu and select List All Devices, be sure to select the correct device.
Select driver "libusbK (v3.0.7.0)" and click Install Driver (or Replace Driver). If you get a security alert, choose to install the driver anyway.
Download the latest firmware here and AVRDude (for Windows) here. If you use Mac OS or Linux you need to install AVRDude, there should be tutorials how to do this.
Connect the USBAsp to the KTRL CD32 pin headers with the dupont wires according to to the picture below. Then connect the USBAsp to a USB port of your computer
You then need to run these commands in a command prompt / shell (from the folder where you extracted the firmware and AVRDude):
// Erase the chip (only needed if chip is not empty). This is done at a slower speed (-B 3)
avrdude.exe -p m328p -c usbasp -P usb -B 3 -e
// Set the fuses to set 8Mhz internal crystal etc. This is done at a slower speed (-B 3)
avrdude.exe -p m328p -c usbasp -P usb -B 3 -U lfuse:w:226:m -U hfuse:w:223:m -U efuse:w:5:m -U lock:w:63:m
// Write the firmware
avrdude.exe -p m328p -c usbasp -P usb -U flash:w:"KTRL_Wireless_Transmitter_v100.hex":a
Add all the face buttons + rubber (according to the CD32 layout, see picture below), dpad + rubber and select/play buttons to the gamepad case and then install the PCB.
The LED goes through the hole in the top part of the case.
Position the PCB so it lies as straight as possible, there is some small margin of rotation possible.
You can secure the battery with some thick double sided tape, it should be placed according to the picture below.
Finally add the shoulder buttons and screw the case together.