Ever wanted to control a tank with your phone? Well, here’s one way to make it happen.
- 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:
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: