2021-07-06 01:45 AM
Solved! Go to Solution.
2021-07-07 08:21 AM
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:
The 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
2021-07-07 08:21 AM
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:
The 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
2021-07-07 10:59 PM
Thanks Eleon for your reply ... This information is quite useful
2023-07-28 02:23 AM
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.
2023-07-28 02:53 AM
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
2023-07-28 04:17 AM
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.
2023-07-28 06:56 AM
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)
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ò