C# “Software Joystick”

We’ve hacked together a C# program in Visual Studio 2005  that writes motor commands like #+20-15; (motor 1 200 forward, motor 2 150 reverse). The serial port has Xbee connected to it. The only tricky part was the motor equations below.
double radians = Math.Atan2(dy, dx);radians = radians + Math.PI / 2;
m1 = (int)(Math.Abs(dx) * Math.Sin(radians) + Math.Abs(dy) * Math.Cos(radians));
m2 = (int)(Math.Abs(dy) * Math.Cos(radians) – Math.Abs(dx) * Math.Sin(radians));
(Equations from David “Wild Shot”)
Eventually we abandon the idea of control with a PC and created our own remote control with a second Arduino Duemilanove, XBee shield, XBee and Wii nunchuck. Thanks to ThingM (http://thingm.com/ and fungizmos.com (http://store.fungizmos.com/) getting the Wii nunchuck was easier to get working then getting the old-school PC joystick that we tried too.  
Advertisements

The Prototype “LV Tanker”

The first prototype with working Arduino, Adafruit motor shield, XBee, XBee adapter, motor power pack and 9V Arduino power, plus the Arduino sketch and Windows controlling program. The first try was buggy but working. Update: It turns out that the rechargeable power pack (from a swiffer) used to run the 2 DC motors was overheating the H-bridge on the motor shield. After switching to 4 AA batteries everything ran smoothly and we were able to drive it around the house. But eventually we burnt out the motor shield.

XBee Adapter Kit

Making the XBee adapter … shown about 1/2 done. After configuring with a TTL cable and testing, the motor shield and the XBee adapter (both from Adafruit) were easy to get working together. (We were able to get analog pins 14-19 working fine as digital pins but could not get NewSoftSerial to read more then 2 chars in a row without errors so we went back to pins 0 and 1 which worked fine).

Fabricating Parts


We have made 6 aluminum axils that are attached with nylon chain and turn in brass bushings. We are using nylon, aluminum and Lexan polycarbonate sheet to keep the weight down.

Initial Design

Prototype design of “The LV Tanker” – Blender perspective screenshot and underside render

 The initial design done in Blender is a dual motor, 6-wheeled tractor controlled by an Arduino Duemilanove, remote controlled using XBees and a laptop. We are big Blender fans and have a lot of fun making things that are not real.