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.
For the hardware serial issues, see this forum post: https://forum.sparkfun.com/posting.php?mode=reply&f=14&t=45291&sid=a9427fa6f969d2777d15e1d0eed89394
You need to: * Edit out some code we use for testing in production. See the line beginning with ‘For production testing only’. * Change the baud rate on the ‘Serial1.begin’ line * Change config.h from ‘#define LOG_PORT SERIAL_PORT_USBVIRTUAL’ to ‘#define LOG_PORT SERIAL_PORT_HARDWARE’
Once that is done, upload the revised code and output will be on the RX/TX pins on the edge of the board.
The blue will pulse letting you know you’re in bootloader mode. (double check your COM port, it will change when this happens)
https://github.com/sparkfun/9DOF_Razor_IMU/blob/master/Firmware/9DoF_Razor_M0_Firmware/9DoF_Razor_M0_Firmware.ino#L161 since it is looking for a “$” for testing. By changing a few lines and printing the string to one of the hardware UARTs, other serial UARTs can read the serial data. Additionally, the serial object is defined here => https://github.com/sparkfun/9DOF_Razor_IMU/blob/master/Firmware/_9DoF_Razor_M0_Firmware/config.h#L25 for the Arduino serial monitor or the hardware serial UART port 1 on pins 0 and 1.
Based on 2 ratings:
4 of 4 found this helpful:
When configured to output the Euler values, the values drift considerably when the IMU is sitting still on a desk and are erratic to the point to appearing random if the IMU is not perfectly still.
The pitch values oscillate slowly around 0, from 339 degrees to 20 degrees. The roll values also oscillate in a similar fashion between 350 degrees to 10 degrees The yaw values just drift, making a complete 360 in 42 seconds or so.
If you slowly pitch or roll the IMU 30 to 45 degrees the values become erratic.
Update: I sent an email to technical support per Kansukee’s suggestion. It is a week later and I haven’t received any response other than the “Thank you for contacting SparkFun Technical Support” auto-reply.
Sorry to hear about the issues with the Razor IMU.
Have you contacted our technical support team at email@example.com - they’re usually pretty good at helping to get products working properly, they may have some strategies to help get rid of the erratic drift on the sensor.
I used this to make a quadcopter flight controller. It’s really nice having everything in such a compact package. It makes testing so much easier with everything being on one board. The SAMD21 is a great chip too!