IMU/SEN-10121

From PaparazziUAV
Jump to: navigation, search

SparkFun SEN-10121 6 DOF IMU

IMU Digital Combo Board - 6 Degrees of Freedom ITG3200/ADXL345

http://www.sparkfun.com/products/10121

Description

This is a simple breakout for the ADXL345 accelerometer and the ITG-3200 gyro. With this board, you get a full 6 degrees of freedom. The sensors communicate over I2C and one INT output pin from each sensor is broken out. If you need a simple and tiny board that gives you 6 degrees of freedom, this would be a good choice.

Features

  • Tiny!
  • Two mounting holes
  • ADXL345 accelerometer
  • ITG-3200 gyro
  • 3.3V input
  • I2C interface

Configuration

This IMU has been tested and flown with Tiny v2.11 and TWOG. It is very similar to the PPZUAVIMU but lacks the magnetic sensor.

In the firmware section of the airframe add the following entries

		<subsystem name="imu" type="ppzuav"/>
		<subsystem name="ahrs" type="float_dcm"/>

The following configuration will be a good starting point for anyone starting out with this IMU

	<section name="INS" prefix="INS_">
		<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
		<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
	</section>

	<section name="IMU" prefix="IMU_">
		<!-- Calibration Neutral -->
		<define name="GYRO_P_NEUTRAL" value="0"/>
		<define name="GYRO_Q_NEUTRAL" value="0"/>
		<define name="GYRO_R_NEUTRAL" value="0"/>
		
		<!-- SENS = 14.375 LSB/(deg/sec) * 57.6 deg/rad = 828 LSB/rad/sec / 12bit FRAC: 4096 / 828 -->
		<define name="GYRO_P_SENS" value="4.947" integer="16"/>
		<define name="GYRO_Q_SENS" value="4.947" integer="16"/>
		<define name="GYRO_R_SENS" value="4.947" integer="16"/>
		
		<define name="GYRO_P_Q" value="0."/>
		<define name="GYRO_P_R" value="0."/>
		<define name="GYRO_Q_P" value="0."/>
		<define name="GYRO_Q_R" value="0."/>
		<define name="GYRO_R_P" value="0."/>
		<define name="GYRO_R_Q" value="0."/>
		
		<define name="GYRO_P_SIGN" value="1"/>
		<define name="GYRO_Q_SIGN" value="1"/>
		<define name="GYRO_R_SIGN" value="1"/>
		
		<define name="ACCEL_X_NEUTRAL" value="1"/>
		<define name="ACCEL_Y_NEUTRAL" value="0"/>
		<define name="ACCEL_Z_NEUTRAL" value="0"/>
		
		<!-- SENS = 256 LSB/g @ 2.5V [X&Y: 265 LSB/g @ 3.3V] / 9.81 ms2/g = 26.095 LSB/ms2 / 10bit FRAC: 1024 / 26.095 for z and 1024 / 27.01 for X&Y -->
		<define name="ACCEL_X_SENS" value="37.9" integer="16"/>
		<define name="ACCEL_Y_SENS" value="37.9" integer="16"/>
		<define name="ACCEL_Z_SENS" value="39.24" integer="16"/>
		
		<define name="ACCEL_X_SIGN" value="1"/>
		<define name="ACCEL_Y_SIGN" value="1"/>
		<define name="ACCEL_Z_SIGN" value="1"/>
		
		<define name="MAG_X_NEUTRAL" value="0"/>
		<define name="MAG_Y_NEUTRAL" value="0"/>
		<define name="MAG_Z_NEUTRAL" value="0"/>
		
		<define name="MAG_X_SENS" value="1" integer="16"/>
		<define name="MAG_Y_SENS" value="1" integer="16"/>
		<define name="MAG_Z_SENS" value="1" integer="16"/>
		
		<define name="MAG_X_SIGN" value="1"/>
		<define name="MAG_Y_SIGN" value="1"/>
		<define name="MAG_Z_SIGN" value="1"/>
		
		<define name="BODY_TO_IMU_PHI"   value="RadOfDeg(0)"/>
		<define name="BODY_TO_IMU_PSI"   value="RadOfDeg(0)"/>
		<define name="BODY_TO_IMU_THETA" value="RadOfDeg(0)"/>
	</section>