Let's Make Robots!

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 ?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

someone must have had my same idea :)

http://www.sparkfun.com/products/10585

Yes, that's an interesting board.Using ADB for communication is a cool idea.

Something similar for Arduino is the MicroBridge. But you will need a additional USB Host shield

Based on that is the PropBridge for Propellor. USB Host can be implemented in Software.

I think about porting this to .NETMF for my FEZ Domino. FEZ domino has a builtin USB Host

I saw this last week and I'm very tempted......very very tempted....

:)

Connecting an Arduino to an Android phone be possible with Amarino: http://www.amarino-toolkit.net/

I haven't tried, but I spotted the link on DIY Drones.

I noticed that the apple Iphone has not been mentioned. Has anyone used the iphone to control a robot?

 

You have to jump through quite a few hoops to dev on the iphone, though I'm sure some people are willing to do it.

Considering my power to weight ratio is about that of a small elephant I can't see much hoop jumping in my future :p

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.

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.

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.

-John

(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.)