adafruit / adafruit/Adafruit_CircuitPython_LSM6DS

LSM6DS032 "doubled" acceleration sensitivity (code matches datasheet but not test)

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

Description

Hello! I have an Adafruit LSM6DS032 board connected by Stemma QT cable to an Adafruit RP2040 Feather, all purchased about a year ago. I've dug them back out for a repeat of a workshop I ran in June last year, where I noticed that the acceleration values were all about double what they should be (Z acceleration on a flat surface was reported as about 19.5G). It didn't matter much to the workshop (just seeing any data was good enough), but I'm curious about it now.

After a peek through the code in this library:
In the `LSM6DS032` class, the acceleration ranges override those from the default `LSM6DS` values in `__init__.py` with doubled max values and doubled conversion factors . If I use the original conversion factors, the output is reasonable. So the code matches the relevant datasheet, but my test suggests the conversion factors are "actually" somehow the same for both the ±16G max chips and the ±32G max chip, which just cannot be true.

I'm now starting to wonder if is possible that my actual board has the wrong chip on it. Is there any easy way to tell if that were the case, short of trying to put >16G's while getting data from the sensor and seeing what happens?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the LSM6DS032 class and the acceleration range and conversion-factor definitions in __init__.py. Compare those values with the LSM6DS032 datasheet and the reported flat-surface Z reading, then determine whether the discrepancy comes from the library or the board's sensor identity. Done means the cause is established and the appropriate code or issue documentation is updated.

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.