Difference between revisions of "DIY USB adapter"

From GIMX
Jump to: navigation, search
(Plug and play)
(Required hardware parts)
Line 5: Line 5:
 
==Required hardware parts==
 
==Required hardware parts==
  
* a usb to serial TTL converter that can work at 500kbps - chip examples: FT232R, CP2102
+
# a usb to serial TTL converter that can work at 500kbps - chip examples: FT232R, CP2102
* a usb development board with a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4
+
# a usb development board 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://shop.ebay.com/i.html?_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A4726&rt=nc&_nkw=CP2102&_sticky=1&_trksid=p3286.c0.m14&_sop=15&_sc=1 CP2102 converters on ebay (as low as 4$)]
 
** [http://shop.ebay.com/i.html?_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A4726&rt=nc&_nkw=CP2102&_sticky=1&_trksid=p3286.c0.m14&_sop=15&_sc=1 CP2102 converters on ebay (as low as 4$)]
 
** [http://shop.ebay.com/i.html?_nkw=FT232*+%28board%2C+module%29&_sacat=0&_sop=15&_odkw=FT232*+-ssop&_osacat=0&_trksid=p3286.c0.m270.l1313 FT232R converters on ebay (as low as 15$)]
 
** [http://shop.ebay.com/i.html?_nkw=FT232*+%28board%2C+module%29&_sacat=0&_sop=15&_odkw=FT232*+-ssop&_osacat=0&_trksid=p3286.c0.m270.l1313 FT232R converters on ebay (as low as 15$)]
Line 16: Line 16:
 
** Some devices like the arduino have an on-board usb to serial chip
 
** Some devices like the arduino have an on-board usb to serial chip
 
** 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 board (atmega32u4, 16$ excl. shipping costs)] (to build a solderless adapter, take a board with header pins)
 
** Boards used for the psgroove hack (check the on-board chip).
 
** Boards used for the psgroove hack (check the on-board chip).

Revision as of 13:52, 20 June 2012

This page explains how to build a pc to ps3/360 usb adapter.

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 - chip examples: FT232R, CP2102
  2. a usb development board with a chip among the following: at90usb82, at90usb162, at90usb646, at90usb647, at90usb1286, at90usb1287, atmega16u2, atmega32u2, atmega16u4, atmega32u4

Examples:

  1. USB to serial TTL converter:
  1. USB development board:

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 board (low price, good quality, and quick delivery).

Firmware loading

Firmwares:

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

Wiring

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

  • GND <--> GND
  • RX <--> TX
  • TX <--> RX

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.

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

Warning: Rx and Tx may be inverted on the usb to serial TTL board.
The CP2102 converter in the above example has inverted Rx and Tx.
If you use the arduino on-board USB to serial converter, Rx and Tx are inverted.

Examples:

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

Connection

If you are using windows and a CP2102 usb to ttl board, install the CP2102 windows drivers first (mandatory).
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 joystick (turn a sixaxis on, it should be detected as controller #2).
If it's not already done, install GIMX.
Start gimx-serial:

In Ubuntu/Linux, the USB to serial TTL 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.