Instructables

ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino

Contest Winner
Picture of ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino
HC-05 to arduino with divider.jpg

UPDATES:

REQUIREMENTS

  • Breadboard wiring and electronics skills.
  • Arduno Uno.
  • HC-05 Bluetooth serial module.


INTRODUCTION

ArduDroid (formerly Andruino) is a simple tool to help you control your Arduino (or clone) from your Android phone. It's both an Android app and an Arduino program. ArduDroid has a simple Android user interface to 1) control Arduino's digital and PWM pins 2) send text commands to Arduino 3) and receive data from Arduino over Bluetooth serial using the ever popular and really cheap (less than $10 from ebay) HC-05 Bluetooth over serial module. This app has been tested and designed for the HC-05 Serial Bluetooth module. Other Bluetooth modules may or may not work. Please see comments section for users who tried other Bluetooth modules with this app.

INSTALL FROM GOOGLE PLAY
https://play.google.com/store/apps/details?id=com.techbitar.android.Andruino

ArduDroid should work with other Bluetooth modules with some tweaking but I have only tested it with the HC-05. This is an alpha version that's running fine on my Samsung Galaxy S2 Plus. Please share your experience running ArduDroid on your phone. Also, while I used Arduino Uno in this prototype, feel free to experiment with other models of Arduino. Please share your experience to help me improve this app.

I have published a guide before on building and programming a circuit with the HC-05 Bluetooth module and Arduino but I will briefly describe again in this guide how to wire the circuit using a breadboard and jumper wires.

ArduDroid is an app that evolved during one of my development projects. Special thanks to engineer Jafar Quttaineh for testing the app and for his invaluable input.

 
Remove these adsRemove these ads by Signing Up
1-40 of 115Next »
arishy1 month ago

I hope it is not too late to comment on your wonderful work.

In the send part, it will be ideal to provide drop down to select from "programmed" text. By that I mean if you program the sketch to respond to specific text it is better to be "typed" correctly!!!.

Of course , you will add the function of "adding" to the drop down "combo box" selection. I hope you understand what I am suggesting.

When you provide us with code, we will be able to contribute to your work.

arishy1 month ago

I hope it is not too late to comment on your wonderful work.

In the send part, it will be ideal to provide drop down to select from "programmed" text. By that I mean if you program the sketch to respond to specific text it is better to be "typed" correctly!!!.

Of course , you will add the function of "adding" to the drop down "combo box" selection. I hope you understand what I am suggesting.

When you provide us with code, we will be able to contribute to your work.

proton3051 month ago

hi, your project works really fine, and I'll like to use it for my garden water system, but I need to customize the android app. Would you please share with me the eclipse source code ? thanks a lot

my email is proton305@gmail.com

proton305

craque1 month ago

I'm using the HC-06 BlueTooth module (I didn't understand the difference between HC-06 and HC-05; still don't). I got TechBitar's Android app and Arduino code to work without a flaw. Thanks TechBitar, now I have something I can work with.

Peter5605132 months ago

Like many others I think this is a great project. I'm just getting started and if I could have a copy of the source code for the Andriod app that would be appreciated. My email address is peter560513@gmail.com.

cgs12 months ago
If u have the source code than please do forward it to me Chanducgs123@gmail.com
mike_vasili5 months ago

hello... i have a an arduino mega 2560 a bluetooth module HC-05 and a galaxy s4. the problem is that, to watch the data received from the phone to the serial monitor of arduino i have to constantly press the reset button of the arduino. please help me...

can please someone help me? i am trying to do my final year project at the university

Me too. I need the code for my final year project!!!

cgs1 dbraganza2 months ago
If u have hot the source code than please do forward it to me

Chanducgs123@gmail.com
yardiansyah7 months ago
this is nice project..

can you send the source code for andorid, i want learn more..

send please at my email enshev92@gmail.com
cgs1 yardiansyah2 months ago
If u have hot the source code than please do forward it to me

Chanducgs123@gmail.com
sdavid22 months ago

Amazing!
mind sharing your android code? I like to customize it for a project of mine.

if you don't mind: Shachar_bd1@walla.com

thanks!

prash42135 made it!3 months ago

worked for me! thnx

IMG_20140428_221831.jpg
junti3 months ago

Hi very nice android app, can I have the source code? can I Modified it? I have a problem with my RC BLuetooth Project I want to control the DC Motor Speed but I really don't know how to make code both Arduino and Android app. like yours but if you share your source code of this maybe I can solve it. I'm using Servo for Left and Right control but only the speed did not control. if possible well you please send to my gmail account? here is my gmail junti20@gmail.com thanks for advance.

irajesh3 months ago

Very nice instructable. Thank you .. We are considering app development and want to know if ArduDroid is open source .. and if we can download it and do a modification to send and get data buttons to establish a different user interface ?

iHayri3 months ago

Thank you very much for this useful app. I tried all tutorials and apps I could find and yours is the only that did work and functions a described. I have a Arduino UNO v.3 and my bluetooth module is from a OBDII scanner that I never used until now and only the bluetooth chip from inside. All I had to do to make it communicate was to set the baud rate to 38400 and put the Key pin on low.

IMG_20140423_205508.jpg
mahf12303 months ago

Great instructables, and thanks for the source code and app, you ´re great.

I used the hc-06 and it work great.

thanks man

anatolanatol4 months ago

hello,

I modifies the sheck and now it works to arduino leonardo this is the code:

https://drive.google.com/file/d/0B_bdvgeAhBOJM2psR...

works to IDE 1.05....

gfreire574 months ago

He only works with the HC-05 Bluetooth serial module?

*Does it only works with the HC-05 bluetooth serial module?

ehmedat4 months ago

If allowed possible code transmitter via Bluetooth

bstott made it!4 months ago

Thank you very much for creating your lessons - bluetooth instructables. They were very helpful. Your tools were good for learning, connecting and verifying the bluetooth modules. My two devices: HC-05 & HC-06 to pair & connect. I did have a problem with phone pair sequence but, found it. They work!

Feature Request on your Android App:

Please provide selections for different data rates - 9600 (default), 38400, 57600, 115200 - ???.

Thank you again!

ArduDroid-testing.jpg
anatolanatol4 months ago

hello,

I used the code on several Arduino boards 1 and it works perfectly; now I wanted to use this board bought on ebay:

http://www.ebay.it/itm/181307172444?ssPageName=STR...

with micro ATMEGA32U4 (should be compatible with Arduino Leonardo).

but it does not work, someone can help me, is it necessary to modify something in Sheck??

pls help me

thanks

accio5 months ago

Hoping this can solve some of the problems: the code for Arduino uses "Serial" command (http://arduino.cc/en/reference/serial). This means that it communicates with HC05 via pin 0 and 1. Those pins are the same used to connect Arduino to the computer. [Looking at the reference of "Serial", maybe you have to introduce some changes to use it on a Leonardo]

If Arduino is attached to the computer via USB the data are passed to the USB and not to the bluetooth module.

Great project!

markie6 months ago
Hello TechBitar,

first of all Nice Project!
At the moment i am experimanting with this hc-05 module.
There is one thing i do not understand.

// 2a) select the requested pin# for DigitalWrite action
void set_digitalwrite(int pin_num, int pin_value)
{
switch (pin_num) {
case 13:
pinMode(13, OUTPUT);
digitalWrite(13, pin_value);
// add your code here
break;

If i just want to make a LED go ON or OFF, what do i fill in here?
i have been trying to get this to work all night but no succes so far.
Hope you can help me.

Greetz from the Netherlands!
Mark.
dbraganza markie5 months ago

I am a noob at this. But this is what my sir thought me. I don't think you need the integer pin-value. You could probably pass a string/char array. Either "HIGH" or "LOW". All in caps. HIGH is to switch the LED on. LOW is to switch the LED off.

digitalWrite(13,HIGH);\\Switched pin 13 LED on

digitalWrite(13,LOW);\\Switched pin 13 LED on

so you code shout be something like this

void set_digitalwrite(int pin_num, char pin_value[])
{
switch (pin_num) {
case 13:
pinMode(13, OUTPUT);
digitalWrite(13, pin_value);
break;

}

Let me know if it works.

gmosquera5 months ago
HI!! I LOVE YOUR TUTORIAL, it is amazing! Thank you so much!

I am working on my senior design project. Part of it is to receive and display data in an android device via bluetooth using arduino. Very similar to this instructable!

Since I'm an EE the arduino part is not too bad, the android part is where im facing difficulties.

Do you mind sending the android code to gabymosqueradiaz@gmail.com?

I would really appreciate it!

Thank you again!
Gaby
dbraganza5 months ago

Can you please send me the source code for this android app on my mail: braganza.denver@gmail.com

The whole eclipse android project preferably`

Raincity 636 months ago

Great ap! I've been having a lot of fun with it but I'm running into issues when using it to control a servo. I've attached the servo to the anologwrite for pin 9 and when I use the slider bar in Ardudroid the servo works for a moment and then I loose the bluetooth connection...any thoughts?

slabarre6 months ago
Hi TechBital, Great project. I impress a lot of people with my project but you deserve the credit! My project is now our project because a couple of guys from the marina where i am, like the idea being able to control the windlass for the anchor and view the lengt of chain with there phone. The product work pretty well, but the problem is that we need a cheat sheet to operate it. something like press 02 to activate the program type reset in case of protection safety on press 03 and 04 for manual override etc. So if you could share the code for the app. will gladly give you all the credit and be really thank full for making our life easier every day. or any other way to get it customise If its available on-line can anybody point me in the right direction? marinehandyman@gmail dot com
fdoped6 months ago
Hi techbitar,
Congratulations for your project.
I did all the steps connecting arduino Uno to computer. It worked.

Connecting to android, i receive the initial message in the "Get Data" textbox but none of the DigitalWrite Toggle Buttons works.

I am using a Galaxy S3 and made the connections using the resistors (1K and 2K). I am using the arduino connected to usb of the computer.
Please, could you help me?

Thanks!
jacek37437 months ago
I'm using a Galaxy S4 and it connects fine. I receive the initial message in the "Get Data" textbox but none of the DigitalWrite Toggle Buttons give an output... Please Help!
It solved the problem of the app not being able to send data after installing a level shifter!
I purchased a CD4050, once it comes in I'll test out what Peterjh stated because I receive data but do not transmitt any to the arduino.
mrdragon3337 months ago
Thank you guru ji, It really helped me in my adventure with arduino.
jamithaawawn8 months ago
Hi Techbitar,

Great instructions and app.
My first test works without any problems.

Here is the combination of what I've tested it with:
• HC-05 on Arduino Pro Mini
• ArduDroid on HTC Desire

Thanks a lot for sharing your work.
Jami
sermad8 months ago
Thank you a lot

Please how can i modify the ArduDroid in andriod phone ?

Thanks again
anatolanatol8 months ago
hello Peterjh,
thank you for your answer; Yes I agree with you and I believe that the problem is the level voltage of RX and TX.. I connected the led to arduino by resistor in series ....
One last thing, where can I find a schematic diagram with CD4050?
...is correct these connections to CD4050:
CD4050
PIN 1 +5 VOLT
PIN 8 GND
PIN 2 RX ARDUINO
PIN 3 TX BTM-5 BLUETOOTH MODULE
PIN 4 RX BTM-5 BLUETOOTH MODULE
PIN 5 TX ARDUINO
1-40 of 115Next »