Instructables
Picture of Android G1 Serial To Arduino Robot
2010-01-24 22.11.48.jpg
2010-01-24 22.13.01.jpg
2010-01-24 22.15.10.jpg
Learn how your Android cell phone can control a robot using an Arduino board. The phone takes commands via telnet from another phone or a PC, so you can control the robot remotely. This project will not otherwise modify the G1 so you can continue using it as your normal phone after undocking it.

Why?
By using cheap electronic components such as Arduino boards, you can pair them with your $400 phone to make an awesome robot. It would cost hundreds of dollars to add GPS, LCD's, motion sensors, wi-fi, cellular connections, speakers, and more to a hobby bot, but your phone already has these!




Together, the Android G1 and Arduino board allow you to use inexpensive electronics such as simple servos and sensors, to build powerful devices such as robots, remote telepresence, or fun toys for kids. More information at Cellbots.com.

Notice: This project currently requires an Android G1 with root access to use serial output from the phone to the Arduino robot. You can add a $20 BlueTooth module to your Arduino board to have the phone talk to it over serial BlueTooth if you want to use the commercial Android software.

Special thanks: We have the Hacker Dojo in Mountain View, CA to thank for putting us in touch, helping with some tricky issues via their mailing list of awesome members, and for having 74LS04 chips in stock. Most of the assembly was done at the Tech Shop in Menlo Park.
 
Remove these adsRemove these ads by Signing Up
1-40 of 42Next »
vince0861 year ago
Can't seem to get "chmod 777 /dev/ttyMSM2" to work.
Keep getting "Operation not permitted".

I am rooted and running Cyanogenmod 6.1.0 on my G1.

Would love to get this working for a personal project.

I know this is way old, but in case people follow the same steps and end up with what vince086 had, simply enter super user by typing

"su"

This will allow access to enter the command "chmod 777 /dev/ttyMSM2"

steaknonio12 months ago
Hey, so I'll be trying this out soon, but wanted to let you and others know about other, cheaper and possibly useful options for the extUSB breakout board. I picked up three of these headphone charger combos hoping they'd be all pinned out, and they certainly are! (http://www.amazon.com/HTC-Multifunction-Adapter-T-Mobile-Shadow/dp/B001QD3MQE) I do enjoy sparkfun's products but it seemed the breakout board just had a bit of too much breakability for my clumsy fingers. a simple squeeze with some channel locks opened up the top and gave access to the inner workings.
Sorry, forgot pic
audio_and_charger.JPG
mabster9251 year ago
can i do this with another android phone running cygenmod 10 and i a micro usb slot
lok.khanal1 year ago
I want to try this but don't have much ideas on coding for this kind. anybody can help me out? I am new so just little help would be great.
jeffhorton1 year ago
Ok.. Cellbot.py is running on HTC Thunderbolt.. BUT it freezes phone when telnet connection made from computer. Any ideas?
Awesome ! :D
I'll try it with my Samsung Galaxy Mini. Many thanks !
jeffhorton1 year ago
Hello,
I am trying to use an HTC Thunderbolt with my Arduino project. I have rooted the phone, I have cellbot.py running on the phone. But when I try to send a command to the Arduino, the phone freezes up. The command is never relayed to the Arduino. Any suggestions on how to cure this. I read in another blog that multithreading the python program will help. Not sure if that is true. I am not that familiar with Python. I am trying to learn multithreading on python now. Am I wasting my time?
Much thanks in advanced.
asmuransyah2 years ago
Hi??? this project can use android experia 10 mini pro???
it looks nice sir,,we would like to implement this project...from wher we can get the components for this project?
sdfgeoff2 years ago
Do you have to have the arduino at all?
Could you not just have the phone do all the processing (after all, they do have pretty good processors) and have the micro-controller just relay the commands to the motors etc,
haroonbms2 years ago
my android phone doesn't have serial port. Can i use a usb to srial converter to
connect it to the arduino... please reply
No android phone has a direct serial port, heck, I don't think you can buy a proper computer with a serial port anymore.
What some android phones do have is the usb port used for connection to a computer, can be used the other way by the phone. This means that you take a special plug (the HTC usb break-out board) that lets your phone talk to a micro-controller.

So google your phone and see it if has a "proper" usb port. Mine doesn't, and I think they are quite rare, but you may be lucky.

(I think, someone correct me if I'm wrong)
haroonbms2 years ago
i have a samsung galaxy y s5360. how to connect this phone serially to robot. is it hrough usb data cable.. i desprately want to this project.. please provide with a solution.
Kryptonite2 years ago
This is brilliant, I plan to do a similar thing though have it controlled via the left and right channels of the headphone jack. It's not an original idea, though it's certainly an easy way out.
techmind482 years ago
I have HTC Wildfire Android mobile.

Is it possible to built with this phone?

A. S. Bhasker Raj
Secunderabad
India
Mobile: +919247332574
mahendar3 years ago
i don't see /dev/ttyMSM2 on my phone. It is rooted though. what can I do?
Rendydevara3 years ago
how did you connect android to arduino ? using serial ttl ?
does android has a serial ttl port ?

sorry, because i only have symbian s60 5th
bsoares3 years ago
great work!
ynk063 years ago
Nice Project! i think i will build this!

But just got a question before i build that

1) i just have a look on the datasheet of 74ls74, isnt that the 74ls04 have a output level of 3.3v but not 5v???So are we converting 3.3v(from phone) to 3.3v(to aridno) agian using the 74ls04?

2) And will G3 and upper version not works with that? since they are using the standard usb again and separate the audio(tx) + Switch(rx) pin to an 3.5mm jack ?

Thank You
Beginning of 2011 inopiaaardbei made a solution called: "Microbridge" using the Arduino USB host bridge and wrote the software to use the Android Debug Bridge to communicate from and to the Arduino.

See more here - http://wp.me/pCAFq-h5. Links to his google code solution are in the post.

A direct link to the google code repository is here: http://code.google.com/p/microbridge/
mertaxoy3 years ago
is it possible with HTC Wildfire. Wildfire has another USB break-out.. Can you please help me about this.,
rex3583 years ago
hey, can i run my camera app that i have built using the ecclipse , the same time when this appp on python is running....illl be glad if some body helps me on this
Chowmix123 years ago
For the newer generations of android electronics (phones and tablets) including the Droid. They come with USB host already built in> Could i use the same programing cable for my arduino to connect to an android tablet? If i did, what app would i need to accomplish a serial port to the arduino?

Chow.
it not goes nothing?
radhoo3 years ago
One of my last projects was a 4x4 differential drone, built from scratch, remotely controlled via Bluetooth using an Android smartphone.
Schematics / demo video here: http://www.pocketmagic.net/?p=1398
Besides ultrasonic sensors, the robot is about to be equipped with a homemade geiger counter sensor to detect "exotic" environment parameters
like the dangerous ionizing radiation. There are quite a few possibilities since the robot has an ATmega microcontroller that can easily
support additional sensors.
The data is sent back to the Android device, via bluetooth.
carterson24 years ago
Can I buy a kit?
wenjiun4 years ago
You can also choose the latest Super D 1.10.2 as well while older version 1.9.3 does not support the feature.
roadog4 years ago
COOL!I wanna try it! 
is it necessary for the phone on the bot to have service turned on??

are there ways to control the bot through satellite instead of using cellphone service. that way you wouldn't be dependent on a service.

Is there any way to bypass the use of cell phone towers all together???
mranalytical (author)  christian2gothic4 years ago
 We typically test with phones that have no SIM card and use wi-fi for local communications.
what if you wanted the bot to travel across several states?

and i've been looking into flying bots, it's been hard to find anything here on instructables.

how hard is it to send live video and sound feed from the bot to your PC??

i'm trying to gather info for a different project i'm working on??
mranalytical (author)  christian2gothic4 years ago
 We just added XMPP support so as long as the phone has a data connection (any kind will do), you can command it from anywhere.

Feel free to start a thread here with ideas: http://groups.google.com/group/cellbots
captFuture4 years ago
Thanks for this nice Tutorial - I can confirm that the latest kernels of Cyanogen have Serial enabled. (I'm personally using a HTC Magic - not a G1)

I did a bit of research as well and found out that Arduino sees 3,3V from the Phone as valid "high" state, so you would not need the 74LS04 in between for sending the data to the arduino.
This is of course different in the other direction - there you have to reduce from 5V to 3,3V :)

Cheers
mranalytical (author)  captFuture4 years ago
Great find captFuture. I'll update the instructable to reflect that. Still trying to get two-way working but the issue isn't hardware so much as making an incoming serial socket using Python when pySerial isn't in ASE.
 Maybe it would be an option to do it in java - some guys are developing a serialport API for the SDK.

code.google.com/p/android-serialport-api/



 but you need the serialport dll..... can you send me?? i can't compile it!!! (rice103@gmail.com)
mranalytical (author)  rice1034 years ago
 You'll have to reach out to the Android Serialport API project team for the code they are using. My work has been using Python on Android via the Android Sripting Environment.
Good to see someone else looking at this... I'm planning on interfacing to an AVR soon for a couple of projects soon (one is a universal IR remote - sending serial commands to the AVR which flashes an IR LED... the other involves the USB host support on the AT90USB1287.. but that ones a secret ^_^)
1-40 of 42Next »