problem using multiple mpu9150 with multiplexer


I’m using several(4) MPU 9150, and

cause it can only support I2C communication and just 2 different address…

I’m using 4channel multiplexer (

and I’m getting the raw acc. gyro. mag. from arduino and process it in desktop

but the problem is… as I know the acc. and gyro. has 1000hz update rate and mag. has 100hz update rate.

so i expect the 100hz for the mpu 9150

and when i use just 1 mpu 9150, the update rate is 100hz (so the ‘roop per seconds’ is 10ms)

but when i use 2 mpu9150, rate is 50hz, and 3mpu 9150 rate is 33hz

so I find that just reading the 9 raw data from 1 mpu 9150 takes 10 ms…

my question is… how can I reduce the time to get the raw data from sensor… 10ms is so long…

let me attach the code and circuit picture… please help me ! I’m desperately beg gin for help T_T

multiple_mpu_9150___lys.ino (13 KB)

my question is.. how can I reduce the time to get the raw data from sensor.. 10ms is so long..

The simplest way is to get an I2C libary that runs faster than 100KHz. The Master I2C libary for example runs faster. Google for it.

That code is reading one byte at the time. The registers address of the MPU-9150 is set for every byte.
And on top of that every x,y, or z-value is read seperately.
That could be a overhead of 75% on the I2C bus. It think it is even more than 75%.

It is possible to read more than one byte from the MPU-9150, so the x,y,z values can be read in a single I2C session.