Creative Commons images are CC BY-NC-SA 3.0

SparkFun 9DoF Razor IMU M0
project on project

by CharlieTheRobot

$ 49.95

Shipping outside of the US?

Click here for info

added to your
shopping cart

In stock 49 in stock
49.95 1+ units
47.45 10+ units
44.96 25+ units
42.46 100+ units
Need larger quantities?
Check out our Volume Sales program

Description: The SparkFun 9DoF Razor IMU M0 combines a SAMD21 microprocessor with an MPU-9250 9DoF (9 Degrees of Freedom) sensor to create a tiny, reprogrammable, multipurpose IMU (Inertial Measurement Unit). It can be programmed to monitor and log motion, transmit Euler angles over a serial port or even act as a step-counting pedometer.

The 9DoF Razor’s MPU-9250 features three 3-axis sensors—an accelerometer, gyroscope and magnetometer—that give it the ability to sense linear acceleration, angular rotation velocity and magnetic field vectors. The onboard microprocessor, Atmel’s SAMD21, is an Arduino-compatible, 32-bit ARM Cortex-M0+ microcontroller also featured on the Arduino Zero and SAMD21 Mini Breakout boards.

In addition to a pair of ICs, the 9DoF Razor IMU includes a µSD card socket, LiPo battery charger, power-control switch, and a host of I/O breakouts for project expansion. It comes preprogrammed with example firmware and an Arduino-compatible bootloader, so you can customize the firmware and flash new code over a USB connection.

Get Started with the 9DoF Razor IMU M0 Guide


  • Integrated MPU-9250 IMU and SAMD21 microprocessor
  • LiPo battery charger
  • µSD card socket
  • Preprogrammed example firmware that streams and/or logs:
    • Accelerometer, gyroscope and magnetometer data…
    • …and/or quaternions, and Euler angles
  • Arduino-programmable via USB
  • New MPU-9250 Arduino library with support for the chip’s digital motion processing capabilities
  • Extra SAMD21 pins broken out
  • System on/off switch


Recommended Products

Customer Comments

  • Anyone has a AHRS compatible firmware for it? I looked over here: but they only have support for older Razor boards.

    Any help is welcome!


  • With the example firmware, the Euler angle Yaw drifts by roughly 1 degree a second when subject to no motion. Is this experienced by others? I’ve seen it on 2/2 boards I have tested. Thanks!

    • What you’re seeing is a very common problem in orientation sensing. As I understand it, the built-in DMP is fusing only the gyro and accelerometer. The magnetometer must be used for stable orientation on all 3 axes, which is the art of 9-DOF sensor fusion. This and many other relevant issues are well described in this wiki.

      As strider points out, there was support for 9DOF fusion in the previous razor board’s library (which was in fact a fork from the repo by the author of that wiki), though it’s mysteriously absent from this new version… it would be great to see this added!

    • I just observed yaw angle after leaving the new razor imu on my table; what you say happens in my Razor as well. I think the angles we observe are estimated only from gyroscope and accelerometer data; if magnetometers are calibrated and included in the estimation, the heading values can be much better. It was better in the previous version of the Razor IMU, in the code written by Peter Bartz. In that code, Peter provided soft and hard iron calibration of magnetometers; the complementary filter used there was taking the magnetometer data into account in heading estimation.

  • Hi, I’m trying to get this to send data over the pins marked TX and RX on the 8 pin header on this module. Any idea which Serial port it corresponds to. Nothing seems to be working other than the SerialUSB at the moment.

    • Try specifying Serial1 as the port. I’m doing this to data to a bluetooth LE module over the rx/tx pins.

  • Sorry if this an amateur question, but is it possible to make this a wireless unit with a lipo and a Bluetooth or other such device? If so, what are the connections? Wanting to make a wireless head tracker for PC games like flying and driving.

    • You should definitely be able to do that. The connections will depend on what type of wireless you want to do and how. The easiest is probably a bluetooth/wifi module that you can connect over the hardware serial ports on the board. The other (and much trickier) option is to use the OTG feature on the board and connect a USB boothtooth/wifi dongle. In this case you will probably end up writing ‘drivers’ for it, but it is also possible someone has already done it. Look into the Simblee board, the ESP8266, nRF boards, and the Bluetooth Mate as a few cheaper wireless options. If you have any other questions feel free to email our techsupport department.

      • So using a Bluetooth Mate, its just as simple as

        Razor IMU Mo —-> Bluetooth Mate Silver GND —> GND 3v3 —> VCC TX —> RX RX —> TX

        What does the RTS 0 and CTS I get wired to? Are they needed? Would this then be wireless to a computer paired by Bluetooth using a USB mini module?



  • Driver installation on Windows 8.1 Pro doesn’t work. Driver is found but INF file doesn’t contain informations of numerique signature. Could you help me ? Edit: On Windows 10 Family, driver installation is not requiered ! Just plug and play. But I need to work with on my W8.1Pro. Windows says that you are the solution…

  • When I followed the hookup guide, and finished “Install Arduino SAMD Boards” section, first I tried to verify firmware code “_9DoF_Razor_M0_Firmware.ino” but Arduino displayed fatal error: sam.h: No such file or directory. Then I tried to verify and upload “MPU9250_Basic.ino” located at the SF MPU-9250 library. I obtained the same fatal error.. Did anybody face this problem when verifying and uploading code to Razor IMU?

    • Arduino’s latest versions of the SAMD board definition’s (1.6.9+) tripped a few things up with the 9DoF Razor’s board definitions. We just pushed a compatible update to the board manager.

      Update the “SparkFun SAMD Boards” core to 1.3.2 by following the same steps in the Installing the SparkFun Board Definition section of the tutorial, but instead of clicking “Install” click “Update”. That should fix it.

  • Any idea of the fastest sampling rate to the uSD card?

  • Congratulations on the new MPU-9250 library. :D

  • Wouldn’t have been better to have the sensor at the center point of the board? If this board is spun (about the mid-point of the mounting holes), the accelerometer and gyroscope sensors will show periodic variations, rather than a simpler 0 acceleration and pure rotational changes.

  • I’m curious, how does this compare to the Razor board it replaced? Obviously, it uses an ARM processor instead of the Atmel one but how about the sensor itself? It’s an all-in-one unit now but I’m curious if the old one may have any advantage over this one in any way or if this is better all around.

    • This board has a much better IMU sensor. The old one used 3 separate chips for accel, gyro, and mag, while this board uses the all in one MPU-9250 IMU. That alone makes it better, no issues with small misalignments, but also, the newer sensor is generally better; less noise and more sensitive.

Customer Reviews

No reviews yet.

Related Tutorials

9DoF Razor IMU M0 Hookup Guide

December 1, 2016

How to use and re-program the 9DoF Razor IMU M0, a combination of ATSAMD21 ARM Cortex-M0 microprocessor and MPU-9250 9DoF-in-a-chip.