loading
Picture of Program your Arduino with an Android device!

Hi,

in this Instructable I want to show you, how you can program your Arduino with your Android device. It is very simple and cheap. Also it allows us to program our Arduino where ever we want, this is usefull for permanently installed Arduino boards, like in light controllers...

So lets get started! :)

Step 1: Materials and Tools

Picture of Materials and Tools

Materials:

A USB-A to USB-B cable ( http://www.amazon.de/AmazonBasics-USB-2-0-Kabel-A-... )

A USB-Host cable (OTG cable) ( http://www.amazon.de/USB-OTG-Adapterkabel-Adapter-... )

An Arduino( http://de.farnell.com/ )

1 LED (for testing)

A Android device with Android 4.0.0+ (or with host aviability)

Software:

ArduinoDroid or

ArduinoCommander from the Google Play store

 
1-40 of 75Next »
dwfunk44751 year ago

To not drain power from phone, get one of these:

http://routerboard.com/5VUSB

plus 5V 2A supply.

Jan_Henrik (author)  dwfunk44751 year ago

Awesome, Thank you!! :)

ASCAS made it!1 year ago

Works great, awesome! This helps a lot in changing values during competitions.

1471238_615321765181154_24135764_n.jpg
Jan_Henrik (author)  ASCAS1 year ago

Nice! :)

masud Molla made it!8 days ago
Arduino Droid is gd app but now and next time is upload to error why ?
temp_1492468160.jpg
Jan_Henrik (author)  masud Molla 8 days ago

Hi, did you unplug and plug the board in again, it seems like the Arduino is not responding...

MrSlehofer.5 months ago

Ok I have a bit of a problem with my arduino because its a clone with CH340G chip.

I need a suitable driver for android, do you know about any? Thanks for replies

Hi, have you solved your problem? I'm in the same situation with my dcduino, i cannot upload to board...
Hi, I still haven't solved my problem :(

Damn!!!

I'm trying android driver for ch340 that i've found here but at the moment I haven't solved too...

Jan_Henrik (author)  MrSlehofer.5 months ago

No, sorry, I dont know any drivers for android, doesnt it work with Arduino Droid?

ochâtelain2 months ago
Schöne Lösung, danke für das Tutorial.
barbarossa7895 months ago

can i use it with Arduino Due? if so, can i make the phone get the readings of a sensors and manipulate it as i want??

Jan_Henrik (author)  barbarossa7894 months ago

Not by now, but it is planned

Hi, is it possible to upload sketch in ArduinoDroid through Bluetooth?

Jan_Henrik (author)  digvijay.m.patil5 months ago

No, just via USB-OTG

diy_bloke1 year ago

:-)
"Sofortly", you must be German :-)

nevertheless, nifty instructable

Jan_Henrik (author)  diy_bloke5 months ago

*late comment incoming* Thankies, I replaced it with the right term ;)

Jan_Henrik (author)  diy_bloke1 year ago

hehe, yes i´m German :)

Thanks! :)

IrfanT5 months ago

if I use the arduino mega adk r3, how to connect android to arduino using usb?

please help me. Thanks

Jan_Henrik (author)  IrfanT5 months ago

scroll up and read my Instructable ;)

It's a common mistake/misunderstanding about the LED connection to pin13. As a rule, never EVER connect an LED directly to ANY pin of Arduino, otherwise the microcontroller of your board may be killed.
There is NO resistor on Pin13 (meanwhile the on-board Pin13 LED has its own). If you put a single red LED, forward current may goes up to the maximum current of USB hosting device (your android phone or your computer). First scenario is not serious (as a phone/tablet has a very limited current capability), but with a pc, it may be almost 1 A (1000 mA). An Atmel microcontroller is limited to 400 mA overall current, a maximum of 40 mA on each pin, meanwhile 20 mA recommended to prevent overheat. If you put a simple LED on any pin without a resistor in line (serial connection), it may be driven by over 400 mA. Not a good idea.

Jan_Henrik (author)  Professzore1 year ago

pin 13 has a current limit of 20mA, this pin was made to connect a led directly :)

on all arduino board? i use mega2560.

Jan_Henrik (author)  ZakiMuslim_6 months ago

I guess so

Take a look at the schematics:
http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf

Take a look at the datasheet:
http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf
29.1. Absolute maximum ratings

It's your decision to brick your controller and/or LEDs.

Note: pins on the microcontroller are not constant current outputs, yet none of them are protected to overcurrent.

each pin has an internal resistor which can be enabled; see digitalwrite() second parameter.

Also see "input and output" under http://arduino.cc/en/Main/arduinoBoardUno

the official Uno has this covered. In any case, your cautioning users to use a resistor explicitly is good practice and ok especially as they may further explore electronics without the Arduino, build their own board, etc.

Yep. They're called pull-up resistors and should be used when the digital pin is set as input (normal pin state). But they have no any effect when pin is set as output. See description:

http://arduino.cc/en/Reference/DigitalWrite

and

http://arduino.cc/en/Reference/Constants

And the above mentioned datasheet of Atmel controllers (see digital I/O diagram).

I write it agan, it's your decision to brick your controller and/or LEDs.

PaulD7 Professzore10 months ago

I connect leds to I/O pins on 5v powered atmegas without limiting resistors and have never damaged a chip. Often even more than one at a time. So it's not going to "brick" your atmega328p because of the current limiting characteristic of the port which provides a max of 40ma. I wouldn't implement a final product without the limiting resistors but just for quick and easy testing it is not going to hurt anything. I have done it a lot over several years too, not just once or twice.

ZakiMuslim_6 months ago

this apps have serial monitor? i want to see sensor value

techno man8 months ago
If your android device doesn't supports USB Host mode or OTG, you can make it into USB Host mode by following this steps:

STEP 1 : First you should root your android device.
For this find specific instructions for your model from such websites as The Unlockr.com and XDA developer forums to root your device.

STEP 2 : Once rooted,install Stick Mount app a free app from Google play store.

STEP 3 : Now connect the OTG cable ,Arduino. Check 'use by default' and tap ok when Android pops up a prompt that says 'open StickMount when this USB device is connected'.

After your device successfully mounts ,you will see a notification from StickMount that displays a message like 'Activate mounts: /sda/usbStorage/sda1' to let you know that your USB device is ready for reading or writing.

Note :( I'm not responsible for any problems /damages while rooting or using this method.Do it at your own risk)
Jan_Henrik (author)  techno man8 months ago

Awesome, Thank you! Didnt know about this possibility!

pucksurfer10 months ago
Does it work with any otg cable? I everything up with the otg cable and the USB a to b. I hooked it up to a moto e running on kitkat 4.4.4. I didn't download the app yet. But the arduino didn't turn on(the built in LEDs didn't turn on). Is it a problem w my otg cable? Or do I need the app first?
Jan_Henrik (author)  pucksurfer10 months ago

Which device do you have, sometimes, they dont have an OTG mode or they dont turn it on... There is only 1 type of OTG kable, so that should work...

I have the moto e. it isn't a tablet but it should work with a phone right?
Jan_Henrik (author)  pucksurfer10 months ago

Yea, most new phones have OTG, but sadly the Moto E doesnt support otg :/

that's to bad, thanks for helping me
Jan_Henrik (author)  pucksurfer10 months ago

I´m realy sorry, that it doesnt work for you :(

KidWithAHat11 months ago
I wish I could do this on a iPhone :( but cool inscrutable.
Jan_Henrik (author)  KidWithAHat11 months ago

Thank you, I will try to find an app for that :)

1-40 of 75Next »