5,597,354 Members 31,799 Now Online
XDA Developers Android and Mobile Development Forum

make your own USB OTG Simple

Tip us?
 
karan.champaneri
Old
(Last edited by karan.champaneri; 31st July 2012 at 10:00 AM.) Reason: missing imge
#1  
Member - OP
Thanks Meter 16
Posts: 94
Join Date: Jun 2012
Location: mumbai
Thumbs up make your own USB OTG Simple



Some high-end Android phones and most of today’s Android tablets support USB OTG (On-The-Go). This enables users to connect standard USB input devices such as keyboards and mice, or even extend storage using a regular USB pen drive. However, only a few Android tablets are equipped with a USB host port (Type A Female connector), while no mobile phone is. Some mobile phone manufacturers ship USB host ports with their handsets while others have them as optional accessories, usually at a premium price.

In order to connect an Android phone to a standard USB device, you need to use a micro (or mini) USB to USB Type A Female convertor, but this should also be an OTG cable. A mini USB OTG cable is available in the market and can cost you around Rs.150 – Rs.300, but finding vendors who actually sell it is not easy. The ones that are available are not guaranteed to work. The case of the micro USB OTG cables is also similar.



USB connector types



In this workshop, we show you how you can build yourself an OTG cable (be it micro or mini) at almost no cost. Do note that the procedure mentioned here will involve hacking into your existing cable, and even a small blunder can potentially damage your cable or the device you use it with. Proceed with extreme caution as we take no responsibility for any damages to your device. Do this at your own risk. Furthermore, do take note of your Android specs and check carefully to see if it has OTG capabilities before trying out this workshop. Phones don’t need to be rooted as the stock ROM usually supports OTG in compatible handsets. Those who have installed third-party developer ROMs should check with the developers if the OTG feature is enabled in the kernel.

Slicing the connector sleeve





Since all phones usually ship with cables, we suggest you opt for a second one from the market to create the OTG cable. For those who are not able to find a similar cable, this workshop will also show you how you can use the same cable for regular and OTG modes. In the following procedure, we'll be using a micro USB cable that we’ll convert to be used with USB OTG.

Requirements:
A standard mini or micro USB cable
Some small, thin wires
A sharp knife
Soldering iron and solder wire
Wire cutter
Hot glue or any quick glue

Firstly, we need to slice open the micro USB connector end very carefully using a knife. The idea here is to cut the outer sleeve (length-wise) into two halves to reveal the connector inside. Be careful not to destroy the outer sleeve as we shall be glueing it back on after the work is done.

A miniature switch



After the sleeve is taken apart, some of you might find a whitish plastic mould covering the connector’s leads. This is for strengthening the cable to connector contacts, and its use depends from manufacturer to manufacturer. Those who have this mould will also have to cut through it to reveal the connector leads. On revealing the connector leads, you will find that it has five leads and not four. The usual four are power, data, data and ground, while the non-connected lead is sense. This lead needs to be grounded before connecting the cable for the phone to switch to OTG mode and sense a USB device connected to the interface.

The difference - circuit




Given above is the pin-out diagram for the micro and mini USB connector.
Pin 1: VCC
Pin 2: data
Pin 3: data
Pin 4 Not connected / unused
Pin 5: ground

In order to get the phone to go into OTG mode, we need to short Pins 4 and 5. You can either choose to short them permanently by soldering them together or soldering two wires to each of the pins and leading those outwards from the connector, which can then be soldered to a small switch. Using the switch, we can switch the cable between normal and OTG whenever needed. If you choose to short it permanently, you will have to cut off the connector at the other end (The Type A Male USB connector) and solder a Type B Female connector to accommodate a USB device. You can also choose to have a male to female USB convertor at that end. Here's what we did:

The connector and the sleeve



We chose to connect a small switch to the leads at Pin 4 and Pin 5 and glue the switch to the wire itself. This way, we could use the cable for both regular and OTG purposes. Next, we glued the connector sleeves back carefully using hot glue. Now the other end of the cable, which has a male USB connector, needed to be converted into a female. For this, we opted for the scrapped USB rear panel connector of a desktop PC. We soldered the wires of the USB connector to create a USB female-to-female convertor. Once done, we now have an OTG cable ready for use. Just to ensure we do not end up frying our phone, we used a multimeter to double-check any cable shortings during the soldering. Lastly, we connected the OTG cable to our Android (the Sony Ericsson Live with Walkman) and used a USB mouse with it. If your cable worked for you and your phone is compatible with OTG features, you can also connect a USB hub to the OTG cable and use a USB keyboard, mouse and pen drive together on the same Android device.

Micro USB Pin points



By following this workshop you can now conveniently use a pointing device to control your apps and games, use a keyboard to type e-mails and messages or use a pen drive to store or access media or large files. If you are lucky enough to find a micro USB connector and a Type A Female USB connector at an electronics store though, you can make your own OTG cable for under Rs.100.
The Following 9 Users Say Thank You to karan.champaneri For This Useful Post: [ Click to Expand ]
 
Harsha Raj
Old
#2  
Harsha Raj's Avatar
Senior Member
Thanks Meter 1128
Posts: 4,134
Join Date: Jun 2011
I would have tried it but for to have a soldering device. I guess soldering device is a must for electronic stuffs.

ROM: SlimSaber - Android 4.4.2 Kernel: Stock

History: Nokia 3100 > Nokia 6230i > Nokia 6111 > Nokia 3100 Classic > Nokia 5700 > Nokia 5230 > Samsung Galaxy S > Samsung Galaxy S II i9100

Secondary Device: Sony Ericsson Live with Walkman WT19i - ROM: Legacy Xperia 4.2.2 Kernel: Stock

 
karan.champaneri
Old
#3  
Member - OP
Thanks Meter 16
Posts: 94
Join Date: Jun 2012
Location: mumbai
Storage Geek

Quote:
Originally Posted by Harsha Raj View Post
I would have tried it but for to have a soldering device. I guess soldering device is a must for electronic stuffs.
A soldering device and a multimeter is a must when a geek is born
 
murpheus
Old
#4  
murpheus's Avatar
Member
Thanks Meter 14
Posts: 64
Join Date: Jan 2012
Location: Quatre Bornes
Thanks for that tutorial. I'm tempted to have a 32G pendrive in my pocket now
The Following User Says Thank You to murpheus For This Useful Post: [ Click to Expand ]
 
karan.champaneri
Old
#5  
Member - OP
Thanks Meter 16
Posts: 94
Join Date: Jun 2012
Location: mumbai
Plug :)

Quote:
Originally Posted by murpheus View Post
Thanks for that tutorial. I'm tempted to have a 32G pendrive in my pocket now
It works like a Charm..... i wish it could support External HDD.... lol sorry for asking for more GOD
 
karan.champaneri
Old
#6  
Member - OP
Thanks Meter 16
Posts: 94
Join Date: Jun 2012
Location: mumbai
Sign All you need Is

All u need is

Any Spare Data Cable

an old usb hub multi connector sounds perfect

cut the data cable wire and then cut the usb hub wire

join two ends according to diagram

use tape to join and u r done

for perfect job use soldering iron

for amazing job follow this Instructons
 
narsimdamha
Old
#7  
Member
Thanks Meter 21
Posts: 59
Join Date: Jul 2012
Location: klang
Quote:
Originally Posted by karan.champaneri View Post


Some high-end Android phones and most of today’s Android tablets support USB OTG (On-The-Go). This enables users to connect standard USB input devices such as keyboards and mice, or even extend storage using a regular USB pen drive. However, only a few Android tablets are equipped with a USB host port (Type A Female connector), while no mobile phone is. Some mobile phone manufacturers ship USB host ports with their handsets while others have them as optional accessories, usually at a premium price.

In order to connect an Android phone to a standard USB device, you need to use a micro (or mini) USB to USB Type A Female convertor, but this should also be an OTG cable. A mini USB OTG cable is available in the market and can cost you around Rs.150 – Rs.300, but finding vendors who actually sell it is not easy. The ones that are available are not guaranteed to work. The case of the micro USB OTG cables is also similar.



USB connector types



In this workshop, we show you how you can build yourself an OTG cable (be it micro or mini) at almost no cost. Do note that the procedure mentioned here will involve hacking into your existing cable, and even a small blunder can potentially damage your cable or the device you use it with. Proceed with extreme caution as we take no responsibility for any damages to your device. Do this at your own risk. Furthermore, do take note of your Android specs and check carefully to see if it has OTG capabilities before trying out this workshop. Phones don’t need to be rooted as the stock ROM usually supports OTG in compatible handsets. Those who have installed third-party developer ROMs should check with the developers if the OTG feature is enabled in the kernel.

Slicing the connector sleeve





Since all phones usually ship with cables, we suggest you opt for a second one from the market to create the OTG cable. For those who are not able to find a similar cable, this workshop will also show you how you can use the same cable for regular and OTG modes. In the following procedure, we'll be using a micro USB cable that we’ll convert to be used with USB OTG.

Requirements:
A standard mini or micro USB cable
Some small, thin wires
A sharp knife
Soldering iron and solder wire
Wire cutter
Hot glue or any quick glue

Firstly, we need to slice open the micro USB connector end very carefully using a knife. The idea here is to cut the outer sleeve (length-wise) into two halves to reveal the connector inside. Be careful not to destroy the outer sleeve as we shall be glueing it back on after the work is done.

A miniature switch



After the sleeve is taken apart, some of you might find a whitish plastic mould covering the connector’s leads. This is for strengthening the cable to connector contacts, and its use depends from manufacturer to manufacturer. Those who have this mould will also have to cut through it to reveal the connector leads. On revealing the connector leads, you will find that it has five leads and not four. The usual four are power, data, data and ground, while the non-connected lead is sense. This lead needs to be grounded before connecting the cable for the phone to switch to OTG mode and sense a USB device connected to the interface.

The difference - circuit




Given above is the pin-out diagram for the micro and mini USB connector.
Pin 1: VCC
Pin 2: data
Pin 3: data
Pin 4 Not connected / unused
Pin 5: ground

In order to get the phone to go into OTG mode, we need to short Pins 4 and 5. You can either choose to short them permanently by soldering them together or soldering two wires to each of the pins and leading those outwards from the connector, which can then be soldered to a small switch. Using the switch, we can switch the cable between normal and OTG whenever needed. If you choose to short it permanently, you will have to cut off the connector at the other end (The Type A Male USB connector) and solder a Type B Female connector to accommodate a USB device. You can also choose to have a male to female USB convertor at that end. Here's what we did:

The connector and the sleeve



We chose to connect a small switch to the leads at Pin 4 and Pin 5 and glue the switch to the wire itself. This way, we could use the cable for both regular and OTG purposes. Next, we glued the connector sleeves back carefully using hot glue. Now the other end of the cable, which has a male USB connector, needed to be converted into a female. For this, we opted for the scrapped USB rear panel connector of a desktop PC. We soldered the wires of the USB connector to create a USB female-to-female convertor. Once done, we now have an OTG cable ready for use. Just to ensure we do not end up frying our phone, we used a multimeter to double-check any cable shortings during the soldering. Lastly, we connected the OTG cable to our Android (the Sony Ericsson Live with Walkman) and used a USB mouse with it. If your cable worked for you and your phone is compatible with OTG features, you can also connect a USB hub to the OTG cable and use a USB keyboard, mouse and pen drive together on the same Android device.

Micro USB Pin points



By following this workshop you can now conveniently use a pointing device to control your apps and games, use a keyboard to type e-mails and messages or use a pen drive to store or access media or large files. If you are lucky enough to find a micro USB connector and a Type A Female USB connector at an electronics store though, you can make your own OTG cable for under Rs.100.

hai mate,
may i ask something here??
i didn't see any white colour wire on your diagram and i also didn't see any ocean blue wire on your actual pic.. could you help me here??
PHONE: SAMSUNG GALAXY S2 GT-I9100
ANDROID VERSION: 4.1.2
ROM :STOCK XXLSJ
KERNEL VERSION: STOCK XXLSJ
BASEBAND VERSION: i9100XXLS6
BUILD NUMBER: JZ054K.I9100XXLSJ
RECOVERY VER : CWM V6 PHILZ



Pressbutton if I helped you somehow
The Following 4 Users Say Thank You to narsimdamha For This Useful Post: [ Click to Expand ]
 
adefxda
Old
#8  
adefxda's Avatar
Senior Member
Thanks Meter 37
Posts: 100
Join Date: May 2010
Location: Jambi
Thank you.. very clear & easy tutorial...
 
agonysfate
Old
#9  
agonysfate's Avatar
Junior Member
Thanks Meter 2
Posts: 18
Join Date: Feb 2012
Quote:
Originally Posted by karan.champaneri View Post
It works like a Charm..... i wish it could support External HDD.... lol sorry for asking for more GOD
You can use OTG to run External HDD, all you need is to separate HDD's power and give it External 5Volts from any cigarette car charger, HDDs consume 1Amp at the most and 5.2 Volts are suitable for it

old HDDs that have Mini-USB with those 2 end USB male wires dont need moding just plug the power on a 5V supply, let the HDD start and plug the Data+Power to OTG cable, but becareful to unplug OTG first before you unplug the power, its not a safe way but it works with my HDDs ( tested on SGS2

The Following User Says Thank You to agonysfate For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes