Introduction: Arduino + Bluetooth Controlled Tank

About: Maker, archer.

I build this tank to learn how to program, how motors, servos, Bluetooth and Arduino works and i build one with making research from internet. Now i decided to make my own Instructables, for people who need to help about build an Arduino tank.

Here is the video: Arduino + Bluetooth controlled Tank


Basically, the system works like;

Bluetooth sends data from the phone(with Arduino RC application, numbers or characters can be sent as data to hc06 )to Arduino and Arduino starts servo and motors for the data.

Step 1: Things You Need

  • 1x arduino uno r3

  • 1x arduino uno motor driver shield

  • 2x 180 rotation micro servos
  • 1x Tamiya tank tracks
  • 1x Tamiya universal plate set
  • 1xTamiya twin motor gear box X1
  • 1x PowerBank (mine is 10400mAh it can change)
  • 1x HC 06 bluetooth module about 2.5 cm circuit board spacer( you can find it from old circuits or pc)
  • Some wire
  • More than 2 male and female header pin connector
  • Soldering iron
  • Hot glue gun ,hot silicone gun (same thing)
  • Soldering wire
  • Circuit board
  • usb cable
  • android phone
  • straw

Step 2: After You Build Your Tanks Body

After you build the Tamiya set solder some wires on your motors. And screw your Arduino into the spacers, as shown.

Plug your motor driver correctly into your Arduino and solder two female head pin connector to pin 0(RX) and 1 (TX).

make the motor connections to the motor driver

Step 3: Tanks Barrel

with some hot silicon glue two servos as shown in photos. connect the servos to the motor shield.

ground servo goes to SER1

up and down servo goes to SER2

Step 4: Battery

Cut two small pieces of the circuit board for your power bank and glue it to the battery. as shown

Cut your USB cable and solder it to the motor shields 5v and ground. MAKE SURE YOU ARE SOLDERING CORRECTLY. (VCC to VCC ground to ground)

Step 5: Bluetooth Connection

Cut your Male and female header pin connectors male side and solder it to the 5v and ground to the motor shield.

for me, green is VCC red is GND

  • NOTE: WHILE YOU UPLOADING THE CODE MAKE SURE THAT YOUR BLUETOOTH IS NOT CONNECTED ARDUINO ANYWAY.

Connect;

  • arduino's rx to hc 06's tx
  • arduino's tx to hc 06's rx

Step 6: Glue the PowerBank

Put some hot glue on the circuit boards and glue it to the Arduino. Test your Arduino with plugging the USB to the power bank(make sure your power bank is open or charged).

Also if you want you can glue another circuit board for your Bluetooth module it's too easy and more beautiful

Step 7: Uploading the Code

Download the code and upload it to your Arduino.

  • Small notes:

sayac means counter in Turkish

durum is status

Servo sagsol;
Servo yukari;

these are also;

Servo rightleft;

Servo up;

  • CODE HAS A PROBLEM ABOUT THE BARREL IF YOU SOLVE IT PLEASE WRITE IT TO THE COMMENTS!!!

for example;

<p>if(durum == '5'){<br>         <br>         while(durum == '5'){<br>               <br>        sayac++;<br>        if(sayac>180)<br>        {<br>          sagsol.write(180);<br>          }<br>          if(sayac<0)<br>        {<br>          sagsol.write(0);<br>          }<br>        delay(50);<br>              <br>       sagsol.write(sayac);<br>       break;<br>       <br>       }<br>     }</p>
  • It keeps counting while you press another button in your phone and int gets bigger,

can we limit the integer if we can please write it to the comments?

limit like 0 to 180.

Step 8: Adding the Straw As Barrel

Cut the straw before the twisted part and put it into the servo

Step 9: Using the Android

Download the Arduino RC app in google play https://play.google.com/store/apps/details?id=eu.j...

power your tank

open the application

press process

press HC 06 device

wait...

when Arduino is connected to phone Bluetooth module stops blinking

open controller mode

make your settings these are my settings. it can change if you connected wrong motor cables to the motor shield but changing the numbers or code you can get the true one.

Step 10: You Are Ready to Go