{"id":33870,"date":"2020-06-17T19:55:52","date_gmt":"2020-06-17T11:55:52","guid":{"rendered":"\/blog\/?p=33870"},"modified":"2020-10-29T17:31:06","modified_gmt":"2020-10-29T09:31:06","slug":"how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/","title":{"rendered":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino"},"content":{"rendered":"\n<p>Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video autoplay loop muted src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/A-AND-G.mp4\" playsinline><\/video><\/figure>\n\n\n\n<p>In today&#8217;s tutorial, we will be learning how to use an MPU9250 Accelerometer and Gyroscope with the Arduino. This tutorial will cover: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>How does the MPU9250 Accelerometer and Gyroscope work?<\/li><li>About the MPU9250 IMU (Inertial Measurement Unit)&nbsp; <\/li><li>Tutorial on how to use an MPU9250 Accelerometer and Gyroscope With Arduino<\/li><li>Applications of the IMU<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">How does the MPU9250 Accelerometer and Gyroscope work?<\/span><\/h2>\n\n\n\n<p>There are <a href=\"https:\/\/www.seeedstudio.com\/Grove-3-Axis-Digital-Accelerometer-16g-Ultra-low-Power-BMA400.html?utm_source=blog&amp;utm_medium=blog\">accelerometer<\/a> and <a href=\"https:\/\/www.seeedstudio.com\/Grove-3-Axis-Digital-Gyro.html\">gyroscope<\/a> sensors on their own which are used to\u00a0measure acceleration and rotational changes respectively. As shown below:<\/p>\n\n\n\n<div class=\"wp-block-columns are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/static-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/9d0ce51a71ce6a79dfa2a98d65a0f0bd\/h\/t\/httpsstatics3.seeedstudio.comseeedfile2018-11bazaar981996_combination.jpg\" alt=\"\" width=\"224\" height=\"168\"\/><figcaption><a href=\"https:\/\/www.seeedstudio.com\/Grove-3-Axis-Digital-Accelerometer-16g-Ultra-low-Power-BMA400.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 3-Axis Digital Accelerometer<\/a><\/figcaption><\/figure><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/static-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/9d0ce51a71ce6a79dfa2a98d65a0f0bd\/h\/t\/httpsstatics3.seeedstudio.comimages101020050201.jpg\" alt=\"\" width=\"226\" height=\"168\"\/><figcaption><a href=\"https:\/\/www.seeedstudio.com\/Grove-3-Axis-Digital-Gyro.html\">Grove &#8211; 3-Axis Digital Gyro<\/a><\/figcaption><\/figure><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>But in this tutorial, we will be using an <em>MPU9250 IMU<\/em> which has both 3-Axis accelerometer and 3-Axis gyroscope integrated on a single chip. In addition, it also has a magnetometer integrated which\u00a0serves as the tool for gravitational force measurement.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/static-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/9d0ce51a71ce6a79dfa2a98d65a0f0bd\/h\/t\/httpsstatics3.seeedstudio.comimagesproduct101020080202.jpg\" alt=\"\" width=\"281\" height=\"211\"\/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Accelerometer Working Principle<\/h3>\n\n\n\n<p>An Accelerometer measures the rate of change of velocity of an object with respect to time&nbsp;also known as acceleration. With an accelerometer, you are able to figure out the angle the sensor is tilted at with respect to the ground.<\/p>\n\n\n\n<p>An accelerometer has microscopic crystals that go under stress when vibrations occur. From that stress, a voltage is generated which creates a reading on any acceleration. The unit of measurement for acceleration is meter per second squared (m\/s^2). But as accelerometer sensors express measurements in &#8220;g&#8221;, one &#8220;g&#8221; is the value of the earth gravitational force which is equal to 9.8 meters per second squared. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/image-55.png\" alt=\"\" class=\"wp-image-33943\" width=\"465\" height=\"398\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-55.png 485w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-55-300x257.png 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/figure><\/div>\n\n\n\n<p>For example, in a 3 axis accelerometer like the MPU9250 Accelerometer sensor, when placed flat with the Z-axis pointing up, Z-axis output of sensor = 1 g or 9.8m\/s^2 while X and Y = 0. This is due to the gravitational force being perpendicular to these axes which do not affect them.<\/p>\n\n\n\n<p>From this data, the sensor is able to use simple trigonometry math and calculate the angle of the sensor. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Gyroscope Working Principle<\/h3>\n\n\n\n<p>The Gyroscope which measures rotational velocity\/rate of change of angular position over time works through the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Coriolis_force\">Coriolis effect<\/a> and MEMS technology.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/howtomechatronics.com\/wp-content\/uploads\/2015\/11\/Gyroscope-How-It-Works.png\" alt=\"Gyroscope-How-It-Works\" width=\"439\" height=\"289\"\/><figcaption>Source:<a href=\"https:\/\/howtomechatronics.com\/how-it-works\/electrical-engineering\/mems-accelerometer-gyrocope-magnetometer-arduino\/\"> HowToMechatronics<\/a><\/figcaption><\/figure><\/div>\n\n\n\n<p>When a mass is moving in a particular direction with a particular velocity and when an external angular rate will be applied as shown with the green arrow a force will occur which the sensor will detect. <\/p>\n\n\n\n<p>As shown above, labelled by the blue and red arrow, this will cause perpendicular displacement of the mass. The displacement will cause a change in capacitance which will be measured, processed and it will correspond to a particular angular rate.<\/p>\n\n\n\n<p>The outputs of the gyroscope are in degrees per second, so in order to get the angular position, we just need to integrate the angular velocity. <\/p>\n\n\n\n<p>For a full explanation of how a Gyroscope works, you can check out <a href=\"https:\/\/www.elprocus.com\/gyroscope-sensor\/#:~:text=Gyroscope%20Sensor%20Working%20Principle,the%20motion%20of%20the%20object.&amp;text=The%20concept%20of%20Coriolis%20force,converted%20into%20an%20electrical%20signal.\">Elprocus page here.<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">About the MPU9250 IMU (Inertial Measurement Unit)&nbsp; <\/span><\/h2>\n\n\n\n<p>IMU which stands for Inertial Measurement Unit 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. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In today&#8217;s tutorial, we will be using an IMU that is a 9-axis motion tracking module based on&nbsp;MPU-9250. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.invensense.com\/wp-content\/uploads\/2014\/12\/rp-mpu-9250.png\" alt=\"\" width=\"250\" height=\"178\"\/><\/figure><\/div>\n\n\n\n<p>The MPU-9250 is a 9-axis MEMS sensor from InvenSense\u00ae. The&nbsp;MPU-9250 features:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/06\/image-56.png\" alt=\"\" class=\"wp-image-33969\" width=\"557\" height=\"531\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-56.png 498w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-56-300x287.png 300w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/figure><\/div>\n\n\n\n<p>Additional Features of the MPU9250 includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Smallest and thinnest QFN package for portable devices: 3x3x1mm<\/li><li>Auxiliary master I2C bus for reading data from external sensors<\/li><li>Minimal cross-axis sensitivity between the accelerometer, gyroscope and magnetometer axes<\/li><li>512 byte FIFO buffer enables the applications processor to read the data in bursts<\/li><li>Digital-output temperature sensor<\/li><li>10,000 g shock tolerant<\/li><li>400kHz Fast Mode I2C for communicating with all registers<\/li><li>Serial interfaces:<ul><li>1MHz for communicating with all registers<\/li><li>200MHz for reading sensor and interrupt registers<\/li><\/ul><\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/media-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/ab187aaa5f626ad16c8031644cd2de5b\/h\/t\/httpsstatics3.seeedstudio.comimagesproduct101020080202.jpg\" alt=\"\" width=\"358\" height=\"268\"\/><figcaption> <strong><a href=\"https:\/\/www.seeedstudio.com\/Grove-IMU-9DOF-v2-0.html?utm_source=blog&amp;utm_medium=blog\">Grove \u2013 IMU 9DOF v2.0<\/a><\/strong> <\/figcaption><\/figure><\/div>\n\n\n\n<p>This IMU based on MPU-9250 is not only affordable, but it also requires low power while offering high performance.  <\/p>\n\n\n\n<p>The Grove &#8211; IMU 9DOF v2.0 &#8211; MPU-9250 also features a user-programmable gyroscope full-scale range of \u00b1250, \u00b1500, \u00b11000, and \u00b12000\u00b0\/sec (DPS), a user-programmable accelerometer full-scale range of \u00b12g, \u00b14g, \u00b18g, and \u00b116g, and a magnetometer full-scale range of \u00b14800\u00b5T. <\/p>\n\n\n\n<p>In the industrial fields, Grove &#8211; IMU 9DOF v2.0 &#8211; MPU-9250 includes programmable digital filters, a precision clock with a 1% drift from -40\u00b0C to 85\u00b0C, an embedded temperature sensor, and programmable interrupts. Grove &#8211; IMU 9DOF v2.0 &#8211; MPU-9250 features I2C, SPI serial, and plug and play Grove interfaces.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Tutorial on how to use an MPU9250 Accelerometer and Gyroscope With Arduino<\/span><\/h2>\n\n\n\n<p>Let&#8217;s jump into how can we connect the MPU9250 IMU sensor to the Arduino. As the sensor module we are using is part of our <a href=\"https:\/\/wiki.seeedstudio.com\/Grove_System\/\">Grove collection<\/a>, connecting the sensor to the Arduino is much easier and faster. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What you&#8217;ll need:<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Arduino UNO \/ <a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4.2-p-2517.html\">Seeeduino V4.2 <\/a>(Seeed&#8217;s very own Arduino)<\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2-p-1378.html\">Grove &#8211; Base Shield<\/a> (Optional, to make connection easier)<\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-IMU-9DOF-v2-0.html?utm_source=blog&amp;utm_medium=blog\">Grove \u2013 IMU 9DOF v2.0<\/a>  <\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step by Step Instructions<\/h3>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\"><strong>Hardware<\/strong><\/p>\n\n\n\n<p><strong>Step 1<\/strong> &#8211; Connect Grove-IMU_9DOF_v2.0 to port&nbsp;<strong>I2C<\/strong>&nbsp;of Grove-Base Shield. <\/p>\n\n\n\n<p>If you do not have a Grove Base Shield, you can directly connect the IMU module to your Arduino following the table below:<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table class=\"\"><tbody><tr><td><strong>Arduino<\/strong><\/td><td><strong><a href=\"https:\/\/www.seeedstudio.com\/Grove-IMU-9DOF-v2-0.html?utm_source=blog&amp;utm_medium=blog\">Grove \u2013 IMU 9DOF v2.0<\/a><\/strong>  <\/td><\/tr><tr><td>5V<\/td><td>VCC<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>SDA<\/td><td>SDA<\/td><\/tr><tr><td>SCL<\/td><td>SCL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Step 2<\/strong> &#8211; Plug Grove &#8211; Base Shield into Seeeduino. <\/p>\n\n\n\n<p><strong>Step 4<\/strong> &#8211; Connect Seeeduino to PC via a USB cable. Your connection should look something like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/img\/with_ardu.jpg\" alt=\"with_ardu\" width=\"423\" height=\"318\"\/><\/figure><\/div>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color\"><strong>Software<\/strong><\/p>\n\n\n\n<p><strong>Step 1<\/strong> &#8211; Download the&nbsp;IMU <a href=\"https:\/\/github.com\/Seeed-Studio\/Grove_IMU_9DOF\/archive\/master.zip\">library<\/a> from Github.<\/p>\n\n\n\n<p>If you do not know how to install library on Arduino IDE, you can refer to this guide on <a href=\"https:\/\/wiki.seeedstudio.com\/How_to_install_Arduino_Library\">How to install library for Arduino<\/a><\/p>\n\n\n\n<p><strong>Step 2<\/strong> &#8211; Create a new Arduino sketch and paste the codes below to it or open the code directly by the path:<\/p>\n\n\n\n<p>File -&gt; Example -&gt;IMU_9DOF_Demo_Compass_Calibrated-&gt;IMU_9DOF_Demo_Compass_Calibrated. <\/p>\n\n\n\n<p>Here is the main code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup() {\n  \/\/ join I2C bus (I2Cdev library doesn't do this automatically)\n  Wire.begin();\n \n  \/\/ initialize serial communication\n  \/\/ (38400 chosen because it works as well at 8MHz as it does at 16MHz, but\n  \/\/ it's really up to you depending on your project)\n  Serial.begin(38400);\n \n  \/\/ initialize device\n  Serial.println(\"Initializing I2C devices...\");\n  accelgyro.initialize();\n \n  \/\/ verify connection\n    Serial.println(\"Testing device connections...\");\n    Serial.println(accelgyro.testConnection() ? \"MPU9250 connection successful\" : \"MPU9250 connection failed\");\n    delay(1000);\n    Serial.println(\"     \");\n \n \/\/Mxyz_init_calibrated ();\n}\n \nvoid loop()\n{   \n    getAccel_Data();\n    getGyro_Data();\n    getCompassDate_calibrated(); \/\/ compass data has been calibrated here\n    getHeading();               \/\/before we use this function we should run 'getCompassDate_calibrated()' frist, so that we can get calibrated data ,then we can get correct angle .                    \n    getTiltHeading();           \n \n    Serial.println(\"calibration parameter: \");\n    Serial.print(mx_centre);\n    Serial.print(\"         \");\n    Serial.print(my_centre);\n    Serial.print(\"         \");\n    Serial.println(mz_centre);\n    Serial.println(\"     \");\n \n \n    Serial.println(\"Acceleration(g) of X,Y,Z:\");\n    Serial.print(Axyz[0]);\n    Serial.print(\",\");\n    Serial.print(Axyz[1]);\n    Serial.print(\",\");\n    Serial.println(Axyz[2]);\n    Serial.println(\"Gyro(degress\/s) of X,Y,Z:\");\n    Serial.print(Gxyz[0]);\n    Serial.print(\",\");\n    Serial.print(Gxyz[1]);\n    Serial.print(\",\");\n    Serial.println(Gxyz[2]);\n    Serial.println(\"Compass Value of X,Y,Z:\");\n    Serial.print(Mxyz[0]);\n    Serial.print(\",\");\n    Serial.print(Mxyz[1]);\n    Serial.print(\",\");\n    Serial.println(Mxyz[2]);\n    Serial.println(\"The clockwise angle between the magnetic north and X-Axis:\");\n    Serial.print(heading);\n    Serial.println(\" \");\n    Serial.println(\"The clockwise angle between the magnetic north and the projection of the positive X-Axis in the horizontal plane:\");\n    Serial.println(tiltheading);\n    Serial.println(\"   \");\n    Serial.println(\"   \");\n    Serial.println(\"   \");\n    delay(300);\n}<\/code><\/pre>\n\n\n\n<p><strong>Step 3<\/strong> &#8211; After uploading the code, you should see the results appear. It should look something like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/img\/Grove-IMU_9DOF_v2.0_demo.jpg\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">References<\/h3>\n\n\n\n<p>To help you out, here&#8217;s a diagram that shows the orientation of the axes of sensitivity and the polarity of rotation.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/img\/MPU9250_axes.jpg\" alt=\"\" width=\"337\" height=\"285\"\/><figcaption><strong> Orientation of Axes of Sensitivity and Polarity of Rotation for Accelerometer and Gyroscope <\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/img\/MPU9250_axes2.jpg\" alt=\"\" width=\"429\" height=\"315\"\/><figcaption><strong> The orientation of Axes of Sensitivity for Compass <\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Applications of the MPU9250 Accelerator and Gyroscope<\/span><\/h2>\n\n\n\n<p>Now that you know how the MPU9250 IMU works, here are some projects and applications you can do with it: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Consumer electronics; Smartphones, tablets, fitness trackers for motion sensing and orientation<\/li><li>GPS and satellite positioning systems<\/li><li>Sports technology and training applications<\/li><li>Personal transportation devices like Segway for stabilization\/balancing of the vehicle<\/li><li>Inertial Navigations Systems to control aircraft, ships, submarines, and other unmanned aerial vehicles<\/li><li>Anywhere that needs motion detection<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Summary<\/span><\/h2>\n\n\n\n<p>That&#8217;s all for today&#8217;s tutorial on how to use an MPU9250 Accelerometer and Gyroscope with the Arduino.<\/p>\n\n\n\n<p>For more information on the MPU9250, you can check out its <a href=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/res\/MPU-9250A_Product_Specification.pdf\">datasheet<\/a> and <a href=\"https:\/\/files.seeedstudio.com\/wiki\/Grove-IMU_9DOF_v2.0\/res\/MPU-9250A_Reg_Map.pdf\">register map<\/a>.<\/p>\n\n\n\n<p>If you have any questions regarding this tutorial please leave a comment down below! <\/p>\n\n\n\n<p>Looking for a much more efficient IMU? We got one for you! It is the <strong><a href=\"https:\/\/www.seeedstudio.com\/Grove-IMU-10DOF-v2-0.html?utm_source=blog&amp;utm_medium=blog\">Grove \u2013 IMU 10DOF v2.0<\/a><\/strong>. 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! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies,<\/p>\n","protected":false},"author":2781,"featured_media":33972,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[105,2140,6,104,2435,31,2436,267,2778,2776,2779,2777,2162,2280,2281,2780],"class_list":["post-33870","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-accelerometer","tag-accelerometer-arduino","tag-arduino","tag-gyro","tag-gyrometer","tag-gyroscope","tag-gyroscope-arduino","tag-imu","tag-imu-arduino","tag-imu-sensor","tag-imu-sensor-arduino","tag-imu-sensor-module","tag-mems-accelerometer","tag-mpu-9250","tag-mpu-9250-arduino","tag-mpu9250"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio<\/title>\n<meta name=\"description\" content=\"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-17T11:55:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-10-29T09:31:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png\" \/>\n\t<meta property=\"og:image:width\" content=\"275\" \/>\n\t<meta property=\"og:image:height\" content=\"107\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"yida\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yida\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/\",\"name\":\"How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png\",\"datePublished\":\"2020-06-17T11:55:52+00:00\",\"dateModified\":\"2020-10-29T09:31:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\"},\"description\":\"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png\",\"width\":275,\"height\":107,\"caption\":\"How to use an MPU9250 Accelerometer and Gyroscope With Arduino\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use an MPU9250 Accelerometer and Gyroscope With Arduino\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\",\"name\":\"yida\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"caption\":\"yida\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio","description":"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/","og_locale":"en_US","og_type":"article","og_title":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio","og_description":"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-06-17T11:55:52+00:00","article_modified_time":"2020-10-29T09:31:06+00:00","og_image":[{"width":275,"height":107,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png","type":"image\/png"}],"author":"yida","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yida","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/","name":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png","datePublished":"2020-06-17T11:55:52+00:00","dateModified":"2020-10-29T09:31:06+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e"},"description":"Ever heard of MPU-9250? It is a multi-chip module (MCM) which consists of 2 dies, and houses the 3-Axis gyroscope and the 3-Axis accelerometer! Still unsure about how it works? Read on to find out! Hope that this article will help you understand the applications of MPU9250 and how to interface it with Arduino!","breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png","width":275,"height":107,"caption":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/06\/17\/how-to-use-an-mpu9250-accelerometer-and-gyroscope-with-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use an MPU9250 Accelerometer and Gyroscope With Arduino"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e","name":"yida","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","caption":"yida"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"}]}},"modified_by":"Gigi","views":84886,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",32,12,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/06\/image-58.png",275,107,false]},"author_info":{"display_name":"yida","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33870","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/2781"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=33870"}],"version-history":[{"count":2,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33870\/revisions"}],"predecessor-version":[{"id":37814,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/33870\/revisions\/37814"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/33972"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=33870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=33870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=33870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}