SparkFun 9DOF IMU + Arduino Issues

So I got one of the SparkFun 9DOF IMUs and wanted to read the data through my duemilanove, however even though I've connected it all together, I can't seem to get a valid reading(or figure out how to hit all the sensors) from the IMU. There seems to be little documentation on this board out there other than that it dumps it's information via a serial interface out of one pin.

Since I'm new at this, I figured I'd come over here and ask to see if anyone had any hints or tips or general advice for this problem as well as information for starting out.

Thanks in advance for anything!

can't seem to get a valid reading

Do you know what a valid reading should look like?

How far from this ideal are the readings you're getting?

Can you post your code?

The reason I say it's not a valid reading is because I just keep getting the value of '1023' and I don't feel like this is a measurement of anything since it does not change if I change the axis of the board. My code is as following, it's pretty just the analogInput sketch...

void setup() {
  Serial.begin(115200);
  analogReference(EXTERNAL); 
 }
 
 void loop() {
   long analogValue = analogRead(0);
  
   Serial.print(analogValue);
   Serial.println("");  
   delay(100);
 }

Since this board outputs everything in a serial stream, would I need something like a MAX232 to understand the stream coming from the IMU?

Now I'm confused - what have you connected your analogue input to?
According to the Sparkfun site, this board outputs serial data at 38.4Kbps, though you could download your own code to it yourself, and not bother with the 2009.

I've connected the Tx pin from the IMU to the Analog pin 0 on my Arduino so that I can read the stream it's supposed to dump out.

serial is not analog, its a stream of on off digital pulses

serial is not analog, its a stream of on off digital pulses

So I should be connecting this to a digital input instead? When looking at a couple of diagrams I found for the 6DOF IMU they were connected to an analog pin.

No, you are going to have to do serial reads one character at a time and then assemble the characters into values. You will need detailed information on the serial protocol that the device uses. I'm sure SparkFun must provide some information or examples?

EDIT: Here is a link that has Arduino code to work with this device:
http://code.google.com/p/sf9domahrs/

Lefty

After doing some more reading and the looking at the linked code, it seems I just may have everything hooked up wrong, I've uploaded this code and tried to run it, however, it's unable to hit the accelerometer which is an I2C device, from what I've read this means that it needs to be on analog pins 4 or 5 (I think), so I'm going to give that a go and see what happens.

Is there an easy way to look up the hardware address of given devices in an I2C design?

The way I read the datasheet, everything comes out via a serial link at 38400 bps; the onboard AVR does all the I2C and analogue conversions for you, and chucks it all out via the serial.
Are you sure we're all talking about the same device?

The way I read the datasheet, everything comes out via a serial link at 38400 bps; the onboard AVR does all the I2C and analogue conversions for you, and chucks it all out via the serial.
Are you sure we're all talking about the same device?

That's what I was under the impression of. After reading about the device I thought I could just hook it to an analog pin, perform a read and get some data, but after the new code that I used from the SparkFun site, I'm getting errors reading the accelerometer which is an I2C device, so I'm try to isolate whether or not this is an issue. Probably should have started with an easier project for the first time...

Now I'm even more puzzled - are you using a 2009, or are you downloading your code straight to the Sparkfun board?
Looking at the schematic, how are you connecting to the I2C?

I am using a 2009 with the code posted at Google Code Archive - Long-term storage for Google Code Project Hosting. to read the IMU board. However when I run the code I get various errors claiming "!ERR: Acc Data". Perhaps this code is not meant to be used on a 2009, and is replacement code for the actual IMU itself?

Hi!

I'm also having 9dof issues.

I've got a Razor 9DOF IMU connected to a Duemilanova atmega328 through pins 2 and 3.

The Duemilanova atmega328 is connected to a PC through the USB.

I'm trying to talk to the IMU with the PC so I can figure out what the IMU is actually doing. I hope to help improve documentation for other developers doing exactly the same thing.

I've been trying to use NewSoftSerial without much success.

Can one of you delightful, patient experts please tell me how to do what I'm trying to do?

Thank you!