Electronic – Accessories for Android devices with USB host

androidinterfacemicrocontrollerusb

The Android Accessory SDK relies on the accessory having USB host. However, my understanding is that newer versions of Android (3.1, 2.4?) have USB host support in the kernel. And I know many existing Android devices have hardware support for host (most tablets surely, Moto Droid, HTC Droid Incredible, etc.).

So my question is, given an Android device that has USB host, what will be the simplest/cheapest way to interface this with a micro? The first thing that comes to mind is using an FTDI USB->serial chip and a micro with UART. But I don't know if the FTDI drivers can be put on Android devices. Anyway, there's probably a much better solution.

I'd prefer a solution that doesn't require a rooted Android device, but would be interested to hear some of these options too.

Best Answer

The cheapest way? Use a µC with USB built in. Many of the pic18 and upwards have this. So do many other makes of µC.

The simplest way? As you already state - convert it to RS-232 at TTL levels with some form of conversion chip like the FTDI.

Yes, there could well be problems with drivers for both solutions, but it is more likely the FTDI will be supported out of the box. However, the first solution has the advantage that you can make the µC look like whatever device you want it to look like.

Oh, and as an aside - some of the high end PICs (eg some pic32 chips) have USB host built in as well. Just thought I'd mention it...