cancel
Showing results for 
Search instead for 
Did you mean: 

HTS221 HUMIDITY DATA CLARIFICATION

unnati811
Associate II
Posted on September 12, 2016 at 09:05

I am using HTS221 for humidity and temperature measurement.

On reading the registers for temperature and converting as per the equation suggested, i get the correct temperature.

but on reading the registers for humidity and converting as per the equation suggested, humidity

obtained is not correct.

the register values read are as follows:

H0_T0_OUT = 9

H1_T0_OUT = -10540

H0_RH_X2 = 53

H1_RH_X2 = 132

when humidity is measured in a controlled environment with different known humidities, the HTS221 measured humidity varies +/- 5 % within the range 26.5 % to 66% humidity(which is calibrated range of sensor), but outside the range that is lower than 26.5% and higher than 66%  variation of 10 to 20% humidity is seen.

kindly help to get the correct humidity.

regards

unnati
2 REPLIES 2
ahslopes1
Associate
Posted on November 03, 2016 at 19:17

Hi,

I am using HTS221 for humidity and temperature measurement and LPS25HB to pressure measurement. Pressure and temperature readings are ok but humidity readings are not ok. 

The value from my regsiters after my initialization of HTS221 are:

HTS221 AV_CONFIG: 0x10 value is 0x3F

HTS221 CTRL_REG1: 0x20 value is 0x83

HTS221 CTRL_REG2: 0x21 value is 0x00

HTS221 CTRL_REG3: 0x22 value is 0x00

In Humidity registers I get the following values listed below:

H_T_out(s16)  = -9349 - > two complements: 

9349

H0_rH(s16)  = 27

H1_rH(s16) = 66

H0_T0_OUT(s16)  = 0

H1_T0_OUT(s16)  = -10442

 - > two complements: 

10442

With this values I applied the following formula :

tmp = ((uint32_t)(H_T_OUT - H0_T0_OUT))*((uint32_t)(H1_rH - H0_rH)*10);

humidity = tmp/(H1_T0_OUT - H0_T0_OUT);

humidity += H0_rH*10;

Using the signal the final value is:

humidity = -619 -> 61,9%

Someone could help me to get the correct humidity readings?

Regards

Legacy member
Not applicable
Posted on May 06, 2017 at 22:24

Hello, please have a look at my post here:

https://community.st.com/0D50X00009XkXwhSAF

 

I use a different casting and get the correct result.