This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HDC2022: Interrupt details

Part Number: HDC2022
Other Parts Discussed in Thread: HDC2021, HDC2080

We are using HDC2022 in our product .To set threshold we are using hex values as thresholds. But when that is converted to temperature as given in datasheet , we are facing some error .
I have mentioned the issue in detail in the file attached.Please help us solve this issue.

We are need to exact temperature like 26,27,28..but now we could only set thresholds as 26.58 or 26.3 or 27.88.We could not set exactly the whole number.So pleade assist us on it.

What are the exact difference between HDC2022, HDC2021 and HDC2080.

  • Hi Sowmiya,

    Unfortunately due to devices resolution and accuracy, you will not be able to achieve a whole number. However, if you use the formula attached to this response you will be able to get a value very close to temperature threshold you want.

    The table attached shows you how close the actual hex code is from the original temperature.

    With respect to the difference between the two devices, the HDC2021 has a removable polyimide tape that protects the device during assembly whereas the HDC2022 has a PTFE filter that protects the device against dust and water. The HDC2022 is also IP67 rated.

    Best Regards,
    Pavani Tenneti

     


  • Hi Pavani Tenneti,

    Thanks for your response.
    We have temperature register's high limit and low limit setting for only 8bit, but you have said the hex values in 16bit. We have tested from datasheet that we can read from two 8bit  temperature register & combine them to get 16bit value. From that 16 bit using formula given in datasheet we get real temperature. So we can't set temperature in 16bits, please guide us in proper ways to solve our queries.
    Let me know if I dint convey clearly my requirement.

    Regards,

    Sowmiya
  • Sowmiya - 

    In this case, you can use the threshold register setting and set it up, as you have noticed, for something close  but not precisely to the exact temperature yet, and this is because that is an 8 bit register. So then how fast do you need to know your system is at a given temperature? 

    I tested this out on my side and wondered if this is something close to what you are looking for. 

    overall, from power up - the interrupt goes low after it (the part) drops below threshold temp

    Here below in this zoom in on configuration of the part - you can see I set up the part up for high temp threshold of 25C (0x64 to register 0x0B), high temp threshold interrupt enabled (0x40 to 0x07) and configured for 5Hz readings (0x77 to 0x0E). Note the IRQ line lowers when set by writing 0x0E.

      

    Then I applied slight heat to PCB to raise temp of the sensor towards 25C. This took about 2 seconds. (above in the first image, this is the dip in the IRQ line)

    Then when IRQ fires, the MCU takes about 15microseconds to respond, service the IRQ and read out the temperature. (in my testing, the IRQ fired within 0.2 degrees of the "desired" temp - is that good enough for you?

    If not, then you can continue to read the part until it got to exactly where you wanted and take another decision in software. Here I had it setup for 5Hz readings, so the part got to 25C within 500mSec of that first interrupt from the read, so if that is fast enough you could do similar.