This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADXL362 Calibration

Hello,

We are planning to use the accelerometer in the Thingy91, we have some inconsistent results when configuring/reconfiguring, we have 2 questions:

 - When we, for example, want to change the thresholds while running, we write the values in the corresponding registers, is there anything else to do so the accel starts using the new values? Does the accel need to be reset somehow?

 - See attached a typical sequence of measurments when running the adxl362 sample included with zephyr. The z axis is measuring earths gravitation, but why the other two axis are consistently measuring values around -1.5 m/s^2? This is of course with the device motionless. Does the accel need to be calibrated somehow?

Thank you.

Xavier

Parents
  •  - When we, for example, want to change the thresholds while running, we write the values in the corresponding registers, is there anything else to do so the accel starts using the new values? Does the accel need to be reset somehow?

    The thresholds are configured in prj_thingy91_nrf9160ns.conf using:

    CONFIG_ADXL362_ACTIVITY_THRESHOLD=200
    CONFIG_ADXL362_INACTIVITY_THRESHOLD=200
    In order to configure these thresholds during runtime, you will need to use the Sensor API to send commands to the ADXL362. Have a look at the ADXL362 drivers, and especially adxl362_attr_set().
    Found under: zephyr\drivers\sensor\adxl362\
    You can also have a look at our Asset_Tracker sample (nrf\applications\asset_tracker\src\motion\motion.c) to see how they communicate with the sensor. 
    The device drivers are lacking some documentation, but is work in progress. Let me know if anything is unclear. 
    Kind regards,
    Øyvind
  • We have been looking at the codebases that you mention and as we understand it there is a hardcoded parameter in the driver. In particular when configuring the thresholds you can set the thresholds themselves but also what the documentation calls "time" which is the amount of events above the threshold that need to be measured for it to trigger. That value is hardocded in the driver to 1. We have been testing to change it with various degrees of success, we don't seem to be able to get consistent results. Is there a reason why that particular parameter is hardcoded or it's just as you said a work in progress?

Reply
  • We have been looking at the codebases that you mention and as we understand it there is a hardcoded parameter in the driver. In particular when configuring the thresholds you can set the thresholds themselves but also what the documentation calls "time" which is the amount of events above the threshold that need to be measured for it to trigger. That value is hardocded in the driver to 1. We have been testing to change it with various degrees of success, we don't seem to be able to get consistent results. Is there a reason why that particular parameter is hardcoded or it's just as you said a work in progress?

Children
Related