SamsungE810USBCable
These instructions provide hints to built a serial cable from a cheap non-original Samsung E810 USB data cable. The E810 cable is only needed to provide a suitable connector which can be plugged into the GP2x EXT port. Additionally the cable provides a convenient USB connector and has a level shifter built-in.
Contents |
Hints on the cable
Non-original cables vary greatly in their circuit design and connector specifics. However since the cable should work for the phone it will work for the GP2X, too. There is only one thing your cable should provide: You should be able to open the box containing the EXT port connector otherwise you will not be able to change the wiring or solder anything.
How is it done?
A serial cable needs 4 lines: receive (Rx), transmit (Tx), ground (0 Volt) and a power line (+3 Volt).
USB 1.x/2.0 standard A/B cables (not mini/micro) comes with these 4 lines:
Pin | Name | Cable color | Description |
---|---|---|---|
1 | VCC | Red | +5 V |
2 | D− | White | Data − |
3 | D+ | Green | Data + |
4 | Ground | Black | Ground |
First we will find out/confirm which wires are Tx and Rx on your cable and then we find/confirm a ground and power wire. Finally you will plug these into the connector and you are done.
Soldering needed?
In my case it was not needed to solder anything. This is due to the fact that the EXT port connector of my cable contained pins which I could simply pull out and push them back in another order. If your cable is similar to mine soldering will not be needed for you, too. However if you cable contains a small PCB (like the original Samsung cable has) things are not much more difficult and you can still follow this manual.
Disclaimer
You follow these instructions on your own risk. You warranty is taken for damages occured by following them. There is potential for burning the resistors of your USB connector! Ask someone else to do the wiring if you feel unsafe messing with electronics.
General note
It is possible to burn the resistor of your USB connector by doing the stuff below. Do not connect arbitrary wires for a long time. The speaker/headphone test should be done short. Remove the cable from the USB port between the steps (e.g. when you're reading).
This manual was written by an electronics/electrics novice. If someone more experienced with these matters reads this and has ideas on how to make it better: By all means register for the Wiki and change the text!
Stuff you need
- a speaker or headphones
- a multimeter
- a terminal application (minicom on GNU/Linux works perfect)
- calm hand
Preparation
- open the box with the EXT port connector
- pull all pins out of the connector or desolder them
Determining Rx/Tx
- plug cable into USB port
- start the terminal app
- configure your serial device (e.g. /dev/ttyUSB0 on GNU/Linux)
- set flow control to software (important!)
- take multimeter to find two cable ends which show a difference of 3 Volts
- connect one of the cable ends to your speaker/headphone
- try connecting another cable to your speaker and press a key in the terminal app
- if you hear clicking sounds you have found Tx
- if not try another cable
- write down the color of your Tx cable (it will be connected to the GP2x Rx pin (pin 22)
- try connecting your Tx cable to another cable and type something in your terminal app
- if you see the character you typed on screen you have found Rx
- if not try another cable
- write down the color of your Rx cable (it will be connected to the GP2x Tx pin (pin 23)
Thanks to the guys from the NSLU2 Wiki for providing the idea with the speaker/headphone.
Determining ground and power
- put your multimeter into voltage measurement mode
- plug the cable to your USB port
- connect a wire to the multimeter
- try another wire until the multimeter shows around 3.3V or -3.3V (not 3.7, -3.7)
- declare one of the wires to be ground the other to be power
Connecting
If your cable has pins just push them back in the following order:
- power at pin 20
- Tx at pin 22
- Rx at pin 23
- ground at pin 24
Look carefully that the pins do not touch each other. My cable had tiny sleeves around the wire which I could push over the pins to separate them cleanly.
Testing
- plug the USB cable in
- start terminal app
- set 115000 bps, 8 bits, no stop bits (sometimes referred as: 115000,8,N)
- set flow control to software
- start GP2x
- GP2x shows crazy colors
- no panic
- switch GP2x off
- swap ground and power and try again
- terminal app shows but messages: Well done!
- GP2x shows crazy colors