cancel
Showing results for 
Search instead for 
Did you mean: 

Inertial MEMS sensors with differents ODR for data fusion with STM32 Discovery L4 board

josan
Associate

In my STM32 Discovery L4 board I have inertial MEMS sensors L3GD20 gyroscope and LSM303C e-compass (accelerometer+magnotemeter), all of them with different Output Data Rate, by default in BSP 95 Hz, 50 Hz, 40 Hz respectively.

In order to make a sensor fusion, how must to adjust a periodic timer to take correct samples?

Thanks in advance.

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @josan​ , the ideal would be to have same ODR among sensors or at least a common multiple ODR. However, please consider this statement of the standard MotionFX library for the sensor fusion (NUCLEO environment):

100 Hz is recommended. The output data rate for:

  • the gyroscope and the accelerometer should be equal to or greater than 100 Hz;
  • the magnetometer can be lower - 20/40 Hz is typically good for a magnetic field sensor.

I suggest you to acquire the data at the maximum ODR (e.g. 95 Hz) and manage the duplicated values of the other sensor acquisitions discarding them during the data processing.

Regards