cancel
Showing results for 
Search instead for 
Did you mean: 

In HTS221 sensor not getting correct Humidity data

jayesh1
Associate
Posted on September 22, 2015 at 08:14

I am using HTS221 , and I am taking value from 

HTS221 via I2C.

Here i was successful to get correct temperature data you can see in attach .txt file.

But for Humidity i am getting values but they are not as per environment.

Here i have made following settings in control register.

Read HTS221 AV_CONFIG: 0x10 value is 0x1B

Read HTS221 CTRL_REG1: 0x20 value is 0x80

Read HTS221 CTRL_REG2: 0x21 value is 0x01

Read HTS221 CTRL_REG3: 0x22 value is 0x00

In Humidity registers i get the following values listed below,

H_OUT(s16)  = -32768

H0_rH_x2(u8)  = 33

H1_rH_x2 (u8) = 72

H0_T0_OUT(s16)  = 10

H1_T0_OUT(s16)  = 12504

Now putting  above values in below linear interpolation formula,

hum_f (s16) = (H0_rH + (hum_out - hum0_t0_out) * (H1_rH - H0_rH) / (hum1_t0_out - hum0_t0_out));

I am getting 

hum_f = -70

 which is not correct , now as i increase humidity the value changes but is goes above 100 and keeps on increasing  which is not practical. Has any body configured this sensor and took data then plz help me out in this...

#hts221
5 REPLIES 5
Nickname3482_O
Associate II
Posted on October 02, 2015 at 19:16

Hello,

as specified in the datasheet, HTS221rh value needs to be quantified bytwo point

interpolation after whichthe result needs to be clipped to0 or 100as it gets outside

the range of physicallymeaningful values.

I'm providingin attachment more details on the procedure (check HTS221_Get_Measurement).

If you still have issues after that, it's possible thatthere is a calibration issuein the sensor,

in that case I also suggest testing with a different sensor and comparing results.

Regards,

Adalberto

________________

Attachments :

example.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz3K&d=%2Fa%2F0X0000000bJu%2Ffs8Iv.1fF_Kc_n2HpUk5YgaZoBlO2PZK1HkCp2XA6RA&asPdf=false
zahnd
Associate
Posted on February 11, 2016 at 08:40

Hello,

Are there know issues with the calibration? We do have wrong humidity values with lots of our sensors. I was already writing to your support but i still wait for the answer since more then one week. Can you please provide me some information. 

zahnd
Associate
Posted on February 11, 2016 at 09:56

Hi,

If you can assure me that your calibration is right, can you please provide me typical calibration data's so i can check if my data's are making sense.

Nickname3482_O
Associate II
Posted on February 11, 2016 at 15:48

Hello Raphael,

I'm providing register data in attachment as you requested.

If this does not help you to clarify you can feel free to send us calibration data from your

parts in order to doublecheck.

Regards,

Adalberto

________________

Attachments :

HTS221_REGS.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz0O&d=%2Fa%2F0X0000000bJx%2F21kbHB4NlIxQGwDNpWGt7VEGNUO17HTH4xVFXm2uzGg&asPdf=false
MMikh
Associate

Hi!

I have same behavior with this sensor: right temperature but wrong humidity.

Just wash it in ultrasonic cleaner to solve this!