cancel
Showing results for 
Search instead for 
Did you mean: 

Info about sensortile capabilities

ADe C.1
Associate II

Hi,

I need to get accelerometer data with a frequency of 100hz and I'm looking for the sensortiles STEVAL-STLKT01V1

Looking at the documentantion is not clear to me what is the data sample rate they have by default.

Here in the community someone mentioned a sampling rate about 50hz, but if you want to change it you have to modify the firmware, is that correct?

This imply working on low level C code and compiler?

As an alternative I'm evaluating also the STEVAL-STWINKT1 , is pricey but If I'm correct is a sensortile specific for iot industry with a wideband vibrational sensor and wideband accelerometer.

Still I can't find in the docs what is the default sample rate. Can someone clarify this?

Since I'm not a C programmer I searching for a kit that can at least deliver 100hz sampling rate by default without going into coding, compiling, ect (at least for now)

Thanks,

Andrea

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi Andrea,

>> I need to get accelerometer data with a frequency of 100hz and I'm looking for the sensortiles STEVAL-STLKT01V1

If you consider STSW-STLKT01, which is the package directly related to the STLKT01V1, you can browse the package folders to find what you are searching for. I describe below how to do it, but -for example- for the LSM6DSM the default ODR for this package is 104Hz, both accelerometer and gyroscope, while it is 100Hz for the LSM303AGR accelerometer.

However, since you prefer not to go deep into programming, you should be able to change the ODR using the STBLE Sensor smartphone app, in the sensors' configuration section (not sure you can, however... I'm sure it is possible with the SensorTile.box, but not sure with the SensorTile).

>> As an alternative I'm evaluating also the STEVAL-STWINKT1

Of course, the STWINKT is a more recent and more complete solution compared with the SensorTile kit. It mounts more recent devices and it is likely to be supported for longer time in the future.

Same way as for the STLKT01V1, you can browse to \Drivers\BSP\Components and have a look to the sensor configuration. For example, for the IIS2DH device, in the iis2dh_reg.c file, IIS2DH deinit function, you have the default ODR:

/* Reset output data rate. */
  pObj->acc_odr = IIS2DH_ODR_1Hz;

You can change it referring to the ODR list described in the iis2dh_reg.h file.

typedef enum {
  IIS2DH_POWER_DOWN                      = 0x00,
  IIS2DH_ODR_1Hz                         = 0x01,
  IIS2DH_ODR_10Hz                        = 0x02,
  IIS2DH_ODR_25Hz                        = 0x03,
  IIS2DH_ODR_50Hz                        = 0x04,
  IIS2DH_ODR_100Hz                       = 0x05,
  IIS2DH_ODR_200Hz                       = 0x06,
  IIS2DH_ODR_400Hz                       = 0x07,
  IIS2DH_ODR_1kHz620_LP                  = 0x08,
  IIS2DH_ODR_5kHz376_LP_1kHz344_NM_HP    = 0x09,
} iis2dh_odr_t;

-Eleon

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi Andrea,

>> I need to get accelerometer data with a frequency of 100hz and I'm looking for the sensortiles STEVAL-STLKT01V1

If you consider STSW-STLKT01, which is the package directly related to the STLKT01V1, you can browse the package folders to find what you are searching for. I describe below how to do it, but -for example- for the LSM6DSM the default ODR for this package is 104Hz, both accelerometer and gyroscope, while it is 100Hz for the LSM303AGR accelerometer.

However, since you prefer not to go deep into programming, you should be able to change the ODR using the STBLE Sensor smartphone app, in the sensors' configuration section (not sure you can, however... I'm sure it is possible with the SensorTile.box, but not sure with the SensorTile).

>> As an alternative I'm evaluating also the STEVAL-STWINKT1

Of course, the STWINKT is a more recent and more complete solution compared with the SensorTile kit. It mounts more recent devices and it is likely to be supported for longer time in the future.

Same way as for the STLKT01V1, you can browse to \Drivers\BSP\Components and have a look to the sensor configuration. For example, for the IIS2DH device, in the iis2dh_reg.c file, IIS2DH deinit function, you have the default ODR:

/* Reset output data rate. */
  pObj->acc_odr = IIS2DH_ODR_1Hz;

You can change it referring to the ODR list described in the iis2dh_reg.h file.

typedef enum {
  IIS2DH_POWER_DOWN                      = 0x00,
  IIS2DH_ODR_1Hz                         = 0x01,
  IIS2DH_ODR_10Hz                        = 0x02,
  IIS2DH_ODR_25Hz                        = 0x03,
  IIS2DH_ODR_50Hz                        = 0x04,
  IIS2DH_ODR_100Hz                       = 0x05,
  IIS2DH_ODR_200Hz                       = 0x06,
  IIS2DH_ODR_400Hz                       = 0x07,
  IIS2DH_ODR_1kHz620_LP                  = 0x08,
  IIS2DH_ODR_5kHz376_LP_1kHz344_NM_HP    = 0x09,
} iis2dh_odr_t;

-Eleon

ADe C.1
Associate II

Hi Eleon,

Thanks for the detailed answer, I gave a look at the documentation and the android app. Having a configurable sample application ready to deploy on the sensortile.box is ideal for start to experiment without spending to much time on the code.

As you pointed for the STLKT01V1 I located the data rate code in the  LSM303AGR driver, it's already set to 100hz which is fine

 /* Select default output data rate. */

 pObj->acc_odr = LSM303AGR_XL_ODR_100Hz;

But this is just the sensor ODR, I've forgot to mention that I need to stream the data via bluetooth. This involve, I suppose, getting in sync with the ble advertising and that frequency is probably too high...could be possible to have better results using GATT server notifications?

Thanks,

Andrea

ADe C.1
Associate II

After some searches I've decided that the sensortile.box could be the best choice for my actual needs.

I downloaded the android app ST BLE Sensor and had a look at the sample applications...it's great be able  change the ODR freq but this is limited to the sensor data frequency and logging?

The only doubt I still have is if by default it output 100hz data throught bluetooth. This is because I need to get the acceleration data stream almost in realtime.

I gave a look at the user manual, a configuration like the Pedometer app could be ideal (ODR@52hz) but is not clear to me if it stream the data via bluetooth or just save a log.

Hi @ADe C.1​ ,

I agree with you that the SensorTile.box is more easier to program via Bluetooth.

Note that data are sent via Bluetooth at the defined ODR, same way as it would be via USB serial communication.

You can however go deep in the Bluetooth transmission by considering the ST BLE Sensor app source code on Github.

-Eleon

Thanks for the fast reply, I'll order a sensortile.box and start to work with it asap!