Skip to main content
Visitor II
September 24, 2020
Solved

values ​​of iis3dwb mems

  • September 24, 2020
  • 8 replies
  • 3219 views

I am reading the x, y, z axis values ​​of iis3dwb mems using DSP Microprocessor.

However, the following results are displayed.

lpf or 2g, 4g, 8g, 16g change the same

I want to ask if the procedure is wrong

X auxi : red graph

initial(default) value : 39xx.xxxxxx ~ 3996.xxxxxx(mg)

Q1) How to set the initial value to 0?

Value changes rapidly even without vibration.(0g ~ 3g)

Even if there is vibration, the value changes rapidly.(0g ~ 3g)

Q2) How to make the rate of change small?

It is not a program error.

Q3) Is the sensitivity of the original iis3dwb like this?

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @Kyouk.1​ ,

    trying to answer to your

    Q2) The hpf adjustment changes position, but the signal is fluctuating.

    Is there another way?

    Please check this thread if can be of any help for you. The suggestion here is to properly set both HP and LP2 filters.

     iis3dwb_xl_hp_path_on_out_set(&dev_ctx, IIS3DWB_HP_ODR_DIV_800);
     iis3dwb_xl_filter_lp2_set(&dev_ctx, PROPERTY_ENABLE);
     
    /* Into --> */
     
    iis3dwb_xl_hp_path_on_out_set(&dev_ctx, IIS3DWB_XL_ODR_26k7Hz);
    iis3dwb_xl_filter_lp2_set(&dev_ctx, PROPERTY_ENABLE);

    Q3) When the block data is updated, a noise signal is generated.

    If the block data is not updated, the noise signal disappears.

        Is there another way?

    Is it mandatory for you to have the BDU enabled?

    -Eleon

    8 replies

    Kyouk.1Author
    Visitor II
    September 24, 2020

    Kyouk.1Author
    Visitor II
    September 24, 2020

    Graph cannot be inserted.

    ST Employee
    September 25, 2020

    Hi @Kyouk.1​ ,

    the graph value along y axis are a little strange... Since the startup sequence looks correct, are you sure you are converting well the LSB data output?

    float_t iis3dwb_from_fs2g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.061f);
    }
     
    float_t iis3dwb_from_fs4g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.122f);
    }
     
    float_t iis3dwb_from_fs8g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.244f);
    }
     
    float_t iis3dwb_from_fs16g_to_mg(int16_t lsb)
    {
     return ((float_t)lsb * 0.488f);
    }

    You can btw use the accelerometer offset registers (X_OFS_USR, Y_OFS_USR, Z_OFS_USR) which can be used for zero-g offset correction or, in general, to apply an offset to the accelerometer output data. You have to enable the USR_OFF_ON_OUT bit of CTRL7_C (16h) register and tune the 73h, 74h and 75h registers (see datasheet, p.45).

    I suggest you to check also the iis3dwb_read_data_polling.c file for an example of the device initialization procedure.

    Moreover, it is strange that 2 of 3 axis are sensing the gravity in a steady condition... should be only 1 axis... You may try to comment the BDU code line to disable it, and check what happens.

    -Eleon

    Kyouk.1Author
    Visitor II
    October 14, 2020

    The offset adjustment problem is solved.

    (Solved by setting CTRL7_C register)

    Thank you.

    ST Employee
    September 27, 2020

    Hi, let me add two comments

    1) data in IIS3DWB and as also in other ST MEMS are represented as 2’s complement numbers.

    Chapter 4.5 in this application note

    https://www.st.com/resource/en/application_note/dm00683267-iis3dwb-ultrawide-bandwidth-lownoise-3axis-digital-vibration-sensor-stmicroelectronics.pdf

    pls check if you respect this in your code

    2) if you want to terminate the DC acceleration component (earth gravity), you can enable internal High Pass (HPF) filter in IIS3DWB

    See figure 14 for the freq response with HPF enabled and its bandwidth settings

    https://www.st.com/resource/en/datasheet/iis3dwb.pdf

    and also chapter 9.17 how to set it - CTRL8_XL (17h)

    Vladimir

    Kyouk.1Author
    Visitor II
    October 6, 2020

    ​Hello

    Thank you for answer.

    The gravity of the X and Y axes has been changed to the Y axis.

    Additional questions.

    1. When there is no vibration, the X-axis shakes up to 0.1(mg)~3996(mg).

    (View : Capture1 & Capture 2)

    Is it negative mg because the variable declaration is unsigned?

    2. When vibration occurs, the amount of change in the x-axis and y-axis is large.

    (View : Capture1 & Capture 2)

    Is it negative mg because the variable declaration is unsigned?

    ​ 

    capture1

    0693W000004IkNSQA0.png 

    capture2 (X auxi : It changes rapidly.)

    X auxi : red, Y auxi : green, Z zuxi : blue

    0693W000004IkNhQAK.png 

    ​capture3 : temperature(satisfactory fine)

    ST Employee
    October 6, 2020

    I see in your last post that you are using Zigbee communication 230,400bps​

    IIS3DWB has output data rate of ~27kHz (27000Hz). Each axis has 16bit data so 16 x 3 (=3 axes) = 48.

    48 x 27000 = 1,296,000 bps

    1,296,000 bps  >> 230,400bps​ and you have definitely some additional overhead what I see from the text log capture1

    Is not it possible that you loose some data and that you bring inconsistency in the logs you are transmitting ?

    Kyouk.1Author
    Visitor II
    October 13, 2020

    thank you for the reply.

    Q1) Can't you move X axis Y axis Z axis to 0 mg?

    Offset cannot be adjusted.

    Is there another way?

    Q2) The hpf adjustment changes position, but the signal is fluctuating.

    Is there another way?

    Q3) When the block data is updated, a noise signal is generated.

    If the block data is not updated, the noise signal disappears.

        Is there another way?

    result1.

    X-axis result: 38mg~44 mg.

    Y-axis result: (-_3940mg~(-)3936mg.

    Z-axis result: 905mg~910mg.

    X-axis result: 20mg~66 mg.

    Y-axis result: (-)3996mg~(-)3916mg.

    Z-axis result: 850mg~960mg.

    Kyouk.1Author
    Visitor II
    October 13, 2020

    0693W000004JXMsQAO.png

    Kyouk.1Author
    Visitor II
    October 13, 2020

    Question2, Questin3 could not be solved.

    Please advise.

    Thank you.

    Kyouk.1Author
    Visitor II
    October 15, 2020

    Hello...​

    Z-axis data fluctuates after block data update.

    Look at the graph.

    Block data updata enabale case (A) and block data updata disable case (B)

    This is my sequence.

    Are there any errors?

    It seems to be the last question.

    ​Thank you....

    0693W000004JobLQAS.png

    ST Employee
    October 15, 2020

    Hi @Kyouk.1​ ,

    trying to answer to your

    Q2) The hpf adjustment changes position, but the signal is fluctuating.

    Is there another way?

    Please check this thread if can be of any help for you. The suggestion here is to properly set both HP and LP2 filters.

     iis3dwb_xl_hp_path_on_out_set(&dev_ctx, IIS3DWB_HP_ODR_DIV_800);
     iis3dwb_xl_filter_lp2_set(&dev_ctx, PROPERTY_ENABLE);
     
    /* Into --> */
     
    iis3dwb_xl_hp_path_on_out_set(&dev_ctx, IIS3DWB_XL_ODR_26k7Hz);
    iis3dwb_xl_filter_lp2_set(&dev_ctx, PROPERTY_ENABLE);

    Q3) When the block data is updated, a noise signal is generated.

    If the block data is not updated, the noise signal disappears.

        Is there another way?

    Is it mandatory for you to have the BDU enabled?

    -Eleon

    Kyouk.1Author
    Visitor II
    November 2, 2020

    Hello.

    Thanks for the advice.

    I want to set the X, Y, Z auxi to 0mg(I want to avoid gravity)

    Even if I adjust hpf and lpf, it cannot be set to 0mg

    ST Employee
    November 5, 2020

    Hi @Kyouk.1​ ,

    it's strange that with the high pass... did you correctly configured the HPCF_XL_[2:0] and the FDS bits of CTRL8_XL (17h) register? (See datasheet, p.36)

    Another way to make the residual offset zero is to use the user offset compensation method. You have to measure the residual offset in a steady state condition and then write it in the X_OFS_USR (73h), Y_OFS_USR (74h) and Z_OFS_USR (75h) registers, so that the chip automatically subtract this value to the output. You have also to set the USR_OFF_ON_OUT bit of CTRL7_C (16h) register to enable this path.

    -Eleon