cancel
Showing results for 
Search instead for 
Did you mean: 

Using Motion AC library for calibrating IIS3DWB sensor with custom board

Nikhil D&K
Senior

Hello Developers,

We are developing a predictive maintenance application using ST Mems IIS3DWB sensor with out custom board having Cortex-M4 archichtetcure. Currently we have integrated Motion SP middleware to perform time domain analysis. 

But as the values are not that accurate with the refernce device readings, so we are trying to calibrate ST Mems IIS3DWB using ST's Motion AC calibration library on our custom board. So we have added the library file in our project, but on enabling the Motion AC library using initialise function the firmware gets stuck. 

 

So i would like to know whether Motion AC library run only on STM32 based boards ? Can the source file be made available for the same for porting it on other platforms ? Also is there any other way of calibrating IIS3DWB sensor.   

 

 

2 REPLIES 2
Federica Bossi
ST Employee

Hi @Nikhil D&K ,

Yes, Motion AC works only with STM32 boards.

In alternative, you need to consider the gravity field: it is important to know the position, in order to understand the portion of earth gravity offset along each axis. You can place your device in a steady condition (regardless the actual position of the device in space), and use the high pass filter to cut the 1g gravity from each axis. In this way the residual contribution to the output would be given by the offset.

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.

Hello @Federica Bossi , 

Thanks for info.

So by placing my end device with IIS3DWB in steady platform irrespective of position and enabling highpass filter (IIS3DWB_HP_ODR_DIV_800) will give me the offset values in all direction. Here we have taken values in mg instead of mg/LSB i.e the raw values is multiplied by the sensitivity. 

Sample Acc Data array (x,y,z) : 

{"P":"-2,1,-5,-15,3,-13,0,5,-13,-14,-17,3,-1,2,11,-7,-1,-8,-9,2,3,7,-4,-2,17,12,-6,-18,-17,18,-2,0,30,-8,-19,-6,-1,-10,3,-19,6,0,-4,0,-6,15,-7,-8,-5,5,2,10,16,15,-1,9,-10,14,-3,-7,5,-8,-12,0,4,-3,4,5,3,-17,-11,-15,-16,-2,4,19,16,2,2,-6,5,8,8,-5,-30,-10,20,2,12,-4,-6,-6,8,2,8,-2,13,7,-14,16,16,11,-11,-31,17,-5,-13,11,-6,21,-9,-8,-12,16,3,0,0,17,10,-10,-6,-5,1,14,0,3,17,-7,-4,11,-5,-10,-2,5,-15,16,-7,21,4,3,2,-4,6,-7,7,6,-19,-5,-2,6,-2,13,4,-9,12,-1,-20,-15,-6,14,6,-10,-8,-5,1,8,12,0,10,18,-4,0,0,0,-16,5,15,9,-2,6,7,-2,-3,14,11,5,11,-6,5,-12,-22,25,0,-2,3,-6,9,-3,"}
 

 

So for instance if X: -2 mg, Y: 1 mg, Z: -5 mg are my offset values, then can you please tell how should i write this values in offset register of IIS3DWB.  Are there any function available directly in lower level drivers to set this offset values.   

 

Hoping for a quicker response.