Wednesday, April 11, 2007

Progress for Sensor team

Hi guys,
first of all, thanks to Ian, tianyi and Karan for putting in the work when I had prelims.
Turns out the newer higher order MFB filter that we built, also has a similar attenuation problem. So basically we need to think again about what we need to do. We have all the documentation for this MFB filter with us, so we can proceed from there.

Monday, April 2, 2007

MedusaLite BETA

I've just finished upgrading MedusaLite to BETA (meaning that it is now in a testable phase, able to interface with the entire segment that the meches just built today). As for all changes, refer to the SVN log.

Issues to be addressed:

Concurrency - Needs to be tested to make sure all functions are blocking

I2C Read / Writer&Read - Still having problem reading back from servos, until this is solved, I have implemented a CONFIG file that will hold the position of the arm (as far as the PC knows). I have just finished writing and testing a serial interface for i2c communication (pc -> uart -> mega32 -> i2c), it works for all read/write on the tiny26 adc and servo controller registers, this will serve as a backup, but it is pretty quick and efficient.

Safeguards - Create safeguards so the wires don't snap (i.e. limit the position between two thresholds) or slide off the gear.

Precision - Need to do something about the twitching of the servos, more precisely Servo 0 and 2.

Servo Controller Memory - The servo controller "forgets" the previous settings given to it through the I2C, so need to be very careful when power cycling the servo controller. You must first turn it off, take out the servo motor connection, turn it back on, send the correct settings through I2C then plug the motors back in. Failure to do this might risk damaging the arm, as the powerful motors will reset to 1500 (which is not neutral).

Week of April 1st through April 7th

This is a weekly report entry, please use the comments to list what you have been doing and the progress you've made. If you cannot access this blog, send me an email ASAP.

Just make comments as you go through the week.

Note: Since we just started this, we will include the whole last weekend in this report as well.

Update (4/3):

Please remember to also include the number of hrs you spent on each task.

Friday, March 30, 2007

Sensor team

The gain for the filter's OK but the cutoff is pretty bad ... it doesn't attenuate properly. We're gonna build a higher order with the same cutoff...two or more op-amps together should do it.

So we're meeting Sunday to talk about it. Everyone should come.

I2C Blocking/Concurrency Problem

I've just started testing how well the i2c functions for the Connii works when we query data on the i2c bus very quickly and right now it seems to have problems with it.

If I'm querying the battery information from the servo controller consecutively (with a 1 ms delay between each queries), I find that it works for about 2-4 queries. Then I would get an exception ("There is no slave responsible for this I2C address"), originating from the native function of the teleos.I2cApi.Java.I2cApi (which basically means that its a C/C++ function wrapped with Java).

I'll try to use a thread and time it to find out what's the max delay time.

Update (3/31):

Weird thing is that this doesn't happen when I query ADC data from the Tiny, so it makes me think it might not be Connii's problem. But when we tested the servo controller and did continuous reads through a mcu, it was fine.

Update (4/1):

We've found the root of the problem as being that the I2C api does not allow the sending of consecutive bytes (start->address->data->data->data....) when passing a byte array versus passing a Vector of bytes.

Sunday, March 11, 2007

I2C Communication Problem

There's a problem with using the Connii's Java API. It only allows a single byte as an address, but bytes are signed. Basically for the servo controller whose address is 0xc2, Java interprets it as an int thereby forcing you to cast it as a byte, but that turns it into -62, which the Connii interprets as 0xffc2 which is not a valid 7-bit address. I've emailed Telos tech support about this.

If this doesn't work it leaves us with a few options:
1.) Use Connii's C API and SWIG it.
2.) Use a MCU with a byte addres between 0 and 127 to act as a translator.
3.) Build our GUI with C/C++
4.) Go back to the idea of emulating I2C with serial port in Linux

I just heard back from the tech support:

"I2C supports only addresses from the range 0..127. For all other addresses you will get an exception. Some data sheets are using I2C addresses in an 8-bit format. To get the real address simply shift this address one to the right."

So basically the Connii API wants us to input 7-bit addresses, so we just need to right shift 0xc2 to 0x61.

Saturday, March 10, 2007

Sensor team filter

The filter works and has a gain of 50, just like we designed it to be. So that's a success. Let's meet in the superlab on Wednesday to test the cutoff and try out the potentiometer. Ayan, could you get permission to work on Wednesday?

-Aditya

MedusaLite - Compile Info

I've updated the MedusaLite in the CS repository, it should run. But you need the following:

Eclipse 3.2.x (http://www.eclipse.org/) - http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.2.2-200702121330/eclipse-SDK-3.2.2-win32.zip

JDK SE 6 (http://java.sun.com/javase/downloads/index.jsp)

JOGL (https://jogl.dev.java.net/) - http://download.java.net/media/jogl/builds/nightly/jogl-1.1.0-pre-20070310-windows-i586.zip
To install, place the *.jar files in C:\Program Files\Java\jre1.6.0\lib\ext and C:\Program Files\Java\jdk1.6.0\jre\lib\ext, then place the *.dll files in C:\Program Files\Java\jre1.6.0\bin and C:\Program Files\Java\jdk1.6.0\jre\bin.

Subversion (SVN) Repostory

A few ways to access the SVN:

Subclipse (an svn plugin for Eclipse) - http://subclipse.tigris.org/
tortoiseSVN (a windows shell extension of a powerful svn client) - http://tortoisesvn.tigris.org/
cygwin (a linux environment in windows) - http://www.cygwin.com/

Our SVN Addresses:

http://cusnakearm.svnrepository.com/svn/CS
http://cusnakearm.svnrepository.com/svn/ECE

CU Snake Arm Team's Blog Created

CU Snake Arm Team's blog for posting information and updates.