Beginners Guide to Building Arduino Robots With Bluetooth and Android

102,425

136

12

Posted

Introduction: Beginners Guide to Building Arduino Robots With Bluetooth and Android

In this tutorial we are going to go over building a Arduino robot that can be controlled via bluetooth with an Android phone/tablet. This is a beginners guide that is going to briefly go over the process of wiring and programming your robot.  

Step 1: Build List...

The following is the list of components we are going to use:

1.   Pololu Zumo chassis              http://www.zagrosrobotics.com/shop/item.aspx?itemid=884
2.   DRV8833 dual motor driver    http://www.zagrosrobotics.com/shop/item.aspx?itemid=879
3.   Arduino Uno or compatible     http://www.zagrosrobotics.com/shop/item.aspx?itemid=868
4.  Bluetooth modem                    http://www.zagrosrobotics.com/shop/item.aspx?itemid=883
5.  Android phone or tablet

Along with that list of parts for the robot you are going to need these basic things to build and program your robot

1,   Computer with the Arduino IDE    http://arduino.cc/en/Main/Software
2.   Soldering iron
3.   Some solder and wires

Step 2: Assembly...

After you have assembled your robot chassis and solderd your motor driver and modem, the next step is to wire up your Arduino Uno to the motor drivers and chassis. Here is the wiring diagram


Arduino PIN      GND   --    DRV8833      GND
Arduino PIN         10    --    DRV8833      ain2
Arduino PIN         11    --    DRV8833      ain1
Arduino PIN           5    --    DRV8833     bin1
Arduino PIN           6    --    DRV8833     bin2
Arduino PIN      GND    --    DRV8833    GND
Arduino PIN        VIN    --    DRV8833     VIN

Arduino PIN     (TX)1    --    Silvermate    RX
Arduino PIN     (RX)0   --    Silvermate    TX
Arduino PIN          5V    --    Silvernate VCC
Arduino PIN       GND   --    Silvernate GND
Silvermate           CTS   --    Silvermate  RTS

Step 3: Arduino Sketch...

Download the attached sketch and flash it to your Arduino. If you are new to Arduino you can always reference their home page and or the Playground for ideas and insight into everything Arduino.

Robots sketch download link  https://www.box.com/s/25c8f3c14c8b0217759e 

Home page  http://www.arduino.cc/

Playground    http://arduino.cc/playground/

Step 4: Testing Our Robot...

Now that we have flashed our Arduino Uno with the attached sketch, we can use USB to communicate with the Uno to send motor commands based on string commands. In order to do this we use the Arduino IDE serial monitor. Make sure that your baud rate set on your serial monitor window is the same as the baud rate in our sketch (115200).   Now we can send commands like 

f   ( Forward ) ,  b  ( Back ) ,  l  ( Left ) ,  r  ( Right )



Step 5: Android App...

Here is a basic Android app that sends string commands via bluetooth to our Arduino Uno. Of coarse you can always write you own .apk to Incorporate a more advanced interface using your phones accelerometer, or touchscreen using sliders for motor speed and direction. Transfer the .apk to the sd card on your phone or tablet and use an app like ES file explorer to gain access into the SD card and install the .apk.


ES FIle Tutorial -- http://www.youtube.com/watch?v=myOW8YrcSzg



Max_Control App --     https://www.box.com/s/8b06bcee9ec84ec70a72



Step 6: Conclusion...



This hopefully has helped you get a basic understanding of how to incorporate Arduino with Bluetooth and Android. I have also included a printable robot that you can print on card stock at home or at print shops like Kinkos. Take notice of the page size as it is 10' x 16', if this is too big for your printer use a photo editor to break up the images to a printable format. There are 2 files one blank cutout that you can edit and the other that is pictured in this tutorial. Enjoy your new wireless robot and now you can start planning your next modification to your robot with sensors,servo arms, cameras or higher level programming control with a PC over Bluetooth.

Robot Images  https://www.box.com/s/012d79de3373d3133706

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Gluten Free Challenge

    Gluten Free Challenge
  • First Time Author Contest 2018

    First Time Author Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

16 Comments

can i use Hc-05 bluetooth modem instead of your bluetooth

hey I'm in the UK and cant get access to all the different components so I have 2 questions.
1. could I use this for my Bluetooth modem - http://www.amazon.co.uk/Bluetooth-Module-Wireless-Serial-Arduino/dp/B00DJQ5Q5Q/ref=sr_1_2?ie=UTF8&qid=1388606312&sr=8-2&keywords=bluetooth+slave

2.is it possible to use the arduino motor sheild instead of the dual motor drive

ignore the second question I found one that should work.... hopefully

i wana ask that can we communicate b/w android and arduino(any other microcontroller) via usb cable?? bluetooth's data rate is lesser than of usb..

Yes you can use USB. Although for this Instructable, which is only sending simple strings, there is plenty of bandwidth to handle this type of simple control. Plus bluetooth gives us the advantage of not being tethered to the robot. I would suggest reading up on the data sheets for the type of Microcontroller you are using to see what speeds are available and how to incorporate them. Try this link for some information on Maximum baudrates with Arduino- http://forum.arduino.cc/index.php?topic=21497.0 -Atom

Is the dual motor driver needed if I use servos to drive the chassis instead?

No, but you will have to do some modification to the Arduino Sketch in order to get your robot moving. I suggest looking over the Arduino Servo Library - http://arduino.cc/en/reference/servo to get some insight into rewriting the code. -Atom

Will this work with wifi instead of bluetooth?

The Android application is built around using Bluetooth comm vs WiFi so it would require a major rewrite. It might be interesting to use WiFi vs bluetooth. Which Arduino wifi shield are you looking at using?