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.