Skip to main content
Visitor II
May 12, 2017
Question

HTS221 Humidity problem

  • May 12, 2017
  • 2 replies
  • 2011 views
Posted on May 12, 2017 at 12:04

Hello. I have a problem with humidity measurement. Despite the proper value of temperature, te humidity is always over 100%. I'm using the official ST software. I'm wondering if it is a hardware problem ?

The initialization is as following:

...

HTS221_Init_st cfg_struct;

cfg_struct.avg_h = HTS221_AVGH_4;

cfg_struct.avg_t = HTS221_AVGT_2;

cfg_struct.odr = HTS221_ODR_1HZ;

cfg_struct.bdu_status = HTS221_ENABLE;

cfg_struct.heater_status = HTS221_DISABLE;

cfg_struct.irq_level = HTS221_LOW_LVL;

cfg_struct.irq_output_type = HTS221_PUSHPULL;

cfg_struct.irq_enable = HTS221_DISABLE;

HTS221_Get_DeviceID(&deviceID);

HTS221_Set_InitConfig(&cfg_struct);

/* it is activation function in fact !!! */

HTS221_DeActivate();

while (true)

{

         HTS221_Get_Measurement(&humidity, &temperature);

         ... some delay and read data

}

#humid #hts221 #humidity #sensor
    This topic has been closed for replies.

    2 replies

    May 17, 2017
    Posted on May 17, 2017 at 11:05

    Hello,

    it is easier to help if you paste the device's register contents.

    We can quickly rule out a faulty device.

    David

    Visitor II
    May 17, 2017
    Posted on May 17, 2017 at 11:18

    If the following register contents will be sufficient ?

    AV_CONF (10h)

    CTRL_REG1 (20h)

    CTRL_REG2 (21h)

    CTRL_REG3 (22h)

    May 17, 2017
    Posted on May 17, 2017 at 11:21

    To be able to count the output, output values + calibration values are needed.

    Please paste the content of all the registers below:

    0690X000006071yQAA.png
    Visitor II
    May 17, 2017
    Posted on May 17, 2017 at 22:12

    I2C analyzer's log when writting 0x20 register:

    0690X00000603qJQAQ.jpg
    May 18, 2017
    Posted on May 18, 2017 at 09:58

    The configuration also seems to be OK, active mode, BDU and 1 Hz output data rate.

    Does the the H_OUT remain the same even after a few seconds and samples measured? Do you see the same behaviour with temperature measurement?

    Visitor II
    May 18, 2017
    Posted on May 18, 2017 at 10:10

    I will check it as soon as possible, but there is no problem with temperature measurement.