Comments (12)
Some suggestions from my part as I just saw that you replied.
- Don't use the datasheet from adafruit site but rather the one from ST site because it has been revised a few times from the 2010 version your link leads to. This is the 2016 version you can see some differences in the ODR that's why i am talking about 1.344 kHz and not 1.250 kHz.
Here the December 2016 version which is the current version.
https://www.st.com/resource/en/datasheet/lis3dh.pdf
- If you are planning on going full speed on this sensor have a look on the application note page 9/59
you may be limited by bandwidth limitations when using HR mode.
from adafruit_lis3dh.
I was looking into setting a faster data rate in my sketch and came across this reported issue. I haven't tried implementing it yet, but I wanted to share some additional information from the docs in case it helps anyone to confirm (and/or fix) the issue reported above.
Based on what I've read and the information below, I believe the following code is needed to use low-power (5khz) mode. Please double-check before trying it for yourself.
// Enable all axes, low-power mode
writeRegister8(LIS3DH_REG_CTRL1, 0xf);
// 5khz data rate
setDataRate(LIS3DH_DATARATE_LOWPOWER_5KHZ);
// High res off, BDU enabled
writeRegister8(LIS3DH_REG_CTRL4, 0x80);
Datasheet info
The following is taken directly from page 9 of the Application Note.
Referring to the LIS3DH datasheet, output data rate (ODR) and low power enable (LPen)
bits ofCTRL_REG1
and HR bits ofCTRL_REG4
are used to select the operating modes
(power-down mode, normal mode and low power mode) and output data rate (Table 2 and
Table 3).Table 2. Operating mode selection
Operating mode CTRL_REG1
[3] (LPen bit)CTRL_REG4
[3] (HR bit)BW [Hz] Turn-on time [ms] Low power mode 1 0 ODR/2 1 Normal mode 0 1 ODR/9 7/ODR Table 3. Data rate configuration
ODR3 ODR2 ODR1 ODR0 Power mode selection 0 0 0 0 Power-down mode 0 0 0 1 Normal/low power mode (1 Hz) 0 0 1 0 Normal/low power mode (10 Hz) 0 0 1 1 Normal/low power mode (25 Hz) 0 1 0 0 Normal/low power mode (50 Hz) 0 1 0 1 Normal/low power mode (100 Hz) 0 1 1 0 Normal/low power mode (200 Hz) 0 1 1 1 Normal/low power mode (400 Hz) 1 0 0 0 Low power mode (1.5 kHz) 1 0 0 1 Normal (1.250 kHz)/low power mode (5 kHz)
I believe these correlate to the these data rate options in Adafruit_LIS3DH.h.
References
- LIS3DH datasheet
- Setting default rate (400hz), normal mode, and high-res in Adafruit_LIS3DH.cpp
- Implementation of
setDataRate()
from adafruit_lis3dh.
@ladyada Is this repo still being maintained? There are several open PRs and Issues, like this one, which have not had responses.
from adafruit_lis3dh.
HR bit in LIS3DH_REG_CTRL5
HR bit is in LIS3DH_REG_CTRL4
from adafruit_lis3dh.
Related Issues (20)
- "Fluctuating" accel. outputs
- Tested Works STM32L1 HOT 1
- Please expose readregister8 and writeregister8 HOT 1
- Setting resolution & BDU on incorrect register? HOT 2
- Can you add an example for lis3dh temperature measurement? HOT 1
- Library prevents usage of 1.25kHz Normal Power Mode HOT 1
- Doxygen index page is blank HOT 1
- FIFO mode is not available HOT 3
- Interrupt pin always HIGH after version 1.1.3 for Attinyxy4 HOT 2
- Wrong divider values HOT 1
- Acceleration values changing in step size of atleast 16 HOT 1
- Data rate not be able to change HOT 1
- Docs not updating HOT 3
- How to read and print out the value of the register HOT 1
- Accelerometer readings fluctuation when standing still, spindle vibration measurement HOT 1
- Accelerometer readings without using FIFO HOT 1
- How to select between multiple HW SPI interfaces HOT 1
- Scaled readings in 16G range to high HOT 2
- Library doesn't compile with ATTiny85 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_lis3dh.