Let's Make Robots!

Bluetooth Remote Control Treaded Chassis

Controlled via phone accelerometers and Bluetooth
RC_tank_no_PWM_schematic.pdf36.09 KB
RC_tank_no_PWM_ATtiny2313.c3.43 KB
RC_Tank_no_PWM_NokiaE75.py_.txt3.61 KB
Serial_Control.vi_.txt39.71 KB
Bluetooth_and_accelerometer_RC_tank_with_PWM.zip40.73 KB

This is my first robot using an Atmel ATtiny2313 Microcontroller.  It uses an L298N H-bridge with no PWM, with plans to add PWM.  I've included schematic and code in the files.  The high current/low voltage Tamiya motors were swapped out for Solarbotics RM3 motors.  The gearbox is a Tamiya Twin motor gearbox.  The Bluetooth module is the Roving Networks RN-41-SM and is available at Mouser.com for $45.

The Cell phone is programmed in Python for S60 v2.0.0.  The computer program is a LabVIEW 8.20 virtual instrument control.  Remove the _.txt extension when using these two files.



 I've added PWM for independent speed control of each motor as a function of accelerometer values in the phone.  The last video shows a demonstration of the PWM version.  The zip file 'Bluetooth_and_accelerometer_RC_tank_with_PWM.zip' includes all PWM version code and updated schematic.  This revision was mostly changing code - the only hardware changes was the addition of a couple of wires to connect the PWM outputs of the microcontroller to the enable inputs of the H-bridge, which required moving a couple of IO pins to get at the necessary dedicated PWM pins.

The improvements made to this revision:

  • PWM
  • Graphical accelerometer feedback on phone python script
  • Bluetooth automatically turned on when off in python script (before it failed when BT was off)
  • New communication scheme to transmit direction and PWM commands to vehicle - has the form {<dir><left PWM><right PWM>}
  • Automatic shutoff - microcontroller firmware stops the motors if no commands are received within 100ms (accomplished with 16-bit timer), which prevents the robot from continuing to move when the Bluetooth connection is terminated or fails. This requires the phone to transmit constantly.

You may also notice it looks more responsive. That's because I was using a lowpass filter when reading accelerometer data in the first revision, oops!


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What do you plan next?

Haha, I've got a few ideas including:

  • Optimus prime like bot
  • roboballer (arcade style minibasketball game turned telerobot)
  • quadrocopter and eventually with collective pitch
  • Robot with Wifi camera/remote control and an arm
  • Remote control lawnmower
  • self-balancing

so many ways to go!

Great setup my friend.  Works great with the cell and bluetooth.  I wish I could do it with my iPhone 4,unless it would have been jailbreak, your cell works on Android I presumed. Thanks for the explanation :)

First of all, do you need a data plan for this to work on your phone, second, does this work with HTC, third, can I do it with an Arduino Duemilinove?


  1. no data plan necessary
  2. my code works with Symbian Series 60 operating system
  3. arduino will work buy you may need to modify the code

So far I have only programmed a Nokia phone running Symbian operating system.  I will eventually port the cell phone code to Android operating system as Python is available on that platform as well.

Hi, this is great, I specially liked what you did with your phone's accelerometer.

I have the same bluetooth module and my question is how robust is this module, I mean do I really have to worry about static discharges and also what precautions do I have to take while I solder wires to the pins?    


When I've soldered the bare module (RN-41) I used a grounding strap, although I don't think I was in a static prone area (I've previously made a breakout board for the RN-42).  I also followed the soldering temperatures specified in the datasheet, which requires a temperature controlled soldering iron- I had to leave the iron on the pin for about 30 seconds for it to warm up, and longer on the grounds.  If you are using the RN-41-SM which is already broken out then I'm sure you can use higher soldering temperatures with it at the breakout pins.  The module is probably pretty robust to harsh treatment but I'm more paranoiod than most people :)

Alright, thanks a lot you take some weight off my back,  of couse I'll still be cautious

and yeah I was starting to get a little paranoid myself.

Well thanks again and hope you continue doing cool stuff like this.  


Hi again, I got into a project and I need to comunicate various cell phones with the bluetooth module and I was wondering which mode of operation did you set it to ? (as to SM0, SM1, etc). Which bluetooth profiles do the cell phone has to support to do so?
I will be programming in Java do you have any suggestions? I'm new at doing cell phone apps.

Thanks, and sorry for asking that many questions.