3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Android G1 Serial To Arduino Robot

Android G1 Serial To Arduino Robot
«
  • tank.jpg
  • 2010-01-24 00.05.09.jpg
  • 2010-01-24 22.12.00.jpg
  • 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
 

Step 1Items needed

Items needed
«
  • sdk-large.png
  • physicalPixel-circuit3.png
  • qrcode to ASE.png
  • 74LS04.jpg
  • ddms adb shell putty.jpg
  • devphone-large.png
  • ASE logo.png
  • cyanogenlogo.png
  • last photo ←
»
 To complete this tutorial you will need the following:

Hardware:
- Android G1 Dev Phone (or other Android device with root access and serial output)
- Arduino (I'm using a Freeduino SB but any one should do)
- 3.3v to 5v converter if you aren't using a 3.3v Arduino (I'm using a 74LS04 chip for under $1 but other options are available)
- HTC USB break-out board for the G1
- Soldering equipment for two quick connections
- A robot body with micro servos (cardboard, acrylic, treads, wheels, anything will do)

Software:
- Android Scripting Environment (ASE)
- Telnet client for your PC (I'm using PuTTY on Windows)
- Arduino development environment
- (optional) Serial client for your PC (I'm also using PuTTY on Windows for this)
- (optional) Android SDK

If you can follow instructions you can complete this tutorial with little knowledge of Python, Arduino, Android, or electronics. You'll want to know those things if you want to go beyond a blinking LED but this will get you started.
« Previous StepDownload PDFView All StepsNext Step »
31 comments
Apr 8, 2012. 11:23 PMsdfgeoff says:
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,
Apr 7, 2012. 11:48 AMharoonbms says:
my android phone doesn't have serial port. Can i use a usb to srial converter to
connect it to the arduino... please reply
Apr 8, 2012. 10:55 PMsdfgeoff says:
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)
Mar 29, 2012. 8:12 AMharoonbms says:
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.
Mar 2, 2012. 4:03 AMKryptonite says:
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.
Sep 26, 2011. 5:32 AMtechmind48 says:
I have HTC Wildfire Android mobile.

Is it possible to built with this phone?

A. S. Bhasker Raj
Secunderabad
India
Mobile: +919247332574
Sep 23, 2011. 3:41 AMmahendar says:
i don't see /dev/ttyMSM2 on my phone. It is rooted though. what can I do?
Aug 16, 2011. 3:44 AMRendydevara says:
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
Apr 23, 2011. 2:07 PMbsoares says:
great work!
Mar 27, 2011. 9:42 PMynk06 says:
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
Mar 24, 2011. 7:11 AMpeterkaptein says:
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/
Feb 5, 2011. 4:10 AMmertaxoy says:
is it possible with HTC Wildfire. Wildfire has another USB break-out.. Can you please help me about this.,
Dec 14, 2010. 4:15 AMrex358 says:
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
Dec 12, 2010. 7:56 PMChowmix12 says:
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.
Nov 26, 2010. 12:37 AMwareneutron says:
it not goes nothing?
Nov 1, 2010. 4:14 PMradhoo says:
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.
Jul 25, 2010. 7:23 PMcarterson2 says:
Can I buy a kit?
Apr 3, 2010. 5:58 AMwenjiun says:
You can also choose the latest Super D 1.10.2 as well while older version 1.9.3 does not support the feature.
Apr 2, 2010. 1:53 AMroadog says:
COOL!I wanna try it! 
Mar 27, 2010. 8:49 PMchristian2gothic says:
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???
Mar 28, 2010. 7:51 PMchristian2gothic says:
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??
Jan 27, 2010. 7:43 AMcaptFuture says:
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
Jan 29, 2010. 3:39 AMcaptFuture says:
 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/



Mar 1, 2010. 5:16 AMrice103 says:
 but you need the serialport dll..... can you send me?? i can't compile it!!! (rice103@gmail.com)
Jan 27, 2010. 5:49 AMtim_programmer says:
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 ^_^)
Jan 26, 2010. 12:57 AMTheBestJohn says:
 That is pretty awesome.... perhaps programming on the android to the arduino is on the horizon?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
13
Followers
1
Author:mranalytical