Android phone as a controller

Hello there :)

I'm on the edge of purchasing an android phone. Looking at specifications around i thought: "Hey but this is the perfect controller for a robot!!" It has an incredible inventory of useful stuff: gps, compass for navigation, wifi, bluetooth and cellular for communication, huge screens for UI, speaker for talking, plenty of cpu, camera, easily programmable, and so on, all packed in a small package, all low power! And all for as less as $200! What do you want more ??

There's only a drawback: there's no simple way to phisically connect a device to peripherals :(

Practically all android phones lack any kind of serial, spi or i2c connection. They have USB but client only.

Anyone know of some hack to resolve the issue ? I tought of opening the phone and try to identify an i2c bus, but it's a little too invasive :) some hack on the USB? Some SPI ?


try they use android phones for their robots

there’s no simple way to

there’s no simple way to phisically connect a device to peripherals

Why get tied down to physical? get a buletooth transceiver and communicate with the phone wireless-ly with an MCU!

yes but they use the Android

yes but they use the Android G1 wich has a specific hack, afaik

well that would surely work,

well that would surely work, but it’s not very optimal, you have to purchase a bluetooth mcu (usually not very cheap), and two blueteeth consume extra battery to communicate across a couple of inches

which phone are you going

which phone are you going for?

might be possible to find out if the same access is possible on other phones


currently the Acer Liquid.

currently the Acer Liquid. i’ve searched around but found no help… In general, i whould have said the android hacking community was enormous, but i fund very few useful sites around

You can get bluetooth I2C or

You can get bluetooth I2C or SPI interfaced transceivers for very cheap, since he only needs little range he can get the lowest power ones, Ebay, RS232 is easily interfaced with any micro controller, don’t get the USB ones!

If you look around you probably find cheaper ones :slight_smile:


EDIT: If you do get to interface USB with an MCU, nothing will beat this:, that’s less that 2$ and free shipping!

im interested in this one too .

i was thinking of buying one  because of its specifications…

Same here…

Correct me here folks, the Android will run Java-written programs, correct? And these apps can access the hardware features of the phone, right?

–BTW an answer to the original question, I have has AWESOME results using Bluetooth to relay data, is it as simple as just sending info that way?


Just an fyi, there has been

Just an fyi, there has been a project going on called amarino that allows you to collect data from the arduino but I belive you could have 2 way com. CTC, they even use our beloved firefly bt device, which I have tried already and played around iwth this app. The nice thing is that it’s fairly feature rich andi f you are familiar with java, the source code is available to you as well.

Has anyone mentioned an FTDI chip?

The FTDI chip in an Arduino connects the USB to a serial interface.  My Maemo OS2008 Nokia N800 has a driver for communicating through the USB (it’s requires a bit of work to get it running each time).

Perhaps the Android phone has drivers somewhere for FTDI/USB-to-serial communications?  A google search of “android arduino” or “android ftdi arduino” might help you there.


(edit: oh yeah, the point:  If you buy an “FTDI cable” (5V or 3.3V) it’ll work just fine with the driver, and you can plug it in to your serial device.)

(pps – After a quick search it looks like you might end up using a similar “usbserial.ko” and “ftdi_sio.ko” kernel module on your phone to what I use on my Nokia OS2008, probably along with the pyserial-2.5 library.)

correct, you can program

correct, you can program them in Java and access all the feature via code (bluetooth, wifi, camera, sensors, etc).

as far as i know, usb in

as far as i know, usb in cell phones is only client, not host. And you need an host becouse the FTDI is client.

correct me if i’m wrong :slight_smile:

You need to install USB Host Mode first

I currently have an Ardupilot Mega talking to my Nokia N800 terminal program.  The USB port on the N800 is normally for accessing the memory or re-flashing the device, but software is available for “USB Host Mode”.  Serial access in Linux is via “root” privileges only, so I had to install root access.  The kernel modules usbserial.ko and ftdi_sio.ko have to be installed by a root user (“insmod usbserial.ko”) each time the device is restarted, and USB Host Mode must be enabled.  Once these things are installed, the FTDI device shows up as “/dev/ttyUSB0”.  The way I chose to access the port is through python, a language in which, like German or Italian, I learned just enough to scrape by. 

Hopefully you can find the kernel modules in Android OS, along with the “USB Host Mode”, root access, and pyserial.  If you find those, I’ll be happy to post the reference I used for getting serial output working on OS2008, since it might be similar across Linux-like distributions.

delete this one (double post it)

htc diamond

Is there any way to put in my htc diamond android and then use this to interface it with my arduino ???

i’m not sure, but it could

i’m not sure, but it could be. Try to read this instructable:


it’s for the G1 but it’s still HTC, maybe it’s valid for you diamon too.

Don’t forget to post your results if you try :slight_smile:

Look at the cellbots

Look at the cellbots homepage. They have build a lot of robots controlled by Android phones. The easiest way is , to use Bluetooth as connection between robot and phone. So you will need a Bluetooth UART adapter for your robot, but you don’t need to root your phone. A cellbot script for Arduino exists, which needs to be adapted for your robot. On the Android side. python scripts were used for the control programs, no Java programming needed. All necessary code can be found at Google code. For running Python an Android the android-scripting Environment (ASE) is needed.

I have tested it with my Ardubot controlled by a HTC Nexus One and it is working (most of the time). Sometimes the Bluetooth will not connect, but that is a minor issue. Until now I have not found the time to make a video, a tip & walkthrough, or writing my own scripts. Maybe this weekend I will have find the time for this.

headphone jack
I though to use my Nokia phone for visison. With Symbian and Python everything seems possible (although, slow).

I think the easyest way to connect other thingies to phone is with headphone jack. You can output different frequencies, through optoisolator(for safety) it’s possible to decode it in your atmega/pic. Probably the best way if you don’t have massive data amounts. Motor and light control should be possible. You can use microphone jack for feedback.

Second way is that android should be able to be USB master, if that is true then USB to serial converter or VUSB or whatever. Worth research if you want to be awesome. Even allows two way data transfer.

Third and the easiest way is screen light… Screen light on - drive, screen light off - stop. Or even different colors and color sensor. With big enough screen you should get many sensors… And mobiles second camera or light sensor for feedback.