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.

HDC2080: Temperature drops suddenly and read invalid temperature

Part Number: HDC2080

After boots-up, the HDC2080 value seems to be working fine i.e. value between 27 to 32 degrees C.

But after some time (approx after an hour), the temperature drops to 22 degrees C.Withing 10 seconds, the temperature reading drops to 22C from 32C.

We have few sensors running on trial(testing) units but only one board gives this type of value, i.e. common software is used across all the boards.

I2C protocol analyzer screenshot for your reference.

  • Hi Josh,

    I have corrected the timing/delay in the application code. But still, issue persists maybe for a different reason.

    Could you help me to locate the issue?

    Temperature drop issue #1:

    The results are fine till the value of temp MSB 0x01 [timestamp 101.17.898]

    Still, I am seeing a sudden drop in temperature. Any comments?

    Measurement Configuration issue #2:

     Do you know why the value of the reg Measurement Configuration reading 0xF6? 

  • Dear Ganesh - 

    Please see this forum post: https://e2e.ti.com/support/sensors/f/sensors-forum/879641/hdc2080-taking-more-time-for-data-ready . Please then scroll down to where I responded and you will see a firmware workaround by which you can clear the 0xF6 in register 0x0F issue. 

  • Hi Josh,

    I am still not clear why the temperature dropped down rapidly before even the config register gets corrupted(0xFE).

    Did you review the issue#1 snapshot, temperature seems to be invalid even though the master sends 0x01 to 0x0F?

  • Ganesh - 

    To me it looks like you continue to send 0x01 to 0x0F and then increment pointer and read register value - this is not the way

    you should send 0x01 to 0x0F, then set pointer to 0x00, then read out all four bytes (0x00 through 0x03) at one time - this is the correct way to use the part. 

  • Josh,

    Application reads both 0x01 and 0x02(after the measurement trigger )and then again it triggers the measurement to read the RH 0x02 and 0x03. Do you think the second trigger causes the issue with temperature drop?

    Currently, I am not focusing the value of RH because it does not have delay b/w trigger and read.

  • Ganesh -

    OK - I see now what you mean - actually you wait 2.413mSec between starting conversion and setting pointer to 0x00. 

    I previously misread the column for duration as time between commands, but the column prior to that has the time stamps, so for example sending address byte, and writing 0x0F with 0x01 at ~100kHz does in fact take about 300uSec (I measured 293uSec, your time was about about 337uSec, so you must be running a little slower than 100kHz on the I2C) -  

    Anyway, that should be fine, but it sure looks like to me that you are clocking out two bytes, which in this case would first be registers 0x00 and 0x01, where you get 0x2A76 (which is 0x762A or 30250d or 35.54°C, then you set pointer to 0x01 and clock out two bytes, so you get 0x01 again and 0x02, which is 0x76E7 and the MSByte of temp and LSB of %RH value, which is meaningless to you. Then you repeat that with 0x02 and 0x03. Plus in between you are sending 0x0F blank? I think you should just read out all the bytes at once, because the way you are doing it, it wastes clock cycles. 

    Then to your point, the next time around (~20 seconds later) when you get back to reading the 0x00 and 0x01 registers correctly, the temp was 0x7D66 ==> 0x667D, which equates to 25.436°C. I am not sure what your ambient conditions were - was this in a chamber or controlled environment - or just on desktop?

  • Josh,

    Testing it on the desktop.

    Also, I have modified the flow to read both the temperature and RH in a single shot( with one trigger) and kept it for overnight testing.

  • Ganesh - 

    great - let us know the results. 

  • Josh,

    It works!!

    After 8 hours of testing, I was not able to reproduce this issue.

  • Ganesh - 

    Fantastic!

  • Hi Josh,

    This issue is getting reproduced in my setup again.

    Do you have any recommendations?

    Is there any initialization I need to do for this part?

    The application does the following init(HDC2080_open) on boot-up and then goes in a loop: trigger + delay + read TRH


    HDC2080_Handle HDC2080_open(unsigned int HDC2080Index, I2C_TypeDef * i2cHandle,
                                HDC2080_Params *params)
    {
        HDC2080_Handle handle = &HDC2080_config[HDC2080Index];
        HDC2080_Object *obj = (HDC2080_Object*)(HDC2080_config[HDC2080Index].object);
       // HDC2080_HWAttrs *hw = (HDC2080_HWAttrs*)(HDC2080_config[HDC2080Index].hwAttrs);
        uint16_t data;

        //if (obj->i2cHandle != NULL) {
        //    return (NULL);
        //}

        obj->i2cHandle = i2cHandle;

        if (params == NULL) {
            params = (HDC2080_Params *) &HDC2080_defaultParams;
        }

        /* Perform a Hardware HDC2080 Reset */
        if (HDC2080_writeRegister(handle, CMD_SW_RST, HDC2080_RST_DRDY_INT_CONF_REG)) {

            //usleep(WAIT_POST_RESET * 1000U);
            //for (volatile int i = 0; i < WAIT_POST_RESET * 1000U; i++) {
              // Do nothing
            //}
            //UDELAY_Delay(WAIT_POST_RESET * 1000U);        //DES test to allow I2C to settle???
    #ifndef LX_MICRO_SECONDS_DELAY_NOT_SUPPORTED
            UDELAY_Delay(WAIT_POST_RESET * 1000U);
    #else

            sl_sleeptimer_delay_millisecond(WAIT_POST_RESET);
    #endif


            data = (uint8_t)params->measurementMode | (uint8_t)params->tempResolution |
                    (uint8_t)params->humResolution;

            if (HDC2080_writeRegister(handle, data, HDC2080_MEAS_CONFIG_REG)) {

                data = (uint8_t)params->outputDataRate | (uint8_t)params->interruptEn |
                        (uint8_t)params->interruptMode | (uint8_t) params->interruptPinPolarity;

                if(HDC2080_writeRegister(handle, data, HDC2080_RST_DRDY_INT_CONF_REG)){

                    data = (uint8_t) ~(params->interruptMask);

                    if(HDC2080_writeRegister(handle, data, HDC2080_INT_MASK_REG)){

                        //Reset Interrupt Masks
                        if(HDC2080_readRegister(handle, (uint16_t *) &data, HDC2080_DRDY_INT_STATUS_REG)){

                            if (params->callback != NULL) {
                                obj->callback = params->callback;
                                //GPIO_setCallback(hw->gpioIndex, obj->callback);
                                //GPIO_enableInt(hw->gpioIndex);

                            }
                        }
                    }
                }
            }
            return (handle);
        }

        obj->i2cHandle = NULL;

        return (NULL);
    }

  • Dear Ganesh - 

    there is no real reason to issue a software reset on the device after power up - I know some of the competitive devices require it, but the HDC2 does not. If you implemented the firmware workaround for the register issue previously - every time you do a POR or software reset, you need to re-run that. 

    Also,  I would still recommend to read all the measurement value registers at once, it will save you time. 

    like this: 

  • Hi Josh,

    Issue persists with 4 bytes read

    ...

  • Ganesh - 

    the only thing i can see in your transactions that looks odd at this point is the 0x00 write to 0x0F in between your transactions. 

    I do see that the temp difference is about 10 degrees different, as you say - since its on desktop, you may want to put this in a chamber or check if you laptop fan is blowing on it or a cup of tea or coffee was placed nearby during the testing (this is common on my desk) - probably best to isolate the unit and eliminate outside influences.  

  • Josh,

    That is not written to 0x0F, I am reading to confirm that this register is not corrupted before doing the trigger operation.

  • ok - thanks - I see that now - you should get a logic analyzer :) and try to find a chamber.