In order for your Android phone or tablet to host a USB device such as an Arduino, you need an On-The-Go (OTG) USB cable. You can buy these for a few bucks online, but if you have an old USB cable around it’s easy and more fun to make one!


Step #1:

Make Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB Cable
  • All you need are two donor USB cables, one with a female type A end like you’d find on a USB extension cable (shown in the first photo here) and one with a male micro B end (second photo). When you’re finished, you’ll have a cable that plugs into your phone on one side and accepts a standard USB cable on the other.
  • First, cut your 2 donor cables to expose the red, black, white, and green wires within, and strip the insulation off the tips.
  • Match up the wire colors from both sides of your soon-to-be Frankencable and solder them together. Insulate the soldered joints from each other using shrink tubing, electrical tape, or hot glue. Don’t forget to connect the braided shielding as well — that’s the uninsulated stranded wire that surrounds the 4 colored wires.

Step #2:

Make Your Own On-The-Go (OTG) USB Cable
  • After splicing the 2 cables together, wrap the junction in electrical tape for protection and strain relief.
  • Many Android phones are USB On-The-Go devices, which means they can act as the USB host (providing power) or slave (receiving power). You want the phone to be the USB host for this project, and you can ensure it acts as such by means of a special Sense pin on the micro B connector.
  • When the sense pin is connected to ground, the USB OTG device attached to the cable enters host mode. If the sense pin is left in its usual disconnected state, the USB OTG device will remain in slave mode.

Step #3:

Make Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB CableMake Your Own On-The-Go (OTG) USB Cable
  • Carefully cut open the micro B end of your spliced cable and solder pins 4 and 5 together as shown in the diagram. Be careful not to bridge any other connections besides pin 4 and 5!
  • Once that’s done, reassemble the micro B plug and tape or glue it back together to complete your cable.

Step #4:

Make Your Own On-The-Go (OTG) USB Cable
  • You can run a quick test of your cable by connecting one end to your Android phone and the other into Arduino.
  • If all is well, the Arduino should power up! If not, unplug both ends of your cable and check for short circuits or loose connections.
  • Note that you won’t be able to test the data connection until you get some code on both the phone and the microcontroller.

  • perry

    one end a 3.5 audio, 2female rca, s-video other end 10 pin round

  • Radoslav Gulik

    I like, if someone spread those how-tos through the internet. Chinese (eBay, dx,..) cables are somethimes only straight (only 1st step of this how-to), so sometimes we need to do something by our hands. thanks for this!

  • Tom Monfort

    I have an adapter that came in a package to adapt a retractable USB to the various mini/micro USB connectors that have been in use over the last few years. It has one that plugs into the micro USB on my Motorola Xoom and a standard male USB to plug into the retractable USB, which has a female USB and male USB. I also have a female to female USB adapter. The adapter package came from Walmart 3 or 4 years ago and the female to female from So, for those of you that are all thumbs, Walmart and the web can save you from the possibility of getting wires crossed and creating new problems for less than $20.

    • Tony Ahn Jr

      If your goal is to create an OTG cable, this won’t work. Pins 4&5 on the Micro-USB end must be jumpered (ie grounded).

  • Kitty Cat

    Instead of buying a soldering iron, I just taped a small piece of tin foil on and it worked fine

    • annonymous

      that’s one way to do it but it may be a problem if you start plugging out USB and accidently sripping the wires and making a short circuit directly on your phone

  • Tony Ahn Jr

    WRONG Instructions. This will result in a “standard” USB pass-through cable. A properly configured OTG cable has pins 4 & 5 jumpered on the micro-USB end.

    • BurgersBytes

      It is moron!

    • Angelo

      Can’t you read? Obviously, you only read step 1. In step 3, he clearly states that pins 4 and 5 must be soldered together. There is even a little diagram!

  • Samuel Denty

    It wont work as Tony Ahn Jr said!

    • Angelo

      Don’t youyou people read? Step 3 in the instructions alreadt said to solder pins 4 and 5 together. Get it? It WILL work!

  • لوازم جانبی موبایل

    tnx a lot see our site too:

  • beatriz

    I have a usb 64 GB for android leef brand the problem is that my phone is a galaxy S6 that also is compatible with this drive but my phone do not recognized it I am trying to transfer photos fron my phone to the computer can you help