AnsweredAssumed Answered

LIS3DH High pass filter doesn't work on z-Axis

Question asked by Alexander P. on Nov 14, 2016
Latest reply on Nov 30, 2016 by Miroslav B
Hello everybody,
I am trying to apply the built in high pass filter of an LIS3DH to all 3 axis. For the x and y axis this works beautifully: When I rotate the board by 90° I see the peak in the data and flattening out again.
This seems not to work with the Z-Axis. I always get about 1g when I leave it lying on my desk z-axis towards earth...
I don't see any possibility to configure the axes that are used for high pass filtering...

I am using the lis3dh_driver from ST with the following settings:
/* enable the accelerometer */
LIS3DH_SetODR(LIS3DH_ODR_10Hz);

/* enable all axes */
LIS3DH_SetAxis(0x07);

/* full scale = 2g */
LIS3DH_SetFullScale(LIS3DH_FULLSCALE_2);

/* Enable block data update, so unread previous data will just be dismissed */
LIS3DH_SetBDU(MEMS_ENABLE);

/* big endian data selecten: LSB @ lower address */
LIS3DH_SetBLE(LIS3DH_BLE_LSB);

/* set fifo to stream mode and enable it */
LIS3DH_FIFOModeEnable(LIS3DH_FIFO_STREAM_MODE)

/* set low power mode and 8 bit resolution, start the measruements */
LIS3DH_SetMode(LIS3DH_LOW_POWER);

/* set high pass filter mode */
LIS3DH_SetHPFMode(LIS3DH_HPM_NORMAL_MODE);
LIS3DH_SetHPFCutOFF(LIS3DH_HPFCF_0);
LIS3DH_SetFilterDataSel(MEMS_ENABLE);


Any Idea how I could make the high pass filter work on the z-axis as well?

thanks for you replies
Alexander

Outcomes