Bluetooth MSP430 Tank

 

 

Ever wanted to control a tank with your phone?  Well, here’s one way to make it happen.

Parts:

  • MSP430 Launchpad with msp430g2553 chip.
  • Wireless Bluetooth V2.0 RS232 TTL Tranceiver Module
  • Motor Drive Booster Pack  You’ll need to make this yourself unless the guy (Parker Dillmann @ longhornengineer.com) who designed it starts selling them.  I used oshpark.com to print the board, and mouser.com to order the parts.
  • A Tank with 2 motors.  You’re on your own here, but I bought my tank treads and motors at Pololu.com, and built the chassis out of scrap and legos.
  • Some sort of battery (I used a 6.2V NiCd from another RC vehicle).
  • And of course, an android phone.

Here’s the code for the launchpad:

main.c    The port connections are all described in the code.

You will also need uart.c from the longhornengineer.com site.

Here’s the APK for the little android app I wrote to control the thing:

MSP430Tank.apk

Here’s the code.  (As I mentioned it’s pretty rough, a cobbling together of various stuff from the internet and old projects I’ve written in the past.)

It’s just two sliders to control each motor and a menu item to connect to the bluetooth device.  It actually took some pretty tricky coding to the get the interface right, and I learned a lot about android bluetooth and multitouch programming in the process.  I can post the code if anybody is interested, but it is pretty rough (see above).

All in all, a fun project where I learned a lot as usual.  Next step might be to add some sensors.  Or maybe a really bright LED and then have a control on the phone to flash it at people.  Anyway, here’s a little video of the setup in action:

 

 

This entry was posted in Electronics Projects. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

5 Comments

  1. Posted January 29, 2013 at 2:11 AM | Permalink

    I am working on a bluetooth controlled RGB led controller.I havent been able to get the android app working right yet.Is it possible that you can post the code for the android app??

    Heres a link to my project https://murlidharshenoy.wordpress.com/2011/12/25/bluetooth-controlled-rgb-led-strip/

    • mike
      Posted January 29, 2013 at 8:53 AM | Permalink

      See code above. However, I’d probably recommend some other examples for android/bluetooth programming (I didn’t write that part, just hacked at it until it worked in my app). Good luck!

  2. paco
    Posted January 29, 2013 at 5:10 AM | Permalink

    Code for the app please!

    Neat build btw.

    • mike
      Posted January 29, 2013 at 8:50 AM | Permalink

      Thanks, I added the code above.

  3. Posted January 30, 2013 at 12:10 AM | Permalink

    Hey Mike!

    thanks for posting the code!
    btw the link seems broken.

    This link worked for me!
    http://www.remotepinyon.com/software/msp430/DualMotorControl/MSP430Tank_AndroidApp.zip

    Cheers! :)

One Trackback

  1. By » TI MSP430 tank Fuzzy Hypothesis Online on February 1, 2013 at 11:34 AM

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>