Introduction: Arduino/Android - BLUETOOTH Multi Servo Motor Control Android APP

Hello world! I made a 1 servo control app yesterday and i said that i would make a multi control, so here is the multi control app! I also made a better arduino code. Follow the next step for the schematic, code, parts list & APP

GET THE APP ON GOOGLE PLAY

Contact me if you want the source code!

Step 1: Schematic, Code & Parts List.

Connect everything like the schematic, Upload the code, download the app, connect bluetooth after pairing the devices and it should work. Make sure to connect RXD to TX and TXD to RX.

Also make sure not to have the bluetooth connected when uploading the code!

Parts list.

  1. Arduino uno, (Use a mega if you want to use more then 6 Servos!) i used the RobotDyn Uno.
  2. HC-06 Bluetooth module, or any other.
  3. 6 x Servo motor. (Can test with one to of course)
  4. Jumper wires set MM/FF/MF
  5. Android phone.

Good luck!

Follow the next step to find out how to change your bluetooth module its name, pin & baud rate.(optional)

Step 2: How to Change the Name of Your HC-06

What is needed?

1 x USB to TTL microcontroller programmer to connect to your HC-06

How to connect the Programmer?

VCC to VCC

GND to GND

RXD to TX

TXD to RX

Lets get started...

  1. connect the USB TTL programmer to the HC-06
  2. Plug in the USB and open up The Arduino IDE
  3. Open the serial monitor.
  4. Type "AT" without quotes. You should see a respond in the Serial monitor saying "OK"
  5. Type "AT+NAMExyz" Sets the module name to “xyz” (Replace xyz with the name you want.) response should be OKsetname.
  6. Type "AT+PIN1234" Sets the pin to 1234 (replace 1234 with your desired pin) respond should be OKsetPIN For more info on changing baudrate etc. i included a PDF file. Good luck!

Comments

author
divyanshu13 made it! (author)2017-04-16

Please send the source code.... My email id is divyanshupant.just4u@gmail.com

author
ÜbeytT made it! (author)2017-04-12

Please source cod Android
tarhanubeyt@gmail.com

author
ÜbeytT made it! (author)2017-04-12

unsigned int realservo = (servopos1 *256) + servopos; why?

author
skizzognr made it! (author)2017-02-08

Can you give me source code?please?
Ale.belligoli@libero.it

author
Denisenk made it! (author)2017-01-28

Hello!

Can You send me a source code please?
waskid29@gmail.com

Thank you

author
MamunEdt made it! (author)2017-01-26

#include <Servo.h>

Servo myservo1, myservo2, myservo3, myservo4, myservo5, myservo6, myservo7, myservo8, myservo9, myservo10;

byte serialA;

void setup()

{

myservo1.attach(9);

myservo2.attach(10);

myservo3.attach(11);

myservo4.attach(3);

myservo5.attach(5);

myservo6.attach(6);

// myservo7.attach(); fill in pin numbers if you use more then 6 servos i left them blank

// myservo8.attach();

// myservo9.attach();

// myservo10.attach();

Serial.begin(9600);//change your baudrate to your Bluetooth modules baudrate if needed.

}

void loop()

{

if (Serial.available() > 2) {serialA = Serial.read();Serial.println(serialA);}

{

unsigned int servopos = Serial.read();

unsigned int servopos1 = Serial.read();

unsigned int realservo = (servopos1 *256) + servopos;

Serial.println(realservo);

if (realservo >= 1000 && realservo <1180){

int servo1 = realservo;

servo1 = map(servo1, 1000,1180,0,180);

myservo1.write(servo1);

Serial.println("servo 1 ON");

delay(10);

}

if (realservo >=2000 && realservo <2180){

int servo2 = realservo;

servo2 = map(servo2,2000,2180,0,180);

myservo2.write(servo2);

Serial.println("servo 2 On");

delay(10);

}

if (realservo >=3000 && realservo < 3180){

int servo3 = realservo;

servo3 = map(servo3, 3000, 3180,0,180);

myservo3.write(servo3);

Serial.println("servo 3 On");

delay(10);

}

if (realservo >=4000 && realservo < 4180){

int servo4 = realservo;

servo4 = map(servo4, 4000, 4180,0,180);

myservo4.write(servo4);

Serial.println("servo 4 On");

delay(10);

}

if (realservo >=5000 && realservo < 5180){

int servo5 = realservo;

servo5 = map(servo5, 5000, 5180,0,180);

myservo5.write(servo5);

Serial.println("servo 5 On");

delay(10);

}

if (realservo >=6000 && realservo < 6180){

int servo6 = realservo;

servo6 = map(servo6, 6000, 6180,0,180);

myservo6.write(servo6);

Serial.println("servo 6 On");

delay(10);

}

// if (realservo >=7000 && realservo < 7180){ //UNCOMMENT if using more then 6 Servos.

// int servo7 = realservo;

// servo7 = map(servo7, 7000, 7180,0,180);

// myservo7.write(servo7);

// Serial.println("servo 7 On");

// delay(10);

// }

//

// if (realservo >=8000 && realservo < 8180){

// int servo8 = realservo;

// servo8 = map(servo8, 8000, 8180,0,180);

// myservo8.write(servo8);

// Serial.println("servo 8 On");

// delay(10);

// }

//

// if (realservo >=9000 && realservo < 9180){

// int servo8 = realservo;

// servo8 = map(servo9, 9000, 9180,0,180);

// myservo8.write(servo8);

// Serial.println("servo 9 On");

// delay(10);

// }

//

// if (realservo >=10000 && realservo < 10180){

// int servo10 = realservo;

// servo10 = map(servo10, 10000, 10180,0,180);

// myservo10.write(servo10);

// Serial.println("servo 10 On");

// delay(10);

// }

}

}

author
士瑩楊 made it! (author)2016-12-18

Hello!Can You send me a source code please?

yuiocs7498398@gmail.com

author
WildanB made it! (author)WildanB2016-12-22

Do you have get the source code ? Can you share it to me please?

to wildanbalfas3@gmail.com

thankyou

author
WildanB made it! (author)WildanB2016-12-22

Do you have get the source code ? Can you share it to me ?

author
WildanB made it! (author)2016-12-22

Aweeasome!!

Can You send me a source code please?

to wildanbalfas3@gmail.com

thankyou

author
MudassarI4 made it! (author)2016-12-20

HI!! Can u Plz send me the Code??

MudassarIsmail47@gmail.com

author
graciello2 made it! (author)2016-12-11

Hello!Can You send me a source code please?
graciello2@bigmir.net

author
DavidR662 made it! (author)2016-11-26

hola que tal todo funciona buen pero después de 4 o 5 movimientos se traba la aplicación o ya no responde el brazo alguna idea de porque ?

author
mananp11 made it! (author)2016-10-24

hey i need your help sir i want to develop an android app controlling 4 servomotor.

author
vandenbrande made it! (author)vandenbrande2016-10-26

What do you need help with? Please send that to my e-mail. contact@arduinosensors.nl

author
EfrainP6 made it! (author)2016-10-19

please send me the code, ejpatino@uninorte.edu.co

author
alex.powell.581 made it! (author)2016-10-11

This project it is great, please can You send me the source code for the android application, pleas? blackbirdsr71pooa@gmail.com

author
HasanE8 made it! (author)2016-10-02

Hello.. This is my graduating project. Can you send me the source code ,please?
E-mail: hasaneroglu1994@gmail.com

author
CodyH47 made it! (author)2016-09-19

Thank you for your work. Can you provide the source code for the app? Or do u think u can add limitations to your existing program for each servo? Other wise i will have to re code the softwear. please feel free to email me at codyhurley88@yahoo.com

author
SwikarA made it! (author)2016-09-18

please send me the source code to nepalikta399@gmail.com

author
xristos123 made it! (author)2016-09-03

I have received the code thank you very much !!

author
xristos123 made it! (author)2016-09-02

yes the code!!

author
vandenbrande made it! (author)vandenbrande2016-09-02

Ok i will send it again, hope you get it.

author
xristos123 made it! (author)2016-08-30

hello 10 days have passed but still I do not have the program. You have to do anything yet?

author
vandenbrande made it! (author)vandenbrande2016-08-30

You mean the source code? Sorry people ask me everyday. I must have missed it. but i remember your name and thought i allready have send it.

author
xristos123 made it! (author)2016-08-19

hello i want this code for a model ship. You want to you give me;; Thank use from GREECE

author
vandenbrande made it! (author)vandenbrande2016-08-19

Hi xristos, Send me your e-mail address with the request for the multi servo source code. I will send it in a mail to you. Send to : contact@arduinosensors.nl

author
xristos123 made it! (author)2016-08-19

my e mail is

xristoskaiti@hotmail.com

author
MattE52 made it! (author)2016-08-18

Hello! I'm a high school robotics teacher over in the United States, and I just wanted to say thanks! Each student is programming a variety of different robots using HC-06's this semester and this was very helpful. I would greatly appreciate the source code.

Matthew.f.eaton@gmail.com

Thanks!

author
aymans14 made it! (author)2016-08-15

Can you give me the source code please

Email : ayman_sharawani@hotmail.com

Thank you...

author
vandenbrande made it! (author)vandenbrande2016-08-16

Yes sure, I will send it to your mail.

author
EOneK made it! (author)2016-08-12

plz i want a code sir plz

khobragades244@gmail.com

author
RickyW16 made it! (author)2016-07-17

can you give me the source code please
rickywijaya210@yahoo.com

author
Nguyên AnhN made it! (author)2016-06-25

can you give me the source code please

author
vandenbrande made it! (author)vandenbrande2016-06-25

Hello, yes please send a message with your mail address then i will send it to your mail as attachment.

author
Nguyên AnhN made it! (author)Nguyên AnhN2016-07-06

its ntna2003@gmail.com

sorry for late replying

author
OaphO made it! (author)2016-07-02

hello can you give the source code of the app please

Email : giantscrusher@gmail.com

author
SaktichaiP made it! (author)2016-07-01

Can you give me the source code please

Email : haoshoku-spb@hotmail.com

author
R&OB made it! (author)2016-06-30

Can you give me the source code please

author
vandenbrande made it! (author)vandenbrande2016-06-30

Hi please send a e-mail to contact@arduinosensors.nl I will reply and send the source code.

author
zwilson5 made it! (author)2016-06-18

Will this still work if some of the servos are hooked up with an external power source?

author
vandenbrande made it! (author)vandenbrande2016-06-18

Hi,

Yes that is correct, it should still work fine. Make sure you dont use to much power or you will destroy the servo.

Best regards, Danny

author
AkshayS91 made it! (author)2016-05-03

I want android apk source code

author
vandenbrande made it! (author)vandenbrande2016-05-04

Hello my friend,

I will send it to you. for a small favor, leave a review on google play please. let me know and i will send it.

Greetings

author
AkshayS91 made it! (author)AkshayS912016-05-08

I have review it already my friend

author
AkshayS91 made it! (author)2016-05-03

Hai

author
AkshayS91 made it! (author)2016-05-03

Hai

author
bobdub19 made it! (author)2016-04-19

Hi great instructible. I am very interested in android/arduino communication.

would you be able to share with me the source code of the android app. thanks.

author
vandenbrande made it! (author)vandenbrande2016-04-21

Hey my friend, did you get the PM?

About This Instructable

16,031views

21favorites

License:

Bio: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the ... More »
More by vandenbrande:Arduino & C# - RGB LED / LED STRIP CONTROL C# Application Arduino & C# - LM35 Temperature Sensor C# Application Arduino (OPEN SOURCE) Arduino & C# - HC SR04 Distance Meter C# App for Arduino
Add instructable to: