Wednesday, December 15, 2010

Some progress

First off, some of my own joystick code, mostly messing around.
Basically the joystick controls a "ship" to fly around with 6DOF (and afterburner! :P)
The sample code is a bit challenging, as I've never seen/dealt with the .dict or .type attribute before, or the 'pass' or chr() command, but that's just something I'll have to read up on. I'll do that and comment out the code later this week probably.

I also was playing with the killswitch stuff yesterday. On the radio controller board, when a button is pressed, I discovered that it maintains the corresponding output 'high'. The only way to cut that signal is to cut power feeding the board. This means pressing the button can only turn ON the N-channel FET, but not off. I think we may need to use a P-channel FET instead if this IS supposed to be a killswitch. Also, the diode is supposed to go in inverse parallel with the load, right?(cathode to positive, anode to negative/ground/drain) For the regulator I have a cap from each leg to ground.
EDIT: Nevermind, it all works now. Turns out the little remote is fussy about the voltage it needs. If it's below 5V it can only turn on but not off. The wallwart i was using was to weak for my load, so when I pressed the remote button, the voltage to the device dropped below 5v and wouldn't shut off. I stuck a cordless drill battery in there instead and now it works perfectly! :D

Tuesday, December 14, 2010

To Do Tasks 12/14/2010

We spoke previously about tasks for you guys to tackle on the robomagellan project in preparation for getting started. I will summarize to the best of my understanding and perhaps add a few more.

Tasks for everyone.

Install the following python software:
  1. Python 2.6.6
  2. pyserial for 2.6
  3. pygame for 2.6
Install the following Embedded programming software:
  1. Arduino 0021

1. Breadboard, test and build the remote kill switch.
2. Get the joystick working with pygame using the sample code I posted. Go through and comment the code to show you understand what it is doing.
3. Use pygame to display a map of the area we will be testing. We will be using a park area on campus on the east side of the ag compound. The following image is from google maps.
4. Create an image of the robot on the map that you can move around using the robot. The next step will be to integrate this with the GPS info. I think I have another usb GPS floating around that you can play with.

1. Document all the network stuff that you have done on this site. Make sure all the libraries listed above are installed on the netbook and remove any old versions etc.
2. I will drop off an Arduino board for you to play with. When you get it work through the tutorials here:
3. Take a look at the code here AFTER the tutorials where I demonstrate using interrupts. Play with the hardware you have to make this work.

1. Test the various code I posted on my website about each of the devices. (GPS, compass, IMU)
2. Review this overview paper.
2. Take a look at this project and implement it:
The picture at the bottom is especially instructive. It solves several of the problems addressed in the overview paper. Be sure to follow the link. You will have to change the channels on the IMU since ours is slightly different but other wise the code should just drop in.
3. Align one of the axis of the gyro with the compass physically. (More velcro?) Plot the gyro data over a long time span (~30 seconds) measure the drift. Write some code on the PC in python to correct the gyro drift based on the compass reading.


Monday, December 13, 2010

Project Libraries

For this project I would recommend the following libraries.
  1. python 2.6 (main programming environment)
  2. pyserial (Serial IO)
  3. pygame (fast 2D mapping and input) OR vpython (3D mapping and input)

All of these exist in both windows and linux versions which means we can easily port our code from the netbook to an embedded platform. While you are all familiar with vpython, pygame is a much faster library which is optimized for 2D graphics. (Perhaps our maps can be reduced to 2D)

I have posted some sample code for using a joystick in pygame at:

Friday, December 10, 2010

Welcome to the Robomagellan Project

Information so far is available at