SparkFun will be closed Monday 7/4/2022 for the 4th of July holiday. Orders placed after 2 pm MT on Friday 7/1/2022 will be processed on Tuesday 7/6/2022. SparkFun Support will also resume on Tuesday 7/6/2022. Have a safe holiday!

9 Degrees of Freedom - Razor IMU - 16MHz (Sale)

Replacement: This has been updated with a new version. There have been minor tweaks to the new version, but this one is still fully functional. This page is for reference only.

The 9DOF Razor IMU incorporates four sensors - an LY530AL (single-axis gyro), LPR530AL (dual-axis gyro), ADXL345 (triple-axis accelerometer), and HMC5843 (triple-axis magnetometer) - to give you nine degrees of inertial measurement. The outputs of all sensors are processed by an on-board ATmega328 output over a serial interface.

The board comes programmed with the 16MHz Arduino bootloader and example firmware that tests the outputs of all the sensors. Simply connect to the serial TX and RX pins with a 3.3V FTDI Basic Breakout, open a terminal program to 38400bps and a menu will guide you through testing the sensors. You can use the Arduino IDE to program your code onto the 9DOF, just select the 'Arduino Duemilanove w/ATmega328' as your board.

The 9DOF operates at 3.3VDC; any power supplied to the white JST connector will be regulated down to this operating voltage - our LiPo batteries are an excellent power supply choice. The output header is designed to mate with our 3.3V FTDI Basic Breakout board, so you can easily connect the board to a computer's USB port. Or, for a wireless solution, it can be connected to the Bluetooth Mate or an XBee Explorer.

  • 9 Degrees of Freedom on a single, flat board:
    • LY530ALH - 300°/s single-axis gyro
    • LPR530ALH - 300°/s dual-axis gyro
    • ADXL345 - 13-bit resolution, ±16g, triple-axis accelerometer
    • HMC5843 - triple-axis, digital magnetometer
  • High pass filter on the gyro outputs
  • Outputs of all sensors processed by on-board ATmega328 and sent out via a serial stream
  • Output pins match up with FTDI Basic Breakout, Bluetooth Mate, XBee Explorer
  • 3.5-16VDC input
  • ON-OFF control switch and reset switch
  • 1.95 x 1.10 " (49.53 x 27.94 mm)


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Mike Bakula / about 10 years ago / 1

    So, I just found I still have of of these - what rev of the firmware should I use with it?

  • Member #361915 / about 10 years ago / 1

    hello everyone,could you tell me what the software in order to simulate 9 degree of freedom??? thank you so much!

    • Take a look at the firmware links on the product page for the new version of this board, found here. This has a few good examples of how to visualize the data from this board and should be a good starting point for you.

  • adxl345rate / about 12 years ago / 1

    Hello Arduino Experts,
    I wonder if it is possible to read from ADXL345 at 100 Hz rate (0.01 second). I have checked the code given above "Code by Doug Weibel and Jose Julio" and it works fine for 50 Hz.
    Can any one help or suggest a solution or may be this is not possible using the Razor IMU board.
    Thank you very much.

  • PIND / about 12 years ago / 1

    I have a a strange problem with 9DOF razor IMU.....After getting some raw readings all three acceleromter readings get equal either -1 or some really big value. Same is teh case with magnetometer readings.
    I didn't change the original firmware on the device as i received it. When i reset the device the thing starts working correctly. Can anyone tell me what could be the problem because i am getting this problem after almost every 10 readings and its not desired.
    Note. Each reading is taken after half a second.
    Any help?

  • PIND / about 12 years ago / 1

    @ Sparkfun experts...
    How can i interface the IMU to an Arduino serially. what to do with the DTR and CTS pins as leaving them open doesn't make Arduino to read data from IMU? IMU is working fine with PC.

  • tz / about 13 years ago / 1

    I really wish you added the final component to get temperature and barometric altimiter:
    Or at least had the I2C broken out for connection.

  • DougWeathers / about 13 years ago / 1

    How would I use this with a Propeller uC?
    I expect I would do all the fancy filtering on the Propeller and just get the raw sensor readings from this IMU over a serial link?
    It looks like the demo code would be pretty close to what I'd need in that case.
    I'm somewhat used to dealing with SPI devices. Would that be faster than 384000 bps? That wouldn't be too terribly hard to add to the demo code either, I'd guess.
    My application: get some idea of the path a rocket takes, without using GPS. Acceleration and gyro rates might be ... extreme :)
    Any hints and/or comments would be very welcome!

  • jihlein / about 13 years ago / 1

    Should the high pass filter on this board be romoved when porting over the ArduIMUV2_DCM_V10 code, as described for V2 board from diydrones.com?

  • Laurenceb / about 13 years ago / 1

    The temp sensor is on ADC8 - you really need to use the 1.1v reference to get useful data from it.

  • bradpowers / about 13 years ago / 1

    Why, when I perform a self test, does my IMU tell me that the magnetometer is bad?

  • GlennPowers / about 13 years ago / 1

    The ATmega328 has a built-in temperature sensor on ADC line 7 (IIRC). But, the Arduino IDE doesn't support it. Nor, I have I seen any code that does. But, it's there.

  • xow / about 13 years ago / 1

    The 6DOF Razor was perfect in that it took up a minimum of space and used only flat components. Why did you guys have to add the ATmega? People whose applications need 3-axis acc/gyro/mag sensing are probably not to going be satisfied with just an AVR, horsepower-wise, and not everyone wants to use AVR/Arduino as the bridge between their sensors and e.g. Gumstixes.
    I have no gripe with the board, but I wish there were a full sensor board, with 3-axis acc/gyro/mag and GPS, but no useless ?c tacked on.

  • fenghua9801 / about 13 years ago / 1

    I think it would be beneficial to breakout other pins for the 328p, because maybe they can be used for other applications such as control motors.

  • Xander2 / about 13 years ago / 1

    I see 6 holes on there that don't seem to be labelled. Are those connected to anything useful? Wouldn't mind having access to a few extra io.
    Also, does this come with the correct sort of bootloader to load arduino code?

    • Sam9 / about 13 years ago / 1

      The 6 holes are for the ISP for the AtMega. They will connect to the pins shown in the schematic.

  • math / about 13 years ago / 1

    what sensor update rate is available with this?

  • psykokwak / about 13 years ago / 1

    You have not to wait someone program an extended kalman filter for this IMU.
    It already exists integrated AHRS less than 100$ :
    I use this one :
    http://vectornav.com/vn-100 (500$) I it has nothing to envy the Xsens MTI...

  • Nescioquiddicas / about 13 years ago / 1

    Dumb question, and I think I already know the answer: GPS compatibility?

  • Laurenceb / about 13 years ago / 1

    From the schematic it appears this is using a 16MHz crystal with a 3.3v supply to the atmega328? According to the atmega328 datasheet the max clock speed is 13.33MHz @ 3.3v supply.

    • Yep. We're outside the 'safe' gray area as dictated by the datasheet. Every unit we release from production gets fully tested and I have not seen a unit fail (out of thousands) from 'over clocking'. We're pretty sure this is a CYA graph from Atmel, and understandably so. We're releasing an 8MHz version which will be a bit strapped for processing but will be within spec for those people that don't like the wild side.

      • Laurenceb / about 13 years ago / 1

        I see, but it might not maintain reliability outside of "office" temperatures. Having said that the linear region in the atmel datasheet does look slightly simplistic.
        Rather than remove the HP filter, why not turn swap around the Cap and resistor so you have a second order low pass. The ST gyros use a switched capacitor filter internally so they will chuck out a fair bit of high frequency harmonics. Aliasing problems may crop up with high performance stuff. Also atmega only has a 10bit ADC, and the noise from the ST gyros is going to be around 0.2lsb RMS or thereabouts. Maybe a LPC with your bootloader would be nicer, or perhaps two versions - atmega and LPC.

  • roycohen2013 / about 13 years ago / 1

    and what exactly is the example code that is given because i dont see a pde or something that would say that u can open it in the arduino ide and edit it

    • The example code is C code written using the WinAVR tool chain. It is not an Arduino sketch but could easily be modified to be.

  • Antoine / about 13 years ago / 1

    Fair enough.wold replace "orthogonal" by "not colinear" in your post.
    The magnetometer can output (on a I?C port) the 3 components of the magnetic field in the axes of the board of course.

  • roycohen2013 / about 13 years ago / 1

    hey when you guys say we can program it does this mean that the code is in the arduino pde format
    and does anyone know what the magnometer outputs exactly or have an example

  • Krogoth / about 13 years ago / 1

    It's not an AHRS... yet.
    Given there's essentially an Arduino built into the board with full access to the sensors, it's only a matter before the IMU code from the open source ArduPilot project is integrated into this board to provide AHRS capability at no added cost (in fact, see http://www.diydrones.com/profiles/blogs/new-imu-from-sparkfun-soon-to )
    I must still insist that 9DOF is incorrect - adding a 3-axis magnetometer does not increase the number of degrees of freedom that this board can measure, because in 3 spatial dimensions there are only 6 degrees of freedom in rigid body motion. It is confusing because there are physically 9 sensors on 3 axes, but a sensor is not equivalent to a degree of freedom (otherwise adding 3 temperature sensors would make it a 12DOF IMU...)
    I suggested AHRS because they require 6DOF inertial sensing as well as 2 orthogonal reference vectors (gravity and magnetic field), and this board provides all of these.

    • Hi Krogoth - My apologies for the nails on the chalk board! We added the mag and needed a differentiating name.
      AHRS is not correct. This board has the high-pass filter installed which will limit the the usefulness with the DIYdrones/Jordi/Bill code. We're coming out with another version that runs at 8MHz and has the HP filter removed. We hope to include Jordi/Bill's improved AHRS on the board as well.

  • Antoine / about 13 years ago / 1

    This is not a AHRS Krogoth.
    It is a complete 3 DOF IMU, which only gives you the raw sensor data.
    I've spent 1 year to develop a complete GPS-aided AHRS from that kind of sensors, and I promise it's not easy, and would not be sold 124$ (see Xsense : http://www.xsens.com/en/general/mti-g which costs 4000euros without VAT).
    There is still something important missing: the integrated temperature sensor in each gyro if you want good performances (with your own temperature calibration).
    And the 9 DOF is not as wrong as it may be: you said it: 6 DOF for a 3D representation + 3 DOF for the magnetic vector as it doesn't represent the same thing. This vector depends a lot on your position on earth and you can even use it instead of gravity to get the vertical.
    A 9 dimension vector sensor would probably be a better title, but I'm very happy with that product.

  • Krogoth / about 13 years ago / 1

    To beat the old drum... As an engineer, it grates against my soul to see this advertised as 9DOF, when it is in fact only 6DOF (maximum possible in our 3 dimensional world) plus a yaw reference. The breakdown is as follows:
    3 Accelerometers: 3 linear DOF (+ gravity vector)
    3 Gyroscopes: 3 rotational DOF
    3 Magnetometers: magnetic north vector
    I suggest that this be advertised as an AHRS board (Attitude and Heading Reference System), in contrast with the original Razor IMU (which you might call an ARS or Attitude Reference System, though no-one does). Unfortunately, 9DOF is already on the silkscreen grate grate :P

Customer Reviews

No reviews yet.