What is an IMU Sensor and How to use with Arduino?

An Inertial Measurement Unit (IMU) is defined as a 9 axis sensor that measures orientation, velocity, and gravitational forces by combining Accelerometer, Gyroscope, and Magnetometer into one. IMUs typically come in large packages, but with recent developments like MEMS technology, they are now more commonly seen as miniaturized sensors designed for easy integration with Arduino or other microcontrollers.

As such, I’ll be introducing the list of Arduino IMU sensors available at Seeed. But before that, let’s understand more about IMUs!

If you’re looking for a buying guide on Accelerometer and Gyroscope sensors, do refer to my previous post here!

How does IMU work?

IMU Sensor Working Principle

We established in the introduction that IMUs measure orientation, velocity, and gravitational forces but how does it work to achieve that?

IMUs work by detecting the rotational movement of the 3 axis, commonly known as Pitch, Roll, and Yaw. To achieve such, it relies on the functionality of Accelerometers, Gyroscopes, and Magnetometers.

Accelerometers

  • Accelerometers serve as the tool for velocity measurement on an IMU since we know its functionality is to detect the rate of change in velocity of an object
  • Can only measure pitch and roll, no information about yaw

Gyroscopes

  • Gyroscopes serve as the tool for rotation/rotational rate measurement on an IMU since we know its functionality is to detect rotational changes or maintain orientation

Magnetometer

  • Magnetometer serves as the tool for gravitational force measurement on an IMU
  • Compared to an Accelerometer that can’t measure yaw since it works on a constant gravitational force, a magnetometer is a great complement to accelerometer sensors

Combining these three sensors gives u a 9DOF IMU that measures orientation, velocity, and gravitational force.

Uses of IMU sensors?

Key Applications of IMUs

IMUs are most commonly used in Inertial Navigations Systems to control aircraft, ships, submarines, and other unmanned aerial vehicles. However, with their wide measurement capabilities, IMUs are still applicable for other usages as follows:

  • Consumer electronics; Smartphones, tablets, fitness trackers for motion sensing and orientation
  • GPS and satellite positioning systems
  • Sports technology and training applications
  • Personal transportation devices like Segway for stabilization and balancing of a vehicle
  • Virtual Reality (VR) and Augmented Reality (AR); navigation and body/human motion tracking

The above is a general list of IMU applications. However, if you are interested in Embedded Machine Learning, or simply, TinyML, take a look at this comprehensive guide on hackster.io! 

Disadvantages of IMUs

As much as IMUs are picked for many applications, it’s still not an error-free option for motion sensing needs. Accumulated error, also known as “drift”, is one of the main disadvantages of IMUs. It is present due to its constant measuring of changes and rounding off its calculated values. When such a process happens for a prolonged period of time, it can lead to significant errors.

With no way to improve the accuracy of an IMU aside from using better inertial sensors, we’ve gathered to recommend a few IMU sensor options that are worth taking a look at!

Recommended IMU Sensors at Seeed

Here at Seeed, we have a couple of IMU sensors for you to choose from, ranging from 9DOF to 10DOF option. All applicable for microcontroller usage and Grove Compatible!

Grove Compatible?

Grove system is Seeed’s very own initiative, mainly aimed at helping users like yourself to easily use different modules, sensors, and more through our plug-and-play system!

  • We currently already hold more than 300 Grove modules, including other sensor types for you to choose from!

As compared to the other IMU 9DOF breakout boards offered, ours require no breadboard, jumper wires, and circuit building for pairing with Arduino!

Don’t believe how easy pairing is made possible with Grove? Shown below is a general IMU sensor vs one of our Grove – IMU 9DOF Sensor:

Like how simple and clean it is?

All you need is a Grove Base Shield alongside your Arduino, and you’re good to go!

  • We’ll talk more about the IMU sensor pairing guide afterward

Now let’s move on to our recommendations!

MPU-9250 option: Grove – IMU 9DOF v2.0

Starting off the list of IMU sensors here at Seeed is this 9DOF v2.0 IMU sensor module! It’s an affordably priced and low-powered module that delivers high performance!

Packed with a 3-axis gyroscope, a 3-axis accelerometer, and a 3-axis magnetometer, it’s a 9-axis motion tracking module based on MPU-9250.

Here is a guide on how to get started with MPU-9250.

Features:

  • Ultra-low power, low voltage
  • Wide Detecting Range
  • Internal Digital Motion Processing™ (DMP™) engine supports advanced MotionProcessing and low power functions such as gesture recognition using programmable interrupts
  • Self-test function
  • Digital-output 3-Axis angular rate sensors (gyroscopes) with a user-programmable full-scale range of ±250, ±500, ±1000, and ±2000°/sec
  • Digital-output 3-Axis accelerometer with a programmable full-scale range of ±2g, ±4g, ±8g, and ±16g
  • Digital-output 3-Axis accelerometer with a full-scale measurement range is ±4800μT

Interested to find out more about the Grove – IMU 9DOF v2.0? You can head to our product page here!

ICM20600+AK09918 option: Grove – IMU 9DOF 

Next up try the dual chip (LCD20600 + AK09918) IMU module. It is a cheaper alternative to the previous one, having the same 3-axis gyroscope and accelerometer. The only two differences are its 6-axis motion tracking module and having 3-axis electronic compass.

Features: 

  • 3-Axis Gyroscope with Programmable FSR of ±250 dps, ±500 dps, ±1000 dps, and ±2000 dps
  • 3-Axis Accelerometer with Programmable FSR of ±2g, ±4g, ±8g, and ±16g
  • 3-Axis Electronic Compass with 0.15 μT/LSB (typ.) sensitivity
  • User-programmable interrupts
  • 16-bit ADC resolution and Programmable Filters for acceleration measurements
  • 16-bit ADC resolution for magnetic measurements
  • 1 KB FIFO buffer enables the applications processor to read the data in bursts(LCM20600)
  • Embedded temperature sensor
  • Magnetic sensor overflow monitor function
  • Built-in oscillator for internal clock source

Find out more from its product page here!

BMP280 with MPU-9250: Grove – IMU 10DOF v2.0

Need a substantial upgrade from the previous recommendations? The Grove – IMU 10DOF v2.0 provides a total of 10 axes of data for you, way more applications and better performance!

Based on the newly released BMP280, this IMU sensor module is only 65% smaller than the BMP180, but consumes way lesser power; only 2.7uA@1Hz!

For more information on the MPU-9250 and BMP280, refer to the respective datasheets attached

Features:

  • Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-programmable full-scale range of ±250, ±500, ±1000, and ±2000°/sec
  • Digital-output 3-Axis accelerometer with a programmable full-scale range of ±2g, ±4g, ±8g, and ±16g
  • Digital-output magnetometer with a full-scale range of ±4800uT
  • Temperature measurement with ±1.0°C accuracy
  • Barometric pressure measurement range 300 – 1100 hPa with ±1.0 hPa accuracy

Interested to find out more about the Grove – IMU 10DOF v2.0? You can head out to our product page here!

Small option – XIAO nRF52840 Sense

Need a smaller alternative? Try the XIAO nRF52840 Sense! It is only 21 x 17.5 mm small but packs a 6-axis IMU. It is powered by the nRF52840 chip, and it is perfect for the previously mentioned TInyML projects.

Features:

  • Versatile Microcontroller: Incorporate the Nordic nRF52840 chip with FPU, operating up to 64 MHz, mounted multiple development ports, supported by Arduino / CircuitPython
  • Wireless Capabilities: Implement Bluetooth 5.0, BLE functions with onboard antenna, also provide NFC connectivity
  • Elaborate Power Design: Provide ultra-low power consumption as 5 μA in deep sleep mode while supporting lithium battery charge management
  • Advanced onboard Functionality: Assemble additional digital microphone and 6-axis IMU in the tiny board for embedded Machine Learning applications
  • Thumb-sized Design: 21 x 17.5mm, Seeed Studio XIAO series classic form factor, suitable for wearable devices

How to use an IMU sensor with Arduino?

We’ve recommended our IMU sensor modules for your selection but wonder how you can use them with Arduino? Here’s a simple tutorial to help you get started. We’ll be using the Grove – IMU 10DOF v2.0 as our IMU sensor!

Here’s what you need:

  • Seeeduino is Seeed’s very own Arduino board, built with relative benefits over the original
    • If you do not wish to purchase a Seeeduino, this tutorial is still applicable for the following Arduino boards: Arduino UNO, Arduino Mega, Arduino Leonardo, Arduino 101, Arduino Due

How to connect:

  • Step 1: Connect Grove – IMU 10DOF v2.0 to I2C port of the Grove – Base Shield
  • Step 2: Plug Grove – Base Shield into Seeeduino
  • Step 3: Connect Seeeduino to the PC via a USB cable

Software configurations and Arduino Code:

  • Step 4: Upload the code. Note that we should select the correct board type and COM port. Where we can see:

Summary

That’s all for today’s guide on IMU sensors and modules for Arduino usage. I hope with this, you get a better understanding of what is an IMU Sensor, how it works, and the modules available for Arduino usage!

Start creating your very own motion-sensing project with our list of IMU sensor modules today!

About Author

Calendar

January 2020
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031