Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High pass filter not working for LSM6DSOX #62

Open
bobu01 opened this issue Jun 17, 2023 · 1 comment
Open

High pass filter not working for LSM6DSOX #62

bobu01 opened this issue Jun 17, 2023 · 1 comment

Comments

@bobu01
Copy link

bobu01 commented Jun 17, 2023

The __init__.py file does not support high-pass filter (HPF) settings for LSM6DSOX sensor. The LSM6DSOX has a different control register configuration compared to other IMU parts supported by this library. This is in register _LSM6DS_CTRL8_XL.

  • The HPF has 8 bandwidth options (ODR/4 to ODR/800)
  • Bit 2 of CTRL8_XL has to be set to 1 to enable HPF (default 0 is for LPF)

I've modified the __init__.py file as a test and it seems to work OK with LSM6DSOX. This is tested using Adafruit STM32F405 Feather and the LSM6DSOX board with a I2C connection. The HPF filters out steady-state (gravity) and passes motions. This file will break the library for other IMU parts. I don't know enough to make this work for all the parts.
init.py.zip

Thanks for this library
Regards,
Bob U.

@Pweder3
Copy link

Pweder3 commented Mar 4, 2024

isnt the bit selected by the high_pass_filter property RWBits(2, _LSM6DS_CTRL8_XL, 5) selecting the wrong bit. isnt the bandwidth selected by the first 3 bits not by bits 5 and 6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants