adafruit / adafruit/Adafruit_CircuitPython_LSM6DS

High pass filter not working for LSM6DSOX

Open
#62 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34
Forks
23
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/files/11779635/__init__.py.zip)

Thanks for this library
Regards,
Bob U.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in __init__.py and compare the LSM6DSOX _LSM6DS_CTRL8_XL register configuration with the other IMU parts supported by the library. Verify the eight HPF bandwidth options and the enable bit on the tested LSM6DSOX hardware, then confirm the change does not break other supported parts.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.