9 Degrees of Freedom Sensor

The 9 Degrees of freedom sensor stick (9DOF) contains 3 sensors: an accelerometer, a gyroscope, and a magnetometer. Each sensor can be communicated with using I2C from analog pins 4 and 5 on the Arduino Uno. We powered the sensor stick using the 5 volts out available on the Arduino Uno.  I2C also requires pull-up resistors on the data (SDA) and clock (SCL) buses.  We used two pull up resistors soldered to the 5 volt output of the Arduino shield and SCL/SDA.

To prevent the sensor from receiving too much noise during flight, the sensor was soldered to an Arduino ProtoShield on the pins.  The other end of the 9DOF was glued to the shield.

Without much programming experience, the 9DOF can be calibrated and used to determine the orientation of the sensor stick. A tutorial available from Razor AHRS provides downloadable code to read sensor data and send it over a serial connection to a computer running processing software.

Each sensor was calibrated separately by moving the sensor stick (along with the entire Arduino board) around each axis for the gyro and magnetometer, and holding the accelerometer in place on each side. The calibrated values for each sensor in the Razor AHRS firmware are listed in the following table.

Sensor X-Min
Accelerometer -287 278 -278 279 -285 270
Magnetometer -747 570 -579 604 -621 663
Gyroscope -35.10 45.71 12.51

Sensor Mounted On Shield

Click to enlarge.


Sensor Test Video

Although calibrating the sensors improved the performance, the magnetometer still has some problems as can be seen in this video. Often times, the magnetometer causes the orientation to drift back to the starting direction. Interference happens due to the many magnetic disturbances in the Engineering and Computer Science Building, as well as some problems with the sensor stick itself. Therefore, we opted not to use the magnetometer in the final quadcopter.

4 thoughts on “9 Degrees of Freedom Sensor

  1. Great work. I had a question. What is the minimum number of DOF required for the quadcopter to maintain normal flight functions. Isnt 6 DOF enough?

  2. Technically there can only be six degrees actually, 9 degrees is just more of a marketing spin on the sensor because there are three sensors in one.

  3. Pingback: Q計画の中心要素は、オーデマピゲ時計工場が司会のQ国際賞授与対象は保護児童権益側は重大な貢献の有名人や社会機構。新しいMillenaryミレニアムクインシージョーンズ腕時計の一部販売収

Comments are closed.