1. Jerry Hildenbrand's Avatar

    [INFO]What is USB OTG?

    A type of USB connection that acts as a host or master to slave connections. It first came to Android (officially) in 3.1, and now it's fairly standard across devices. It's what lest you use mice, keyboards, cameras, controllers, and (if rooted) thumb drives or externally powered hard drives.

    It also kicks *** because it's a standard, using a standard connection instead of a proprietary model, found in things like an iPad camera connector kit. Standards are good.[/INFO]

    What this guide is (and isn't)

    This is a guide to building your own USB On-The-Go cable from crap you might already have in your desk drawer. Don't order any of these cables to make your own -- instead order a cable from Amazon for a buck.. It will look nicer and there less chance to burn and cut yourself.

    This is not a guide for people who don't like to build and or break stuff. You'll need tools. You'll need a soldering iron. You'll need very sharp knives. For the love of all things holy, pay attention to what you're doing, and be sober while playing with these stabby burny things.

    If you're going to continue anyway, awesome. Welcome to my world, where ordering stuff is never the answer when you have drawers full of things like old USB cables. You'll need:
    A soldering iron
    Some solder
    Some tape and or heat shrink tubing. The cheapest electrical tape you can find.
    A very sharp, thin knife. Xacto's are perfect.
    Something to cut a cable and strip some wires with.
    Something to pry the casing away with. A tiny straight screwdriver works great.
    A microUSB cable. Like the one that came with your phone or tablet. But don't ruin a good one -- order a cable from Amazon instead.
    A USB extension cable. One with one male and one female end. Again -- order an OTG cable from Amazon before you ruin a good one.

    Grab this end of your microUSB to USB cable.

    Follow the seam on each side and cut away the plastic outer shell. If you are scavenging a USB cable from LG be careful -- there's a tiny circuit board there and it will wiggle and break the solder joint on all the connections. Don't cut yourself.

    Once cut, fold back the two halves of the casing and see if the connector body will slide down the cable. If it does, push it away. If it doesn't, cut it off. You'll see some silicon over all the connections, and maybe a metal connector shell (LG cables have the body in this picture). Carefully carve away the dried silicon and use a small screwdriver or dental tool to open the metal shell if there's one there. This is almost as sharp as the knife. Be careful. If yours has this metal casing, open it, pull it out, and throw it away.

    Here's the fun part. Your connector will have five pins, but only four wires attached. Your job is to attach the black wire to pin 5 (where it's attached now) and to pin 4 (the empty one). For those interested, the pinout is:
    • Pin 1 -- VCC (red)
    • Pin 2 -- Data - (white)
    • Pin 3 -- Data + (green)
    • Pin 4 -- ID (none for USB pass through, grounded for OTG) (black)
    • Pin 5 -- GND (black)

    Solder in a jumper however you like. I like to pull the black lead off of pin 5 and fold it back, then solder a pigtail to pin 4 and pin 5. Make a joint a bit back from the connector itself where these two pigtails connect to the black wire you pulled from pin 5. This way you aren't trying to solder two wires to one tiny little pin. Be sure you don't accidentally bridge any pins together (they are pretty close) or it won't work. I don't think you could short it and release the magic blue smoke, but better safe that sorry -- so keep things clean when soldering. You'll end up with an ugly mess, sort of like this:
    The important thing is to make sure the solder joints are good, and nothing is touching. [TIP]Protip: if you use an iron that's too hot, the plastic will melt into the solder. If you melt too much plastic, you'll have to find another cable.[/TIP]

    If you have a multimeter, you can cut the other end off the cable now and ring out the connections to make sure they are all good and not shorting. If you don't, look it over really well, and when satisfied grab your electrical tape and wrap it up. If you listened and used really cheap "plasticky tape" you need to pull it tight when wrapping so it gets hard when it cools down. You sparkys know what I'm talking about -- expensive tape stays flexible. Use the cheap stuff and get a nice, firm shell over your connector. It will look like this:

    Now to work on the other end.

    Cut the male end off of both cables. Strip back about two inches of the cable jacket n the long ends (toss the male ends in the round file), and match up the colors. If your colors don't match remember the pinout from above and bust open that male end to check the pins. Wire from pin to pin instead of color to color. Your colors will probably match. Solder and tape up this end just like you did above. When you're done, grab a cheap USB mouse and plug it in

    Keyboards and controllers will probably work out of the box. To use a pen drive, you'll need either support from your device's ROM or to be rooted and use an app. Grab Stickmount from Google Play. Plug in a USB stick, read the screen:
    Say yes, then select "mount" in the stickmount app and wait for the magic. Your drive will be mounted in /sdcard/usbStorage/sda1 in any file browser:
    You can store music, movies, porn, or anything you desire on the thumbdrive. Any size will work. Go wild with it. When you're done, unmount it from the notification shade and then unplug it.

    Nothing works! -- check your soldering and connections.
    I have power, but no data -- check your soldering and connections
    I can't mount a USB stick -- Get root and install StickMount
    It's cheaper to just buy a cable! -- Yep. But not nearly as fun and buying another cable doesn't use crap in my desk drawer.
    08-15-2012 02:00 AM
  2. n0obpr0's Avatar
    Great guide Jerry!!
    08-15-2012 02:18 AM
  3. retsaw's Avatar
    If pin 4 needs to be grounded and the ground is pin 5 then can't you just stick a small blob of solder between them rather than soldering individual wires to both of them?

    Sent from my Nexus 7 using Android Central Forums
    08-15-2012 02:47 AM
  4. Jerry Hildenbrand's Avatar
    If pin 4 needs to be grounded and the ground is pin 5 then can't you just stick a small blob of solder between them rather than soldering individual wires to both of them?

    Sent from my Nexus 7 using Android Central Forums
    On different sides of the connector. But there's no special way needed, I just did it this way because it was easier with my really hot solder iron.
    retsaw likes this.
    08-15-2012 02:51 AM
  5. retsaw's Avatar
    I see. I've already bought a couple of USB OTG cables, so I don't really need another one, but I've just got what must be the smallest USB microsd reader it is possible to make (the card slot is on the underside of the USB connector pins) so if I solder it directly to a microUSB plug I'll hopefully be able to cut down the size of what I need plugged in to get extra external storage.

    Sent from my Nexus 7 using Android Central Forums
    08-15-2012 03:22 AM
  6. garry1bowie's Avatar
    Sorry guys to jump in here by going off topic, but could you tell me what theme that is you're using? Thanks.
    R_o_n_n_i_e likes this.
    08-15-2012 08:51 AM
  7. dmmarck's Avatar
    Great work Jerry, looks like I have a nice project for the weekend.
    08-15-2012 09:16 AM
  8. R_o_n_n_i_e's Avatar
    Love your N7 theme, name please?
    08-15-2012 12:34 PM
  9. txrose72's Avatar
    Great post. You could add a third line using a male usb to make a "Y" cable to add a charging line to allow streaming movies via a USB stick or USB HD and still maintain the battery on the device.
    08-17-2012 07:31 PM
  10. paisasaenz's Avatar
    this was a good way to wast some time. im just wondering what if the 4 pins are connected on the same side like in the pic. and if i just connect it to the back where to?
    thanks in advance
    Attached Thumbnails [DIY] Making your own OTG cable (image heavy)-otgp.jpg   [DIY] Making your own OTG cable (image heavy)-otgp2.jpg  
    09-14-2012 10:30 PM
  11. shafferb's Avatar
    Orrr you could buy a factory made one on Amazon or eBay for $.99 cents ?
    09-17-2012 08:57 PM
  12. alabamay's Avatar
    great job,but they have plenty cheaper cables start 0.99 .
    following I am currently using ,good and cute .
    what is your clock widget?
    Attached Thumbnails [DIY] Making your own OTG cable (image heavy)-img_20120918_215111.jpg  
    09-18-2012 09:06 AM
  13. VictoryVision's Avatar
    Nice step by step instruction. As seen in multiple replies you did not say to buy a cable from Amazon enough times or is it like usual, people too lazy to read before they reply?
    I agree there are times I like to try to do things for myself with left over stuff and using my free time to try something useful and/or learning something.
    12-07-2012 02:29 PM
  14. Avijit Pal's Avatar
    I have got a tablet that has only one mini usb port used for both charging and connecting devices (pen drive and dongle). Serious problem arises when charge exhausts during surfing and I have to quit it to connect charger. I have tried to build one OTG *** charger myself by cutting an OTG midway and attaching a male usb cable ( only VCC, Red and GRND, Black). But its not working as it is doing only one work at a time. If I connect the charger first then it charges the device and doesn't recognize a slave and if I connect a slave fist it detects it but does not charge. Where is the problem and why? Please tell how I can make it.
    03-30-2013 04:46 AM
  15. Joe Bilodeau's Avatar
    Simple to follow and i fully agree with reusing junk, had a bunch of cables in a drawer and had this up Nd running in 10 mins, thank you much you sir, awesome guide!
    05-14-2013 03:25 PM
  16. MattEarp1's Avatar
    I recommend not using a blackberry cable, the one I used was missing the mythical 4th pin I needed to solder too.
    06-28-2013 04:51 PM
  17. MattEarp1's Avatar
    Not to harp on this tread..but here's a video I found that doesnt require cutting open the end of the cable or any soldering.
    06-28-2013 07:33 PM
  18. 3XTR3M1ST's Avatar
    Instead of shorting pin 4 and 5 from within the cable head, would it also be viable to short them from within the device itself? Say if I disassembled the phone to access the back of the female usb micro connector and soldered the pins. Would there be any damage caused if the permanently shorted pins 4 and 5 (within the device) is connected to a charging adapter/PC?
    01-14-2014 03:46 AM
  19. MattEarp1's Avatar
    I'm sure it would cause issues with syncing your device to a PC. I highly recommend NOT doing this. It is much more safe to alter a cable than your device.
    TOTtomdora likes this.
    06-18-2014 05:20 AM
  20. stevieg7's Avatar
    Along the same line of topic, I have an asus tf300t. I'm trying to build a cable that charges while I incorporate my usb devices. I have an old charge/data cable so I already have the 40 pin connector and the proprietary usb plug. I've tried several connections and have yet to achieve my goal. Any suggestions would be greatly appreciated.
    Thanks , steve
    08-31-2014 08:59 PM