We are running modified Asset Tracker app (nRF SDK 2.3.0) in Thingy91, basically just with added color (light) and ADXL362 sensors readings, and using BSEC BME680 driver instead of zephyr's. The app runs in active mode. Now we would also like to utilize ADXL372 for impact detection and I just cannot get it to work.
When I configure ADXL372 for measurement mode (CONFIG_ADXL372_MEASUREMENT_MODE), I get some readings, kind of weird values as discussed in other tickets (eg. Thingy91: adxl372 accel_polling example not giving proper data. ).
But we are really interested in peak detection, no matter what I do with the unit, impact_trigger_handler is not invoked and therefore no SENSOR_EVT_MOVEMENT_IMPACT_DETECTED is fired.
What I did:
2. added ADXL372 to the overlay file:
/ { aliases { temp-sensor = &bme680; humidity-sensor = &bme680; pressure-sensor = &bme680; accelerometer = &adxl362; impact-sensor = &adxl372; light-sensor = &bh1749; }; }; &i2c2 { bme680: bme680@76 {}; bh1749: bh1749@38 {}; }; &spi3 { adxl362: adxl362@0 { autosleep; }; adxl372: adxl372@1 {}; };
2. included the following line, per https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/asset_tracker_v2/doc/sensor_module.html#motion-impact-detection
CONFIG_EXTERNAL_SENSORS_IMPACT_DETECTION=y
This results in this corresponding part of the .config:
CONFIG_ADXL372=y CONFIG_ADXL372_PEAK_DETECT_MODE=y # CONFIG_ADXL372_MEASUREMENT_MODE is not set CONFIG_ADXL372_ACTIVITY_THRESHOLD=500 CONFIG_ADXL372_INACTIVITY_THRESHOLD=400 CONFIG_ADXL372_ACTIVITY_TIME=1 CONFIG_ADXL372_INACTIVITY_TIME=2 CONFIG_ADXL372_REFERENCED_ACTIVITY_DETECTION_MODE=y # CONFIG_ADXL372_TRIGGER_NONE is not set CONFIG_ADXL372_TRIGGER_GLOBAL_THREAD=y # CONFIG_ADXL372_TRIGGER_OWN_THREAD is not set CONFIG_ADXL372_TRIGGER=y
I've tried the unit with Asset Tracker in passive mode, but no luck either. I have verified that the sensor is ready and sensor_trigger_set call in ext_sensors.c is successful. I've also tried lower thresholds (from 500 & 400 to 50 & 40), but it also did not help.
Is there anything I'm doing wrong? How can I get the impact detection in Asset Tracker to work?
Thank you very much in advance.
Kind regards,
Ales Pour