cancel
Showing results for 
Search instead for 
Did you mean: 

values ​​of iis3dwb mems

Kyouk.1
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

16 REPLIES 16
Kyouk.1
Associate III

Kyouk.1
Associate III

Graph cannot be inserted.

Eleon BORLINI
ST Employee

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

Vladimir JANOUSEK
ST Employee

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

​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)

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.1
Associate III

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.

0693W000004JXMsQAO.png

Kyouk.1
Associate III

Question2, Questin3 could not be solved.

Please advise.

Thank you.