Difference between revisions of "DIY USB adapter/en"

From GIMX
Jump to: navigation, search
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
 
<languages />
 
<languages />
This page explains how to build a pc to ps3/360 usb adapter.<br />
+
This page explains how to build a pc to PS3/Xbox 360/PS4/Xbox One usb adapter.<br />
  
 
'''A much easier but less complete tutorial is also available: [[DIY_USB_adapter_for_dummies|DIY USB Adapter for dummies]].'''<br />
 
'''A much easier but less complete tutorial is also available: [[DIY_USB_adapter_for_dummies|DIY USB Adapter for dummies]].'''<br />
Line 9: Line 9:
 
==Required hardware parts==
 
==Required hardware parts==
  
# a USB to serial TTL converter that can work at 500kbps and that is '''5V tolerant''' - chip examples: FT232R, CP2102
+
# a USB to serial TTL converter that can work at '''500kbps''' and that is '''5V tolerant'''
 +
{| class="wikitable"
 +
| chip || CP2102 || FT232R || PL2303 || CH340 || FT230X
 +
|-
 +
| 5V tolerant
 +
| style="background: green; color: white;" | yes
 +
| style="background: orange; color: white;" | (*)
 +
| style="background: orange; color: white;" | (*)
 +
| style="background: orange; color: white;" | (*)
 +
| style="background: green; color: white;" | yes
 +
|-
 +
| 500 kbps
 +
| style="background: green; color: white;" | yes
 +
| style="background: green; color: white;" | yes
 +
| style="background: red; color: white;" | no
 +
| style="background: red; color: white;" | no
 +
| style="background: green; color: white;" | yes
 +
|-
 +
|
 +
|-
 +
| compatible
 +
| style="background: green; color: white;" | yes
 +
| style="background: orange; color: white;" | (*)
 +
| style="background: red; color: white;" | no
 +
| style="background: red; color: white;" | no
 +
| style="background: green; color: white;" | yes
 +
|}
 +
(*) depends on the board
 
# a USB development board '''working at 5V''' with a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4
 
# a USB development board '''working at 5V''' with a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4
  
 
Examples:
 
Examples:
 
* USB to serial TTL converter:
 
* USB to serial TTL converter:
 +
** [http://jim.sh/ftx/ MicroFTX (10$ excl. shipping costs)]
 
** [http://www.ebay.com/sch/i.html?_odkw=cp2102&LH_BIN=1&_sop=15&_osacat=0&_from=R40&LH_PrefLoc=2&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xcp2102+-pl2303&_nkw=cp2102+-pl2303&_sacat=0 CP2102 converters on ebay (as low as 3$)]
 
** [http://www.ebay.com/sch/i.html?_odkw=cp2102&LH_BIN=1&_sop=15&_osacat=0&_from=R40&LH_PrefLoc=2&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xcp2102+-pl2303&_nkw=cp2102+-pl2303&_sacat=0 CP2102 converters on ebay (as low as 3$)]
 
** [http://www.ebay.com/sch/i.html?_odkw=ft232+-cp2102+-ssop&LH_BIN=1&_sop=15&_osacat=0&_from=R40&LH_PrefLoc=2&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xft232+-cp2102+-pl2303+-ssop&_nkw=ft232+-cp2102+-pl2303+-ssop&_sacat=0 FT232R converters on ebay (as low as 4$)]
 
** [http://www.ebay.com/sch/i.html?_odkw=ft232+-cp2102+-ssop&LH_BIN=1&_sop=15&_osacat=0&_from=R40&LH_PrefLoc=2&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.Xft232+-cp2102+-pl2303+-ssop&_nkw=ft232+-cp2102+-pl2303+-ssop&_sacat=0 FT232R converters on ebay (as low as 4$)]
Line 21: Line 49:
 
** A second usb development board can also be programmed as a usb to serial converter.
 
** A second usb development board can also be programmed as a usb to serial converter.
 
* USB development board:
 
* USB development board:
** [http://www.pjrc.com/store/teensy.html Teensy board (atmega32u4, 16$ excl. shipping costs)] (to build a solderless adapter, take a board with header pins)
+
** [http://www.pjrc.com/store/teensy.html Teensy 2.0 board (atmega32u4, 16$ excl. shipping costs)] (to build a solderless adapter, take a board with header pins) (newer Teensy 3.x and LC boards are NOT compatible as they do not have the same chip)
 
** [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)
 
** [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)
 
** Boards used for the psgroove hack (check the on-board chip).
 
** Boards used for the psgroove hack (check the on-board chip).
Line 32: Line 60:
 
* CP2102 board (from ebay) + Teensy++ (at90usb1286)
 
* CP2102 board (from ebay) + Teensy++ (at90usb1286)
  
Recommended: CP2102 converter from ebay (very low price, but sometimes low delivery) and the Teensy board (low price, good quality, and quick delivery).
+
Recommended: CP2102 converter from ebay (very low price, but sometimes low delivery) and the Teensy 2.0 board (low price, good quality, and quick delivery).
  
 
==Firmware loading==
 
==Firmware loading==
  
 
*[http://gimx.fr/download/gimx-firmwares.html Firmwares]
 
*[http://gimx.fr/download/gimx-firmwares.html Firmwares]
:* Joystick: 16bit stick axes, for PS3
+
{{Firmwares}}
:* EMUPS3: Sixaxis emulation, for PS3
+
 
:* EMU360: 360 pad emulation, for Xbox 360
 
:* EMUPS4: Hori 4 FPS pad emulation, for PS4 (no touchpad/motion sensing support)
 
  
 
There are several tools that can be used to load the hex file:
 
There are several tools that can be used to load the hex file:
Line 63: Line 89:
 
|-
 
|-
 
| TX    || RX / RXI / TXD
 
| TX    || RX / RXI / TXD
 +
|}
 +
With a Teensy 2.0 as a USB dev board:
 +
{| class="wikitable"
 +
| Teensy 2.0 || USB to UART board
 +
|-
 +
| GND    || GND
 +
|-
 +
| D2    || TX / TXO / RXD
 +
|-
 +
| D3    || RX / RXI / TXD
 
|}
 
|}
  
 
If you use the arduino on-board USB to serial converter, Rx and Tx are inverted, i.e. Rx = TX&#9654; and Tx = RX&#9664;
 
If you use the arduino on-board USB to serial converter, Rx and Tx are inverted, i.e. Rx = TX&#9654; and Tx = RX&#9664;
  
The example below shows how to connect a CP2102 converter (left) to a Teensy board (right):
+
The example below shows how to connect a CP2102 converter (left) to a Teensy 2.0 board (right):
  
 
<div class="image200px">[http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG]</div>
 
<div class="image200px">[http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG http://gimx.fr/img/screenshots/PC-to-PS3-USB-controller.JPG]</div>
Line 80: Line 116:
 
* Teensy++ and CP2102 wired on a breadboard:
 
* Teensy++ and CP2102 wired on a breadboard:
 
:<div class="image200px">[http://gimx.fr/img/screenshots/cp2102_teensy++.jpg http://gimx.fr/img/screenshots/cp2102_teensy++.jpg]</div>
 
:<div class="image200px">[http://gimx.fr/img/screenshots/cp2102_teensy++.jpg http://gimx.fr/img/screenshots/cp2102_teensy++.jpg]</div>
* Teensy and CP2102 soldered:
+
* Teensy 2.0 and CP2102 soldered:
 
:<div class="image200px">[http://gimx.fr/img/adapter/soldered.jpg http://gimx.fr/img/adapter/soldered.jpg]</div>
 
:<div class="image200px">[http://gimx.fr/img/adapter/soldered.jpg http://gimx.fr/img/adapter/soldered.jpg]</div>
  
 
==Connection==
 
==Connection==
  
If you are using windows and a CP2102 usb to ttl board, install the [http://gimx.fr/download/CP210x_VCP_Windows CP2102 windows drivers] first (mandatory).<br />
 
Connect the USB to serial converter to your PC, and connect the usb dev board to your ps3. Turn the PS3 on (the ps button is not working yet). The ps3 should detect a controller (turn a sixaxis on, it should be detected as controller #2).<br />
 
 
If it's not already done, install [http://gimx.fr/downloads GIMX].<br />
 
If it's not already done, install [http://gimx.fr/downloads GIMX].<br />
 +
If you are using windows and a CP2102 USB to UART board, run the CP2102 windows driver installer that is included in the GIMX setup.<br />
 +
Connect the USB to UART converter to your PC, and connect the usb dev board to your console. Turn the console on (the ps/guide buttons are not working at this point). The console should detect a controller (if you add another controller, it should be detected as controller #2).<br />
 
Start gimx-launcher:<br />
 
Start gimx-launcher:<br />
 
TODO: update screenshot<br />
 
TODO: update screenshot<br />
 
<div class="image200px">[http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png]</div>
 
<div class="image200px">[http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png http://gimx.fr/img/screenshots/tuto/2.4_2_gimx-serial.png]</div>
In Ubuntu/Linux, the USB to serial TTL converter should be detected as "ttyUSBX" (with 'X' a number).<br />
+
In Ubuntu/Linux, the USB to UART converter should be detected as "ttyUSBX" (with 'X' a number).<br />
 
In Windows, it should be detected as "COMX" (with 'X' a number). Check the device manager to select the right one.
 
In Windows, it should be detected as "COMX" (with 'X' a number). Check the device manager to select the right one.
 
<div class="image200px">[http://gimx.fr/img/screenshots/WinCP2102.gif http://gimx.fr/img/screenshots/WinCP2102.gif]</div>
 
<div class="image200px">[http://gimx.fr/img/screenshots/WinCP2102.gif http://gimx.fr/img/screenshots/WinCP2102.gif]</div>
 +
Now that your adapter is ready you can follow the instructions on the [[Quick_Start|Quick Start page]].

Revision as of 15:05, 30 September 2015

Other languages:

This page explains how to build a pc to PS3/Xbox 360/PS4/Xbox One usb adapter.

A much easier but less complete tutorial is also available: DIY USB Adapter for dummies.
A German translation of a previous version is also available on the forum: old German translation.

Warning: you are responsible for the hardware you buy, and anything right or wrong you do with this.

Required hardware parts

  1. a USB to serial TTL converter that can work at 500kbps and that is 5V tolerant
chip CP2102 FT232R PL2303 CH340 FT230X
5V tolerant yes (*) (*) (*) yes
500 kbps yes yes no no yes
compatible yes (*) no no yes

(*) depends on the board

  1. a USB development board working at 5V with a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4

Examples:

Tested and working:

  • Arduino duemilanove (on-board FT232RL) + Bumble-b (discontinued, at90usb162)
  • Arduino duemilanove (on-board FT232RL) + Teensy++ (at90usb1286)
  • CP2102 board (from ebay) + Teensy 2.0 (atmega32u4)
  • CP2102 board (from ebay) + Teensy++ (at90usb1286)

Recommended: CP2102 converter from ebay (very low price, but sometimes low delivery) and the Teensy 2.0 board (low price, good quality, and quick delivery).

Firmware loading

<translate>

  • EMUJOYSTICK: HID joystick emulation, with 16bit stick axes, for PS3 and PC
  • EMUPS3: Sixaxis emulation, for PS3
  • EMU360: 360 pad emulation, for Xbox 360 and PC
  • EMUPS4: Hori Pad FPS Plus emulation, for PS4 and PC
  • EMUXONE: Xbox One pad emulation, for Xbox One
  • EMUG29PS4: Logitech G29 gaming wheel emulation, for PS4
  • EMUG27: Logitech G27 gaming wheel emulation, for PS3 and PC
  • EMUGTF: Logitech GT Force emulation, for PS2 and PC
  • EMUDF: Logitech Driving Force emulation, for PS2 and PC
  • EMUDFP: Logitech Driving Force Pro emulation, for PS2 and PC

</translate>


There are several tools that can be used to load the hex file:

dfu-programmer example:

   sudo dfu-programmer at90usb162 erase
   sudo dfu-programmer at90usb162 flash at90usb162.hex
   sudo dfu-programmer at90usb162 reset

Wiring

The only thing you have to do is to connect the following pins:

USB dev board USB to UART board
GND GND
RX TX / TXO / RXD
TX RX / RXI / TXD

With a Teensy 2.0 as a USB dev board:

Teensy 2.0 USB to UART board
GND GND
D2 TX / TXO / RXD
D3 RX / RXI / TXD

If you use the arduino on-board USB to serial converter, Rx and Tx are inverted, i.e. Rx = TX▶ and Tx = RX◀

The example below shows how to connect a CP2102 converter (left) to a Teensy 2.0 board (right):

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:

Examples:

  • Bumble-b and FT232RL wired on a breadboard:
  • Teensy++ and CP2102 wired on a breadboard:
  • Teensy 2.0 and CP2102 soldered:

Connection

If it's not already done, install GIMX.
If you are using windows and a CP2102 USB to UART board, run the CP2102 windows driver installer that is included in the GIMX setup.
Connect the USB to UART converter to your PC, and connect the usb dev board to your console. Turn the console on (the ps/guide buttons are not working at this point). The console should detect a controller (if you add another controller, it should be detected as controller #2).
Start gimx-launcher:
TODO: update screenshot

In Ubuntu/Linux, the USB to UART converter should be detected as "ttyUSBX" (with 'X' a number).
In Windows, it should be detected as "COMX" (with 'X' a number). Check the device manager to select the right one.

Now that your adapter is ready you can follow the instructions on the Quick Start page.