Until recently, you could download the schematics and firmware for a 2-port joystick adapter from Andreas Paul’s website. This adapter was sold many years ago in Germany by Sinchai as a kit. But this website does not exist anymore. So my intention was to build this adapter myself. Because I wanted to have it as small as possible, I chose a version in SMD technology.
Unfortunately, the schematic was only available as an Eagle file, so I had to “copy” the plan again in KiCad.
The assembly list for the above version with normal components is as follows:
www.reichelt.de Parts list with order numbers
1x USB BWUSB socket type B, angled
2x D-SUB ST09EUSub-D female 9pin, male, angled
1x WSL 10GTub connector 10pin, straight
1x ATTINY2313DIPATMEL AVR ATtiny 2313-20PI
1x GS20PPrecision socket 20pin
1x 12.0000-HC49U-SCrystal 12 MHz
1x PFRA 010 resetting fuse
2x IF 3.6Z diode 3.6V 0.5W
2x METALL 68,0 resistor 68 Ohm 1/4 Watt
1x METALL 1,50K resistor 1,5 kOhm 1/4 Watt
1x METALL 10,0K resistor 10 kOhm 1/4 Watt
1x RAD 10/35 electrolytic capacitor 10 µF
2x KERKO 22pCapacitor 22 pF
2x X7R-2,5 100ncapacitor 100 nF
Reichelt prices as of 11-06-2018: 3.88 EUR
Here is the layout from the original version:
And a shot of the finished version:
Unfortunately, there is no suitable, or ready-cut housing. So I did a little research on the Internet, and then became aware of the old DB9 jumper boxes. Perhaps one or the other still remembers it from old times. These were the boxes that were needed to adapt serial interfaces.
These housings are still available today for very little money:
On the picture you can already see the finished joystick adapter. In the silver housing is the complete electronics, from the circuit diagram shown above.
Now I just had to transfer the schematic to KiCad, which was done quickly.
The assembly list is slightly different due to the SMD construction.
- 2x 100nF capacitor / 0805
- 1x 10µF tantalum capacitor / Kemet B
- 2x 22pF capacitor / 0805
- 2x Zener diode BZT52C3V6 / SOD 123
- 1x Littlefuse1206L150THWR / 1206
- 2x DB9 female, male with solder cups
- 1x 10k resistor 1/8W, 1% / 0805
- 1x 1.5k resistor 1/8W, 1% / 0805
- 2x 68 resistor 1/8W, 1% / 0805
- 1x ATTiny 4313-SU / SOIC-20W
- 1x 12MHZ crystal / 5032, 2pin
- header 2 rows
- USB connection cable
The board then looked very good in KiCad in the 3D model:
The assembly is actually quite simple, since only a few components are needed. The components are assembled from small to large. First the resistors, then the capacitors, followed by the quartz. Then the programmable microcontroller.
At the end there is the pin header, which is needed to program the microcontroller and the two DB9 connectors. I recommend to put the construction together by hand and to solder it into one half of the case. Then solder the first side of the DB9 sockets to the board. And then the back side can be soldered.
Then a small hole must be drilled in a bottom part of the adapter in the side, so that the USB cable can be plugged through there. It is best to take a ready-made cable with an open end. Such cables are available from Reichelt, among others.
After passing the cable through the previously drilled hole, the wires can be soldered to the board. To secure the cable from being pulled out, a small cable tie should be pulled around the cable.
After soldering the adapter looks like this:
This adapter should be easy to assemble even by a beginner in SMD. There is actually nothing else to consider.
Now only the microcontroller must be flashed with the appropriate firmware. This can be done most simply with the tool avrdude. The call differs of course, depending on the used programming adapter a little bit. With the very popular and widely used USBASP adapter the whole thing would look like this:
avrdude -c usbasp -p t4313 -U flash:w:main4313.hex -U lfuse:w:0xcf:m -U hfuse:w:0xdb:m -U efuse:w:0xff:m
Then plug the housing together and the joystick adapter is ready.