cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract rawdata of sensortile.box . I have received the csV file.. How to understand the data value Date HostTimestamp (ms) NodeName NodeTimestamp RawData Humidity (%) 50:13.1 836 TILEBOX @541833 3131 7502 62.9 How to decode the rawdata

Snara.21
Senior
 
1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Snara.2​ ,

you can find an explanation in this presentation, p.133, for the Humidity sensor.

In particular, the csv datalog formatted in excel should look like the following:

0693W00000Bd4iQQAR.pngThe fist column is the date, and you should format it as a date in excel; then the host time in millisecond (this value can be used as time axis in an x-y graph), is the time from which the device is operating; then the node name and the node time stamp; and finally you have the relevant data, i.e. the humidity raw data in decimal (7502 dec = 1D4E hex) and the physical percentage value 62.9%.

The last value is calculated according to these technical note indications.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

View solution in original post

6 REPLIES 6
Eleon BORLINI
ST Employee

Hi @Snara.2​ ,

you can find an explanation in this presentation, p.133, for the Humidity sensor.

In particular, the csv datalog formatted in excel should look like the following:

0693W00000Bd4iQQAR.pngThe fist column is the date, and you should format it as a date in excel; then the host time in millisecond (this value can be used as time axis in an x-y graph), is the time from which the device is operating; then the node name and the node time stamp; and finally you have the relevant data, i.e. the humidity raw data in decimal (7502 dec = 1D4E hex) and the physical percentage value 62.9%.

The last value is calculated according to these technical note indications.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

Snara.21
Senior

Thanks Eleon for your reply ... This information is quite useful

Hello, how are you? I was looking at how to interpret the RawData in this case and seeing the technical note indications I am not clear.

At the same time, I'm seeing how to interpret the RawData in the accelerometer, since I don't understand it. At first I tried with the microphone and it was very simple, since I only had to convert from HEX to DEC and I got the MIC_LEVEL in dB.

Could you clarify the case of humidity, and more importantly the accelerometer, please.

Best regards.

Hi @SAbba.1 ,

for the conversion between LSB (raw data) and physical data for accelerometers, you can refer to the github repository of the C drivers. For example, for the LIS2DW12, you can refer to the file lis2dw12_reg.c:


float_t lis2dw12_from_fs2_to_mg(int16_t lsb)
{
return ((float_t)lsb) * 0.061f;
}

-Eleon

I'm going around but I never get the corresponding result, would it be too much to ask for an example? I can't understand the multiplications (* 0.061f; * 0.122f) I've tried with 6500280028FC and I can't get what I should get on each axis.

Thank you very much.

Hi @SAbba.1 ,
the function Eleon pointed out is the one that converts LSB in mg with Full Scale 2g, but to better understand the conversion, you should refer to the corresponding table in the datasheet (here is table 3 for the LIS2DW12)

niccol_0-1690551978447.png

as you can see the sensitivity is expressed in [mg/digit], so if you multiply by the LSB [digit measurment unit] you have mg as output.
depending on the FS and the mode you are using, you should use the right sensitivity.

for the accelerometer, a good start is to apply these conversions and look at the data. in mg, when the board is flat on a surface, you should have around 1000 mg on one axis and around 0 on the others, then you can turn the board upside down, and the axis at 1000 will go at -1000. that is the check to be sure you are reading the data the right way.

I made the example for the accelerometer, but it is applicable also to the humidity.

Let me know if this solves, and feel free to start another topic if you need more info =)


Niccolò