loading

Here’s a cool little project you can make to control a tiny tank from your smartphone. To do this, we hack apart a cheap RC tank that you can get off the internet, and add a TinyDuino with the Motor x4 TinyShield and Bluetooth TinyShield. Using Bluetooth on our Android phone, we install the “Arduino BT Joystick” app to be able to drive around the tank.

Items Required

  • Radio control tank – Here is the one we used: link
  • TinyDuino Basic Kit – link
  • Motor x4 TinyShield – link
  • Bluetooth TinyShield – link
  • 100-250 mAh lithium polymer battery less than 20mm wide – Here is the one we used: link
  • JST-PH battery extension cable – Here is the one we used: link
  • Li-Ion Battery Charger – Here is the one we used: link

Tools Needed

  • Soldering Iron
  • Small Phillips Head Screwdriver
  • Computer with Arduino IDE
  • Android phone with Arduino BT Joystick App

Step 1: Disassemble the Tank

The first objective is to remove the original electronics and battery from the tank. The upper body of the tank can be removed by unscrewing two small Phillips screws that are above the wheels on either side of the tank. Inside the tank, the original receiver is secured with one screw. Remove the screw and cut or desolder any wires attaching the receiver and battery to the tank, leaving as much wire as possible. Some of the extra plastic inside the tank was removed to free up space.

Step 2: Wire in the TinyCircuits Motor Board

After the original electronics are removed, the TinyDuino motor controller and processor board can be soldered in its place. Cut the JST battery expansion cable with about 1 inch of wire left connected to the connect. Take the end of the cable with the male connector, and solder these wires into the Motor x4 TinyShield VM (red wire) and GND (black wire) connections. Since the power source is a single lithium battery with a maximum voltage of 4.2 volts, the processor board can be powered by soldering a wire from VM on the controller board to the positive battery terminal, labeled ‘+’, on the processor board. Then, the motor wires should be soldered to the MOTOR1 and MOTOR2 pads on the motor controller board. This example connects the left track to MOTOR2 and the right track to MOTOR1, but the motor connection and direction can be changed in the code. Make sure the power connection is insulated! The soldered boards are shown below:

Step 3: Program the TinyDuino Sketch

Plug in the USB TinyShield to the processor board, and program in the TinyTank sketch (download) using the Arduino IDE. Then remove the USB TinyShield and plug in the Bluetooth TinyShield.

TinyDuino sketch for joystick control (uses the free version of Arduino BT Joystick app): link

TinyDuino sketch for accelerometer control (uses the paid version of Arduino BT Joystick app): link

Step 4: Download the App on Your Android Phone

On your Android phone, download the free Arduino BT Joystick app. The free app will let you drive the tank using a keypad. You can also upgrade to the Pro version of the app, which allows you to steer the tank using the accelerometer on the phone. In both cases, set the Send Delay = 100ms.

Step 5: Control the Tank With Your Phone!

Connect the BT connection to the TinyShield Bluetooth, by scanning for Bluetooth connections on your phone. Then start up Arduino BT Joystick on your phone and connect to the Bluetooth. You can then drive around your tank!

<p>By the way, the tiny star on the side indicates it's a red army tanks while the style of that tanks is that of a m4 Sherman used by the americans and the british in wwii.</p>
<p>That's because it's actually a Russian T-34. The side canisters in the back gave it away for me. I guess it helps I used to play World of Tanks :)</p><p>https://en.wikipedia.org/wiki/T-34</p>
<p>Hello TinyCircuits's team,</p><p>just a little help if you please ?</p><p>could it be possible to use the other MotorShield's pins (3 or 4) to drive 4 leds (2 white in front and 2 red in back) ?</p><p>- I want to transmit the ambiant T&deg;C (with KTY10-6 sensor) via Bluetooth (with [url=http://remotexy.com/en/examples/]RemoteXY[/url] ) but I don't know what pin I must use (motorShield use many! )</p><p>Many thanks</p><p>Cheers</p><p>Gilles</p>
Thanks Gilles - if the pins are being used to drive a motor (in this example motor 3 and motor 4 aren't used), then you can definitely hook them up to LEDs.<br><br>Thanks,<br><br>TinyCircuits
<p>Hello TinyCircuits's team,</p><p>with your new CPU board with LiPo charger, is it always needed to wire boards as you show on the picture ? (+)</p>
You will still need to wire between the boards, since the Motor x4 TinyShield has dedicated power pin for the motor voltage. So you'll still need to connect this pin up to the battery voltage.<br><br>Thanks,<br><br>TinyCircuits
<p>Many thanks ;)</p>
<p>Many many thanks TinyCircuits,</p><p>as soon as I receive my TinyCircuits's order I try this code with a small scaling value ;) (4.2V=100%, 3.2V=0% for 1S LiPo battery)</p><p>Cheers</p><p>Gilles</p>
Yes, you can measure the current battery voltage by using the ADC to read the current power rail (the battery is directly connected to the processor power pin). Here is code that will let you do this in your sketch:<br><br>https://code.google.com/p/tinkerit/wiki/SecretVoltmeter<br><br>Thanks!<br><br>TinyCircuits
<p>Hi TinyCircuits team,</p><p>how could it be possible to permanently control the battery level ?</p>
Not quite sure what you mean by controlling the battery level, can you explain a little more?<br><br>Thanks,<br><br>TinyCircuits
<p>I've discovered this amazing app http://remotexy.com/en/examples/ that works very well with a RN42 Bluetooth module and I can make a level indicator with it on the Smartphone interface. So I would like to send the battery level to the Smartphone...</p>
<p>Hi Carol - I've just checked this and the links are working, you can find them in step 3 of the project.</p><p>Thanks!</p>
<p>Hi, the link to download the sketch seems to be missing. I see Guillaume asked for the same and it was possibly fixed a month ago, but today I could not find it. Is it possible to get a copy of it? Thanks!</p>
<p>Hi Guillaume - sorry about this, the links have been fixed. Thanks!</p>
<p>Thanks!</p>
<p>Hey,</p><p>This is a very interesting project, unfortunately the links to sketches seem dead. Is it possible to have a copy of it? I'm also working on a similart project and am interrested to see the code you are using.</p><p>Thanks!</p>
<p>Very cool project!</p>
<p>This project is very unique!!!! great job!</p>
<p>This is one of the coolest projects I've seen in a while! Well done. </p>

About This Instructable

12,610views

58favorites

License:

More by TinyCircuits:Tiny GPS Tracker TinyFanBoat TinyHoverCraft 
Add instructable to: