cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Wrist Tilt Direction Detection on LSM6DS3TR-C

Gautam_21
Visitor

Issue with Wrist Tilt Direction Detection on LSM6DS3TR-C

Hardware & Software Details:
- Sensor: LSM6DS3TR-C
- Platform: Arduino
- Interface: I2C

Problem Statement:
We are working on detecting wrist tilt using the LSM6DS3TR-C sensor. While the tilt detection interrupt (`wrist_tilt_ia`) is triggering correctly, the tilt direction values (`wrist_tilt_ia.xpos`, `wrist_tilt_ia.xneg`, etc.) always remain zero, regardless of the actual movement.

Configuration Steps Taken:

Sensor Initialization:
Verified sensor presence using lsm6ds3tr_c_device_id_get().
Performed a software reset using lsm6ds3tr_c_reset_set().
Enabled Block Data Update (BDU) to ensure data consistency.

Sensor Configuration:
Set accelerometer output data rate to 26Hz (lsm6ds3tr_c_xl_data_rate_set()).
Set gyroscope output data rate to 26Hz (lsm6ds3tr_c_gy_data_rate_set()).
Configured accelerometer full scale to ±2g and gyroscope to ±2000 dps.

Wrist Tilt Detection Setup:
Enabled wrist tilt detection (lsm6ds3tr_c_wrist_tilt_sens_set()).
Configured tilt latency to 80 ms (lsm6ds3tr_c_tilt_latency_set()).
Configured tilt threshold to 22 (lsm6ds3tr_c_tilt_threshold_set()).
Enabled INT2 interrupt for wrist tilt (lsm6ds3tr_c_pin_int2_route_set()).
Configured tilt axis masking to detect tilts in X+ and X- directions (lsm6ds3tr_c_tilt_src_set()).

Tilt Detection Check:
Continuously reading lsm6ds3tr_c_all_sources_get() to check for tilt events.
wrist_tilt_ia interrupt is detected, but all axis direction values remain zero.

Even after configuring the `lsm6ds3tr_c_a_wrist_tilt_mask_t` register to enable detection on specific axes (X+, X-,Y+,Y-), the tilt direction does not update accordingly. We have verified that the sensor is properly initialized, and the interrupt fires, but we cannot obtain the tilt direction data.


Code: The code is added to this.

Expected Behavior:
- When tilting in a specific direction (e.g., X+), the corresponding register bit should indicate the movement.

Observed Behavior:
- The tilt interrupt (`wrist_tilt_ia`) triggers correctly.
- The tilt direction values (`wrist_tilt_ia.xpos`, `wrist_tilt_ia.xneg`, etc.) remain zero for all directions.

Output of the code provided:

Screenshot 2025-02-24 112515.png

page 55, 56 Configuration steps  for Absolute Wrist Tilt 

Screenshot 2025-02-24 121811.pngScreenshot 2025-02-24 121759.png

Page 17 from datasheet  to configure AWT 

Screenshot 2025-02-24 115620.png

 

Steps Taken:
1. Verified sensor detection (`whoami` check passes).
2. Enabled `wrist_tilt_sens` and configured `lsm6ds3tr_c_a_wrist_tilt_mask_t`.
3. Checked register values after tilt events, but they always remain zero.
4. Tried different threshold and latency values for tilt detection.

Question:
- Is there any additional register or configuration required to enable proper axis direction detection for wrist tilt?
- Has anyone successfully retrieved tilt direction data using this sensor, and if so, what modifications were necessary?


Any insights or suggestions would be greatly appreciated!

0 REPLIES 0