<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gimx.fr/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthijs</id>
	<title>GIMX - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://gimx.fr/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthijs"/>
	<link rel="alternate" type="text/html" href="https://gimx.fr/wiki/index.php?title=Special:Contributions/Matthijs"/>
	<updated>2026-05-04T12:25:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.7</generator>
	<entry>
		<id>https://gimx.fr/wiki/index.php?title=DIY_USB_adapter&amp;diff=4586</id>
		<title>DIY USB adapter</title>
		<link rel="alternate" type="text/html" href="https://gimx.fr/wiki/index.php?title=DIY_USB_adapter&amp;diff=4586"/>
		<updated>2015-12-26T16:44:16Z</updated>

		<summary type="html">&lt;p&gt;Matthijs: Add Arduino Leonardo wiring&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
This page explains how to build a GIMX DIY USB adapter.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
'''A much easier but less complete tutorial is also available: [[DIY_USB_adapter_for_dummies|DIY USB Adapter for dummies]].'''&amp;lt;br /&amp;gt;&lt;br /&gt;
A German translation of a previous version is also available on the forum: [http://forum.gimx.fr/viewtopic.php?f=4&amp;amp;t=362 old German translation].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Warning: you are responsible for the hardware you buy, and anything right or wrong you do with this.&lt;br /&gt;
&lt;br /&gt;
==Required hardware parts== &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== USB to serial TTL converter === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
Make sure it works at '''500kbps''' and that it is '''5V tolerant'''.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| chip || CP2102 || FT232R || PL2303 || CH340 || FT230X&lt;br /&gt;
|-&lt;br /&gt;
| 5V tolerant&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: orange; color: white;&amp;quot; | (*)&lt;br /&gt;
| style=&amp;quot;background: orange; color: white;&amp;quot; | (*)&lt;br /&gt;
| style=&amp;quot;background: orange; color: white;&amp;quot; | (*)&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
| 500 kbps&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: red; color: white;&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: red; color: white;&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| compatible&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: orange; color: white;&amp;quot; | (*)&lt;br /&gt;
| style=&amp;quot;background: red; color: white;&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: red; color: white;&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: green; color: white;&amp;quot; | yes&lt;br /&gt;
|}&lt;br /&gt;
(*) depends on the board&amp;lt;br /&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
* [http://jim.sh/ftx/ MicroFTX (10$ excl. shipping costs)]&lt;br /&gt;
* [http://www.ebay.com/sch/i.html?_odkw=cp2102&amp;amp;LH_BIN=1&amp;amp;_sop=15&amp;amp;_osacat=0&amp;amp;_from=R40&amp;amp;LH_PrefLoc=2&amp;amp;_from=R40&amp;amp;_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xcp2102+-pl2303&amp;amp;_nkw=cp2102+-pl2303&amp;amp;_sacat=0 CP2102 converters on ebay (as low as 3$)]&lt;br /&gt;
* [http://www.ebay.com/sch/i.html?_odkw=ft232+-cp2102+-ssop&amp;amp;LH_BIN=1&amp;amp;_sop=15&amp;amp;_osacat=0&amp;amp;_from=R40&amp;amp;LH_PrefLoc=2&amp;amp;_from=R40&amp;amp;_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xft232+-cp2102+-pl2303+-ssop&amp;amp;_nkw=ft232+-cp2102+-pl2303+-ssop&amp;amp;_sacat=0 FT232R converters on ebay (as low as 4$)]&lt;br /&gt;
* [http://www.sparkfun.com/products/198 CP2102 converter at sparkfun (22$ excl. shipping costs)]&lt;br /&gt;
* [http://www.sparkfun.com/products/718 FT232R converter at sparkfun (15$ excl. shipping costs)]&lt;br /&gt;
* Some devices like the arduino have an on-board usb to serial chip (remove the AVR chip to use it)&lt;br /&gt;
* A second usb development board can also be programmed as a usb to serial converter.&lt;br /&gt;
&lt;br /&gt;
=== AVR USB development board === &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
Make sure it is '''working at 5V''' and that is has a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4&amp;lt;br /&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
* [http://www.pjrc.com/store/teensy.html Teensy 2.0 board (atmega32u4, 16$ excl. shipping costs)] (to build a solderless adapter, take a board [http://www.pjrc.com/store/teensy_pins.html with header pins]) (newer Teensy 3.x and LC boards are NOT compatible as they do not have the same chip)&lt;br /&gt;
* Boards used for the psgroove hack (check the on-board chip).&lt;br /&gt;
* Arduino-compatible boards based on the atmega32u4 chip&lt;br /&gt;
** [http://arduino.cc/en/Main/ArduinoBoardLeonardo Arduino Leonardo] - [http://arduino.cc/en/Main/Buy distributors] - (cheap Chinese clones can be found on ebay for 11$ incl. shipping costs)&lt;br /&gt;
** [http://www.ebay.com/sch/i.html?_sop=15&amp;amp;_from=R40&amp;amp;_sacat=0&amp;amp;_nkw=pro+micro+atmega32u4+-atmega328&amp;amp;LH_PrefLoc=2&amp;amp;rt=nc&amp;amp;LH_BIN=1 Cheap atmega32u4 boards on ebay] (about 4$). Soldering required.&lt;br /&gt;
&lt;br /&gt;
=== Recommended setup === &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
* CP2102 converter from ebay (very low price, but sometimes low delivery)&lt;br /&gt;
* Teensy 2.0 board (low price, good quality, and quick delivery).&lt;br /&gt;
&lt;br /&gt;
==Firmware loading== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
*[http://gimx.fr/download/gimx-firmwares Firmwares]&lt;br /&gt;
{{Firmwares/en}}&lt;br /&gt;
&lt;br /&gt;
===Teensy boards===&lt;br /&gt;
&lt;br /&gt;
Teensy boards can be easily flashed using the [http://www.pjrc.com/teensy/loader.html Teensy Loader].&amp;lt;br /&amp;gt;&lt;br /&gt;
It is probably the easier to use flashing tool, but it is only compatible with '''genuine''' teensy boards.&lt;br /&gt;
&lt;br /&gt;
===Cheap Arduino-compatible atmega32u4-based boards===&lt;br /&gt;
&lt;br /&gt;
====Using the Arduino Builder tool====&lt;br /&gt;
&lt;br /&gt;
* Download the Arduino Leonardo drivers and save them into the same folder:&lt;br /&gt;
** [https://github.com/arduino/Arduino/raw/master/build/windows/dist/drivers/arduino.cat arduino.cat]&lt;br /&gt;
** [https://github.com/arduino/Arduino/raw/master/build/windows/dist/drivers/arduino.inf arduino.inf]&lt;br /&gt;
* Right-click on the arduino.inf file and click on Install.&lt;br /&gt;
* Make sure that the USB to UART board (e.g. CP2102) is connected and powered, and that the wiring with the atmega32u4 board is correct.&lt;br /&gt;
* Make sure that the atmega32u4 board is connected and powered.&lt;br /&gt;
* Download the [http://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/ArduinoBuilder-0.9.1.7z/download Arduino Builder tool] and extract the archive (using [http://www.7-zip.org/ 7zip]).&lt;br /&gt;
* Run ArduinoBuilder.exe.&lt;br /&gt;
* Click on &amp;quot;Load Sketch / HEX&amp;quot;, and select the desired atmega32u4.hex firmware.&lt;br /&gt;
* Click on &amp;quot;Board Type&amp;quot; and select &amp;quot;Arduino Leonardo&amp;quot;.&lt;br /&gt;
* Click on the COM port that matches the &amp;quot;Silicon Labs CP210x ... (COMX)&amp;quot; COM port in the device manager (or whatever the name of your USB to UART board is). This is a trick to make the Arduino Builder tool look for a new COM port.&lt;br /&gt;
* The following message should appear: &amp;quot;Forcing reset using 1200bps open/close on COMX...&amp;quot;.&lt;br /&gt;
* Quickly unplug/replug the atmega32u4 board, or connect RST to GND twice.&lt;br /&gt;
* The atmega32u4 board should run the bootloader. The Arduino builder tool should find the Arduino Leonardo COM port and flash the firmware.&lt;br /&gt;
Upon success a &amp;quot;Uploading completed!&amp;quot; message should be displayed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using Avrdude====&lt;br /&gt;
&lt;br /&gt;
* Download the Arduino Leonardo drivers and save them into the same folder:&lt;br /&gt;
** [https://github.com/arduino/Arduino/raw/master/build/windows/dist/drivers/arduino.cat arduino.cat]&lt;br /&gt;
** [https://github.com/arduino/Arduino/raw/master/build/windows/dist/drivers/arduino.inf arduino.inf]&lt;br /&gt;
* Right-click on the arduino.inf file and click on Install.&lt;br /&gt;
* Make sure that the USB to UART board (e.g. CP2102) is connected and powered, and that the wiring with the atmega32u4 board is correct.&lt;br /&gt;
* Make sure that the atmega32u4 board is connected and powered.&lt;br /&gt;
* Download the [http://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/ArduinoBuilder-0.9.1.7z/download Arduino Builder tool] and extract the archive (using [http://www.7-zip.org/ 7zip]).&lt;br /&gt;
* Press shift and right-click into the bin folder, and click on &amp;quot;Open command window here&amp;quot;.&lt;br /&gt;
* Type the following text but don't press enter:&lt;br /&gt;
 avrdude -p atmega32u4 -c avr109 -P COM7 -D -U flash:w:&amp;lt;path to atmega32u4.hex&amp;gt;:i&lt;br /&gt;
* Make sure to replace &amp;quot;&amp;lt;path to atmega32u4.hex&amp;gt;&amp;quot; in the command line with the location of the firmware to load (for example: C:\Users\YourUserName\Downloads\firmwares-5.0\EMUPS4\atmega32u4.hex).&lt;br /&gt;
* Move the cursor right after COM7.&lt;br /&gt;
* Open the device manager, and unfold the COM port item.&lt;br /&gt;
* Quickly unplug/replug the atmega32u4 board, or connect RST to GND twice.&lt;br /&gt;
* The atmega32u4 board should run the bootloader. As soon as you see it appearing in the device manager, change the COM port number in the CMD window and press enter.&lt;br /&gt;
&lt;br /&gt;
In GNU/Linux, the avrdude command is:&lt;br /&gt;
 avrdude -p atmega32u4 -c avr109 -P /dev/ttyACM0 -D -U flash:w:atmega32u4.hex:i&lt;br /&gt;
(make sure to adjust the port and the file)&lt;br /&gt;
&lt;br /&gt;
===Other tools===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
There are a few other tools that can be used to load the hex file:&lt;br /&gt;
* [http://www.atmel.com/tools/FLIP.aspx Flip utility from Atmel] (not compatible with genuine teensy boards and with Arduino-compatible atmega32u4-based boards)&lt;br /&gt;
* [http://dfu-programmer.sourceforge.net/ dfu-programmer command-line tool] (not compatible with genuine teensy boards and with Arduino-compatible atmega32u4-based boards)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
dfu-programmer example:&lt;br /&gt;
    sudo dfu-programmer at90usb162 erase&lt;br /&gt;
    sudo dfu-programmer at90usb162 flash at90usb162.hex&lt;br /&gt;
    sudo dfu-programmer at90usb162 reset&lt;br /&gt;
&lt;br /&gt;
==Wiring== &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
The only thing you have to do is to connect the following pins:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| USB dev board || USB to UART board&lt;br /&gt;
|-&lt;br /&gt;
| GND     || GND&lt;br /&gt;
|-&lt;br /&gt;
| RX     || TX / TXO / TXD&lt;br /&gt;
|-&lt;br /&gt;
| TX     || RX / RXI / RXD&lt;br /&gt;
|}&lt;br /&gt;
'''Warning: some adapters are mislabeled and have inverted RX/TX.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
With a Teensy 2.0 or Arduino Leonardo as a USB dev board:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Arduino Leonardo || Teensy 2.0 || USB to UART board&lt;br /&gt;
|-&lt;br /&gt;
| GND              || GND        || GND&lt;br /&gt;
|-&lt;br /&gt;
| 0 (RX1)          || D2         || TX / TXO / TXD&lt;br /&gt;
|-&lt;br /&gt;
| 1 (TX1)          || D3         || RX / RXI / RXD&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
If you use the arduino on-board USB to serial converter, Rx and Tx are inverted, i.e. Rx = TX&amp;amp;#9654; and Tx = RX&amp;amp;#9664;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
The example below shows how to connect a (mislabeled) CP2102 converter (left) to a Teensy 2.0 board (right):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
It's possible to solder wires or to use jumper wires (these are generally provided with USB to serial TTL boards) in case your AVR USB board has header pins:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/adapter/solderless.jpg http://gimx.fr/img/adapter/solderless.jpg]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
* Bumble-b and FT232RL wired on a breadboard:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/screenshots/ft232rl_bumbleb.jpg http://gimx.fr/img/screenshots/ft232rl_bumbleb.jpg]&amp;lt;/div&amp;gt;&lt;br /&gt;
* Teensy++ and CP2102 wired on a breadboard:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/screenshots/cp2102_teensy++.jpg http://gimx.fr/img/screenshots/cp2102_teensy++.jpg]&amp;lt;/div&amp;gt;&lt;br /&gt;
* Teensy 2.0 and CP2102 soldered:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/adapter/soldered.jpg http://gimx.fr/img/adapter/soldered.jpg]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Connection== &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
If it's not already done, install [http://gimx.fr/downloads GIMX].&amp;lt;br /&amp;gt;&lt;br /&gt;
Connect the USB to UART converter to your PC, and connect the usb dev board to your console.&amp;lt;br /&amp;gt;&lt;br /&gt;
Turn the console on (the ps/guide buttons are not working at this point).&amp;lt;br /&amp;gt;&lt;br /&gt;
The console should detect a controller (if you add another controller, it should be detected as controller #2).&amp;lt;br /&amp;gt;&lt;br /&gt;
Start gimx-launcher:&amp;lt;br /&amp;gt;&lt;br /&gt;
TODO: update screenshot&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png]&amp;lt;/div&amp;gt;&lt;br /&gt;
In Ubuntu/Linux, the USB to UART converter should be detected as &amp;quot;ttyUSBX&amp;quot; (with 'X' a number).&amp;lt;br /&amp;gt;&lt;br /&gt;
In Windows, it should be detected as &amp;quot;COMX&amp;quot; (with 'X' a number). Check the device manager to select the right one.&lt;br /&gt;
&amp;lt;div class=&amp;quot;image200px&amp;quot;&amp;gt;[http://gimx.fr/img/screenshots/WinCP2102.gif http://gimx.fr/img/screenshots/WinCP2102.gif]&amp;lt;/div&amp;gt;&lt;br /&gt;
Now that your adapter is ready you can follow the instructions on the [[Quick_Start|Quick Start page]].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthijs</name></author>
		
	</entry>
</feed>