Showing results for 
Search instead for 
Did you mean: 

High power consumption of the MLC in the LSM6DSOX (~500µA)

Associate II

At the stage of creating a proof concept, a LSM6DSOX sensor for a wearable device was chosen. In the datasheet, its power consumption looks fine (~15µA per MLC tree), but in practice there are problems and I want to understand what the problem is.

I used this sensor with the ST(lsm6dsox_gym_activity_recognition_left) MLC example for check power consumption because the device we are designing needs to detect activity. Consumption in this case is about 500 µA(not 15, right?). The description for the example says that it uses ultra low power mode for the accelerometer and the gyroscope is turned off (STMems_Machine_Learning_Core-master\application_examples\lsm6dsox\Gym activity recognition\

The accelerometer is configured with ±8 *g* full scale, 26 Hz output data rate, ultra-low power mode.

Four features have been used (mean, peak-to-peak, min, max), and one low-pass filter (IIR1) has been applied to the accelerometer input data.

The MLC runs at 26 Hz, computing features on windows of 78 samples (corresponding to 3 seconds).One decision tree with around 30 nodes has been configured to detect the different classes. A meta-classifier has not been used. 

I have expected a consumption of about 20..30.. ok 40 µA but 500!... below is part of my code, please let me know if I am doing everything right?

/* Check device ID */
uint8_t whoamI, rst;
/* Check device ID */
 lsm6dsox_device_id_get(&dev_ctx, &whoamI);
  if (whoamI != LSM6DSOX_ID)
    while (1); //TODO: Error state here!
  /* Restore default configuration */
  lsm6dsox_reset_set(&dev_ctx, PROPERTY_ENABLE);
  do {
    lsm6dsox_reset_get(&dev_ctx, &rst);
  } while (rst);
  /* Start Machine Learning Core configuration */
  for (int i = 0; i < (sizeof(lsm6dsox_gym_activity_recognition_left) /
                    sizeof(ucf_line_t) ); i++ ) {
    lsm6dsox_write_reg(&dev_ctx, lsm6dsox_gym_activity_recognition_left[i].address,
                       (uint8_t *)&lsm6dsox_gym_activity_recognition_left[i].data, 1);
  /* End Machine Learning Core configuration */
  /* At this point the device is ready to run but if you need you can also
   * interact with the device but taking in account the MLC configuration.
   * For more information about Machine Learning Core tool please refer
   * to AN5259 "LSM6DSOX: Machine Learning Core".
  /* Turn off embedded features */
  lsm6dsox_embedded_sens_get(&dev_ctx, &emb_sens);
  /* Turn off Sensors */
  lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_OFF);
  lsm6dsox_gy_data_rate_set(&dev_ctx, LSM6DSOX_GY_ODR_OFF);
  /* Disable I3C interface */
  lsm6dsox_i3c_disable_set(&dev_ctx, LSM6DSOX_I3C_DISABLE);
  /* Enable Block Data Update */
  lsm6dsox_block_data_update_set(&dev_ctx, PROPERTY_DISABLE);//PROPERTY_ENABLE
  /* Set full scale */
  lsm6dsox_xl_full_scale_set(&dev_ctx, LSM6DSOX_8g);
  lsm6dsox_gy_full_scale_set(&dev_ctx, LSM6DSOX_2000dps);
  /* Route signals on interrupt pin 1 */
  lsm6dsox_pin_int1_route_get(&dev_ctx, &int1_route);
  int1_route.mlc1 = PROPERTY_ENABLE;
  lsm6dsox_pin_int1_route_set(&dev_ctx, int1_route);
  /* Configure interrupt pin mode notification */
  /* Enable embedded features */
  lsm6dsox_embedded_sens_set(&dev_ctx, &emb_sens);
  /* Set Output Data Rate.
   * Selected data rate have to be equal or greater with respect
   * with MLC data rate.
  lsm6dsox_xl_data_rate_set(&dev_ctx, LSM6DSOX_XL_ODR_26Hz);
  lsm6dsox_gy_data_rate_set(&dev_ctx, LSM6DSOX_GY_ODR_OFF);


ST Employee

Hi @YRakh.1​ ,

I'm not sure it is a software/configuration-related issue.

Can you please share the schematic of your application board?