ArduIMU

From PaparazziUAV
Jump to navigation Jump to search
Tiny13 w/IMU

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. Do not connect 3.3V from the Paparazzi-AP to the ArduIMU as it internally generates it's own stable 3.3v supply.
  2. Integration into the Paparazzi software is realized as a module. This is an easy way to connect and test the software.
  3. This description shows how to use the ArduIMU without a separate GPS-Receiver and without a Compass/Magnetometer. The GPS-Data is sent by the Paparazzi-AP over i2c to the ArduIMU.
  4. There is an other airframe/main-AP we wrote which uses a magnetometer for yaw-drift compensation. We haven't written an installation guide for this configuration yet. But we will try to do this as soon as possible.

The Code has been integrated into the Paparazzi build system.


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) Insert 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 this "Settings" file: settings/tuning_ins.xml
  • (5) Remove the infrared estimation
remove this:
<subsystem name="attitude"         type="infrared"/>

Magnetometer

Please post Magnetometer integration guide


Flash the ArduIMU

(6) Programming the ArduIMU for use with the Tiny includes using :

  1. Adapted software in sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps.
  2. Standard USB FTDI cable plugged into the header that comes with the arduimu (Match the wire colors with those written on the arduimu silkscreen GRN=Green BLK=Black)

Steps:

  • Plug in USB FTDI Cable to PC and ArduIMU (this also provides power)
  • On ubuntu 10.04 installation of the arduino software is as simple as :
 $ sudo apt-get install arduino
  • Now launch the arduino IDE :
 $ arduino

(TODO: Using the graphical interface is probably not necessary as the flashing seems to use avrdude command line utility)

  • open project/sketch (File->open , point to paparazzi/sw/airborne/firmwares/non_ap/arduimu_Firmware_WithGps/arduimu/arduime.pde)
Arduino open sketch.png
  • clicking "verify" button compiles
  • clicking "upload" button flashes (may need to select your com port in menu Tools->Serial Port)

For more information concerning flashing of the ArduIMU, read: http://code.google.com/p/ardu-imu/wiki/Code

Do we still need this or is everything in git now?

You can find the original ZHAW code here.

Hardware Considerations

So far, this setup has been successfully flown in the Maja and EasyStar aircraft. For faster more agile aircraft such as the Merlin or Funjet, the polling rate needs to be changed from 15 Hz to 40 Hz in the /conf/modules/ins_arduimu.xml file.

The ArduIMU is sensitive to vibrations. Mount it on a thick piece of foam to dampen the vibrations.


Have Fun !

Results

Please Post Results Here... Issues?