Program Your Arduino With an Android Device Over Bluetooth

51,480

503

46

About: I am an electronic-enthusiast, maker, developer Android app, hobbyist and an owner of Bluino Electronics.

Hello world, in this Instructable I want to show you, how to program your Arduino Uno with your Android device over Bluetooth. It is very simple and so cheap. Also it allows us to program our Arduino where ever we want over wireless bluetooth... So lets get started! :)

Step 1: Materials and Tools

Hardware :

  • Arduino Uno
  • Bluetooth HC-05 module
  • Mini breadboard
  • Capacitor 1uf/16v (elco)
  • Reasisor 100 ohm
  • 5 pcs x Jumper wires
  • USB cable
  • Android device with Android 4.0.0+ (Bluetooth available)
  • Laptop/PC

Software :

  • Bluino Loader from the Google Play store

Step 2: Program Your Arduino Using Laptop/PC

Start by copying the code from text box below.
Then, copy and paste the code into the Arduino IDE editor. Compile. Upload.

This code contains several functions to change the parameters of Bluetooth HC-05 :

  • AT+NAME=Bluino#00 : Change name of bluetooth module, default name is "HC-05".
  • AT+BAUD=115200,0,0 : Change baud rate to 115200 (Arduino Uno, Bluino and Mega2560)
  • AT+BAUD=57600,0,0 : Change baud rate to 57600 (Arduino Nano, Leonardo, Micro, Pro Mini 3V3/5V and Duemilanove)
  • AT+POLAR=1,0 : Change state pin conditio
  • For additional you can change password to use not standard password while pairing, AT+PSWD=xxxx.

Name of bluetooth must "Bluino#00-9999", if you want custom name you should use the paid version of Bluino Loader App.

void setup() {
  Serial.begin(38400);
  delay(500);   
  Serial.println("AT+NAME=Bluino#00");
  delay(500);
  Serial.println("AT+UART=115200,0,0"); // Use this baudrate if using for Arduino Uno, Bluino and Mega2560
//Serial.println("AT+UART=57600,0,0");  // Use this baudrate if using for Arduino Nano, Leonardo, Micro, Pro Mini 3V3/5V and Duemilanove
  delay(500);
  Serial.println("AT+POLAR=1,0")
  delay(500);
}

void loop() {
}     

Step 3: Hook Up Like Schematic

Following the above image, the layout is relatively simple.

If you want you can replace breadboard with PCB prototype board with some soldering work, so you get small size or like shield for Arduino.

Step 4: Time to Setup Bluetooth HC-05

Basically in this step how to setup HC-05 over At command, with following this step you will set HC-05 to some parameters.

In step 2 you have upload sketch to Arduino, in that code have Serial function to communicate over pin RX/TX (D0/D1), which is when you connect to HC-05 pin RX/TX is will force setup HC-05 on At command mode. Just follow step like on pictures.



• Press and hold KEY button
• Plug USB cable for powering Arduino
• Wait about 5 second (still hold KEY button)
• Unplug and re plug USB for reset from AT command mode


Step 5: Install Application Bluino Loader From Googleplay Store

Okay, the first app I want to show you is "Bluino Loader", for Andorid 4.0 or higher with available bluetooth connection. You can get from googleplay store :

Bluino Loader - Arduino IDE or Pro version to support developer Bluino Loader Pro - Arduino IDE

This app is for working with the Arduino Uno, you can write, edit and upload sketches to Arduino uno over bluetooth HC-05. The app is easy to understand like Arduino IDE, there are many examples sketch, also you can add some libraries just copy paste library folder to folder BluinoLoader/libraries. You can change of theme of editor color, size of text and many features. If you want get Serial Monitor feature, removed Ad and can scan any name of bluetooth (Not only Bluino#...) you can buy feature in-app purchase, so also support developer.

Uploading a sketch worked very good over Bluetooth! So I would give this app 4.0 out of 5 stars :)

Step 6: Try Upload Sample Sketch Blink.ino Into Arduino Using Android Device Over Bluetooth

  • After finish installed you can open example sketch BluinoLoader/examples/02.Basic/Blink/Blink.ino
  • Wait until extracting tools finished
  • Tap on "upload" button (Arrow in the circle icon)
  • After done compiling no error, tap button "Scan Bluino Hardware" to search active bluetooth
  • Pick bluetooth hardware with name "Bluino#00"
  • If first pairing enter pairing code standard "1234", then OK
  • Wait until process uploading done

After all step OK your Arduino will blink on led 13, and you can repeat all the steps to upload another sketch.

2 People Made This Project!

Recommendations

  • PCB Contest

    PCB Contest
  • First Time Author

    First Time Author
  • Toys Contest

    Toys Contest

46 Discussions

0
None
Beevo

1 year ago

I have uninstalled and reinstalled the app. On retest I get the same result. The screen comes up with select bluetooth device and then "loading.." and then "Hex file not found".

Brett

2 replies
0
None
mansurkamsurBeevo

Reply 1 year ago

can you send me sketch that you want to upload

0
None
garbo james

3 months ago

after i connect to the bluetooth there is no password asked or paring complete. and the upload is error. what should i do?

0
None
shine23

Question 4 months ago

I downloaded a library and put it to library under bluino folder.But I have no idea how to add this library to the IDE Page of Bluino IDE. example (#include )

0
None
RonnyD14

5 months ago

i replaced the 1µF capacitor with a 4,7µF capacitor. The arduino reset before the upload works fine now.

0
None
TopanU

6 months ago

Pak kalau untuk arduino wvacat/wavgat tidak bisa., selalu tampil " usb tidak terhubung " via android kesalahan nya dimana..samsung j5 support otg..mohon bantuan nya.

Screenshot_20180609-103321.jpg
0
None
chadbone

Question 8 months ago on Introduction

I am using a atmega328PB as a drop in replacement for the 328P which I could not get at the time I built my boards. I would love to be able to use my bluetooth HC-05 to program them but I get an error... I am able to program a stock pro-mini with the 328P but not with the 328PB which has a different signature. In Arduino IDE I trick it by changing the expected signature in the config file but I am unable to do that with the Bluino app... how can we add a board to expect a different signature? Thanks soooooooo much for your help and the amazing app!

0
None
shukybr

Question 8 months ago

Hi, is the BLE (bluetooth 4.0) going to supported withe this android application? if yes , when?

0
None
Chardeayush1184

Question 10 months ago

Hello Sir
I am making a voice controlled car. Whenever Im trying to upload the program, it says "no usb connected" though the arduino is connected by an usb.
What should I do sir?
Waiting for your reply.
Thank you

0
None
GrimorJ

10 months ago

HC-05 manual recommend to use it with +3.3v instead of 5v.
Is safe to used it for long time with 5v? I can't make it work with 3.3v but with 5v it works OK.

0
None
lynxtyplosion

1 year ago

When I tried to upload it says no USB connected. I was trying to connect the arduino through bluetooth. I have paired the device with the HC - 05 module.

How do I make the device connect through bluetooth.

Thanks in advance

I have used a 25 V rating capacitor. Is it affected due to that config?

3 replies
0
None
mansurkamsurlynxtyplosion

Reply 1 year ago

The app says no USB connected because app in mode upload sketch via usb, go to Settings > Board then switch toggle switch to Bluetooth.

Screenshot_2017-11-07-01-51-28-277_com.bluino.bluinoloader.png
0
None
lynxtyplosionmansurkamsur

Reply 1 year ago

Thank you!! It worked !!

what is the function of the cap? And do we still need it after we do the AT config?

0
None
mansurkamsurlynxtyplosion

Reply 1 year ago

Yes still needed, the function of capacitor is for auto-reset arduino when begin upload sketch.

If you don't use capacitor, you can still upload sketch but by pressing reset button on Arduino just before upload sketch process.

0
None
glassgorilla

2 years ago

Can anyone link an eBay item for the Capacitor? It's not clear to me exactly what is needed. I think I found everything else.

3 replies
0
None
mansurkamsurglassgorilla

Reply 2 years ago

that is general electrolit capacitor/bipolar capacitor can be change value betwen 1uf/16v - 47uf/16v

0
None
19soNso93mansurkamsur

Reply 1 year ago

Could you please give a link to capacitor. I would love to program my Arduino bluetooth. I've found everything but the capacitor 1uf 16v elco

0
None
PersiaH

2 years ago

برای دوستان فارسی زبان

موفق باشید