Professional Documents
Culture Documents
Using MPU 9250 IMU in Vertical Orientation
Using MPU 9250 IMU in Vertical Orientation
New Posts FAQ Calendar Community Forum Actions Quick Links Advanced Search
Forum Rule: Always post complete source code & details to reproduce any
issue!
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages, select the forum that
you want to visit from the selection below.
Results 1 to 3 of 3
02-14-2018, 05:26 AM #1
ITS_vk
Using MPU 9250 IMU in vertical orientation
Junior Member
Join Date: Jan 2018 Hi everyone !
Posts: 8 iam trying to use MPU 9250 IMU in vertical position i.e in
90 degree position with respect to ground for my project.
In this position the y-axis of accelerometer and gyroscope
is perpendicular to the ground. Currently iam getting
incorrect reading from the IMU. it is working fine when i
keep it flat on the ground. iam using Kris winer's code
available on github. i tried the following to change the
default axes orientation but it did not work.
Code:
MahonyQuaternionUpdate(ax, -az, ay, gx*PI/180.0f,
Code:
MahonyQuaternionUpdate(ax, ay, az, gx*PI/180.0f,
Hardware setup:
MPU9250 Breakout --------- Teensy 3.6
VDD ---------------------- 3.3V
VDDI --------------------- 3.3V
SDA ----------------------- A4
https://forum.pjrc.com/threads/49749-Using-MPU-9250-IMU-in-vertical-orientation?highlight=magnetometer 1/3
25/11/2019 Using MPU 9250 IMU in vertical orientation
SCL ----------------------- A5
GND ---------------------- GND
Note: The MPU9250 is an I2C sensor and uses the
Because the sensor is not 5V tolerant, we are us
We have disabled the internal pull-ups used by t
We are also using the 400 kHz fast I2C mode by s
*/
//#include "Wire.h"
#include <i2c_t3.h>
// See also MPU-9250 Register Map and Description
// above document; the MPU9250 and MPU9150 are vi
//
//Magnetometer Registers
#define AK8963_ADDRESS 0x0C
#define AK8963_WHO_AM_I 0x00 // should return 0x
#define AK8963_INFO 0x01
#define AK8963 ST1 0x02 // data ready stat
02-14-2018, 08:15 AM #2
WMXZ
Originally Posted by ITS_vk
Senior Member
Hi everyone !
Join Date: Jul 2014
iam trying to use MPU 9250 IMU in vertical position
Posts: 2,373
i.e in 90 degree position with respect to ground for
my project. In this position the y-axis of
accelerometer and gyroscope is perpendicular to the
ground. Currently iam getting incorrect reading from
the IMU. it is working fine when i keep it flat on the
ground. iam using Kris winer's code available on
github. i tried the following to change the default
axes orientation but it did not work.
what means incorrect data?
02-14-2018, 08:49 AM #3
ITS_vk Hi WMXZ,
Thanks for replying quickly !. I will give you the raw values
Junior Member
you asked for very shortly because iam not having the
Join Date: Jan 2018
equipment right now, but in the mean time can you please
Posts: 8
tell me is there anything wrong with the code ?
https://forum.pjrc.com/threads/49749-Using-MPU-9250-IMU-in-vertical-orientation?highlight=magnetometer 2/3
25/11/2019 Using MPU 9250 IMU in vertical orientation
Posting Permissions
You may not post new BB code is On
threads Smilies are On
You may not post replies [IMG] code is On
You may not post [VIDEO] code is
attachments On
You may not edit your HTML code is Off
posts
Forum Rules
https://forum.pjrc.com/threads/49749-Using-MPU-9250-IMU-in-vertical-orientation?highlight=magnetometer 3/3