ITG-3200 value conversion

By peter_schottmann , 27 November 2011

Hi,

I want to get angular rate form a ITG-3200 (on an ATMEL Inertial 1 sensor board) and what I do is the following (for simplicity I do not care about bias and drift in the first step, but I am aware of such problems):


void ITG3200_readGyroRaw(int16_t *_GyroX, int16_t *_GyroY, int16_t *_GyroZ) {
readmem(GYRO_XOUT, 6, buffer);
*_GyroX = (((int16_t)buffer[0] << 8) | buffer[1]);
*_GyroY = (((int16_t)buffer[2] << 8) | buffer[3]);
*_GyroZ = (((int16_t)buffer[4] << 8) | buffer[5]);
}

void ITG3200_readGyro(float *_GyroX, float *_GyroY, float *_GyroZ) {
int16_t x, y, z;

ITG3200_readGyroRaw(&x, &y, &z);
*_GyroX = x / 14.375;
*_GyroY = y / 14.375;
*_GyroZ = z / 14.375;
}


This results in angular rates that look quite good - qualitatively. But the values are much to big (~factor 10). With only slow rotation of my board I get the values up to 2000 °/s.

Anyone an idea where's the fault in my conversion? Is my sensor broken?
phpbb Topic ID
13968