Introduction: Driving Motor With Android Using Arduino and Bluetooth

Picture of Driving Motor With Android Using Arduino and Bluetooth

Hey friends!! This is my first instructable ever and today I'm going to show you how to drive 2 motors with android using arduino and a cheap Bluetooth module. This project can be very helpful to you to build robots which can be controlled by android. This also requires programming skills for arduino as well as for MIT app inventor. The MIT app inventor is a very useful software which help you to make apps for android. If you are a beginner in app inventor follow the video.

Motors are very essential for movements in robots so a motor cannot be drove by arduino as it doesn't supply sufficient voltage to it so here we will use a simple motor driver IC called 'L293D'. This is the cheapest motor driver as it is only an IC. It can drive only 2 motors at a time and it supply external voltage to motors upto 36 volts and if supplied more than that the IC will overheat and destroyed obviously while the internal voltage is 5v from arduino. Robots controlled with a wire can be messy so here we will use a Bluetooth module(I've used HC-05 but u can use HC-06). It has 4 active pins VCC, GND, RX and TX.So this RX is a receiver pin which is connected to TX pin of Arduino and the TX is a transceiver pin which is connected to RX pin of arduino and remember to only supply 3.3v of arduino to the Bluetooth.

Step 1: Requirements

Picture of Requirements

Now you must have the following things : -
1. Arduino UNO R3
2. Bluetooth Module (HC-05 or HC-06)
3. Motor driver (IC L293D)
4. 2 DC motor (take out from toys)
5. Android Phone (any)
6. Breadboard
7. Jumper Wires

8. 9V Battery

Step 2: Circuit Connection (UPDATED)

Picture of Circuit Connection (UPDATED)

Now here is the hardware setup

Just follow the Schematic above and remember that the RX of bluetooth module will be connected with the TX of Arduino and the TX of bluetooth module will be connected with the RX of Arduino.This is the common mistake made by most of people and they blame us.

THE CONNECTION IS FIXED.

Step 3: Arduino Programming (UPDATED)

Picture of Arduino Programming (UPDATED)

Download the following file and upload it to Arduino.

https://www.dropbox.com/s/eup60v05mnd40ll/Bluetoot...

PROGRAM IS ALSO FIXED.

Step 4: Android App Programming (UPDATED)

Now you have to make an app so that you can send command to your Arduino so here we will use MIT app inventor. If you don't have the AI companion download it in your android by going in this link.

https://play.google.com/store/apps/details?id=edu....

go to the following link, sign in with your gmail account and follow the video.

http://ai2.appinventor.mit.edu/

after you finished programming go to connect and select 'AI companion'.

Then type the code generated and type it into the AI companion in your Android or simply scan the QR code.

If you are finding difficult or very complicated to make the app the download my app from the following link.

https://www.dropbox.com/s/vhlim7ea0mty584/bluetooth.apk?dl=0

Step 5: Precautions

Picture of Precautions

Ok since you have done with your connections and with your app. You must take some precautions revised.

1. do not connect the RX and TX before uploading the program to the arduino or else you will get an error

2. make sure that you have connected TX and the RX of the bluetooth module with RX and the TX of the Arduino i.e RX=TX &TX=RX.

3. give 3.3v to bluetooth module and 5v to motor driver and 9v-36v(battery) to motor driver as shown in schmatic.

4. check that the commands in the program of arduino and in the program of app are same i.e. Left = Left, Left ╪ left or else the arduino will not recognize the command its looking for and it will do nothing of course.

5. And simply check that the connections are into there correct pins

6. Before starting the app please make sure that your bluetooth module is paired with your device and your bluetooth is on.

7. If you found any problem with the project then just comment below and i will fix it.

You are good to go and have fun with robotics !!!!

If you want more tutorials and projects from me request below !!!!!!

Comments

RomanP6 (author)2015-08-20

Hi! I have a question regarding a problem I ran into when using the android app. When I choose the device I want to connect to from the list of available bluetooth connections, the screen just gets black and nothing happens. I would appreciate hearing your suggestions as to what might cause the problem and what has to be done to resolve it. Thanks!

TedD8 (author)2016-08-30

how would i control speed also

AGTx (author)TedD82016-08-31

You can control the speed with pwm pins only.

mayor_nawghare18 (author)2016-05-31

I want to rotate 8 kg camera pls guide me to do so...including electronic circuit , stepper motor..and power supply to it

AGTx (author)mayor_nawghare182016-06-02

sorry for late reply, an instructable for driving the stepper motor will be out by tomorrow, Thank you for having patience. :)

SarvangD (author)2016-05-17

I have some problem in connecting. I am not clear on connections of Breadboard. Else all is done. Please Help me.

AGTx (author)SarvangD2016-05-17

sure thing but what is the problem actually?

DhyanSagar (author)2016-04-18

Can we update this project with the use of gsm module in place of Bluetooth to control remotely with voice commands

Please help me with giving some ideas about that

AGTx (author)DhyanSagar2016-04-19

yes ofcourse, badluck i dont have a gam module

DhyanSagar (author)AGTx2016-04-26

Then guide me how to use it I'am beginear please guide me

AGTx (author)DhyanSagar2016-04-19

gsm module

udayk24 (author)2016-02-10

i senn your project in instructables its so awsome and i did it buut i got a small problem that my bluetooth is not showing indication blink which is required for pairing that was the final thing to complete projecct can you please email me:udaykumarmanavalla143@gmail.com as soon as possible

udayk24 (author)2016-02-10

sir i did all connections but my bluetooth is not showing the indicatior signal why please reply to my email:udaykumarmanavalla143@gmail.com

007SANJAN (author)2015-09-06

please upload some more videos regarding robotics and getting started with app

AGTx (author)007SANJAN2015-09-06

I will try.

shreyas songirkar (author)AGTx2015-09-14

friend I am having the same Problem, the motor does not correspond to the command

why is this so ?

the arduino rx and tx blinks as i command but no response by motor

AGTx (author)shreyas songirkar2015-09-14

OK let me see what's the problem, until I fix this problem you go and check-out my other instructable, it will surely work.

shreyas songirkar (author)2015-09-10

AGTx (author)shreyas songirkar2015-09-10

Any problem?

AGTx (author)2015-09-05

Really really sorry guys the connection was a bit faulty, my bad.

Now the connection and the arduino code both are updated so there more problem in future i hope.

THANKS for sharing your problem.

shreyas songirkar (author)2015-08-31

What about programming HC 05 module or there is no need for it?

Please help me as i am new.

I also want to try this amazing project.

AGTx (author)shreyas songirkar2015-09-01

programming hc 05 I don't know if it can be programmed. Please let me do some research on it.
My new project "Voice Controlled Arduino" is coming soon.

shreyas songirkar (author)AGTx2015-09-03

Please help me you are my last hope............

AGTx (author)shreyas songirkar2015-09-04

Have you seen your mail yet

shreyas songirkar (author)AGTx2015-09-02

pls give me solution to this problem

shreyas songirkar (author)AGTx2015-09-02

Friend Thx it got paired

But the motors do not correspond on the command arduino uno blink when i press the forward key or any key (it means the command reach till arduino but motor to not correspond)

shreyas songirkar (author)2015-09-01

Thx !!! that means u have not programmed HC 05 in this amazing project {is this correct}

AGTx (author)shreyas songirkar2015-09-01

Actually, Hc 05 cannot be programmed its purpose is to transfer data from one device to other. The app which I made in the video send command to arduino and then after recognising it will make the motors rotate. We can also control the speed of motor if you want by changing the program of arduino and editing the app.


shreyas songirkar (author)AGTx2015-09-01

Oh!!! That's Great Thanks for your help.

Eager to see your upcoming project.

Thx once again.

shreyas songirkar (author)2015-09-01

can we use uno instead of uno R3?

AGTx (author)shreyas songirkar2015-09-01

Sorry for the late reply.
Actually you can use any arduino board you like.

AGTx (author)2015-08-22

OH! I think i know the solution first of all you have to get paired with the bluetooth module from the settings of your mobile. If it asks a password it must be "1234"(without quotes) and one more make sure that your bluetooth in your phone is always on and also the bluetooth module should be on to pair it with your device.

Thanks for asking the question and if there are more problems please feel free to discuss it.

saqlain zafar (author)2015-08-01

nicely done

AGTx (author)2015-07-31

If you like this tutorial please vote me in contests!!!!!!

AGTx (author)2015-07-31

thanks

seamster (author)2015-07-31

Nicely done!

About This Instructable

12,164views

27favorites

Bio: Nothing much to talk about - Still in school.
More by AGTx:Driving an ESC/Brushless-Motor Using Raspberry Pi Arduino Voice Recognition with AndroidDriving motor with android using arduino and bluetooth
Add instructable to: