Hacking away with Android pt 2 – Making your own USB host cable

Posted on October 30, 2010

6


This hack is specifically for Android devices that can act as a USB-host.

A home-made USB host cable, connecting a USB-hub to an Archos tablet

Why? – To connect USB stuff to your Android device

To connect USB stuff (a mouse, keyboard or memory stick) to your Android device (in my case a Android Tablet) you need a USB host cable. These cables are not sold in your regular shop.

Related posts

Android – more than phones: moving into alternative uses of the Android phone

Hacking away with Android: A series of articles to discover the possibilities of the Android hardware and software for productivity, hardware hacking and cluster-computing

Inside the Archos 32: See the insides of the Archos 32 (and some macro-shots of the screens)

Purpose

Getting the USB host to work is a preparation towards three types of use:

  1. Using Android Tablets as an alternative for a Netbook – including the use of an external keyboard, external storage, and an external mouse
  2. Using Android devices (like tablets, hand helds and phones) as distributed computers – each fulfilling a specific task and each capable of communicating to the others and sharing and transferring files
  3. Using a chain of Android Devices as the “Smart Part” of Roomware installations – allowing Arduino devices and XBee-based devices to become connected to an Application Pool that can extend the local setup to a global installation.

Basis – using the connectors and cutting the cables

Micro USB-host cables are not easy to find, so based on this post where Chris Paget hacks his own USB host cable and some basic Wikipedia information on USB I started doing some cutting, soldering and simple hardware hacking. Your basic needs are as follows:

  1. You need a Micro-USB connector to plug into your Android Device
  2. To connect anything to your Android deviceyou can do two things:
    1. Connect it directly to your Android device
    2. Connect it to an USB hub, which is connected to your Android device
  3. For which you need either:
    1. A female USB connector to connect any other device (like a keyboard, memory stick or mouse)  to your Android Device
    2. A mini-USB connector, type B to connect your Android device to an USB hub

Female USB connector

USB hub and Mini USB connector, type B

What your need

  1. A sharp (pen) knife – to cut open the cover of the USB connectors
  2. A soldering iron and soldering tin – to remove the wires attached to the
  3. A micro-USB cable – if you want to connect your device to an USB Hub and / or
  4. A USB extension cable with a USB female connector – If your want to connect USB devices directly to your Android device
  5. Black tape – to close the cover of your USB connector

The steps in brief

  1. Liberate your Micro-USB connector – as you need this to create your own cable
  2. Cut the USB male connector from your cable – as you want to repace that for your Micro-USB connector
  3. Solder your Micro-USB connector to your USB cable – to make your own USB host cable
  4. Check your handy-work – as you might make a mistake or create a short cicruit by sloppy soldering
  5. Close the cover of your connector – using some sticky tape and the old cover you removed, to protect your work and make it less fragile

Step 1: liberating the Micro USB connector

You need a liberated Micro USB connector to plug your home made Host cable into the Android device

  1. Cut – Use a sharp (pen) knife to cut the cover of the connector along the long side
  2. Pry open – pry the side open
  3. Get the connector out – Get the connector and cable out of the cover.
  4. Pry the cable loose from the cover – The cable is usually stuck to the cover, so be careful when you pry that loose

The result should look like this:

A liberated Micro USB connector

When you open the cover, you will find that the wires on the USB connector are covered with a plastic or plastic-like substance, or that the cover is welded around the cables.Remove this and do not be afraid to damage the wires. You will remove the wires anyway.

Step 2: Cutting the USB male connector from your cable

In this next step you are going to cut the USB male connector from the cable that will by your home-made Android USB Host cable.

An USB Male connector

  1. Cut off the USB male connector
  2. Strip the mantle – to release the wires of the cable
  3. Strip the tip of the wires – so that you can solder it to the Micro USB cable

Your result after step 1 and 2 should look something like this:

Result after step 1 and 2

The male USB connector on the right hand side is what was attached to the cable of the female USB connector. The stripped grey cable on the left hand side is what came free and where we will connect the Micro USB connector to.

Step 3: Soldering the Micro-USB connector to your cable

  1. Remove all the old wires – from your Micro-USB connector (if you have not done that already)
  2. Solder all the new wires –  from your cable to the Micro-USB connector – color schemes given below
  3. Make it a USB Host connector – Connect pin 4 (the ID pin) to pin 5 (the Ground or GND) to make your Micro-USB cable a USB Host cable

Color schemes for Micro USB host cable. Plus and minus are on the "flat" or top side of the micro-usb connector. Data +/- are on the bottom side of the USB plug

In most cases, your USB cable has the red / white / green / black color scheme. It is possible – in my case when opening the Mini-USB type B connector – that the wires follow a different color scheme. Which was: red / brown / orange and black

The above image shows your the colors, order and placing of the wired from the backside of the Micro-USB connector

The - almost - finished cable, bottom side. Red and green (data + / -) go here

Notice the little looped black cable in the top area. This connects Pin 4 (ID) to pin 5 (GND) and is required to make your connector a USB Host connector.

The result with a connector from a different cable, top side. Plus (white/brown) and minus (black) are connected on this side

This photo shows another Micro-USB connector, where the soldering points are a bit better defined. Connecting the GND (black) to the ID pin – as is visible in the somewhat blurry photo – is done by extending the wire to that pin and soldering it to both pin 4 (ID) and the official attachment point for the GND.

Step 4: Check the soldering points

The worst thing that can happen is you making either:

  1. A short circuit between wires by sloppy soldering / using too much tin
  2. Connecting the wrong color to the wrong pin

Double check your soldering handy work before moving to step 5. Once you have closed the cover on your cable, you do not want to open it again and repeat the steps in 3.

Step 5: Close the connector

As your home-made USB Host cable is fragile, use the shell you cut earlier from your Micro-USB to cover your work.

It might be that you need to do some cutting in the plastic to make room for your soldering work, when the cable was tightly fitting the old configuration.

  1. Close the cover on your USB connector – using the cover you cut open in step 1.
  2. Tape it with tape – to fix it all solidly

It should look something like this:

The finished product

Holding your Micro USB plug steady for soldering

I used the Samsung Galaxy as the “clamp” to hold the Micro USB plug steady while soldering. As the wires in the plug are really thin, not much heat will be transferred to the phone and no damage will be done.

Using the Samsung Galaxy to hold the plug steady for soldering

Not all phones / devices support USB host

I found that not all phones support USB host. The Moterola Droid is currently one of the few that does. The G1 might be able too, after installing the CyangenMod. My two Android phones: the LG G540 and the Samsung Galaxy i7500 certainly do not support USB-host without some serious hacking.

The Archos and Archos7

I focused specifically on the Archos7. The Archos family of tablets claims to support both USB host and USB slave. That claim is true, but there are some limitations.

What works:

  1. A USB keyboard – I bought a Trust keyboard to test
  2. A USB mouse – I used my Microsoft mouse to test
  3. A USB hub with 1 and 2
  4. The Sony eBook reader – Connecting it directly to the Archos7 – The reader does not work via the USB hub!

What does not work (on the Archos 7):

  1. Connecting the Sony eBook reader via the USB hub
  2. Connecting a LaCie Rikiki drive to the Archos7, directly or via the USB Hub

I have not tested anything outside this list yet.

The Archos 32 and 101

[Update: Feb 03, 2011]

For the new line of Archos models, including the Archos 32 and Archos 101, the following does work:

  1. Connecting the Sony eBook reader via the USB hub
  2. Connecting a LaCie Rikiki drive to the Archos7, directly or via the USB Hub
  3. Connecting a USB memory stick

I was able to do FTP transfers using AndFTP (FTP client) and SwiFTP (FTP server) between the Android devices I have and between Android devices and my laptop. Read more about that software in part one.

Limitations with Android 2.2 and external storage devices

  1. It will only recognize one storage device at the time / it can not handle multiple drives. In general it will pick the first plugged in and shift to the next drive when you take the first one out.
  2. It will only be able to read a limited set of file systems. Use FAT 32 to be on the safe side. NTFS does not work for Android 2.2