Difference between revisions of "ArduIMU"

From PaparazziUAV
Jump to navigation Jump to search
Line 1: Line 1:
This page describes how to integrate an ArduIMU into an existing Airframe/Paparazzi-Code.
This page describes how to integrate an ArduIMU+ V2 (flat) into an existing Airframe/Paparazzi-Code.
#The ArduIMU communicates over I2C with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V.
#The ArduIMU communicates over I2C with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V.
#The integration into the software is realized as a module. That is an easy way to connect and test new software.  
#The integration into the software is realized as a module. That is an easy way to connect and test new software.  
Line 5: Line 5:
#There is an other airframe/main-AP we wrote wich uses a magnetometer for yaw-drift compensation. We didn't write an installation guide like this yet. But we try to do this as soon as possible.  
#There is an other airframe/main-AP we wrote wich uses a magnetometer for yaw-drift compensation. We didn't write an installation guide like this yet. But we try to do this as soon as possible.  


You can download the code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].
The Code has been integrated into the Paparazzi build system. Find the original ZHAW code [https://home.zhaw.ch/~schmiemi/Arduimu4Paprazzi.rar here].


== Airframe Adjustments ==
== Airframe Adjustments ==
Line 12: Line 12:
* (1) Insert the module:
* (1) Insert the module:
  <modules>
  <modules>
   <load name="ArduIMU.xml"/>
   <load name="ins_arduimu.xml"/>
  </modules>
  </modules>


* (2) Activate "i2c" and "modules"
* (2) Activate "i2c"
ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
  <target name="ap"    board="...">
  ap.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150
          ...
  ap.CFLAGS += -DUSE_MODULES
  <define name="USE_I2C0"/>
  </target>
  <subsystem name="i2c"/>


== Copy the Modules and other Data ==
* (3) Have INS neutrals


conf/modules: "ArduIMU.xml"
<section name="INS" prefix="INS_">
  <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
  <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
</section>


* (3) Copy "ArduIMU.xml" into the directory "conf/modules/"
* (4) Use settings/tuning_ins.xml
 
sw/airborne/modules/: "ArduIMU"
 
* (4) Copy the directory "ArduIMU" into the directory "sw/airborne/modules/"


== Flash the ArduIMU ==
== Flash the ArduIMU ==


* (5) Flash the ArduIMU with the adapted software. For information concerning flashing of the IMU, read:
* (5) Flash the ArduIMU with the adapted software in '''sw/airborne/firmwares/helper/arduimu_Firmware_WithGps'''. For information concerning flashing of the IMU, read:


http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6
http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6


Have Fun !
Have Fun !
Please note that there was a major revision to the paparazzi i2c drivers in early September 2010. As the ArduIMU code is written for the former drivers, it will not work on a paparazzi installation updated after 1 September 2010 (it will work on a paparazzi installation updated before then). To work with the new transaction-based i2c drivers, the ArduIMU code will need to be revised.

Revision as of 04:14, 24 October 2010

This page describes how to integrate an ArduIMU+ V2 (flat) into an existing Airframe/Paparazzi-Code.

  1. The ArduIMU communicates over I2C with the Paparazzi-AP. The wiring is pretty easy to do. Connect SDA, SCL, ground and supply the IMU with 5V.
  2. The integration into the software is realized as a module. That is an easy way to connect and test new software.
  3. This Guide/Software is made to use the ArduIMU without separate GPS-Receiver and without Compass/Magnetometer. The GPS-Data is sent by the Tiny 2.11 over I2C to the IMU.
  4. There is an other airframe/main-AP we wrote wich uses a magnetometer for yaw-drift compensation. We didn't write an installation guide like this yet. But we try to do this as soon as possible.

The Code has been integrated into the Paparazzi build system. Find the original ZHAW code here.

Airframe Adjustments

conf/airframes: "MyAirframe.xml"

  • (1) Insert the module:
<modules>
  <load name="ins_arduimu.xml"/>
</modules>
  • (2) Activate "i2c"
<target name="ap"    board="...">
          ...
  <define name="USE_I2C0"/>
</target>
<subsystem name="i2c"/> 
  • (3) Have INS neutrals
<section name="INS" prefix="INS_">
  <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
  <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
</section>
  • (4) Use settings/tuning_ins.xml

Flash the ArduIMU

  • (5) Flash the ArduIMU with the adapted software in sw/airborne/firmwares/helper/arduimu_Firmware_WithGps. For information concerning flashing of the IMU, read:

http://code.google.com/p/ardu-imu/wiki/HomePage?tm=6

Have Fun !