cancel
Showing results for 
Search instead for 
Did you mean: 

Accelerometer ISM330 - Sampling frequency configuration

famadeu
Associate

Hello,

 

In general, I would like to better understand the relationship between the sampling frequencies of the FIFO and the Accelerometer (ISM330) and how to adjust them correctly for my application, could anyone give an example?

 

In my case I have the following configuration:
ISM330DLC_ACC_SetOutputDataRate(&MotionSensor, 26.0f)
ISM330DLC_FIFO_Set_ODR_Value(&MotionSensor, 6660.0f)
ISM330DLC_FIFO_ACC_Set_Decimation(&MotionSensor, ISM330DLC_FIFO_XL_DEC_32)


That is, the ISM is sampling the accelerometer at 26Hz, the FIFO with decimation is configured to store at a sampling of approx. 208Hz (6660/32), which indicates that in 1 second the accelerometer saves 8 samples (208Hz/26Hz) from the accelerometer in the FIFO. Is this correct?

 

For a practical application, for example, a motor with 1000RPM (1000/60=16Hz), would the frequency I need to adjust in the ISM330DLC_ACC_SetOutputDataRate function be at least ISM330DLC_XL_ODR_52Hz?

 

Your feedback is much appreciated.

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @famadeu ,

The ODR of the sensor sets the frequency at which the output data is updated. The FIFO ODR sets the frequency at which these data are stored in the FIFO. The FIFO ODR has to be equal or lower than the sensor ODR, because otherwise, repeated data would be stored in the FIFO. The decimation allows you to even further reduce the FIFO ODR if desired. 

Therefore in your case, if you set the ODR to 26Hz, the maximum ODR for the FIFO 26Hz. If you select a factor 2 decimation for example, you would get 13Hz for the FIFO, so 13 samples every second, meaning that only half of the samples that were measured by the sensor are stored in the FIFO.

For the practical application you mentioned, the minimum ODR for the sensor is indeed 52Hz to avoid aliasing. Depending the specific constraints, a higher ODR would provide a more detailed information.

You could check the Datasheet and the Application Note for more details on the specific configuration.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Federica Bossi
ST Employee

Hi @famadeu ,

The ODR of the sensor sets the frequency at which the output data is updated. The FIFO ODR sets the frequency at which these data are stored in the FIFO. The FIFO ODR has to be equal or lower than the sensor ODR, because otherwise, repeated data would be stored in the FIFO. The decimation allows you to even further reduce the FIFO ODR if desired. 

Therefore in your case, if you set the ODR to 26Hz, the maximum ODR for the FIFO 26Hz. If you select a factor 2 decimation for example, you would get 13Hz for the FIFO, so 13 samples every second, meaning that only half of the samples that were measured by the sensor are stored in the FIFO.

For the practical application you mentioned, the minimum ODR for the sensor is indeed 52Hz to avoid aliasing. Depending the specific constraints, a higher ODR would provide a more detailed information.

You could check the Datasheet and the Application Note for more details on the specific configuration.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.