Introduction: MultiTasking Robot

Bluetooth-controlled robot, doing some task based on commands: Manual control (RC Mode), Autonomous (Obstacle avoider Mode), shows a text on LCD, also control the Robot's speed.

Step 1: Parts Needed

You will need:

  1. Arduino Uno/Genuino
  2. Motor Driver (I'm using 2A Motor Shield from DFRobot)
  3. Three of Ultrasonic sensors HC-SR04
  4. HC-05 Bluetooth module
  5. 16x2 LCD with I2C
  6. Jumper wires
  7. Mini-breadboard
  8. 9V battery for Arduino, 7.5-12 V battery pack for motors (custom)
  9. Robot chassis (I'm using DFRobot Devastator Tank Mobile Platform)
  10. Soldering tools
  11. Any tools that may help you work easily
  12. Creativity

Next...

Step 2: Modifying Some Parts

Here, you need to modify some parts, the HC-05 bluetooth module and the LCD. You have to make a voltage divider for the bluetooth module and add an I2C module to the LCD.

Step 3: Build It..

Attach your arduino and parts in their proper place, based on your creativity. For good looking, neat the jumper wires.

Step 4: Wiring Diagram & Programming

Follow this wiring diagram to hook up the parts. Instructions also included in the program. Install the libraries then upload the program. Make sure to release the HC-05 RX TX pins from the Arduino pins before uploading.

Step 5: Play With Your Robot

To control Robot from PC, use TeraTerm software. Software download available here: Tera Term

To control over Android, you can use this app: Arduino Bluetooth Controller

Pair your HC-05 with your device first. When it is asking for password, enter 1234 (default HC-05's password).

Then:

If you use TeraTerm: open the software, click 'Serial', choose your bluetooth port, play.

If you use Android, open the app > Proceed > choose HC-05 > open the Controller Mode > set your controller keys (Set Commands), play. You can also use the Vehicle Mode, set the controller keys too.

These commands based on the codes:

w : Move Forward

a: go Left

s: Move Backward

d: go Right

q: Stop

e: decrease speed

r: increase speed

x: LED ON

z: LED OFF

1: Obstacle Avoider Mode

2: Showing the text on LCD

0: Clear n turn off the LCD backlight

You can modify the codes for another commands. If you fail once, don't give up! That's what make this fun. Do troubleshoots. Hope you make it!

Comments

author
monkeybiz07 (author)2016-05-30

Hi, thank you very much for sharing your work/instructions. I'm helping my nephew to building this as his first robot project. I have question about step 2, "Modifying some parts". It says "You have to make a voltage divider for the bluetooth module", is this referring to the 1k and 2k resistor as shown in the diagram? Can you please tell me what specific type of resistor to buy? Sorry if I'm asking something very basic...I looked up on ebay and there are many with different Watt and ohm, unsure which is the right one. Thank you for helping out.

author

Hi! Thank you for your comment. Yes it's referring to the resistors as shown in the diagram. You can use the 1k and 2k carbon film resistor with 5% tolerance and i think it's fine to use 1/4 or 1/2 Watt of them. Thank you.

author

Thank you for the quick reply. I'm having difficulty finding 2k resistor on ebay, but there are a lot of 2.2k ones....can i use them instead? thanks again.

Tony

author

Hi, Tony! Actually i experienced the same with you, so i replaced the 2k resistor with 2x1k resistors in series. Hence, you will need three 1k ohm resistor. Thank you

author
alarch88 (author)2016-03-22

Hi, i am building this but cant seem to find a L298P motor driver. I can only seem to find a L298 and a L298N. If you can maybe tell me a website to find one or comment a link to it, that would be great.

author
alarch88 (author)alarch882016-03-22

And another question would be what kinda of motor battery did you use?... And i really dont see it put anywhere in the wiring tutorial

author
Dimas Sheldon made it! (author)alarch882016-03-22

Oh I'm sorry, my bad. I use 6x1.2VNi-Mh Energizer batteries
connected to Motor Controller and a 9V Ni-Mh battery connected to
Arduino. Remember to place the power connection jumper to

PWRIN connection like in this pict (if you use DFRobot L298P Motor Driver):

300px-Arduino_Shield6 ext pwr.png
author
carlcarter (author)Dimas Sheldon2016-05-24

that must be hard:c

author
carlcarter (author)alarch882016-05-24

I need friends

author
Dimas Sheldon (author)alarch882016-03-22

Hi alarch88, actually it's fine to use the L298 or L298N series, as long as you can configure it. In matter where to find L298P, you can find it here: http://www.dfrobot.com/index.php?route=product/product&product_id=69&search=L298&description=true#.VvHQLdCFvig. Thank you:)

author
carlcarter (author)2016-05-24

I need friends

author
Aswinm1 (author)2015-12-17

hi i am getting errors in my compiling it is saying'NEWPING'does not name a type please help i really want to make it THANK YOU

author
Dimas Sheldon (author)Aswinm12015-12-22

Sorry for slow response. You might not find errors if you use the program and the library that i give in step 4, except if you modified the program with your own codes. Please check your codes again, make sure you have 'initialize' everything before. Thank you

author
peterpiper50 (author)2015-12-04

Thank you DimSheldon That helped with the errors. I also had to figure out my I2C

address and configuration. Now working out my motor controller. Doesn't follow the

commands quite right.

Thank you again Peter

author

ok, you're welcome

author
peterpiper50 (author)2015-11-29

Hi, I compiled your code and got errors.

C:\Users\Peter\AppData\Local\Temp\build6fb2e778

34053d47e65979797fe94432.tmp/core\core.a

(Tone.cpp.o): In function `__vector_7':

C:\Program Files (x86)\Arduino\hardware\arduino

\avr\cores\arduino/Tone.cpp:539: multiple definition

of `__vector_7'

libraries\NewPing\NewPing.cpp.o:C:\Users\Peter

\Documents\Arduino\libraries\NewPing/NewPing

.cpp:284: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling.

Can you help. Thank you

author
Dimas Sheldon made it! (author)peterpiper502015-11-30

Hi peterpiper50, you have to comment some codes in the Newping.cpp file first, as seen in this pict, or you can just replace your Newping.cpp file with this Newping library(newping.cpp file included) https://www.dropbox.com/s/dwvqmrhdger92k0/NewPing.rar?dl=0. Thank you

NP.JPG
author
peterpiper50 (author)2015-11-29

C:\Users\Peter\AppData\Local\Temp\build6fb2e7783

4053d47e65979797fe94432.tmp/core\core.a

(Tone.cpp.o): In function `__vector_7':

C:\Program Files (x86)\Arduino\hardware\arduino\

avr\cores\arduino/Tone.cpp:539: multiple definition

of `__vector_7'

libraries\NewPing\NewPing.cpp.o:C:\Users\Peter

\Documents\Arduino\libraries\NewPing/NewPing

.cpp:284: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling.

last post didn't print everything. Sorry

author
peterpiper50 (author)2015-11-29

Hi, I tried compiling your code and am getting errors.

C:\Users\Peter\AppData\Local\Temp\build6fb2e77834053d47e65979797fe94432.tmp/core\core.a(Tone.cpp.o): In function `__vector_7':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Tone.cpp:539: multiple definition of `__vector_7'

libraries\NewPing\NewPing.cpp.o:C:\Users\Peter\Documents\Arduino\libraries\NewPing/NewPing.cpp:284: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling.

Can you help.

Thank you

author
Arbot (author)2015-09-10

can i use hc 06 in place of hc 05

author
Dimas Sheldon (author)Arbot2015-11-07

I haven't try it before, but you can try use it. But I recommend you to use the Hc05, because the HC05 can be a master and slave, where the Hc06 just can be a slave module.

author
wallylewis (author)2015-07-25

Thanks, this is great! I am making something similar but I'm using PIRs to look for a human and then follow the human (like a pet robot) I'm using ultrasonic sensors for avoidance while it looks for a human... if it cannot find a human after a time, it emits a cry. Feedback welcome!

author
Dimas Sheldon (author)wallylewis2015-07-25

wow yours is great! i wanna try to make it later!

author
DIY Hacks and How Tos (author)2015-07-25

Cool robot.

author

thanks..

About This Instructable

7,990views

101favorites

Bio: n e w b i e
More by Dimas Sheldon:MultiTasking Robot
Add instructable to: