MechWarrior Bot

Fri Nov 13 00:00:17 2009 by Eric Hokanson
Modified Mon Apr 30 06:42:56 2012

Electronics

After spending some time with the Bot Board II we grew more and more dissatisfied with it.  It wasn't the board itself, which was designed quite well, but the choice of processor they used.  The Basic Atom Pro just had too many issues in both its operation as well as the software used to write programs.  Enabling things like hardware servo or serial support would stop other features from working like PWM or pulsin/pulsout.  In addition the BASIC language is not fun to work with, at least half of the manual was wrong, and programs were breaking when updating from one minor revision to the next.

I had always been interested in the Arduino project and decided to go ahead and order a Duemilanove along with a Renbotics ServoShield.  The Arduino's large collection of libraries and stable C++ like language was a big improvement over the BASIC language of the Atom Pro.

The kit came with a wireless PS2 controller which worked quite well but we needed to transition away from that and talk to it via serial port.  I managed to compile a custom Cyanogen kernel for our HTC Android phones that gave us access to the serial port on the bottom of the phone.  I whipped up a net enabled serial port Android application and we were soon walking the robot around the room over the internet.

Later in the development stage our Android phone was upgraded to the Nexus One for its improved camera and additional processing power.  However, this left us without a hardware serial port.  To solve this problem we went with a Bluetooth Mate, which works well with Android 2's improved bluetooth stack.

In order to fire the Airsoft guns we needed to drive two DC motors.  You can't do this directly from the board because they can't supply the needed power.  After trying a few different solutions we settled on the TI SN754410 Half-H Driver chip.  You can use it to drive up to four items with a combined current under 2A with TTL logic inputs.  We designed a nice circuit on the provided breadboard space of the ServoShield.

Software

The rules state that the operator of the mech cannot look directly at the mech while competing.  All operations must be done through a camera.  To do this we had a rather complicated setup that looked something like:

[Client] -- 802.11g --> [Android Phone] -- Bluetooth --> [Arduino]

For our client we went with Processing which is very easy to work with and compliments both Android and Arduino very well.  We whipped up a quick app that displays the video from the phone, has some crosshairs, and displays a bunch of sensor data.

After starting with a G1 and myTouch, we finally settled on a rooted Nexus One.  We wrote a custom built JNI C library to capture and compress the framebuffer.  This was read by our custom Android app that did the communication and image processing.  We started on a vision tracking system

We open sourced our entire project and you can find it at its Google code page under the name destroyallhumans.

Competition

We entered our robot "Miss Alignment" into the 2010 games in San Mateo, CA.  They had build an awesome little city scape arena for the mechs to walk around in.  Unfortunately we had constant problems with communication as there were 100s of 2.4GHz sources in the same building.  We were greatly out matched in firepower as well.  We learned a lot, had a great time, and hope to compete again next year with many improvements.

<< Prev Page
blog comments powered by Disqus